JP2004005060A - Control program retrieval device and its program - Google Patents

Control program retrieval device and its program Download PDF

Info

Publication number
JP2004005060A
JP2004005060A JP2002158143A JP2002158143A JP2004005060A JP 2004005060 A JP2004005060 A JP 2004005060A JP 2002158143 A JP2002158143 A JP 2002158143A JP 2002158143 A JP2002158143 A JP 2002158143A JP 2004005060 A JP2004005060 A JP 2004005060A
Authority
JP
Japan
Prior art keywords
variable
control program
condition
command
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002158143A
Other languages
Japanese (ja)
Other versions
JP3847665B2 (en
Inventor
Natsuo Okada
岡田 夏郎
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.)
Schneider Electric Japan Holdings Ltd
Original Assignee
Digital Electronics 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 Digital Electronics Corp filed Critical Digital Electronics Corp
Priority to JP2002158143A priority Critical patent/JP3847665B2/en
Publication of JP2004005060A publication Critical patent/JP2004005060A/en
Application granted granted Critical
Publication of JP3847665B2 publication Critical patent/JP3847665B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize a control program retrieval device capable of shortening the time required for retrieval of a desired command. <P>SOLUTION: A programmable indicator 12 has a device control part 33 for controlling a device 2a according to a control program capable of setting an operand by a variable, an HMI processing part 24 for displaying the state of the device 2a and accepting the operation to the device 2a, and a control-HMI processing part 41 for giving an instruction to the HMI processing part 25 to display a rudder monitor screen. The control-HMI processing part 41 retrives, in the designation of a condition having instruction words as the retrieval range, a command whose instruction word is matched to the condition, and retrives, in the designation of a condition having variables as the retrieval range, a command whose variable is matched to the condition. Accordingly, the trouble that one of the instruction word and the variable is retrived instead of the retrieval of the other can be solved, and the time required for retrieval can be shortened. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、所望の命令の検索に要する時間を短縮可能な制御プログラム検索装置、および、そのプログラムに関するものである。
【0002】
【従来の技術】
従来から、制御システムの制御装置として、プログラマブル・ロジック・コントローラ(PLC)が広く使用されている。当該PLCには、ラダーエディタなどの制御プログラムエディタによって作成された制御プログラムが予め格納され、PLCは、制御プログラムに基づいてデバイスを制御する。
【0003】
ここで、あるデバイスに異常が検出された場合であっても、当該デバイスの異常が原因ではなく、そのデバイスの制御に関連するデバイスの異常が原因であることがある。
【0004】
したがって、デバイスに異常が検出され、そのデバイスに異常がない場合には、異常の原因を特定するために、制御システムのユーザは、例えば、ラダーエディタやラダーモニタがインストールされたパーソナルコンピュータを上記PLCに接続するなどして、上記PLCの制御プログラムをラダーエディタやラダーモニタに表示させる。さらに、ユーザは、ラダーエディタやラダーモニタを操作して、制御プログラムのうち、異常の検出されたデバイスの制御に関連する箇所を検索し、異常の原因となったデバイスや制御プログラムの誤りを特定している。
【0005】
ここで、従来のラダーエディタやラダーモニタは、ユーザによって検索の条件が指定されると、文字列で表現された制御プログラム全体を検索して、条件に合った命令を検索している。
【0006】
【発明が解決しようとする課題】
しかしながら、上記制御プログラム全体の文字列には、命令を示す文字列だけではなく、制御プログラムの可読性を向上させるコメントなども含まれている。また、制御プログラムで使用可能な命令には、動作を示す命令語と動作の対象とを含む命令もあり、このような命令を示す文字列には、命令語名と、演算対象を示す文字列とが含まれている。
【0007】
したがって、所望の命令語名を含む命令を検索しようとして、コメントや変数名が検索条件に合った命令をも検索してしまう虞れがある。また、これとは逆に、所望の変数名を含む命令を検索しようとして、コメントや命令語名が検索条件に合った命令をも検索してしまう虞れもある。
【0008】
この場合は、不所望に検索された命令を含む検索結果から、所望の命令を見つけるために、例えば、検索された命令を順次表示させて所望の命令か否かを判断するなどの手間が必要になり、所望の命令を見つけるまでの時間が長くなりやすい。したがって、異常の原因の特定、および、異常からの復帰に要する時間も増大しがちである。
【0009】
本発明は、上記の問題点に鑑みてなされたものであり、その目的は、所望の命令の検索に要する時間を短縮可能な制御プログラム検索装置を実現することにある。
【0010】
【課題を解決するための手段】
請求項1の発明に係る制御プログラム検索装置は、上記課題を解決するために、制御プログラムを記憶する記憶手段と、当該制御プログラムに含まれる命令を検索するための条件の入力を受け付け、上記記憶手段の制御プログラムの中から当該条件に該当する命令を検索する検索手段とを有する制御プログラム検索装置において、以下の手段を講じたことを特徴としている。
【0011】
すなわち、上記制御プログラムは、命令の動作を示す命令語と、当該動作の対象を特定可能で、しかも、変数名により特定可能な変数との組み合わせからなる命令を含むことができる。また、上記検索手段は、検索範囲を命令語または変数に限定した条件の入力を受け付け可能であり、検索範囲が命令語に限定された命令語条件が入力された場合、上記記憶手段の制御プログラムから、命令語が命令語条件に合った命令を検索すると共に、検索対象が変数に限定された変数条件が入力された場合は、上記記憶手段の制御プログラムから、変数が変数条件に合った命令を検索する。
【0012】
上記構成では、検索範囲を命令語または変数に限定して検索できる。したがって、制御プログラム全体から、検索条件にあった文字列を検索する従来技術と異なって、所望の命令語を含む命令を検索する際、コメントや変数が検索条件に合った命令をも検索してしまうという不具合が発生せず、所望の命令語を含む命令のみを検索できる。同様に、所望の変数を含む命令を検索する際、コメントや命令語が検索条件に合った命令をも検索してしまうという不具合が発生せず、所望の変数を含む命令のみを検索できる。この結果、不所望に検索された命令を含む検索結果から所望の命令を見つける手間を削減でき、所望の命令の検索に要する時間を短縮できる。
【0013】
また、請求項2の発明に係る制御プログラム検索装置は、請求項1記載の発明の構成において、上記制御プログラムでは、変数名として、命令語名を含む文字列を使用可能であり、上記記憶手段には、制御プログラムに出現する変数の変数名が記憶された変数名領域と、制御プログラムに出現する命令語の命令語名が記憶された命令語名領域とが含まれていると共に、上記検索手段は、命令語条件として、命令語名が入力された場合、命令語名領域を検索し、変数条件として、変数条件が入力された場合、変数名領域を検索することを特徴としている。
【0014】
上記構成では、変数名として、命令語名を含む文字列を使用できるので、変数名として設定可能な文字列の数が増え、制御プログラム検索装置のユーザにとって読みやすい変数名を設定しやすくなる。また、この場合であっても、検索範囲に応じて、命令語名領域および変数名領域の一方を検索するので、何ら支障なく、命令語名または変数名が検索条件に合った命令を検索できる。この結果、可読性の向上と、所望の命令検索に要する時間短縮との双方を満足した制御プログラム検索装置を実現できる。
【0015】
なお、命令語条件として命令語名が入力された場合に、変数名領域ではなく命令語名領域を検索し、変数名条件として変数名が入力された場合に命令語領域ではなく変数名領域を検索するのであれば、例えば、命令が命令語と変数とを含んでいる場合、記憶手段が、当該命令を、命令語を示す属性またはフィールド(命令語領域)と変数を示す属性またはフィールド(変数名領域)とに分けて記憶し、検索手段が、検索範囲に応じて、命令語の属性またはフィールドと、変数の属性またはフィールドとの一方を検索してもよい。
【0016】
また、各命令語および変数に対して、命令語および変数全体で一意な識別子を割り当て、記憶手段が上記命令を命令語の識別子と変数の識別子との組み合わせとして記憶すると共に、命令語の識別子と命令語名との対応を示す命令語名テーブル(命令語名領域)と、変数の識別子と変数名との対応を示す変数名テーブル(変数名領域)とを記憶してもよい。この場合、検索手段は、検索範囲に応じて、命令語テーブルおよび変数名テーブルの一方を検索して識別子を取得し、当該識別子を含む命令を検索する。
【0017】
さらに、請求項3の発明に係る制御プログラム検索装置は、請求項1または2記載の発明の構成において、上記記憶手段に記憶された制御プログラム、または、それと同一手順の制御プログラムに基づいて、制御対象を制御する制御手段を備えていることを特徴としている。
【0018】
上記構成では、制御プログラム検索装置が制御手段をも備えているので、制御プログラム検索装置は、制御プログラムに基づいて制御対象を制御する制御装置として動作できる。したがって、当該制御装置が制御対象を制御している間に、制御システムに異常が発生しても、新たな装置を特に接続することなく、制御装置の制御プログラムから異常に関連すると推定される命令を検索できる。ここで、上述のように、検索手段は、検索範囲を命令語または変数に限定して検索できるので、所望の命令を検索する際の時間を短縮できる。これらの結果、異常の原因をより速く特定でき、制御装置を含む制御システムが異常から復帰するために必要な時間を短縮できる。
【0019】
また、請求項4の発明に係る制御プログラム検索装置は、請求項1、2または3記載の発明の構成において、上記検索手段は、検索の条件として、上記命令語条件と変数条件との双方が入力され、アンド検索が指示された場合、命令語が命令語条件に合い、しかも、変数が変数条件に合った命令を検索することを特徴としている。
【0020】
上記構成では、命令語条件と変数条件とをアンド検索できるので、ある命令語または変数が制御プログラム中で数多く使用されており、一方の条件だけでは、所望の命令の検索に手間がかかる場合であっても、所望の命令をより速く検索できる。
【0021】
さらに、請求項5の発明に係る制御プログラム検索装置は、請求項4記載の発明の構成において、上記検索手段は、上記命令語条件および変数条件のいずれが先に入力された場合でも、他方の入力を受け付け可能であることを特徴としている。
【0022】
上記構成では、上記命令語条件および変数条件のいずれが先に入力された場合でも、検索手段は、他方の入力を受け付けることができるので、制御プログラム検索装置のユーザは、検索条件を思いついた順番で、各検索条件を指定でき、制御プログラム検索装置の操作性を向上できる。
【0023】
また、請求項6の発明に係る制御プログラム検索装置は、請求項1、2、3、4または5記載の発明の構成において、上記検索手段は、指示に応じて、上記制御プログラムに含まれる命令語あるいは変数の一覧を表示し、上記命令語条件で指定する命令語、あるいは、上記変数条件で指定する変数の選択を促すことを特徴としている。
【0024】
上記構成では、制御プログラム検索装置のユーザは、命令語条件で指定する命令語または変数条件で指定する変数を入力する際、一覧表示された命令語または変数の中から選択するだけで入力できるので、制御プログラム検索装置の操作性を向上できる。
【0025】
ところで、上記制御プログラム検索装置は、ハードウェアで実現してもよいが、プログラムをコンピュータに実行させて実現してもよい。具体的には、請求項7の発明に係るプログラムは、請求項1記載の各手段としてコンピュータを動作させるプログラムであり、当該プログラムがコンピュータで実行されると、当該コンピュータは、請求項1記載の制御プログラム検索装置として動作する。したがって、請求項1と同様に、所望の命令の検索に要する時間を短縮可能な制御プログラム検索装置を実現できる。
【0026】
【発明の実施の形態】
本発明の一実施形態について図1ないし図17に基づいて説明すると以下の通りである。すなわち、本実施形態に係る制御システム1は、現場に新たな機器を持ち込むことなく、ラダーモニタ画面を表示可能で、しかも、当該ラダーモニタ画面にて、所望の命令を短時間で検索可能なシステムであって、図1に示すように、例えば、ベルトコンベアー式の自動組付機など、ターゲットシステム2のデバイス(制御対象)2aを制御するために用いられている。
【0027】
なお、以下では、プログラマブル表示器(制御プログラム検索装置)12による、ラダーモニタ画面での検索処理について説明する前に、制御システム1の全体構成、並びに、通常の制御状態におけるプログラマブル表示器12の動作について簡単に説明する。
【0028】
すなわち、上記制御システム1には、上記デバイス2aを制御する制御装置としてのPLC11と、多くの場合、制御対象近傍に配されると共に、制御システム1のHMIとして、デバイス2aの状態を表示し、オペレータによるデバイス2aへの操作を受け付けるプログラマブル表示器12とを備えている。また、本実施形態に係るプログラマブル表示器12は、詳細は後述するように、PLCとしての機能も備えており、それぞれに対応するPLC11だけではなく、自らが制御するデバイス2aにも直接接続されている。
【0029】
さらに、本実施形態に係る制御システム1では、各プログラマブル表示器12は、イーサネット(登録商標)などのLAN(ローカルエリアネットワーク)13によって互いに接続されている。また、上記LAN13には、多くの場合、プログラマブル表示器12よりも離れた場所から、制御システム1全体を管理する制御用ホストコンピュータ14が接続されている。
【0030】
なお、上記各プログラマブル表示器12は、シリアルケーブルなどを介して、それぞれに対応するPLC11と接続されている。また、図1では、説明の便宜上、LAN13にプログラマブル表示器12が2台接続され、各プログラマブル表示器12には、PLC11およびデバイス2aがそれぞれ1台ずつ接続されると共に、各PLC11にデバイス2aが1台接続されている場合を例示しているが、当然ながら、それぞれの接続台数は任意に設定できる。
【0031】
また、デバイスは、デバイスアドレスや変数により特定可能で、しかも、状態を取得したり、制御(変更)できるものであれば、例えば、デバイス2a自体であってもよいし、例えば、PLC11やプログラマブル表示器12の記憶装置など、制御システム1に設けられた記憶装置の一領域を示していてもよい。
【0032】
ここで、上記制御システム1では、制御システム1に必須の構成であり、しかも、HMIとして動作するため、演算能力に余力のあるプログラマブル表示器12が通信の大半を処理するように構成されている。さらに、各プログラマブル表示器12は、自らに接続されているPLC11の機種に固有の専用プロトコルと、LAN13での共通プロトコルとを変換して、他のプログラマブル表示器12や制御用ホストコンピュータ14と、PLC11との通信を中継する。なお、共通プロトコルと専用プロトコルとの間のプロトコル変換には、同じ指示に同じコードが割り当てられるように予め定められた共通のコマンドと上記共通のコマンドに対応するPLC11固有のコマンドとの間の変換や、データやアドレスの表現方法の変換、デバイスアドレスと、当該デバイスアドレスに対応し、しかも、デバイスアドレスとは異なる値に設定可能な変数や変数の名称(変数名)との変換なども含まれる。
【0033】
これにより、プログラマブル表示器12および制御用ホストコンピュータ14は、他のプログラマブル表示器12に接続されているPLC11の機種に拘らず、LAN13を介して共通のプロトコルで通信できる。この結果、互いに異なる機種のPLC11の混在する制御システム1が比較的容易に実現されている。
【0034】
上記プログラマブル表示器12は、後述する画面データに基づいて、デバイスの状態を画面表示する際の動作や、画面への操作に応じてデバイスの状態を制御する際の動作を特定するものであって、PLC11と通信するPLC・IF部21と、上記LAN13に接続するためのLAN・IF部22と、例えば、液晶表示装置などからなるディスプレイ23と、ディスプレイ23の画面上に配されたタッチパネル24と、上記各部材21〜24を制御するHMI処理部25と、当該HMI処理部25によって参照され、上記画面データおよび後述する変数が格納される画面データメモリ26および変数メモリ27とを備えている。
【0035】
上記画面データは、画面上の領域と、当該領域への表示や入力に対応するデバイスとの対応関係を示すタグを組み合わせて構成されている。本実施形態では、HMI処理部25が複数の単位画面を切り換え表示可能であり、上記タグは、当該タグが有効となる単位画面を示すファイル番号と、単位画面上で実行すべき動作内容を特定する事象名と、各事象毎に参照される参照情報とを含んでいる。
【0036】
例えば、上記タグが所定の画面領域(表示座標範囲)へ所定のデバイスの状態に応じた部品図形を表示する表示タグの場合、上記参照情報には、表示座標範囲と、デバイスを特定可能な変数(後述)と、例えば、部品図形がスイッチの場合、ONを示す図形のファイルおよびOFFを示す図形のファイルなど、表示時に参照するファイル番号とが含まれる。さらに、タグが入力タグの場合、参照情報として、有効入力座標範囲と、入力結果が書き込まれるデバイスの変数とが含まれる。
【0037】
また、変数メモリ27には、図2に示すように、各変数について、変数の名称(変数名)と、変数に対応するデバイス2aまたは内部メモリを特定するための情報(例えば、アドレスなど)と、変数の内容との組み合わせが記憶されている。なお、本実施形態では、変数に対応するデバイス2aの機種に拘わらず、変数の内容を格納する際の表現方法(例えば、ワード長や符号の有無、あるいは、BCD/2進表記など)が予め定められた表現方法に統一されており、変数が実在のデバイス2aに対応する場合、変数メモリ27には、実際の機種での表現方法も格納されている。この場合、HMI処理部25は、PLC・IF部21を介してデバイス2aの状態を取得あるいは制御する際、表現方法を形式変換して、格納時の表現方法を統一する。
【0038】
一方、上記HMI処理部25は、所定の時間間隔で、画面データメモリ26に格納された画面データから、ベース画面のファイル番号が、現在表示中のベース画面である表示タグを抽出する。さらに、HMI処理部25は、変数メモリ27を参照して、タグに対応する変数の内容を読み出し、内容に応じた部品図形をディスプレイ23に表示する。ここで、PLC・IF部21に接続されたPLC11により制御されるデバイス2aに、上記変数が対応している場合、HMI処理部25は、PLC・IF部21によるPLC11との通信によって、デバイス2aの状態を取得し、上記変数の内容を当該状態に応じて更新している。これにより、ディスプレイ23には、デバイス2aの状態が表示される。
【0039】
なお、変数が他のプログラマブル表示器12に接続されたPLC11によって制御されるデバイス2aの場合、HMI処理部25は、LAN・IF部22、LAN13および他のプログラマブル表示器12を介して当該PLC11と通信するなどして、デバイスの状態を取得し、それに応じて変数の内容を更新する。
【0040】
また、タッチパネル24への押し操作など、オペレータの入力操作を受け付けると、HMI処理部25は、上記画面データから、現在表示中のベース画面に対応し、当該入力操作にマッチする入力タグを検索すると共に、入力結果に応じて、タグに対応する変数の内容を更新する。さらに、HMI処理部25は、デバイス2aの状態を取得する場合と略同様に、PLC11やプログラマブル表示器12と通信するなどして、上記変数の内容に応じて、デバイス2aの状態を制御させる。ここで、入力操作の後も、HMI処理部25は、デバイス2aの状態を画面表示するので、操作結果が画面表示に反映される。
【0041】
加えて、HMI処理部25は、例えば、他のプログラマブル表示器12や制御用ホストコンピュータ14など、LAN13に接続された機器から自らに接続されたPLC11のデバイス2aへの制御指示を受け取った場合や、これとは逆に、上記機器へ報告すべきデバイス2aの状態を自らのPLC11から受け取った場合には、上述したプロトコル変換によって、LAN13での通信、および、PLC11との通信の間を中継できる。
【0042】
さらに、本実施形態に係るプログラマブル表示器12は、PLCとしても動作するために、デバイス2aに接続するためのIO・IF部31と、制御プログラムなどを記憶する制御用ファイルメモリ(記憶手段)32と、当該制御プログラムに基づいて、IO・IF部31に接続されたデバイス2aを制御するデバイス制御部(制御手段)33とを備えている。
【0043】
本実施形態に係るデバイス制御部33は、制御プログラムにおいて、制御対象を変数で特定可能なPLCであって、例えば、数十msなど、予め定められた長さの走査期間(スキャンタイム)毎に、各デバイス2aの状態を読み出し、各デバイス2aに対応する変数の内容として、変数メモリ27に格納する。
【0044】
さらに、デバイス制御部33は、変数メモリ27に格納された各変数の内容を参照しながら、制御用ファイルメモリ32の制御プログラムが示す各命令を順次実行する。
【0045】
ここで、本実施形態に係る制御プログラムでは、図3にラダープログラムとして示すように、あるいは、図4に、そのニモニック表記として示すように、各命令において、命令語Cα…で示される動作の対象(オペランド)を、変数で指定可能であり、命令が、変数で示されたオペランドを含んでいる場合、当該命令の実行に伴なって、変数の内容が更新される。また、本実施形態に係る制御プログラムでは、制御プログラムの可読性を向上させるため、変数名として、命令語名を含む文字列も指定できる。なお、デバイス制御部33が実行可能な命令セットには、オペランドを含まない命令が含まれていてもよいし、オペランドを含む命令であっても、オペランドが変数以外の値(定数など)であってもよい。
【0046】
さらに、上記順次実行される命令の1つとして、エンド命令が実行されると、デバイス制御部33は、制御プログラムの実行を終了し、変数メモリ27に格納された各変数のうち、IO・IF部31に接続されたデバイス2aに対応する変数の内容を各デバイス2aに書き込む。これにより、デバイス制御部33は、PLCと同様に、ユーザが作成した制御プログラムに従い、デバイス2aの状態に応じて各デバイス2aを制御できる。
【0047】
なお、上述したように、変数の内容を格納する際の表現方法が統一されているので、デバイス制御部33は、IO・IF部31を介してデバイス2aと通信する際、表現方法を形式変換して、格納時の表現方法を統一する。
【0048】
さらに、本実施形態に係るプログラマブル表示器12は、例えば、あるデバイス2aの状態が異常な場合に、その異常の原因となるデバイス2aを特定する際などに好適に用いられるラダーモニタ画面を表示するために、上記HMI処理部25およびデバイス制御部33を連携動作させるコントロール−HMI処理部(検索手段)41が設けられている。
【0049】
また、上記制御用ファイルメモリ32には、制御プログラムのOPコード(命令語)およびオペランドだけではなく、例えば、変数の情報、ジャンプ先のラベル、各ラダー記号がどのように接続されるかを示す情報や、ラング番号など、制御プログラムに応じたラダー図を表示するための情報も記憶されている。
【0050】
ラダーモニタ画面を表示する場合、上記コントロール−HMI処理部41は、HMI処理部25に指示して、図5および図6に示すラダーモニタ画面を表示させる。当該ラダーモニタ画面には、ラダー図を表示する領域D1が設けられており、コントロール−HMI処理部41は、上記制御用ファイルメモリ32を参照して、当該制御用ファイルメモリ32に格納された制御プログラムを示すラダー図を表示させることができる。
【0051】
ここで、上記領域D1に表示されるラダー図は、接点やコイル、カウンタなど、図形やその他の形式で表された機能ブロックとしてのラダー記号(Iα…)と、これらに関連するラベルとからなる1または複数のネットワーク(L1…)を、左右の母線(La・Lb)内に記述した図であって、配置されているラダー記号の種類と、各ラダー記号の接続関係とによって、制御手順を図示できる。
【0052】
さらに、上記コントロール−HMI処理部41は、変数メモリ27を参照して、上記各ラダー記号(Iα…)の表示形式(例えば、形状や色あるいは点滅の有無など)を、ラダー記号Iα…に関連するデバイス2aの現在の制御状態に合わせて更新できる。
【0053】
例えば、図5および図6のラダーモニタ画面は、図3および図4の制御プログラムを図示したものであって、ロードを示すラダー記号Iαが、アンドを示すラダー記号Iβ、および、インクリメントを示すラダー記号Iγを介して、母線Lbに接続されている。また、各ラダー記号I…には、デバイスに対応する変数の名称が併記されている。したがって、これらのラダー記号Iα〜Iγと、各ラダー記号Iα〜Iγの接続関係とによって、命令語Cα〜Cγに対応する制御手順、すなわち、第1接点がオン状態で、しかも、第2接点がオン状態の場合、カウンタをインクリメントするという手順を記述できる。
【0054】
また、図5のラダーモニタ画面では、ロードを示すラダー記号IαおよびIδがオフ状態を示す形状で記述されているのに対して、図6のラダーモニタ画面では、両ラダー記号Iα、Iδがオン状態を示す形状で記述されている。したがって、図5および図6に示すラダー図からは、制御手順だけではなく、デバイスの制御状態、すなわち、図5の場合は、第1接点がオフ状態であり、図6の場合は、第1接点がオン状態であることも読み取れる。
【0055】
このように、ラダーモニタ画面は、デバイス2aの状態と制御の手順との双方を表示できる。したがって、あるデバイス2aに不具合が発生し、それによって、他のデバイス2aの状態が通常と違うように制御されて、異常が判明した場合、異常と認識されたデバイス2a自体だけではなく、そのデバイス2aの制御に関連するデバイス2aを順次遡ることができる。この結果、不具合が発生したデバイス2aとは異なるデバイス2aにて異常が検出された場合でも、不具合が発生したデバイス2aを特定できる。
【0056】
さらに、本実施形態に係るコントロール−HMI処理部41は、母線La・LbやネットワークL1…のうち、導電部分を、非導電部分と異なる表示形式で表示するように、HMI処理部25へ指示している。本実施形態では、一例として、非導電部分を、白の細線で表示し、導電部分を緑の太線で表示している。これにより、オペレータは、ラダーモニタ画面を参照することで、ラダープログラムの導電部分も把握できる。なお、図3ないし図6あるいは以下の図面では、例えば、命令語Cαとラダー記号Iαとのように、互いに対応するもの同士に、互いに同じギリシャ文字を付している。
【0057】
また、本実施形態に係るコントロール−HMI処理部41は、ラダーモニタ画面として上記ラダー図を表示する際、図5および図6に示すように、ラダーモニタ画面を操作するためのボタンB…も合わせて表示するよう、HMI処理部25へ指示する。さらに、HMI処理部25が各ボタンB1〜B34への操作を受け付けると、コントロール−HMI処理部41は、操作に応じて、ラダーモニタ画面を制御する。
【0058】
例えば、ボタンB1は、ラダープログラム(制御プログラム)の起動/停止を指示するボタンであり、当該ボタンB1が押された場合、コントロール−HMI処理部41は、デバイス制御部33が制御プログラムを実行中であれば停止させ、制御プログラムの実行を停止していた場合は、制御プログラムの実行を開始させる。
【0059】
また、ボタンB2は、ラダーモニタ画面の領域D1において、先頭に表示されているネットワークL1…の番号(ラング番号)を表示するボタンであって、当該ボタンB2が操作されると、コントロール−HMI処理部41は、例えば、キーパットを表示させるなどして、ラング番号の入力を受け付け、当該ラダー番号からのラダー図を表示させる。
【0060】
また、ボタンB3は、スクロールの単位が、ラング単位/ページ単位かを表示するボタンであって、当該ボタンB3が操作されると、コントロール−HMI処理部41は、スクロールの単位を両者間で切り換える。さらに、ボタンB4は、ラダー図中に整数を表示する際に、10進表示するか16進表示するかを切り換えるボタンであり、当該ボタンB4が操作されると、コントロール−HMI処理部41は、整数の表示方法を両者間で切り換える。また、ボタン群B5は、制御プログラムに応じたラダー図全体のうちのラダーモニタ画面中に表示する領域の移動(スクロール)を指示するボタンであり、それぞれ、左右上下のボタンのいずれかかが操作された場合、コントロール−HMI処理部41は、指示された方向に、表示領域をスクロールさせる。
【0061】
一方、コントロール−HMI処理部41は、ボタンB6が操作されると、ラダーモニタ画面の表示を停止して、HMI処理部25に、通常の操作画面を表示させる。
【0062】
さらに、本実施形態に係る上記変数メモリ27には、ラダーモニタに関する変数(ラダーモニタ変数)を格納する領域42が設けられており、他の変数と同様に、ラダーモニタ変数の内容も、HMI処理部25およびデバイス制御部33から変更できるように構成されている。また、上記コントロール−HMI処理部41は、当該ラダーモニタ変数の内容を監視して、ラダーモニタへの指示を受け付けている。なお、これらラダーモニタへの指示には、ラダーモニタ画面の表示の要否、制御プログラム全体のうち、ラダーモニタ画面で表示する箇所、あるいは、ラダーモニタ画面への操作も含まれている。
【0063】
このように、本実施形態に係るプログラマブル表示器12では、HMI処理部25が、画面データに基づいて、ラダーモニタ変数の上記記憶領域の内容を変更できるように構成されている。また、デバイス制御部33も制御プログラムに基づいて上記記憶領域の内容を変更できるように構成されている。したがって、制御システム1のユーザは、画面データまたは制御プログラムを変更することによって、ラダーモニタ起動のトリガを変更できる。
【0064】
また、本実施形態に係るプログラマブル表示器12では、上記ラダーモニタ変数の一領域として、制御プログラム全体のうち、ラダーモニタ画面が表示する箇所を記憶する領域も設けられており、当該記憶領域の内容も、起動/停止を示す記憶領域と同様にHMI処理部25およびデバイス制御部33から変更できる。
【0065】
したがって、制御システム1のユーザが、画面データまたは制御プログラムを設計する際、トリガとなる事象が発生して、ラダーモニタ画面を起動させるまでの間に、当該記憶領域の内容がトリガとなる事象に関連する箇所を示すように、画面データまたは制御プログラムを設計することによって、ラダーモニタの起動時に上記箇所を表示させることができる。この結果、プログラマブル表示器12は、異常発生時に、異常に関連する箇所を表示したラダーモニタ画面を表示することができる。
【0066】
さらに、ラダーモニタ変数には、ラダーモニタ画面への上記各操作を示す領域も設けられており、コントロール−HMI処理部41は、当該領域の内容に応じて、当該領域に対応する操作がオペレータによって行われたときと同様に、ラダーモニタ画面を自動的に制御できる。したがって、制御システム1のユーザは、ラダーモニタ画面を自動的に操作する画面データまたは制御プログラムを作成できる。一例として、画面データや制御プログラムによって、ラダーモニタ画面のスクロールやスクロールの単位を制御できる。
【0067】
上記構成において、図7に示すフローチャートに基づき、制御システム1の概略動作を説明すると以下の通りである。すなわち、ステップ1(以下では、S1のように略称する)において、例えば、制御用ホストコンピュータ14の作画エディタなどによって、プログラマブル表示器12用の画面データが作成される。また、S2において、制御用ホストコンピュータ14の制御プログラムエディタなどによって、プログラマブル表示器12のデバイス制御部33用の制御プログラムを含む制御用ファイルが作成される。上記各エディタでは、タグや制御プログラムにて、操作や参照の対象となるデバイスを指定する際、デバイスに対応する変数が生成され、当該変数で指定される。
【0068】
さらに、S3では、上記各エディタなどによって、各変数が実際のデバイス2aなどと関連付けられる。なお、変数には、実際のデバイス2aだけではなく、プログラマブル表示器12の記憶領域や、マクロの演算結果を関連付けることができる。この場合、HMI処理部25は、予め設定されたプログラム(マクロ)に従って、変数メモリ27の変数の内容を演算した結果を、マクロに関連付けられた変数の内容に設定できる。
【0069】
また、画面表示や操作あるいは制御に関連する変数の場合と同様に、上記各エディタによって、ラダーモニタ変数は、トリガとなる事象、すなわち、デバイス2aやプログラマブル表示器12の記憶領域またはマクロと関連付けられる。なお、ラダーモニタ変数は、プログラマブル表示器12の記憶領域のうち、操作に応じて内容が変化する記憶領域を関連付けるなどして、オペレータの操作と関連付けることもできる。
【0070】
ここで、上記各エディタでは、デバイスのアドレスを指定するのではなく、デバイスを変数で指定している。したがって、実際のデバイス2aと変数との対応は、プログラマブル表示器12が動作を開始するまでに関連付ければよく、実際のアドレスが決まっていない段階でも、画面や制御手順を設計できる。また、デバイス2aの変更などによって、実際のアドレスが変更されたとしても、画面データおよび制御プログラムにおいて、当該デバイス2aに関連する箇所全てを変更する必要がなく、変数とアドレスとの関連付けを変更するだけでよい。
【0071】
上記S1〜S3にて、画面データ、制御プログラムおよび変数の関連付けが完成すると、S4において、これらのデータは、プログラマブル表示器12に伝送され、画面データメモリ26、制御用ファイルメモリ32および変数メモリ27に格納される。なお、上記では、説明の便宜上、S1〜S3の順に各ステップを記載したが、上記S4にて、プログラマブル表示器12に格納されるまでに、これらのデータが設定されれば、順序が異なっていてもよい。
【0072】
さらに、S5において、プログラマブル表示器12は、上記制御プログラムに基づいて、IO・IF部31に接続されたデバイス2aを制御すると共に、上記画面データに基づいて、操作画面を表示する。ここで、上記S5の処理は、ラダーモニタ画面表示のトリガとなる事象が発生するまでの間(S6にて、NOの間)、繰り返される。
【0073】
トリガとなる事象が発生すると(S6にて、YESの場合)、HMI処理部25またはデバイス制御部33は、S7において、画面データまたは制御プログラムに従って、ラダーモニタ変数のうち、起動/停止を示す記憶領域を、起動を示す値に変更する。一方、コントロール−HMI処理部41は、当該記憶領域の内容を監視しており、当該記憶領域の内容が起動を示す値になると、HMI処理部25にラダーモニタ画面を表示させる。
【0074】
具体的には、上記S7において、コントロール−HMI処理部41は、画面データのうち、予めラダーモニタ用に用意された画面を表示するよう、HMI処理部25へ指示する。これによって、図5および図6に示すように、各ボタンB1〜B34が表示される。
【0075】
さらに、コントロール−HMI処理部41は、制御用ファイルメモリ32の内容を解析して、制御プログラムが示すラダー図に含まれるラダー記号、各ラダー記号間の接続関係、各ラダー記号に対応する変数の名称およびアドレスを把握し、上記ラダー図を含むラダーモニタ画面(図5および図6参照)を表示するよう、HMI処理部25へ指示する。
【0076】
また、コントロール−HMI処理部41は、制御用ファイルに基づいて、ラダー図を表示するために必要な変数を特定する。また、コントロール−HMI処理部41は、これらの各変数について、デバイス制御部33へ変数名を通知し、デバイス制御部33から、変数メモリ27のアドレスのうち、当該変数名の変数の内容が格納されたアドレスを受け取る。さらに、コントロール−HMI処理部41は、当該アドレスへアクセスして、変数の内容を取得する。
【0077】
さらに、各変数の内容が取得できると、コントロール−HMI処理部41は、各変数の内容に応じた表示形式で、各変数に対応するラダー記号を表示するよう、HMI処理部25へ指示する。また、変数の名称およびアドレスを変数メモリ27から取得すると共に、HMI処理部25へ指示して、各ラダー記号に変数名を併記させる。
【0078】
ここで、各デバイス2aに対応する変数の内容は、HMI処理部25またはデバイス制御部33によって更新されており、変数の内容取得および内容に応じた表示指示は、例えば、図5および図6に示すボタンB6が押されるなどして、ラダーモニタ画面の表示終了が指示されるまで(S8にてYESになるまで)、予め定められた周期で繰り返される。
【0079】
これにより、ディスプレイ23には、図5または図6などに示すように、デバイス2aの状態に応じたラダー図が表示される。したがって、オペレータは、ラダー図に基づいて、異常の原因を推測し、例えば、異常の原因と推定されるデバイス2aが、正常に動作しているか否かを確認するなど、推測が正しいか否かを確認できる。
【0080】
また、表示終了が指示されるまでの間、上記コントロール−HMI処理部41は、オペレータからの操作を受け付けると、操作に応じて、ラダーモニタ画面の表示を制御する。これにより、オペレータは、例えば、スクロールや、後述の検索などによって、制御プログラムの他の箇所を参照し、異常の原因を探すことができる。
【0081】
本実施形態では、HMI処理部25が受け付けたオペレータの操作をコントロール−HMI処理部41に伝えるためにも、ラダーモニタ変数が用いられており、HMI処理部25は、ボタンB1〜B34へのタッチなど、オペレータからの操作を受け付けると、操作に応じて、ラダーモニタ変数のうち、それぞれの操作に応じた領域を変更する。一方、コントロール−HMI処理部41は、ラダーモニタ変数の内容を監視しており、内容に応じて、ラダーモニタ画面の表示を制御する。
【0082】
なお、本実施形態に係るコントロール−HMI処理部41は、例えば、タッチパネル24へのタッチなどによって、ラダー記号の選択を検出すると、当該ラダー記号について、例えば、アドレスや、デバイスの状態の文字表記など、図5および図6では表示されていなかった詳細情報を表示する。これにより、図5や図6のように、概略表示の際の視認性を妨げることなく、注目すべきデバイスの詳細を提示できる。
【0083】
さらに、本実施形態に係るプログラマブル表示器12は、制御プログラム全体から、所望の命令を検索する際に必要な手間および時間を削減するために、ある条件にあった命令を検索する際、検索範囲を、命令に含まれる命令語と、オペランドとしての変数とのうちの一方に限定して、検索できるように構成されている。また、命令語を検索範囲とする命令語条件と、変数を検索範囲とする変数条件との双方が指定された場合、命令語が命令語条件にマッチし、しかも、変数が変数条件に合った命令を検索できる。
【0084】
これにより、制御プログラム全体を検索範囲として文字列検索する場合と異なり、命令語を検索しようとして、コメントや変数が検索条件に合った命令をも検索してしまうという不具合が発生せず、所望の命令語を含む命令のみを検索できる。同様に、所望の変数を含む命令を検索する際、コメントや命令語が検索条件に合った命令をも検索してしまうという不具合が発生せず、所望の変数を含む命令のみを検索できる。この結果、不所望に検索された命令を含む検索結果から所望の命令を見つける手間を削減でき、所望の命令の検索に要する時間を短縮できる。
【0085】
具体的には、本実施形態に係る制御用ファイルメモリ32には、図1に示すように、命令語条件が入力された場合に検索される命令語検索用領域(命令語名領域)51と、変数条件が入力された場合に検索される変数検索用領域(変数名領域)52とが設けられている。一例として、本実施形態に係る制御用ファイルメモリ32では、図8に示すように、制御プログラムの各命令が、命令語を示す属性A1と変数を示す属性A2とを有しており、各命令の属性A1を記憶する領域から、上記命令語検索用領域51が構成されている。また、各命令の属性A2を記憶する領域から、上記変数検索用領域52が構成されている。
【0086】
一方、コントロール−HMI処理部41がHMI処理部25に表示させるラダーモニタ画面には、図5および図6に示すように、変数条件を入力するために用いられ、変数の一覧表示を指示するボタンB21と、命令語条件を入力するために用いられ、命令語の一覧表示を指示するボタンB22とが設けられている。なお、これらのボタンに加えて、上記ラダーモニタ画面には、制御プログラムの最初(ラング1)からの検索を指示するボタンB31、検索条件の消去を指示するボタンB32、現在の表示位置から前方向への再検索を指示するボタンB33、および、現在の表示位置から後方向への再検索を指示するボタンB34も設けられている。
【0087】
オペレータによる上記ボタンB22への操作を受け付けるなどして、命令語の一覧表示の指示を受け付けると(図9に示すS21にて、YESの場合)、コントロール−HMI処理部41は、S22において、HMI処理部25へ指示して、図10に示すように、ディスプレイ23に命令語の一覧を表示させて、検索すべき命令語の選択を、オペレータに促す。
【0088】
なお、命令語の一覧として、それぞれのアイコンを一覧表示してもよいが、本実施形態では、画面中に一覧表示可能な命令語の数を増加させるために、命令語の名称(ニモニック表記)を一覧表示している。また、当該命令語の一覧は、例えば、操作画面と同様に、予め画面データとして用意されていてもよいし、例えば、コントロール−HMI処理部41が制御用ファイルメモリ32から、制御プログラムを記述した命令セットを読み出して、当該命令セットに含まれる命令語の一覧を作成し、HMI処理部25に表示させてもよい。
【0089】
S23において、例えば、検索すべき命令語が表示された領域へのタッチを受け付けるなど、オペレータによる命令語の選択指示を受け付けると、コントロール−HMI処理部41は、S24において、図11に示すように、図5または図6において、命令語の一覧表示を指示するボタンB22の代わりに、命令語条件として、選択された命令語(この場合は、OUT)を表示する。
【0090】
この状態では、図5および図6と同様に、ラダー図が表示されており、コントロール−HMI処理部41は、図9に示すS21の処理に戻って、次の操作を待ち受ける。
【0091】
図11に示すように、命令語の検索条件のみが入力されている状態で、例えば、検索を指示するボタンB31、B33またはB34への操作などによって、検索指示を受け付けると(S21およびS31にて、NO、かつ、S41で、YESの場合)、コントロール−HMI処理部41は、S42において、図1に示す命令語検索用領域51を検索して、命令語条件(この場合は、OUT)にマッチした命令を検索する。なお、検索処理でもない場合(S41でNOの場合)、コントロール−HMI処理部41は、S51において、例えば、各ラダー記号の表示更新など、その他の処理を行う。
【0092】
本実施形態に係る命令語検索用領域51は、図8に示すように、制御プログラムの各命令を記憶する領域のうち、命令語の属性A1を記憶する領域から構成されている。したがって、検索の結果、属性A1の内容が命令語条件(この場合は、OUT)を示す命令Cηが発見される。
【0093】
上記S42において、検索条件にマッチした命令が見つかると、コントロール−HMI処理部41は、S43において、制御プログラムのうち、当該命令を含む箇所を表示させた後、図9に示すS21の処理に戻って、次の操作を待ち受ける。
【0094】
本実施形態に係るコントロール−HMI処理部41は、ラダーモニタ画面に表示される箇所を検索結果に応じて変更するだけではなく、図12に示すように、当該ラダー記号Iηを区別するために、検索された命令に対応するラダー記号Iηの表示形式を、他と異なる形式(例えば、四角で囲むなど)で表示している。
【0095】
一方、例えば、オペレータによる上記ボタンB21への操作を受け付けるなどして、変数の一覧表示の指示を受け付けると(S31にて、YESの場合)、コントロール−HMI処理部41は、S32において、HMI処理部25へ指示して、図13に示すように、ディスプレイ23に変数の一覧を表示させて、検索すべき変数の選択を、オペレータに促す。また、本実施形態に係るコントロール−HMI処理部41は、各変数を一覧表示する際、変数名と共に、現在の内容も表示しているので、オペレータは、変数の内容から、検索すべきか否かを判断することもできる。さらに、本実施形態では、ボタンB22と共に、全体のページ数(例えば、2)と現在表示中のページ数(例えば、1)とが表示されている。これにより,オペレータは、現在表示されていない変数があるか否かを容易に判断できる。
【0096】
なお、変数の一覧は、例えば、操作画面と同様に、予め画面データとして用意されていてもよいが、制御プログラムの変更と画面データの変更とが必ずしも一致しているとは限らないので、例えば、コントロール−HMI処理部41が制御用ファイルメモリ32から、制御プログラムに含まれる変数名を抽出して、変数の一覧を作成し、HMI処理部25に表示させる方が望ましい。また、図13は、例えば、図5または図6に示すように、検索条件として、命令語が指定されていない状態において、変数の一覧が指示された場合を図示しており、命令一覧の表示を指示するボタンB22が表示されている。
【0097】
さらに、上記S23およびS24と同様に、S33において、検索すべき変数の選択が指示されると、コントロール−HMI処理部41は、S34において、図14に示すように、変数の一覧表示を指示するボタンB21(図5参照)の代わりに、変数条件として、選択された変数(この場合は、CTUD)を表示した後、S21の処理に戻って、次の操作を待ち受ける。また、本実施形態に係るコントロール−HMI処理部41は、選択された変数の名称と共に、当該変数の現在の値を表示させている。
【0098】
図14に示すように、変数の検索条件のみが入力されている状態で、検索指示を受け付けると、コントロール−HMI処理部41は、上記S42において、図1に示す変数検索用領域52を検索して、変数条件(この場合は、CTUD)にマッチした命令を検索する。
【0099】
本実施形態に係る変数検索用領域52は、図8に示すように、制御プログラムの各命令を記憶する領域のうち、変数の属性A2を記憶する領域から構成されている。したがって、検索の結果、属性A2の内容が変数条件(この場合は、CTUD)を示す命令Cθが発見される。
【0100】
さらに、本実施形態では、上記命令語条件および変数条件のいずれが先に入力された場合でも、他方の入力を受け付け可能であり、例えば、図11に示すように、命令語条件(この場合は、OUT)が指定された状態で、変数一覧の表示が指示されると(上記S31にて、YES)、図15に示すように、変数の一覧を表示し(S32)、変数の選択を受け付け(S33)、さらに、選択結果を表示する(S34)。これにより、図16に示すように、検索条件として、命令語条件と変数条件との双方を設定できる。
【0101】
なお、上記では、命令語条件が先に指定された場合を例にして説明したが、図14に示すように、変数条件が設定されている状態で、命令語一覧の表示が指示されると(上記S21にて、YES)、命令語の一覧を表示し(S22)、命令語の選択を受け付け(S23)、さらに、選択結果を表示する(S24)。この場合でも、図16に示すように、検索条件として、命令語条件と変数条件との双方が設定される。
【0102】
両条件が設定された状態で、検索が指示されると、コントロール−HMI処理部41は、命令語検索用領域51に、命令語条件にマッチする命令語が格納され、しかも、変数検索用領域52に、変数条件にマッチする変数が格納された命令を検索する。
【0103】
本実施形態では、制御プログラムの各命令が、命令語を示す属性A1と変数を示す属性A2とを有しており、属性A1が命令語条件(この場合は、OUT)にマッチし、しかも、属性A2が変数条件(この場合は、CTUD)にマッチする命令が検索される。この結果、命令Cθが発見される。これにより、図17に示すように、命令Cθに対応するラダー記号Iθが、他のラダー記号とは異なる表示形式で表示され、検索結果としてオペレータに通知される。
【0104】
このように、本実施形態に係るプログラマブル表示器12は、命令語を検索範囲とする条件と、変数を検索範囲とする条件との双方が設定された場合、両条件にマッチする命令を検索できる。ここで、命令語を検索範囲とする条件および変数を検索範囲とする条件の一方しか設定できない場合、コメントや他方に含まれる文字列などを誤って検索してしまうという不具合が解消できる一方で、同じ命令語が制御プログラム内で同じ命令語または変数が数多く使用されているときには、条件にマッチする命令が多くなり、所望の命令を見つけるのに手間がかかってしまう。ところが、上記両条件にマッチする命令を検索できるので、異常に関連すると推定される命令語と変数との双方を、それぞれの検索条件とすることにより、所望の命令、および、その命令近傍のラングを、より少ない手間で参照できる。例えば、「ある接点がオンしない理由」を知りたい場合に、その接点に割り付けられている変数を、出力コイル命令と絡ませて検索できる。このように、ラダーの動きを追うために、変数やデバイスを検索するとき、それを演算対象とする命令語と合わせて検索できる。この結果、異常の原因を特定し、通常の制御状態に復帰するまでのメンテナンス時間を短縮できる。
【0105】
また、本実施形態に係るプログラマブル表示器12は、上記両条件のいずれが設定されている状態でも、その条件での検索、他方の条件の設定を受け付けることができるので、オペレータは、命令を検索する際、検索条件を思いついた順番で、それぞれの条件を入力できる。また、一方の条件で検索した結果、条件にマッチする命令が多いと判った時点で、他方の条件を入力できる。これらの結果、上記両条件を受け付ける順番が固定されている場合に比べて、命令検索時の操作性を向上できる。
【0106】
なお、上記では、各命令が命令語の属性A1と変数の属性A2とを有し、ている場合を例にして説明したが、これに限るものではない。例えば、制御プログラムの各命令について、命令語および変数を、それぞれ読み出すことができるように記憶されていれば、同様の効果が得られる。この場合、コントロール−HMI処理部41は、各命令について、その命令語が記憶されている領域から命令語を読み出し、命令語条件にマッチしているか否かを判定できる。同様に、各命令について、その変数が記憶されている領域から変数を読み出し、変数条件にマッチしているか否かを判定できる。また、これとは逆に、制御プログラムの各命令語および変数のそれぞれについて、どの命令で使用されているかが記憶されていてもよい。この場合であっても、コントロール−HMI処理部41は、命令語が記憶されている領域から、命令語条件にマッチした命令語を検索し、当該命令語が使用されている命令を抽出できる。同様に、変数が記憶されている領域から変数条件にマッチした変数を検索し、当該変数が使用されている命令を抽出できる。いずれの場合であっても、命令語が記憶されている領域と、変数が記憶されている領域とが分けて設けられ、命令語条件が設定された場合には、前者を参照して該条件にマッチした命令を検索し、変数条件が設定された場合には、後者を参照して該条件にマッチした命令を検索できれば、同様の効果が得られる。
【0107】
また、上記では、制御用ファイルメモリ32に記憶された制御プログラムを、デバイス制御部33による制御プログラムの実行と、コントロール−HMI処理部41による検索との双方で使用している場合を例にして説明したが、両者が同じ手順を示していれば、実行に適した形式の制御プログラムと、検索に適した形式の制御プログラムとを別々に記憶してもよい。
【0108】
なお、上記では、プログラマブル表示器12のラダーモニタ画面の起動や画面への操作を、デバイス2aやプログラマブル表示器12の記憶領域あるいはマクロの演算結果などに対応付け可能な変数で制御する場合を例にして説明したが、例えば、制御用ホストコンピュータ14にて、ラダーモニタ画面を表示/操作する場合であっても、略同様の効果が得られる。
【0109】
ただし、本実施形態のように、ターゲットシステム2の近傍(現場)にて、オペレータに操作されるプログラマブル表示器12へ、ラダーモニタ画面を表示できると、異常が発生した場合に、現場に新たな機器を持ち込むことなく、これらの画面を参照して、異常の原因を追求できる。
【0110】
なお、現場にて対処する場合、制御用ホストコンピュータ14など、遠隔地で対応する場合と異なり、ラダーモニタを自動起動する程に重要な事象は、ユーザが特に重要と判断した異常に限られ、各ユーザ毎に異なっているため、予め定めておくことが難しい。また、ユーザによっては、トリガとなる事象として、デバイス2aの状態だけではなく、プログラマブル表示器12の記憶領域の内容やマクロの演算結果などを希望することもある。したがって、本実施形態のように、プログラマブル表示器12にて、ラダーモニタ画面の表示や画面への操作を上記のいずれにも関連付け可能な変数で制御できる方が望ましい。
【0111】
なお、上記各部材21〜52は、CPUなどの演算手段が、ROMやRAMなどの記憶手段に格納されたプログラムを実行し、タッチパネルや液晶表示装置などの入出力手段、あるいは、インターフェース回路などの通信回路を制御することによって実現される機能ブロックである。したがって、これらの手段を有するコンピュータが、上記プログラムを記録した記録媒体(例えば、CD−ROMなど)を読み取り、当該プログラムを実行するだけで、本実施形態に係るプログラマブル表示器12を実現できる。なお、例えば、シリアルケーブルやLAN13あるいは、他の通信路を介してプログラムをダウンロードするためのプログラムが、上記コンピュータに予めインストールされていれば、当該通信路を介して、上記コンピュータへ上記プログラムを配付することもできる。
【0112】
【発明の効果】
請求項1の発明に係る制御プログラム検索装置は、以上のように、検索範囲を命令語または変数に限定した条件の入力を受け付け可能であり、検索範囲が命令語に限定された命令語条件が入力された場合、制御プログラムから、命令語が命令語条件に合った命令を検索すると共に、検索対象が変数に限定された変数条件が入力された場合は、上記制御プログラムから、変数が変数条件に合った命令を検索する検索手段が設けられている構成である。また、請求項7の発明に係るプログラムは、請求項1記載の各手段としてコンピュータを動作させるプログラムであり、当該プログラムがコンピュータで実行されると、当該コンピュータは、請求項1記載の制御プログラム検索装置として動作する。
【0113】
上記構成では、検索範囲を命令語または変数に限定して検索できるので、不所望に検索された命令を含む検索結果から所望の命令を見つける手間を削減でき、所望の命令の検索に要する時間を短縮できるという効果を奏する。
【0114】
請求項2の発明に係る制御プログラム検索装置は、以上のように、請求項1記載の発明の構成において、上記制御プログラムでは、変数名として、命令語名を含む文字列を使用可能であり、上記記憶手段には、制御プログラムに出現する変数の変数名が記憶された変数名領域と、制御プログラムに出現する命令語の命令語名が記憶された命令語名領域とが含まれていると共に、上記検索手段は、命令語条件として、命令語名が入力された場合、命令語名領域を検索し、変数条件として、変数条件が入力された場合、変数名領域を検索する構成である。
【0115】
上記構成では、変数名として、命令語名を含む文字列を使用できるので、変数名として設定可能な文字列の数が増え、制御プログラム検索装置のユーザにとって読みやすい変数名を設定しやすくなる。また、この場合であっても、検索範囲に応じて、命令語名領域および変数名領域の一方を検索するので、何ら支障なく、命令語名または変数名が検索条件に合った命令を検索できる。この結果、可読性の向上と、所望の命令検索に要する時間短縮との双方を満足した制御プログラム検索装置を実現できるという効果を奏する。
【0116】
請求項3の発明に係る制御プログラム検索装置は、以上のように、請求項1または2記載の発明の構成において、上記記憶手段に記憶された制御プログラム、または、それと同一手順の制御プログラムに基づいて、制御対象を制御する制御手段を備えている構成である。
【0117】
上記構成では、制御プログラム検索装置が制御手段をも備えているので、制御プログラム検索装置は、制御プログラムに基づいて制御対象を制御する制御装置として動作できる。したがって、当該制御装置が制御対象を制御している間に、制御システムに異常が発生しても、新たな装置を特に接続することなく、制御装置の制御プログラムから異常に関連すると推定される命令を検索できる。ここで、上述のように、検索手段は、検索範囲を命令語または変数に限定して検索できるので、所望の命令を検索する際の時間を短縮できる。これらの結果、異常の原因をより速く特定でき、制御装置を含む制御システムが異常から復帰するために必要な時間を短縮できるという効果を奏する。
【0118】
請求項4の発明に係る制御プログラム検索装置は、以上のように、請求項1、2または3記載の発明の構成において、上記検索手段は、検索の条件として、上記命令語条件と変数条件との双方が入力され、アンド検索が指示された場合、命令語が命令語条件に合い、しかも、変数が変数条件に合った命令を検索する構成である。
【0119】
上記構成では、命令語条件と変数条件とをアンド検索できるので、ある命令語または変数が制御プログラム中で数多く使用されており、一方の条件だけでは、所望の命令の検索に手間がかかる場合であっても、所望の命令をより速く検索できるという効果を奏する。
【0120】
請求項5の発明に係る制御プログラム検索装置は、以上のように、請求項4記載の発明の構成において、上記検索手段は、上記命令語条件および変数条件のいずれが先に入力された場合でも、他方の入力を受け付け可能である構成である。
【0121】
上記構成では、上記命令語条件および変数条件のいずれが先に入力された場合でも、検索手段は、他方の入力を受け付けることができるので、制御プログラム検索装置のユーザは、検索条件を思いついた順番で、各検索条件を指定でき、制御プログラム検索装置の操作性を向上できるという効果を奏する。
【0122】
請求項6の発明に係る制御プログラム検索装置は、以上のように、請求項1、2、3、4または5記載の発明の構成において、上記検索手段は、指示に応じて、上記制御プログラムに含まれる命令語あるいは変数の一覧を表示し、上記命令語条件で指定する命令語、あるいは、上記変数条件で指定する変数の選択を促す構成である。
【0123】
上記構成では、制御プログラム検索装置のユーザは、命令語条件で指定する命令語または変数条件で指定する変数を入力する際、一覧表示された命令語または変数の中から選択するだけで入力できるので、制御プログラム検索装置の操作性を向上できるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施形態を示すものであり、制御システムの要部構成を示すブロック図である。
【図2】上記制御システムのプログラマブル表示器の変数メモリに格納される変数のデータ構造を示す図面である。
【図3】上記プログラマブル表示器のプログラマブル・ロジック・コントローラ機能で実行される制御プログラムを、ラダープログラムとして記載した図面である。
【図4】上記制御プログラムをニモニック表記した図面である。
【図5】上記プログラマブル表示器で表示されるラダーモニタの画面例を示す図面である。
【図6】上記ラダーモニタの画面例を示すものであり、第1接点が閉じた状態を示す図面である。
【図7】上記制御システムの動作の概略を示すフローチャートである。
【図8】上記プログラマブル表示器の制御用ファイルメモリに記憶される制御プログラムを示す図面である。
【図9】上記プログラマブル表示器の動作を示すものであり、ラダーモニタ画面での検索時の動作を示すフローチャートである。
【図10】上記ラダーモニタの画面例を示すものであり、命令語一覧が表示された状態を示す図面である。
【図11】上記ラダーモニタの画面例を示すものであり、検索すべき命令語が選択された状態を示す図面である。
【図12】上記ラダーモニタの画面例を示すものであり、上記命令語での検索結果が表示された状態を示す図面である。
【図13】上記ラダーモニタの画面例を示すものであり、変数一覧が表示された状態を示す図面である。
【図14】上記ラダーモニタの画面例を示すものであり、検索すべき変数が選択された状態を示す図面である。
【図15】上記ラダーモニタの画面例を示すものであり、検索すべき命令語が指定されている状態で、変数一覧を表示している場合を示す図面である。
【図16】上記ラダーモニタの画面例を示すものであり、検索すべき命令語および変数が指定された状態を示す図面である。
【図17】上記ラダーモニタの画面例を示すものであり、上記命令語および変数での検索結果が表示された状態を示す図面である。
【符号の説明】
2a デバイス(制御対象)
12  プログラマブル表示器(制御プログラム検索装置)
32  制御用ファイルメモリ(記憶手段)
33  デバイス制御部(制御手段)
41  コントロール−HMI処理部(検索手段)
51  命令語検索用領域(命令語名領域)
52  変数検索用領域(変数名領域)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a control program search device capable of reducing a time required for searching for a desired instruction, and a program therefor.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, a programmable logic controller (PLC) has been widely used as a control device of a control system. A control program created by a control program editor such as a ladder editor is stored in the PLC in advance, and the PLC controls the device based on the control program.
[0003]
Here, even when an abnormality is detected in a certain device, the abnormality may not be caused by the abnormality of the device but may be caused by an abnormality of a device related to control of the device.
[0004]
Therefore, when an abnormality is detected in the device and there is no abnormality in the device, in order to identify the cause of the abnormality, the user of the control system, for example, uses a personal computer on which a ladder editor or a ladder monitor is installed by the PLC. To display the PLC control program on a ladder editor or a ladder monitor. In addition, the user operates the ladder editor or ladder monitor to search the control program for locations related to the control of the device in which the error was detected, and identify the device or control program error that caused the error. are doing.
[0005]
Here, when a search condition is specified by the user, the conventional ladder editor or ladder monitor searches the entire control program represented by a character string to search for an instruction that satisfies the condition.
[0006]
[Problems to be solved by the invention]
However, the character string of the entire control program includes not only a character string indicating an instruction but also a comment or the like for improving readability of the control program. In addition, the instructions usable in the control program include an instruction including an instruction word indicating an operation and an operation target, and a character string indicating such an instruction includes an instruction word name and a character string indicating an operation target. And are included.
[0007]
Therefore, there is a possibility that a comment or a variable whose name matches a search condition may be searched for an instruction including a desired instruction word name. Conversely, when searching for an instruction including a desired variable name, there is a possibility that a comment or an instruction word whose name matches the search condition may be searched.
[0008]
In this case, in order to find the desired command from the search result including the command that was undesirably searched, for example, it is necessary to display the searched commands sequentially and determine whether or not the command is the desired command. And the time required to find the desired instruction is likely to be long. Therefore, the time required to identify the cause of the abnormality and to recover from the abnormality tends to increase.
[0009]
The present invention has been made in view of the above problems, and an object of the present invention is to realize a control program search device capable of reducing a time required for searching for a desired instruction.
[0010]
[Means for Solving the Problems]
In order to solve the above-described problems, a control program search device according to the present invention receives storage means for storing a control program and an input of a condition for searching for an instruction included in the control program. In a control program search device having search means for searching for an instruction satisfying the condition from a control program of the means, the following means are provided.
[0011]
That is, the control program can include an instruction composed of a combination of a command word indicating an operation of the instruction and a variable that can specify an object of the operation and can be specified by a variable name. The search means can receive an input of a condition in which a search range is limited to a command word or a variable. When a command word condition in which the search range is limited to a command word is input, a control program of the storage means is provided. From the above, when an instruction whose instruction word satisfies the instruction word condition is searched, and a variable condition whose search target is limited to a variable is input, an instruction whose variable satisfies the variable condition Search for.
[0012]
With the above configuration, the search can be limited to the command word or the variable. Therefore, unlike the conventional technique of searching for a character string that meets the search condition from the entire control program, when searching for an instruction including a desired instruction word, a search is also made for an instruction whose comment or variable matches the search condition. It is possible to search for only an instruction including a desired instruction word without causing a problem that the instruction word is lost. Similarly, when searching for an instruction including a desired variable, a problem that a comment or an instruction word matches the search condition does not occur, and only an instruction including a desired variable can be searched. As a result, it is possible to reduce the trouble of finding the desired command from the search result including the command that is undesirably searched, and to reduce the time required for searching for the desired command.
[0013]
According to a second aspect of the present invention, in the control program search device according to the first aspect of the present invention, in the control program, a character string including an instruction word name can be used as a variable name. Includes a variable name area in which the variable names of the variables appearing in the control program are stored, and a command word name area in which the command names of the command words appearing in the control program are stored. The means is characterized in that when a command word name is input as a command word condition, a command word name area is searched, and when a variable condition is input as a variable condition, a variable name area is searched.
[0014]
In the above configuration, since a character string including a command word name can be used as a variable name, the number of character strings that can be set as a variable name increases, and it becomes easy to set a variable name that is easy for a user of the control program search device to read. Also in this case, since either one of the instruction word name area and the variable name area is searched according to the search range, an instruction whose instruction word name or variable name matches the search condition can be searched without any problem. . As a result, it is possible to realize a control program search device that satisfies both the improvement in readability and the reduction in time required for searching for a desired command.
[0015]
When a command name is input as a command condition, the command name area is searched instead of the variable name area, and when a variable name is input as the variable name condition, the variable name area is used instead of the command area. When searching, for example, when an instruction includes an instruction word and a variable, the storage means stores the instruction in an attribute or field (instruction word area) indicating an instruction word and an attribute or field (variable) indicating a variable. Name area), and the search means may search for one of the attribute or field of the command word and the attribute or field of the variable according to the search range.
[0016]
Further, a unique identifier is assigned to each command word and variable as a whole, and the storage means stores the command as a combination of the command word identifier and the variable identifier, and A command name table (command name area) indicating the correspondence with the command name and a variable name table (variable name area) indicating the correspondence between the variable identifier and the variable name may be stored. In this case, the retrieval means retrieves one of the instruction word table and the variable name table according to the retrieval range to obtain an identifier, and retrieves an instruction including the identifier.
[0017]
Further, a control program search device according to a third aspect of the present invention, based on the configuration of the first or second aspect, performs control based on the control program stored in the storage means or a control program having the same procedure as the control program. It is characterized by comprising control means for controlling the object.
[0018]
In the above configuration, since the control program search device also includes the control unit, the control program search device can operate as a control device that controls a control target based on the control program. Therefore, even if an abnormality occurs in the control system while the control device is controlling the control target, a command estimated to be related to the abnormality from the control program of the control device without connecting a new device in particular. Can be searched. Here, as described above, the search means can perform a search by limiting the search range to a command word or a variable, so that the time for searching for a desired command can be reduced. As a result, the cause of the abnormality can be identified more quickly, and the time required for the control system including the control device to recover from the abnormality can be reduced.
[0019]
In a control program search device according to a fourth aspect of the present invention, in the configuration of the first, second or third aspect, the search means includes both of the command condition and the variable condition as search conditions. When an AND search is instructed, the instruction word matches the instruction word condition, and a variable that matches the variable condition is searched for.
[0020]
In the above configuration, the command condition and the variable condition can be AND-searched, so that a certain command word or variable is used many times in the control program, and it is troublesome to search for a desired command with only one condition. Even so, the desired instruction can be searched faster.
[0021]
According to a fifth aspect of the present invention, in the control program search device according to the fourth aspect of the present invention, the search means may determine whether the first one of the command condition and the variable condition is input first. It is characterized in that input can be accepted.
[0022]
In the above configuration, the search means can accept the other input regardless of whether the command condition or the variable condition is input first, so that the user of the control program search device can determine the search conditions in the order in which they came up. Thus, each search condition can be specified, and the operability of the control program search device can be improved.
[0023]
In a control program search device according to a sixth aspect of the present invention, in the configuration of the first, second, third, fourth, or fifth aspect, the search means includes a command included in the control program in response to an instruction. It is characterized in that a list of words or variables is displayed, and the user is prompted to select a command word specified by the command word condition or a variable specified by the variable condition.
[0024]
In the above configuration, the user of the control program search device can input a command word specified by the command word condition or a variable specified by the variable condition by simply selecting from the command words or variables displayed in the list. Thus, the operability of the control program search device can be improved.
[0025]
The control program search device may be realized by hardware, or may be realized by causing a computer to execute a program. Specifically, the program according to the invention of claim 7 is a program for operating a computer as each means of claim 1, and when the program is executed by the computer, the computer executes the program of claim 1. It operates as a control program search device. Therefore, a control program search device capable of shortening the time required for searching for a desired instruction can be realized as in the first aspect.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
One embodiment of the present invention will be described below with reference to FIGS. That is, the control system 1 according to the present embodiment can display a ladder monitor screen without bringing new equipment to the site, and can search for a desired command on the ladder monitor screen in a short time. As shown in FIG. 1, for example, it is used for controlling a device (control target) 2a of the target system 2 such as a belt conveyor type automatic assembling machine.
[0027]
In the following, before describing the search processing on the ladder monitor screen by the programmable display (control program search device) 12, the overall configuration of the control system 1 and the operation of the programmable display 12 in a normal control state will be described. Will be described briefly.
[0028]
That is, the control system 1 displays the PLC 11 as a control device for controlling the device 2a, and in many cases, is disposed near the control target, and displays the state of the device 2a as the HMI of the control system 1, A programmable display 12 for receiving an operation on the device 2a by an operator. Further, the programmable display 12 according to the present embodiment also has a function as a PLC, as described in detail later, and is directly connected not only to the corresponding PLC 11 but also to the device 2a controlled by itself. I have.
[0029]
Further, in the control system 1 according to the present embodiment, the respective programmable displays 12 are connected to each other by a LAN (Local Area Network) 13 such as Ethernet (registered trademark). In addition, a control host computer 14 that manages the entire control system 1 is connected to the LAN 13 from a location farther than the programmable display 12 in many cases.
[0030]
Each of the programmable displays 12 is connected to the corresponding PLC 11 via a serial cable or the like. In FIG. 1, for convenience of description, two programmable displays 12 are connected to the LAN 13, and each programmable display 12 is connected to one PLC 11 and one device 2 a, and each PLC 11 is connected to the device 2 a. Although the case where one device is connected is illustrated, it is needless to say that the number of connected devices can be arbitrarily set.
[0031]
The device may be, for example, the device 2a itself, as long as it can be specified by a device address or a variable and can acquire or control (change) a state, for example, the PLC 11 or a programmable display. One area of a storage device provided in the control system 1 such as a storage device of the device 12 may be shown.
[0032]
Here, in the control system 1, the programmable display 12 which has an indispensable configuration for the control system 1 and operates as an HMI, and has a surplus computing capacity, is configured to process most of communication. . Further, each programmable display 12 converts a dedicated protocol specific to the model of the PLC 11 connected to itself and a common protocol in the LAN 13 to another programmable display 12 and the host computer 14 for control. The communication with the PLC 11 is relayed. The protocol conversion between the common protocol and the dedicated protocol is performed by converting between a common command predetermined so that the same code is assigned to the same instruction and a command unique to the PLC 11 corresponding to the common command. And conversion of the representation method of data and addresses, conversion of device addresses and variables corresponding to the device addresses and settable to values different from the device addresses, and variable names (variable names) are also included. .
[0033]
Thus, the programmable display 12 and the control host computer 14 can communicate with each other via the LAN 13 using the common protocol regardless of the type of the PLC 11 connected to the other programmable displays 12. As a result, the control system 1 in which the PLCs 11 of different models are mixed is realized relatively easily.
[0034]
The programmable display 12 specifies an operation for displaying a device state on a screen and an operation for controlling the state of a device according to an operation on a screen, based on screen data described later. , A PLC / IF unit 21 for communicating with the PLC 11, a LAN / IF unit 22 for connecting to the LAN 13, a display 23 such as a liquid crystal display device, and a touch panel 24 disposed on the screen of the display 23. , An HMI processing unit 25 that controls the members 21 to 24, and a screen data memory 26 and a variable memory 27 that are referred to by the HMI processing unit 25 and store the screen data and variables described later.
[0035]
The screen data is configured by combining a tag indicating a correspondence between an area on the screen and a device corresponding to display or input in the area. In the present embodiment, the HMI processing unit 25 can switch and display a plurality of unit screens. The tag specifies a file number indicating a unit screen in which the tag is valid, and an operation content to be executed on the unit screen. Event name and reference information referred to for each event.
[0036]
For example, when the tag is a display tag that displays a part graphic corresponding to a predetermined device state in a predetermined screen area (display coordinate range), the reference information includes a display coordinate range and a variable that can specify the device. For example, when the component graphic is a switch, a file number referred to at the time of display, such as a graphic file indicating ON and a graphic file indicating OFF, is included. Further, when the tag is an input tag, reference information includes a valid input coordinate range and a variable of a device to which an input result is written.
[0037]
As shown in FIG. 2, the variable memory 27 stores, for each variable, the name of the variable (variable name) and information (for example, an address or the like) for specifying the device 2a or the internal memory corresponding to the variable. , And the contents of the variables are stored. In the present embodiment, regardless of the model of the device 2a corresponding to the variable, an expression method (for example, word length, presence or absence of a sign, or BCD / binary notation, etc.) when storing the content of the variable is set in advance. If the variables correspond to the real device 2a, the variable memory 27 also stores the expressions of the actual model. In this case, when acquiring or controlling the state of the device 2a via the PLC / IF unit 21, the HMI processing unit 25 converts the expression method into a format and unifies the expression method at the time of storage.
[0038]
On the other hand, the HMI processing unit 25 extracts a display tag whose file number of the base screen is the base screen currently being displayed from the screen data stored in the screen data memory 26 at predetermined time intervals. Further, the HMI processing unit 25 refers to the variable memory 27, reads out the contents of the variable corresponding to the tag, and displays a component graphic corresponding to the contents on the display 23. Here, in the case where the above variables correspond to the device 2a controlled by the PLC 11 connected to the PLC / IF unit 21, the HMI processing unit 25 communicates with the PLC 11 by the PLC / IF unit 21 to communicate with the device 2a. , And the contents of the above variables are updated according to the state. Accordingly, the state of the device 2a is displayed on the display 23.
[0039]
In the case of the device 2a whose variables are controlled by the PLC 11 connected to another programmable display 12, the HMI processing unit 25 communicates with the PLC 11 via the LAN / IF unit 22, the LAN 13, and the other programmable display 12. The status of the device is obtained through communication or the like, and the contents of the variables are updated accordingly.
[0040]
When an input operation such as a pressing operation on the touch panel 24 is received by the operator, the HMI processing unit 25 searches the screen data for an input tag corresponding to the currently displayed base screen and matching the input operation. At the same time, the content of the variable corresponding to the tag is updated according to the input result. Further, the HMI processing unit 25 controls the state of the device 2a in accordance with the contents of the above variables by communicating with the PLC 11 or the programmable display 12 in substantially the same manner as when acquiring the state of the device 2a. Here, even after the input operation, the HMI processing unit 25 displays the state of the device 2a on the screen, so that the operation result is reflected on the screen display.
[0041]
In addition, the HMI processing unit 25 receives a control instruction from a device connected to the LAN 13 to the device 2a of the PLC 11 connected thereto, such as another programmable display 12 or a control host computer 14, for example. Conversely, when the status of the device 2a to be reported to the device is received from its own PLC 11, the communication between the LAN 13 and the communication with the PLC 11 can be relayed by the above-described protocol conversion. .
[0042]
Furthermore, since the programmable display 12 according to the present embodiment also operates as a PLC, an IO / IF unit 31 for connecting to the device 2a and a control file memory (storage means) 32 for storing a control program and the like are provided. And a device control unit (control means) 33 for controlling the device 2a connected to the IO / IF unit 31 based on the control program.
[0043]
The device control unit 33 according to the present embodiment is a PLC that can specify a control target by a variable in a control program, and for example, every predetermined scanning period (scan time) such as several tens of ms. , The state of each device 2a is read and stored in the variable memory 27 as the contents of the variable corresponding to each device 2a.
[0044]
Further, the device control unit 33 sequentially executes each instruction indicated by the control program in the control file memory 32 while referring to the contents of each variable stored in the variable memory 27.
[0045]
Here, in the control program according to the present embodiment, as shown as a ladder program in FIG. 3 or as a mnemonic notation in FIG. (Operand) can be specified by a variable, and when an instruction includes an operand indicated by a variable, the contents of the variable are updated as the instruction is executed. In the control program according to the present embodiment, a character string including a command word name can be specified as a variable name in order to improve readability of the control program. The instruction set that can be executed by the device control unit 33 may include an instruction that does not include an operand, and even if the instruction includes an operand, the operand is a value other than a variable (such as a constant). You may.
[0046]
Further, when an end instruction is executed as one of the sequentially executed instructions, the device control unit 33 ends the execution of the control program, and among the variables stored in the variable memory 27, the IO / IF The contents of the variable corresponding to the device 2a connected to the unit 31 are written to each device 2a. Thus, the device control unit 33 can control each device 2a according to the state of the device 2a according to the control program created by the user, similarly to the PLC.
[0047]
As described above, since the expression method for storing the contents of the variables is unified, the device control unit 33 converts the expression method into a format when communicating with the device 2a via the IO / IF unit 31. And unify the representation method at the time of storage.
[0048]
Furthermore, the programmable display 12 according to the present embodiment displays a ladder monitor screen suitably used when, for example, the state of a certain device 2a is abnormal, when identifying the device 2a causing the abnormality. For this purpose, a control-HMI processing unit (search means) 41 for operating the HMI processing unit 25 and the device control unit 33 in cooperation is provided.
[0049]
The control file memory 32 indicates not only the OP code (instruction word) and operand of the control program but also, for example, information on variables, labels of jump destinations, and how each ladder symbol is connected. Information for displaying a ladder diagram corresponding to the control program, such as information and rung numbers, is also stored.
[0050]
When displaying the ladder monitor screen, the control-HMI processing unit 41 instructs the HMI processing unit 25 to display the ladder monitor screen shown in FIGS. The ladder monitor screen is provided with an area D1 for displaying a ladder diagram, and the control-HMI processing unit 41 refers to the control file memory 32 and controls the control stored in the control file memory 32. A ladder diagram showing a program can be displayed.
[0051]
Here, the ladder diagram displayed in the area D1 is composed of ladder symbols (Iα...) As functional blocks represented by figures or other formats, such as contacts, coils, and counters, and labels related thereto. FIG. 4 is a diagram in which one or a plurality of networks (L1...) Are described in left and right buses (La and Lb), and a control procedure is set according to the type of ladder symbols arranged and the connection relation of each ladder symbol. Can be illustrated.
[0052]
Further, the control-HMI processing unit 41 refers to the variable memory 27 and associates the display format (for example, the shape, the color, the presence or absence of blinking, etc.) of each of the ladder symbols (Iα ...) with the ladder symbol Iα ... Can be updated in accordance with the current control state of the device 2a to be executed.
[0053]
For example, the ladder monitor screens of FIGS. 5 and 6 show the control programs of FIGS. 3 and 4, in which the ladder symbol Iα indicating the load, the ladder symbol Iβ indicating the AND, and the ladder symbol indicating the increment are shown. It is connected to the bus Lb via the symbol Iγ. Each ladder symbol I... Also describes the name of a variable corresponding to the device. Therefore, according to the ladder symbols Iα to Iγ and the connection relationship between the ladder symbols Iα to Iγ, the control procedure corresponding to the command words Cα to Cγ, that is, the first contact is in the ON state, and the second contact is In the case of the ON state, a procedure of incrementing the counter can be described.
[0054]
Further, in the ladder monitor screen of FIG. 5, the ladder symbols Iα and Iδ indicating the loading are described in a shape indicating the off state, whereas in the ladder monitor screen of FIG. 6, both the ladder symbols Iα and Iδ are on. It is described in a shape indicating the state. Therefore, from the ladder diagrams shown in FIGS. 5 and 6, not only the control procedure, but also the control state of the device, that is, in FIG. 5, the first contact is off, and in FIG. It can also be read that the contacts are on.
[0055]
Thus, the ladder monitor screen can display both the state of the device 2a and the control procedure. Therefore, when a failure occurs in a certain device 2a, the state of the other device 2a is controlled so as to be different from the normal state, and when an abnormality is found, not only the device 2a itself recognized as abnormal, but also the device The device 2a related to the control of the device 2a can be sequentially traced. As a result, even when an abnormality is detected in a device 2a different from the device 2a in which the malfunction has occurred, the device 2a in which the malfunction has occurred can be specified.
[0056]
Further, the control-HMI processing unit 41 according to the present embodiment instructs the HMI processing unit 25 to display the conductive portion of the buses La and Lb and the networks L1... In a display format different from that of the non-conductive portion. ing. In the present embodiment, as an example, a non-conductive portion is indicated by a thin white line, and a conductive portion is indicated by a thick green line. Thus, the operator can grasp the conductive portion of the ladder program by referring to the ladder monitor screen. In FIGS. 3 to 6 or the following drawings, the same Greek letters are assigned to corresponding ones, for example, the command word Cα and the ladder symbol Iα.
[0057]
Further, when displaying the ladder diagram as the ladder monitor screen, the control-HMI processing unit 41 according to the present embodiment also combines buttons B... For operating the ladder monitor screen as shown in FIGS. To the HMI processing unit 25 to display the data. Further, when the HMI processing unit 25 receives an operation on each of the buttons B1 to B34, the control-HMI processing unit 41 controls the ladder monitor screen according to the operation.
[0058]
For example, the button B1 is a button for instructing start / stop of a ladder program (control program). When the button B1 is pressed, the control-HMI processing unit 41 causes the device control unit 33 to execute the control program. If so, the control program is stopped, and if the execution of the control program has been stopped, the execution of the control program is started.
[0059]
The button B2 is a button for displaying the number (the rung number) of the network L1... Displayed at the head in the area D1 of the ladder monitor screen. When the button B2 is operated, the control-HMI processing is performed. The unit 41 receives an input of a rung number, for example, by displaying a keypad, and displays a ladder diagram from the ladder number.
[0060]
The button B3 is a button for displaying whether the scroll unit is a rung unit or a page unit. When the button B3 is operated, the control-HMI processing unit 41 switches the scroll unit between the two. . Further, the button B4 is a button for switching between decimal display and hexadecimal display when displaying an integer in the ladder diagram. When the button B4 is operated, the control-HMI processing unit 41 Toggles the display of integers between the two. The button group B5 is a button for instructing movement (scroll) of an area displayed on the ladder monitor screen of the entire ladder diagram according to the control program, and one of the left, right, up, and down buttons is operated. If so, the control-HMI processing unit 41 scrolls the display area in the indicated direction.
[0061]
On the other hand, when the button B6 is operated, the control-HMI processing unit 41 stops displaying the ladder monitor screen and causes the HMI processing unit 25 to display a normal operation screen.
[0062]
Further, the variable memory 27 according to the present embodiment is provided with an area 42 for storing variables relating to the ladder monitor (ladder monitor variables). Like the other variables, the contents of the ladder monitor variables are also subjected to the HMI processing. The configuration can be changed from the unit 25 and the device control unit 33. Further, the control-HMI processing unit 41 monitors the contents of the ladder monitor variable and receives an instruction to the ladder monitor. Note that these instructions to the ladder monitor include the necessity of displaying the ladder monitor screen, a part of the entire control program to be displayed on the ladder monitor screen, and an operation on the ladder monitor screen.
[0063]
As described above, in the programmable display 12 according to the present embodiment, the HMI processing unit 25 is configured to be able to change the contents of the storage area of the ladder monitor variable based on the screen data. The device control unit 33 is also configured to change the contents of the storage area based on the control program. Therefore, the user of the control system 1 can change the trigger for starting the ladder monitor by changing the screen data or the control program.
[0064]
Further, in the programmable display device 12 according to the present embodiment, as one area of the ladder monitor variable, an area for storing a portion displayed by the ladder monitor screen in the entire control program is provided. Can be changed from the HMI processing unit 25 and the device control unit 33 in the same manner as the storage area indicating start / stop.
[0065]
Therefore, when the user of the control system 1 designs the screen data or the control program, a trigger event occurs and the content of the storage area is a trigger event until the ladder monitor screen is activated. By designing the screen data or the control program so as to indicate the relevant portions, the above portions can be displayed when the ladder monitor is started. As a result, when an abnormality occurs, the programmable display 12 can display a ladder monitor screen displaying a portion related to the abnormality.
[0066]
Further, the ladder monitor variable is also provided with an area indicating each of the above operations on the ladder monitor screen, and the control-HMI processing unit 41 performs an operation corresponding to the area by the operator according to the content of the area. The ladder monitor screen can be controlled automatically, just as when it was done. Therefore, the user of the control system 1 can create screen data or a control program for automatically operating the ladder monitor screen. As an example, scrolling and the unit of scrolling of the ladder monitor screen can be controlled by screen data or a control program.
[0067]
In the above configuration, the schematic operation of the control system 1 will be described below with reference to the flowchart shown in FIG. That is, in step 1 (hereinafter abbreviated as S1), screen data for the programmable display 12 is created by, for example, a drawing editor of the control host computer 14. In S2, a control file including a control program for the device control unit 33 of the programmable display 12 is created by a control program editor or the like of the control host computer 14. In each of the above editors, when a device to be operated or referred to is specified by a tag or a control program, a variable corresponding to the device is generated and specified by the variable.
[0068]
Further, in S3, each variable is associated with the actual device 2a or the like by each editor or the like. In addition, not only the actual device 2a but also the storage area of the programmable display 12 and the result of the macro operation can be associated with the variable. In this case, the HMI processing unit 25 can set the result of calculating the content of the variable in the variable memory 27 to the content of the variable associated with the macro according to a preset program (macro).
[0069]
As in the case of variables related to screen display, operation, or control, the ladder monitor variables are associated with trigger events, that is, the storage area or macro of the device 2a or the programmable display 12 by the above-described editors. . Note that the ladder monitor variable can be associated with the operation of the operator by associating a storage area of which contents change according to the operation among the storage areas of the programmable display 12.
[0070]
Here, in each of the above editors, the device is specified by a variable instead of specifying the address of the device. Therefore, the correspondence between the actual device 2a and the variable may be associated before the programmable display 12 starts operating, and the screen and the control procedure can be designed even when the actual address is not determined. Further, even if the actual address is changed due to the change of the device 2a, it is not necessary to change all the portions related to the device 2a in the screen data and the control program, and the association between the variable and the address is changed. Just need.
[0071]
When the association between the screen data, the control program and the variables is completed in S1 to S3, in S4, these data are transmitted to the programmable display 12, and the screen data memory 26, the control file memory 32, and the variable memory 27 Is stored in In the above description, for convenience of explanation, the respective steps are described in the order of S1 to S3. However, if these data are set before the data is stored in the programmable display 12 in S4, the order is different. You may.
[0072]
Further, in S5, the programmable display device 12 controls the device 2a connected to the IO / IF unit 31 based on the control program, and displays an operation screen based on the screen data. Here, the process of S5 is repeated until an event that triggers display of the ladder monitor screen occurs (NO in S6).
[0073]
When an event serving as a trigger occurs (YES in S6), the HMI processing unit 25 or the device control unit 33 stores the start / stop of the ladder monitor variables in S7 according to the screen data or the control program. Change the area to a value indicating startup. On the other hand, the control-HMI processing unit 41 monitors the contents of the storage area, and causes the HMI processing unit 25 to display a ladder monitor screen when the contents of the storage area reach a value indicating activation.
[0074]
More specifically, in S7, the control-HMI processing unit 41 instructs the HMI processing unit 25 to display a screen prepared for the ladder monitor in the screen data. As a result, the buttons B1 to B34 are displayed as shown in FIGS.
[0075]
Further, the control-HMI processing unit 41 analyzes the contents of the control file memory 32 and determines the ladder symbols included in the ladder diagram indicated by the control program, the connection relation between the ladder symbols, and the variables corresponding to the respective ladder symbols. The HMI processing unit 25 is instructed to grasp the name and the address and to display a ladder monitor screen including the ladder diagram (see FIGS. 5 and 6).
[0076]
Further, the control-HMI processing unit 41 specifies variables necessary for displaying the ladder diagram based on the control file. Further, the control-HMI processing unit 41 notifies the device control unit 33 of the variable name of each of these variables, and the device control unit 33 stores the contents of the variable of the variable name in the address of the variable memory 27. Received address. Further, the control-HMI processing unit 41 accesses the address and acquires the contents of the variable.
[0077]
Further, when the contents of each variable can be obtained, the control-HMI processing unit 41 instructs the HMI processing unit 25 to display a ladder symbol corresponding to each variable in a display format corresponding to the contents of each variable. In addition, the variable name and address are obtained from the variable memory 27, and the HMI processing unit 25 is instructed to write the variable name along with each ladder symbol.
[0078]
Here, the content of the variable corresponding to each device 2a has been updated by the HMI processing unit 25 or the device control unit 33. The acquisition of the content of the variable and the display instruction according to the content are described in, for example, FIG. 5 and FIG. This is repeated at a predetermined cycle until the end of the display of the ladder monitor screen is instructed, for example, by pressing the indicated button B6 (until YES is determined in S8).
[0079]
Thus, a ladder diagram corresponding to the state of the device 2a is displayed on the display 23 as shown in FIG. 5 or FIG. Therefore, the operator infers the cause of the abnormality based on the ladder diagram, and determines whether the estimation is correct, for example, by checking whether the device 2a presumed to be the cause of the abnormality is operating normally. Can be confirmed.
[0080]
Further, the control-HMI processing unit 41 controls the display of the ladder monitor screen according to the operation when receiving the operation from the operator until the display end is instructed. This allows the operator to search for the cause of the abnormality by referring to another part of the control program by, for example, scrolling or searching described later.
[0081]
In the present embodiment, the ladder monitor variable is also used to convey the operator's operation received by the HMI processing unit 25 to the control-HMI processing unit 41, and the HMI processing unit 25 performs a touch operation on the buttons B1 to B34. For example, when an operation from the operator is received, an area of the ladder monitor variable corresponding to each operation is changed according to the operation. On the other hand, the control-HMI processing unit 41 monitors the contents of the ladder monitor variables, and controls the display of the ladder monitor screen according to the contents.
[0082]
When the control-HMI processing unit 41 according to the present embodiment detects the selection of a ladder symbol by, for example, touching the touch panel 24, the control-HMI processing unit 41 performs, for example, an address, a character notation of a device state, and the like on the ladder symbol. 5 and 6 are displayed. Thereby, as shown in FIG. 5 and FIG. 6, the details of the device to be noted can be presented without hindering the visibility in the schematic display.
[0083]
Further, the programmable display 12 according to the present embodiment is configured such that a search range is set when searching for an instruction that satisfies a certain condition in order to reduce the time and effort required for searching for a desired instruction from the entire control program. Is limited to one of an instruction word included in an instruction and a variable as an operand. In addition, when both the command condition that sets the search range to the command word and the variable condition that sets the search range to the variable are specified, the command condition matches the command condition and the variable matches the variable condition. You can search for instructions.
[0084]
As a result, unlike the case where a character string search is performed using the entire control program as a search range, there is no problem in that a command or a variable is searched for an instruction that matches the search condition. Only instructions containing instruction words can be searched. Similarly, when searching for an instruction including a desired variable, a problem that a comment or an instruction word matches the search condition does not occur, and only an instruction including a desired variable can be searched. As a result, it is possible to reduce the trouble of finding the desired command from the search result including the command that is undesirably searched, and to reduce the time required for searching for the desired command.
[0085]
More specifically, as shown in FIG. 1, the control file memory 32 according to the present embodiment includes a command word search area (command word name area) 51 to be searched when a command condition is input. , A variable search area (variable name area) 52 which is searched when a variable condition is input. As an example, in the control file memory 32 according to the present embodiment, as shown in FIG. 8, each instruction of the control program has an attribute A1 indicating an instruction word and an attribute A2 indicating a variable. The command word search area 51 is configured from the area storing the attribute A1. The variable search area 52 is composed of an area for storing the attribute A2 of each instruction.
[0086]
On the other hand, as shown in FIGS. 5 and 6, a ladder monitor screen displayed by the control-HMI processing unit 41 on the HMI processing unit 25 is a button used to input a variable condition and instructing display of a list of variables. B21 and a button B22 which is used to input a command condition and instruct a list of command words are provided. In addition to these buttons, the ladder monitor screen includes a button B31 for instructing a search from the beginning (rung 1) of the control program, a button B32 for instructing to delete the search condition, and a button B32 for instructing the search from the current display position. There is also provided a button B33 for instructing a re-search to the same and a button B34 for instructing a re-search in the backward direction from the current display position.
[0087]
When an instruction to display a list of command words is received, for example, by receiving an operation on the button B22 by the operator (YES in S21 shown in FIG. 9), the control-HMI processing unit 41 returns to the HMI in S22. By instructing the processing unit 25 to display a list of command words on the display 23 as shown in FIG. 10, the operator is prompted to select a command word to be searched.
[0088]
As a list of command words, each icon may be displayed in a list. However, in the present embodiment, in order to increase the number of command words that can be displayed in a list on the screen, the names of the command words (mnemonic notation) are used. Is displayed in a list. The list of the command words may be prepared in advance as screen data, for example, like the operation screen, or, for example, the control-HMI processing unit 41 may describe the control program from the control file memory 32. The instruction set may be read, a list of the instruction words included in the instruction set may be created, and the list may be displayed on the HMI processing unit 25.
[0089]
In S23, when an instruction to select a command is received by the operator, for example, a touch on a region in which the command to be searched is displayed is received, the control-HMI processing unit 41 proceeds to S24 as shown in FIG. 5 or 6, the selected command word (in this case, OUT) is displayed as the command condition instead of the button B22 for instructing the display of the command list.
[0090]
In this state, the ladder diagram is displayed as in FIGS. 5 and 6, and the control-HMI processing unit 41 returns to the process of S21 shown in FIG. 9 and waits for the next operation.
[0091]
As shown in FIG. 11, in a state where only the search condition of the command word is input, for example, when a search instruction is received by operating a button B31, B33 or B34 for instructing a search (at S21 and S31). , NO, and YES in S41), the control-HMI processing unit 41 searches the command word search area 51 shown in FIG. 1 in S42, and sets the command word condition (in this case, OUT) in the command word condition. Search for matching instructions. If it is not a search process (NO in S41), the control-HMI processing unit 41 performs other processes in S51, such as updating the display of each ladder symbol.
[0092]
As shown in FIG. 8, the command word search area 51 according to the present embodiment includes an area for storing the attribute A1 of the command word among the areas for storing each command of the control program. Therefore, as a result of the search, an instruction Cη in which the content of the attribute A1 indicates the instruction word condition (in this case, OUT) is found.
[0093]
In S42, when an instruction matching the search condition is found, the control-HMI processing unit 41 displays a part including the instruction in the control program in S43, and then returns to the processing of S21 shown in FIG. Wait for the next operation.
[0094]
The control-HMI processing unit 41 according to the present embodiment not only changes the location displayed on the ladder monitor screen according to the search result, but also distinguishes the ladder symbol Iη as shown in FIG. The display format of the ladder symbol Iη corresponding to the searched command is displayed in a format different from other formats (for example, enclosed in a square).
[0095]
On the other hand, for example, when an instruction to display a list of variables is received, for example, by receiving an operation on the button B21 by the operator (YES in S31), the control-HMI processing unit 41 performs the HMI processing in S32. Instructing the unit 25 to display a list of variables on the display 23 as shown in FIG. 13, prompting the operator to select a variable to be searched. Further, the control-HMI processing unit 41 according to the present embodiment also displays the current content along with the variable name when displaying each variable in a list, so that the operator can determine whether or not to search from the content of the variable. Can also be determined. Further, in the present embodiment, the total number of pages (for example, 2) and the number of pages currently displayed (for example, 1) are displayed together with the button B22. Thus, the operator can easily determine whether there is a variable that is not currently displayed.
[0096]
Note that the list of variables may be prepared in advance as screen data, for example, like the operation screen, but since the change in the control program does not always match the change in the screen data, for example, It is preferable that the control-HMI processing unit 41 extracts the variable names included in the control program from the control file memory 32, creates a list of variables, and causes the HMI processing unit 25 to display the list. FIG. 13 illustrates a case where a list of variables is specified in a state where no command word is specified as a search condition, as shown in FIG. 5 or FIG. 6, for example. Is displayed.
[0097]
Further, as in S23 and S24, when the selection of a variable to be searched is instructed in S33, the control-HMI processing unit 41 instructs in S34 to display a list of variables as shown in FIG. After displaying the selected variable (in this case, CTUD) as a variable condition instead of the button B21 (see FIG. 5), the process returns to S21 to wait for the next operation. In addition, the control-HMI processing unit 41 according to the present embodiment displays the name of the selected variable and the current value of the variable.
[0098]
As shown in FIG. 14, when the search instruction is received in a state where only the search condition of the variable is input, the control-HMI processing unit 41 searches the variable search area 52 shown in FIG. Then, an instruction matching the variable condition (in this case, CTUD) is searched.
[0099]
As shown in FIG. 8, the variable search area 52 according to the present embodiment includes an area for storing a variable attribute A2 among the areas for storing each instruction of the control program. Therefore, as a result of the search, an instruction Cθ in which the content of the attribute A2 indicates a variable condition (in this case, CTUD) is found.
[0100]
Further, in the present embodiment, even if either the command condition or the variable condition is input first, the other input can be accepted. For example, as shown in FIG. 11, the command condition (in this case, , OUT) is specified, and when a display of a variable list is instructed (YES in S31), a list of variables is displayed as shown in FIG. 15 (S32), and selection of a variable is accepted. (S33) Further, the selection result is displayed (S34). As a result, as shown in FIG. 16, both a command condition and a variable condition can be set as search conditions.
[0101]
In the above description, the case where the command condition is specified first has been described as an example. However, as shown in FIG. 14, when the display of the command list is instructed in a state where the variable condition is set. (YES in S21), a list of command words is displayed (S22), the selection of the command word is accepted (S23), and the selection result is displayed (S24). Also in this case, as shown in FIG. 16, both a command condition and a variable condition are set as search conditions.
[0102]
When a search is instructed in a state where both conditions are set, the control-HMI processing unit 41 stores a command word that matches the command word condition in the command word search area 51, and furthermore, stores the command word in the variable search area. At 52, an instruction in which a variable matching the variable condition is stored is searched.
[0103]
In the present embodiment, each command of the control program has an attribute A1 indicating a command word and an attribute A2 indicating a variable, and the attribute A1 matches a command condition (in this case, OUT). An instruction whose attribute A2 matches a variable condition (in this case, CTUD) is searched. As a result, the instruction Cθ is found. As a result, as shown in FIG. 17, the ladder symbol Iθ corresponding to the command Cθ is displayed in a display format different from other ladder symbols, and is notified to the operator as a search result.
[0104]
As described above, the programmable display 12 according to the present embodiment can search for an instruction that matches both conditions when a condition that sets a command word as a search range and a condition that sets a variable as a search range are set. . Here, if only one of the condition that sets the command word as the search range and the condition that sets the variable as the search range can be set, the problem of erroneously searching for a comment or a character string included in the other can be solved. When the same instruction word or variable is used many times in the control program, the number of instructions that match the conditions increases, and it takes time to find a desired instruction. However, since instructions matching the above conditions can be searched, both the instruction word and the variable presumed to be related to the abnormality are set as the respective search conditions, so that the desired instruction and the rung near the instruction can be obtained. Can be referenced with less effort. For example, if one wants to know “why a certain contact does not turn on”, the variable assigned to that contact can be searched for in connection with the output coil command. As described above, when searching for a variable or a device in order to follow the movement of the ladder, the search can be performed together with the instruction word to be operated on. As a result, it is possible to reduce the maintenance time required for identifying the cause of the abnormality and returning to the normal control state.
[0105]
In addition, the programmable display 12 according to the present embodiment can accept the search under the condition and the setting of the other condition even when either of the above conditions is set. In doing so, each condition can be entered in the order in which the search conditions came up. In addition, as a result of searching under one condition, when it is determined that there are many instructions that match the condition, the other condition can be input. As a result, the operability at the time of command search can be improved as compared with the case where the order in which both conditions are accepted is fixed.
[0106]
In the above description, the case where each instruction has the attribute A1 of the instruction word and the attribute A2 of the variable has been described as an example, but the present invention is not limited to this. For example, the same effect can be obtained if the command word and the variable are stored so that they can be read out for each command of the control program. In this case, for each command, the control-HMI processing unit 41 can read the command from the area where the command is stored and determine whether or not the command matches the command condition. Similarly, for each instruction, the variable can be read from the area where the variable is stored, and it can be determined whether or not the instruction matches the variable condition. Conversely, for each command word and variable of the control program, which command is used may be stored. Even in this case, the control-HMI processing unit 41 can search for an instruction word that matches the instruction word condition from the area where the instruction word is stored, and can extract the instruction in which the instruction word is used. Similarly, a variable that matches a variable condition can be searched from an area in which the variable is stored, and an instruction in which the variable is used can be extracted. In any case, an area in which the instruction word is stored and an area in which the variable is stored are provided separately, and when the instruction word condition is set, the former is referred to by referring to the former. If a variable condition is set by searching for an instruction that matches the condition, the same effect can be obtained if an instruction that matches the condition can be searched by referring to the latter.
[0107]
In the above description, an example is given in which the control program stored in the control file memory 32 is used for both the execution of the control program by the device control unit 33 and the search by the control-HMI processing unit 41. As described above, if both show the same procedure, a control program in a format suitable for execution and a control program in a format suitable for retrieval may be stored separately.
[0108]
In the above description, an example in which the activation and operation of the ladder monitor screen of the programmable display 12 are controlled by a variable that can be associated with the storage area of the device 2a or the storage area of the programmable display 12 or the operation result of the macro. As described above, for example, even when the ladder monitor screen is displayed / operated by the control host computer 14, substantially the same effects can be obtained.
[0109]
However, if the ladder monitor screen can be displayed on the programmable display 12 operated by the operator near the target system 2 (site) as in the present embodiment, if an abnormality occurs, a new ladder monitor is set up at the site. By referring to these screens, it is possible to pursue the cause of the abnormality without bringing a device.
[0110]
In the case of coping at the site, unlike the case of coping at a remote place such as the control host computer 14, events that are important enough to automatically start the ladder monitor are limited to abnormalities determined by the user to be particularly important, Since it is different for each user, it is difficult to determine in advance. In addition, some users may want not only the state of the device 2a, but also the contents of the storage area of the programmable display 12 and the result of a macro operation as a trigger event. Therefore, it is desirable that the display of the ladder monitor screen and the operation on the screen can be controlled by a variable that can be associated with any of the above on the programmable display 12 as in the present embodiment.
[0111]
Each of the members 21 to 52 includes an arithmetic unit such as a CPU that executes a program stored in a storage unit such as a ROM or a RAM, and an input / output unit such as a touch panel or a liquid crystal display, or an interface circuit. This is a functional block realized by controlling a communication circuit. Therefore, the computer having these units reads the recording medium (for example, a CD-ROM or the like) on which the program is recorded, and executes the program to realize the programmable display 12 according to the present embodiment. For example, if a program for downloading a program via a serial cable, LAN 13, or another communication path is installed in the computer in advance, the program is distributed to the computer via the communication path. You can also.
[0112]
【The invention's effect】
As described above, the control program search device according to the first aspect of the invention can receive an input of a condition in which the search range is limited to a command or a variable, and the command condition in which the search range is limited to the command is If input, the control program searches the control program for an instruction whose instruction satisfies the instruction condition, and if a variable condition whose search target is limited to a variable is input, the variable In this configuration, a search means for searching for an instruction matching the above is provided. Further, a program according to the invention of claim 7 is a program for operating a computer as each means of claim 1, and when the program is executed by the computer, the computer executes the control program search according to claim 1. Operate as a device.
[0113]
In the above configuration, since the search range can be limited to the command word or the variable, the trouble of finding the desired command from the search result including the command searched undesirably can be reduced, and the time required for searching for the desired command can be reduced. This has the effect of being shortened.
[0114]
As described above, in the control program search device according to the second aspect of the present invention, in the configuration of the first aspect, the control program can use a character string including an instruction word name as a variable name, The storage means includes a variable name area in which the variable names of the variables appearing in the control program are stored, and a command word name area in which the command names of the command words appearing in the control program are stored. The search means is configured to search a command word name area when a command word name is input as a command condition, and to search a variable name area when a variable condition is input as a variable condition.
[0115]
In the above configuration, since a character string including a command word name can be used as a variable name, the number of character strings that can be set as a variable name increases, and it becomes easy to set a variable name that is easy for a user of the control program search device to read. Also in this case, since either one of the instruction word name area and the variable name area is searched according to the search range, an instruction whose instruction word name or variable name matches the search condition can be searched without any problem. . As a result, there is an effect that it is possible to realize a control program search device that satisfies both the improvement in readability and the reduction in time required for searching for a desired command.
[0116]
As described above, the control program search device according to the third aspect of the present invention is based on the control program stored in the storage means or a control program having the same procedure as the control program in the configuration of the first or second aspect of the invention. And a control means for controlling the control target.
[0117]
In the above configuration, since the control program search device also includes the control unit, the control program search device can operate as a control device that controls a control target based on the control program. Therefore, even if an abnormality occurs in the control system while the control device is controlling the control target, a command estimated to be related to the abnormality from the control program of the control device without connecting a new device in particular. Can be searched. Here, as described above, the search means can perform a search by limiting the search range to a command word or a variable, so that the time for searching for a desired command can be reduced. As a result, it is possible to more quickly identify the cause of the abnormality, and to shorten the time required for the control system including the control device to recover from the abnormality.
[0118]
As described above, in the control program search device according to the fourth aspect of the present invention, in the configuration of the first, second, or third aspect, the search means includes, as search conditions, the instruction condition and the variable condition. Are input and an AND search is instructed, the instruction word matches the instruction word condition and the variable is searched for an instruction that matches the variable condition.
[0119]
In the above configuration, the command condition and the variable condition can be AND-searched, so that a certain command word or variable is used many times in the control program, and it is troublesome to search for a desired command with only one condition. Even if there is, there is an effect that a desired command can be searched faster.
[0120]
In the control program search device according to the fifth aspect of the present invention, as described above, in the configuration of the fourth aspect of the present invention, the search means may determine whether the command condition or the variable condition is input first. , The other input can be received.
[0121]
In the above configuration, the search means can accept the other input regardless of whether the command condition or the variable condition is input first, so that the user of the control program search device can determine the search conditions in the order in which they came up. Thus, each search condition can be specified, and the operability of the control program search device can be improved.
[0122]
As described above, in the control program search device according to the sixth aspect of the present invention, in the configuration of the first, second, third, fourth, or fifth aspect, the search means stores the control program in response to an instruction. A list of included command words or variables is displayed, and the user is prompted to select a command word specified by the above-described command condition or a variable specified by the above-described variable condition.
[0123]
In the above configuration, the user of the control program search device can input a command word specified by the command word condition or a variable specified by the variable condition by simply selecting from the command words or variables displayed in the list. This has the effect that the operability of the control program search device can be improved.
[Brief description of the drawings]
FIG. 1, showing an embodiment of the present invention, is a block diagram illustrating a main configuration of a control system.
FIG. 2 is a diagram showing a data structure of variables stored in a variable memory of a programmable display of the control system.
FIG. 3 is a diagram illustrating a control program executed by a programmable logic controller function of the programmable display device as a ladder program.
FIG. 4 is a diagram showing the control program by mnemonics.
FIG. 5 is a view showing an example of a ladder monitor screen displayed on the programmable display device.
FIG. 6 shows an example of a screen of the ladder monitor, and shows a state where a first contact is closed.
FIG. 7 is a flowchart schematically showing the operation of the control system.
FIG. 8 is a diagram showing a control program stored in a control file memory of the programmable display device.
FIG. 9 is a flowchart showing an operation of the programmable display device and showing an operation at the time of a search on a ladder monitor screen.
FIG. 10 is a view showing an example of a screen of the ladder monitor and showing a state in which a command word list is displayed.
FIG. 11 shows an example of a screen of the ladder monitor, and shows a state in which a command word to be searched is selected.
FIG. 12 is a view showing an example of a screen of the ladder monitor, and showing a state in which a search result with the command is displayed.
FIG. 13 shows an example of a screen of the ladder monitor, and shows a state where a list of variables is displayed.
FIG. 14 shows an example of a screen of the ladder monitor, and shows a state in which a variable to be searched is selected.
FIG. 15 shows an example of a screen of the ladder monitor, and shows a case where a variable list is displayed with a command word to be searched being specified.
FIG. 16 shows an example of a screen of the ladder monitor, and shows a state in which a command word and a variable to be searched are specified.
FIG. 17 is a diagram illustrating an example of a screen of the ladder monitor, showing a state in which a search result with the command and the variable is displayed.
[Explanation of symbols]
2a device (control target)
12 Programmable display (control program search device)
32 Control file memory (storage means)
33 Device control unit (control means)
41 Control-HMI processing unit (search means)
51 Command word search area (command word name area)
52 Variable search area (variable name area)

Claims (7)

制御プログラムを記憶する記憶手段と、当該制御プログラムに含まれる命令を検索するための条件の入力を受け付け、上記記憶手段の制御プログラムの中から当該条件に該当する命令を検索する検索手段とを有する制御プログラム検索装置において、
上記制御プログラムは、命令の動作を示す命令語と、当該動作の対象を特定可能で、しかも、変数名により特定可能な変数との組み合わせからなる命令を含むことができ、
上記検索手段は、検索範囲を命令語または変数に限定した条件の入力を受け付け可能であり、検索範囲が命令語に限定された命令語条件が入力された場合、上記記憶手段の制御プログラムから、命令語が命令語条件に合った命令を検索すると共に、検索対象が変数に限定された変数条件が入力された場合は、上記記憶手段の制御プログラムから、変数が変数条件に合った命令を検索することを特徴とする制御プログラム検索装置。
Storage means for storing the control program; and search means for receiving an input of a condition for searching for an instruction included in the control program and searching for an instruction corresponding to the condition from the control program of the storage means. In the control program search device,
The control program can include an instruction composed of a combination of a command word indicating an operation of the instruction and a variable that can specify a target of the operation and can be specified by a variable name.
The search means is capable of accepting input of a condition in which a search range is limited to a command word or a variable, and when a command word condition in which a search range is limited to a command word is input, from a control program of the storage means, When an instruction whose instruction word satisfies the instruction word condition is searched, and a variable condition whose search target is limited to a variable is input, an instruction whose variable satisfies the variable condition is searched from the control program of the storage means. A control program search device characterized by performing:
上記制御プログラムでは、変数名として、命令語名を含む文字列を使用可能であり、
上記記憶手段には、制御プログラムに出現する変数の変数名が記憶された変数名領域と、制御プログラムに出現する命令語の命令語名が記憶された命令語名領域とが含まれていると共に、
上記検索手段は、命令語条件として、命令語名が入力された場合、命令語名領域を検索し、変数条件として、変数条件が入力された場合、変数名領域を検索することを特徴とする請求項1記載の制御プログラム検索装置。
In the above control program, a character string including a command word name can be used as a variable name,
The storage means includes a variable name area in which the variable names of the variables appearing in the control program are stored, and a command word name area in which the command names of the command words appearing in the control program are stored. ,
The search means searches a command word name area when a command name is input as a command condition, and searches a variable name area when a variable condition is input as a variable condition. The control program search device according to claim 1.
上記記憶手段に記憶された制御プログラム、または、それと同一手順の制御プログラムに基づいて、制御対象を制御する制御手段を備えていることを特徴とする請求項1または2記載の制御プログラム検索装置。3. The control program search device according to claim 1, further comprising control means for controlling a control target based on the control program stored in the storage means or a control program having the same procedure as the control program. 上記検索手段は、検索の条件として、上記命令語条件と変数条件との双方が入力され、アンド検索が指示された場合、命令語が命令語条件に合い、しかも、変数が変数条件に合った命令を検索することを特徴とする請求項1、2または3記載の制御プログラム検索装置。The search means inputs both the command condition and the variable condition as search conditions, and when an AND search is instructed, the command matches the command condition and the variable matches the variable condition. 4. The control program search device according to claim 1, wherein the control program is searched for an instruction. 上記検索手段は、上記命令語条件および変数条件のいずれが先に入力された場合でも、他方の入力を受け付け可能であることを特徴とする請求項4記載の制御プログラム検索装置。5. The control program search device according to claim 4, wherein said search means is capable of accepting one of said command condition and said variable condition before the other is input. 上記検索手段は、指示に応じて、上記制御プログラムに含まれる命令語あるいは変数の一覧を表示し、上記命令語条件で指定する命令語、あるいは、上記変数条件で指定する変数の選択を促すことを特徴とする請求項1、2、3、4または5記載の制御プログラム検索装置。The search means displays a list of command words or variables included in the control program in response to the instruction, and prompts the user to select a command word specified by the command word condition or a variable specified by the variable condition. The control program search device according to claim 1, 2, 3, 4, or 5, wherein 請求項1記載の各手段として、コンピュータを動作させるプログラム。A program for operating a computer as each means according to claim 1.
JP2002158143A 2002-05-30 2002-05-30 Control program search device and program thereof Expired - Lifetime JP3847665B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002158143A JP3847665B2 (en) 2002-05-30 2002-05-30 Control program search device and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002158143A JP3847665B2 (en) 2002-05-30 2002-05-30 Control program search device and program thereof

Publications (2)

Publication Number Publication Date
JP2004005060A true JP2004005060A (en) 2004-01-08
JP3847665B2 JP3847665B2 (en) 2006-11-22

Family

ID=30428616

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002158143A Expired - Lifetime JP3847665B2 (en) 2002-05-30 2002-05-30 Control program search device and program thereof

Country Status (1)

Country Link
JP (1) JP3847665B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006318504A (en) * 2004-03-31 2006-11-24 Omron Corp Control method of development support device
JP2008077467A (en) * 2006-09-22 2008-04-03 Koyo Electronics Ind Co Ltd Display unit
WO2010095289A1 (en) * 2009-02-18 2010-08-26 三菱電機株式会社 Program analysis support device
DE102015016413A1 (en) 2014-12-19 2016-06-23 Fanuc Corporation A ladder program retrieval device capable of retrieving ladder circuits based on predetermined signal operating conditions
CN115335782A (en) * 2020-03-26 2022-11-11 三菱电机株式会社 Programming support program, programming support device, and programming support method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006318504A (en) * 2004-03-31 2006-11-24 Omron Corp Control method of development support device
JP4517302B2 (en) * 2004-03-31 2010-08-04 オムロン株式会社 Control method and program for development support apparatus and recording medium
JP2008077467A (en) * 2006-09-22 2008-04-03 Koyo Electronics Ind Co Ltd Display unit
WO2010095289A1 (en) * 2009-02-18 2010-08-26 三菱電機株式会社 Program analysis support device
JP5138090B2 (en) * 2009-02-18 2013-02-06 三菱電機株式会社 Program analysis support device
CN102317877B (en) * 2009-02-18 2014-07-09 三菱电机株式会社 Program analysis support device
US9087151B2 (en) 2009-02-18 2015-07-21 Mitsubishi Electric Corporation Program analysis support device
DE102015016413A1 (en) 2014-12-19 2016-06-23 Fanuc Corporation A ladder program retrieval device capable of retrieving ladder circuits based on predetermined signal operating conditions
CN105717830A (en) * 2014-12-19 2016-06-29 发那科株式会社 Ladder Program Retrieval Device Capable Of Retrieving Ladder Circuits Based On Specified Signal Operation Conditions
US10243566B2 (en) 2014-12-19 2019-03-26 Fanuc Corporation Ladder program retrieval device capable of retrieving ladder circuits based on specified signal operation conditions
CN115335782A (en) * 2020-03-26 2022-11-11 三菱电机株式会社 Programming support program, programming support device, and programming support method

Also Published As

Publication number Publication date
JP3847665B2 (en) 2006-11-22

Similar Documents

Publication Publication Date Title
KR950012071B1 (en) Data processing system
US10139805B2 (en) Ladder diagram monitoring device capable of additionally displaying operation situation of CNC in comment
KR20040081004A (en) Displaying method of sequence circuit of injection molding machine
JP2004005060A (en) Control program retrieval device and its program
JP4476223B2 (en) Screen data creation device, screen data editing method, and screen data editing program
JP4043742B2 (en) Ladder monitor device, program thereof, and recording medium
JP4941674B2 (en) Simulation system
JP2001175322A (en) Process monitoring and controlling equipment, screen display control method and storage medium
JP2007034797A (en) Image data generator and its program, and recording medium
JP2003157105A (en) Control system, and its program and recording medium
JP2004302880A (en) Programmable logic controller, program editor device, their program, and recording medium
JP2006318504A (en) Control method of development support device
US11803376B2 (en) Programming support apparatus for developing a user program to be executed by a programmable logic controller
JP4387288B2 (en) Display device for control, editor device, program, and recording medium
JPH08147265A (en) Method and device for verifying operability
JP2782864B2 (en) Terminal device
JPH08339208A (en) Program preparation device for programmable controller
JP2005251014A (en) Control system, control monitor program, recording medium recorded with program therefor, editor device, editor program, and recording medium recorded with program therefor
JP3904865B2 (en) Control system, program thereof and recording medium
JPH06295236A (en) Engineering device
JPH07261830A (en) Plant operation support system
WO2024014364A1 (en) Ladder program editing device, editing method, and editing program
JP2705260B2 (en) Terminal device
JPH08314532A (en) Plant monitor device
JPH0863218A (en) Program constitution display system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060207

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060207

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060823

R150 Certificate of patent or registration of utility model

Ref document number: 3847665

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090901

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100901

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20100901

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110901

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20120901

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20130901

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term