JP4517302B2 - Control method and program for development support apparatus and recording medium - Google Patents

Control method and program for development support apparatus and recording medium Download PDF

Info

Publication number
JP4517302B2
JP4517302B2 JP2006206999A JP2006206999A JP4517302B2 JP 4517302 B2 JP4517302 B2 JP 4517302B2 JP 2006206999 A JP2006206999 A JP 2006206999A JP 2006206999 A JP2006206999 A JP 2006206999A JP 4517302 B2 JP4517302 B2 JP 4517302B2
Authority
JP
Japan
Prior art keywords
program
user program
display unit
output
displayed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006206999A
Other languages
Japanese (ja)
Other versions
JP2006318504A (en
Inventor
誠 井上
賢 筒井
高志 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Priority to JP2006206999A priority Critical patent/JP4517302B2/en
Publication of JP2006318504A publication Critical patent/JP2006318504A/en
Application granted granted Critical
Publication of JP4517302B2 publication Critical patent/JP4517302B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

この発明は、開発支援装置の制御方法及びプログラム並びに記録媒体に関するものである。 This invention relates to a control method and a program and recording medium of the aid device.

ファクトリーオートメーション(FA)の制御装置として、プログラマブルコントローラ(PLC)が用いられている。このPLCは、複数のユニットから構成される。すなわち、電源供給源の電源ユニット,PLC全体の制御を統率するCPUユニット,FAの生産装置や設備装置の適所に取り付けたスイッチやセンサの信号を入力する入力ユニット,アクチュエータなどに制御出力を出す出力ユニット,通信ネットワークに接続するための通信ユニットなどの各種のユニットを適宜組み合わせて構成される。   A programmable controller (PLC) is used as a control device for factory automation (FA). This PLC is composed of a plurality of units. That is, a power supply unit of a power supply source, a CPU unit that controls the entire PLC, an output unit that inputs a switch or sensor signal attached to an appropriate place in an FA production device or facility device, an output that outputs a control output Various units such as a unit and a communication unit for connecting to a communication network are appropriately combined.

PLCのCPUユニットにおける制御は、入力ユニットで入力した信号をCPUユニットのI/Oメモリに取り込み(INリフレッシュ)、予め登録されたラダー言語で組まれたユーザプログラムに基づき論理演算をし(演算実行)、その演算実行結果をI/Oメモリに書き込んで出力ユニットに送り出し(OUTリフレッシュ)、その後、いわゆる周辺処理を行うということをサイクリックに繰り返し処理するようになる。   The control in the CPU unit of the PLC takes in the signal input from the input unit into the I / O memory of the CPU unit (IN refresh) and performs a logical operation based on a user program written in a ladder language registered in advance (calculation execution) The operation execution result is written in the I / O memory, sent to the output unit (OUT refresh), and then the so-called peripheral processing is cyclically repeated.

上記したユーザプログラムは、通常、開発支援装置を用いて生成したラダープログラムであり、通信回線を介してPLCのCPUユニットにダウンロードする。また、作成したラダープログラムに不具合が生じた場合には、ユーザは開発支援装置の表示画面にそのラダープログラムを表示させて検証し、不良箇所を見つけて修正作業を行なう。そして、修正したラダープログラムをPLCにダウンロードする。   The above-described user program is usually a ladder program generated using a development support apparatus, and is downloaded to the CPU unit of the PLC via a communication line. In addition, when a defect occurs in the created ladder program, the user displays the ladder program on the display screen of the development support apparatus, verifies it, finds a defective portion, and performs correction work. Then, the modified ladder program is downloaded to the PLC.

ラダープログラムのデバッグの作業は、想定外の動作をした出力命令のオペランド(接点番号やメモリ番号)をキーにして、その出力命令に関連する入力命令または出力命令を探して、ラダープログラムを修正、編集することを繰り返す。接点番号は、入力ユニットの端子台の端子場所を示す端子番号や、出力ユニットの端子台の端子場所を示す端子番号である。メモリ番号は、プログラマブルコントローラ内のIOデータメモリのアドレス値である。この際、デバッグ作業者にとって、想定外の動作をした出力命令に関連する入力命令または出力命令を探すことは煩雑である。例えば、ある出力命令に問題がある場合において、その出力命令に関連する入力命令が複数あるような場合には、それら複数の入力命令を全てチェックする必要があり、探し出す処理が煩雑である。また、上記出力命令と同じオペランドを持つ入力命令を含むプログラム部分がある場合は、問題となる出力命令に関係するプログラムを修正した後、そのプログラムも正常に動作することを確認する必要があり、確認すべき命令を漏らすことなく全てチェックすることは非常に煩雑である。そして、ラダープログラムが長くなるほどその問題は顕著となる。   The debugging of the ladder program involves correcting the ladder program by searching for the input instruction or output instruction related to the output instruction using the operand (contact number or memory number) of the output instruction that performed an unexpected operation as a key. Repeat editing. The contact number is a terminal number indicating the terminal location of the terminal block of the input unit or a terminal number indicating the terminal location of the terminal block of the output unit. The memory number is an address value of the IO data memory in the programmable controller. At this time, it is troublesome for a debug operator to search for an input command or an output command related to an output command that has performed an unexpected operation. For example, when there is a problem with a certain output instruction and there are a plurality of input instructions related to the output instruction, it is necessary to check all of the plurality of input instructions, and the process of finding out is complicated. In addition, if there is a program part that includes an input instruction having the same operand as the above output instruction, after correcting the program related to the output instruction in question, it is necessary to confirm that the program also operates normally. It is very cumbersome to check all the commands to be confirmed without leaking them. The problem becomes more prominent as the ladder program becomes longer.

この発明は、出力命令と出力命令以外の構成要素を含むプログラマブルコントローラ用のユーザプログラムにおける他の命令に影響を与える出力命令を簡単に検出し、その出力命令を含むプログラムを表示したり、その出力命令に関係する他の構成要素を抽出して表示することができ、ユーザプログラムのデバッグが容易に行える開発支援装置の制御方法及びプログラム並びに記録媒体を提供することを目的とする。 The present invention, the output instruction an output instruction affects the other instructions in the user program for a programmable controller including a component other than the easily detect the output instruction to view a program that contains the output command, the Another object of the present invention is to provide a control method and program for a development support apparatus and a recording medium that can extract and display other components related to an output command and can easily debug a user program.

本発明の開発支援装置の制御方法は、例えばプログラマブルコントローラにダウンロードするユーザプログラムを編集等するのに適したものである。具体的には、出力命令と出力命令以外の構成要素を含むプログラマブルコントローラ用のユーザプログラムを、プログラム記憶手段に記憶し、表示手段に表示する、前記ユーザプログラムを開発するための開発支援装置の制御方法であって、前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記ユーザプログラムに含まれているすべての出力命令を抽出し、前記抽出した出力命令をユーザプログラム上での出現順に登録することによりアウトライン情報を生成する生成処理を実行し、前記表示手段に設けたユーザプログラム表示部に前記プログラム記憶手段に記憶されたユーザプログラムを表示し、前記表示手段に設けたアウトライン情報表示部に、前記生成処理で生成した前記アウトライン情報に基づいて出力命令を出現順に表示する。表示手段は、実施の形態のラダー表示部12aに対応する。 The control method of the development support apparatus of the present invention is suitable for editing a user program downloaded to a programmable controller, for example. Specifically, control of the development support apparatus for developing the user program, which stores an output instruction and a user program for a programmable controller including components other than the output instruction in the program storage means and displays on the display means a method, the components of the user program stored in said program storage means scans sequentially from the head a issue extract all output instructions contained in the user program, Yoo output instructions that the extracted A generation process for generating outline information by registering in the order of appearance on the user program is executed, and the user program stored in the program storage unit is displayed on the user program display unit provided in the display unit. In the outline information display section provided, the outline information generated by the generation process Zui and displays the output instruction in the order in which they appear. The display means corresponds to the ladder display unit 12a of the embodiment.

このようにすると、出力命令を含む所定の構成要素がアウトライン情報表示部にプログラム上での出現順に表示されるため、その表示された構成要素を見ることにより、ユーザプログラム上で所定の構成要素が全体のどの位の位置に存在しているかなどのユーザプログラムのアウトラインを認識することができる。また通常コメントには、ユーザプログラム上での位置を示すステップ番号は付与されないが、コメントを含めてユーザプログラムのすべての構成要素に別途固有のインデックス番号を付与した場合には、コメントを所定の構成要素に設定した場合でもそのインデックス番号を用いてアウトライン情報表示部と、ユーザプログラム表示部の連係を取ることができる。つまり、アウトライン情報表示部に表示された所定の構成要素を選択すると、その選択された構成要素に付されたインデックス番号に対応するラダープログラムの構成要素を認識し、それをユーザプログラム表示部に表示することができる。よって、目的とするラダープログラムの構成要素を簡単に見つけることができる。   In this way, since the predetermined component including the output command is displayed in the order of appearance on the program in the outline information display unit, the predetermined component on the user program is displayed by looking at the displayed component. It is possible to recognize the outline of the user program, such as where it is located in the whole. In addition, a step number indicating the position on the user program is not assigned to a normal comment. However, if a unique index number is assigned to all the components of the user program including the comment, the comment has a predetermined configuration. Even when an element is set, the outline information display unit and the user program display unit can be linked using the index number. That is, when a predetermined component displayed on the outline information display unit is selected, the ladder program component corresponding to the index number assigned to the selected component is recognized and displayed on the user program display unit. can do. Therefore, it is possible to easily find the constituent elements of the target ladder program.

また、前記生成処理は、ユーザプログラムの構成要素のうち、出力命令及び出力命令以外の所定の構成要素を抽出対象として選択されると、前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記選択された抽出対象である出力命令および出力命令以外の所定の構成要素であるか否かを判断した結果に基づいて、前記選択された抽出対象であるすべての出力命令および出力命令以外の所定の構成要素を抽出するものであり、その抽出した出力命令および出力命令以外の所定の構成要素をユーザプログラム上での出現順に登録することによりアウトライン情報を生成するようにしてもよい。In addition, when the generation process selects an output instruction and a predetermined constituent element other than the output instruction as an extraction target from among the constituent elements of the user program, the generation process starts with the constituent element of the user program stored in the program storage unit. All the output commands that are the selected extraction target and the selected output target based on the result of determining whether or not the selected output command is a predetermined component other than the output command and the output command. Predetermined components other than the output command are extracted, and the outline information is generated by registering the extracted output command and the predetermined components other than the output command in the order of appearance on the user program. Good.

さらに、本発明のプログラムは、出力命令と出力命令以外の構成要素を含むプログラマブルコントローラ用のユーザプログラムを、プログラム記憶手段に記憶し、表示手段に表示する、前記ユーザプログラムを開発するための開発支援装置であるコンピュータに、
前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記ユーザプログラムに含まれているすべての出力命令を抽出し、前記抽出した出力命令をユーザプログラム上での出現順に登録することによりアウトライン情報を生成する生成処理、
前記表示手段に設けたユーザプログラム表示部に前記プログラム記憶手段に記憶されたユーザプログラムを表示し、前記表示手段に設けたアウトライン情報表示部に、前記生成処理で生成した前記アウトライン情報に基づいて出力命令を出現順に表示する処理、
を実行させるものである。そして、本発明の記録媒体は、係るプログラムを格納したコンピュータ読み取り可能な記録媒体である。
Further, the program of the present invention stores a user program for a programmable controller including an output instruction and a component other than the output instruction in a program storage unit, and displays the display unit on a development support for developing the user program. To the computer that is a device,
Scanning the elements of the program the user program stored in the storage unit in order from the head, the issue extract all output instructions contained in the user program, the appearance of the output instruction to the extracted on user program Generation process to generate outline information by registering in order,
The user program stored in the program storage unit is displayed on the user program display unit provided in the display unit, and output to the outline information display unit provided in the display unit based on the outline information generated in the generation process Processing to display instructions in order of appearance,
Is to execute. The recording medium of the present invention is a computer-readable recording medium storing such a program.

また、開発支援装置は、例えばプログラマブルコントローラにダウンロードするユーザプログラムを編集等するのに適したものである。具体的な構成としては、プログラマブルコントローラのユーザプログラムを開発するための開発支援装置であって、ユーザプログラムを記憶するプログラム記憶手段と、前記プログラム記憶手段に記憶されたユーザプログラムを先頭から順に走査して、構成要素を抽出し、抽出した構成要素にユーザプログラム上での出現順に固有のインデックス番号を付したアウトライン情報を生成するアウトライン情報生成手段と、前記アウトライン情報を格納するアウトライン情報記憶手段と、ユーザプログラムを表示するユーザプログラム表示部と、前記アウトライン情報に基づいて抽出した構成要素をインデックス番号とともに前記出現順に表示するアウトライン情報表示部とを有する表示手段と、を設けた。   The development support apparatus is suitable for editing a user program downloaded to a programmable controller, for example. As a specific configuration, a development support apparatus for developing a user program for a programmable controller, which scans a program storage means for storing a user program and a user program stored in the program storage means in order from the top. An outline information generating means for generating outline information in which the extracted constituent elements are assigned with unique index numbers in the order of appearance on the user program, and outline information storage means for storing the outline information; And a display unit that includes a user program display unit that displays a user program and an outline information display unit that displays the components extracted based on the outline information together with an index number in the order of appearance.

当該開発支援装置は、開発対象のプログラマブルコントローラのユーザプログラム中にコメントを記述してプログラミングできるものであり、前記アウトライン情報生成手段は、ユーザプログラムにおいてステップ番号が付与されないコメントを含む所定の構成要素を抽出対象として選択されると、前記プログラム記憶手段に記憶されたユーザプログラムを先頭から順に走査し、前記選択された構成要素であるか否かを判断した結果に基づいて、コメントを含む所定の構成要素を抽出するものであり、その抽出したコメントおよび他の構成要素をユーザプログラム上での出現順に登録することによってアウトライン情報を生成するものとすることができる。   The development support apparatus can be programmed by describing a comment in a user program of a programmable controller to be developed, and the outline information generating means includes a predetermined component including a comment to which a step number is not assigned in the user program. When selected as an extraction target, the user program stored in the program storage unit is scanned in order from the top, and a predetermined configuration including a comment is determined based on the result of determining whether or not the selected component is the selected component. Elements are extracted, and outline information can be generated by registering the extracted comments and other components in the order of appearance on the user program.

インデックス番号は、ユーザプログラム上でユニークに存在する番号であり、各命令はもちろんのこと、ステップ番号が付与されないコメントに対しても昇順に設定される。これにより、デバッグ作業者は、ユーザプログラム内において、インデックス番号を特定すると、任意の命令,コメントを一意に特定することができる。   The index number is a number that uniquely exists in the user program, and is set in ascending order not only for each command but also for a comment that is not assigned a step number. Thereby, the debug operator can uniquely specify an arbitrary command and comment when the index number is specified in the user program.

これにより、通常、コメントには、ユーザプログラム上での位置を示すステップ番号は付与されないが、本発明ではコメントを含めてユーザプログラムのすべての構成要素に別途固有のインデックス番号を付与したことにより、コメントを所定の構成要素に設定した場合でもそのインデックス番号を用いてアウトライン情報表示部と、ユーザプログラム表示部の連係を取ることができる。つまり、アウトライン情報表示部に表示された所定の構成要素を選択すると、その選択された構成要素に付されたインデックス番号に対応するユーザプログラムの構成要素を認識し、それをユーザプログラム表示部に表示することができる。よって、目的とするユーザプログラムの構成要素を簡単に見つけることができる。   Thereby, normally, a step number indicating a position on the user program is not given to the comment, but in the present invention, by adding a unique index number to all the components of the user program including the comment, Even when a comment is set as a predetermined component, the outline information display unit and the user program display unit can be linked using the index number. That is, when a predetermined component displayed on the outline information display unit is selected, the component of the user program corresponding to the index number assigned to the selected component is recognized and displayed on the user program display unit. can do. Therefore, it is possible to easily find the components of the target user program.

なお、ユーザプログラムを記憶するプログラム記憶手段と、プログラム記憶手段に記憶されたラダープログラムの構成要素を先頭から順に走査して、少なくとも出力命令を含む所定の構成要素を抽出し、その抽出した構成要素にユーザプログラム上での出現順に固有のインデックス番号を付したアウトライン情報を生成するアウトライン情報生成手段と、アウトライン情報を格納するアウトライン情報記憶手段と、表示画面には、前記ラダープログラムを表示するユーザプログラム表示部(実施の形態では、ラダー表示部)と、アウトライン情報記憶手段に格納された構成要素を前記出現順にツリー状に表示するアウトライン情報表示部とを設け、アウトライン表示部に表示された構成要素とユーザプログラム表示部に表示されたユーザプログラムを連携させるようにすることもできる。   The program storage means for storing the user program and the ladder program components stored in the program storage means are scanned in order from the beginning, and at least the predetermined component including the output command is extracted, and the extracted component Outline information generating means for generating outline information with unique index numbers in order of appearance on the user program, outline information storage means for storing outline information, and a user program for displaying the ladder program on a display screen A display unit (in the embodiment, a ladder display unit) and an outline information display unit that displays the components stored in the outline information storage unit in a tree form in the order of appearance are provided, and the components displayed on the outline display unit And the user program displayed in the user program display It is also possible to make to work the ram.

このようにすると、出力命令を含む所定の構成要素がアウトライン情報表示部にプログラム上での出現順に表示されるため、その表示された構成要素を見ることにより、ユーザプログラム上で所定の構成要素が全体のどの位の位置に存在しているかなどのユーザプログラムのアウトラインを認識することができる。   In this way, since the predetermined component including the output command is displayed in the order of appearance on the program in the outline information display unit, the predetermined component on the user program is displayed by looking at the displayed component. It is possible to recognize the outline of the user program, such as where it is located in the whole.

この開発支援装置はまた、上述したアウトライン情報を自動で生成し、登録することができる。   The development support apparatus can also automatically generate and register the outline information described above.

さらに、ユーザプログラム表示部に表示されたユーザプログラムにおいて選択された命令と同一のオペランドを有する命令を抽出し、その抽出した命令に関する情報を前記表示画面上に設けられたクロスリファレンス情報表示部に表示するクロスリファレンス情報生成手段を備えるとよい。このようにすると、例えば、ユーザプログラム表示部に表示されたユーザプログラムの出力命令を選択することにより、クロスリファレンス情報表示部には、その出力命令と同一のオペランドを持つ入力命令等を抽出し表示することができる。これにより、出力命令の影響を受ける入力命令を一覧リストとして表示することができる。   Further, an instruction having the same operand as the instruction selected in the user program displayed on the user program display unit is extracted, and information on the extracted instruction is displayed on the cross reference information display unit provided on the display screen. It is preferable to provide a cross-reference information generating means. In this way, for example, by selecting an output instruction of the user program displayed on the user program display section, an input instruction having the same operand as the output instruction is extracted and displayed on the cross reference information display section. can do. Thereby, the input commands affected by the output command can be displayed as a list.

クロスリファレンス情報表示部に表示された所定の命令が選択された際に、その選択された命令が属するユーザプログラムを検知し、その選択された命令を前記ユーザプログラム表示部に表示する機能を備えるとよい。このようにすると、クロスリファレンス情報表示部に表示された命令に対応する実際のユーザプログラムを表示することができ、その命令が、プログラム上でどのように他の回路に影響しているかを容易に確認できる。   When a predetermined command displayed on the cross-reference information display unit is selected, the user program to which the selected command belongs is detected, and a function of displaying the selected command on the user program display unit is provided. Good. In this way, it is possible to display the actual user program corresponding to the instruction displayed on the cross-reference information display section, and it is easy to see how the instruction affects other circuits on the program. I can confirm.

さらに、クロスリファレンス情報表示部に表示された1または複数の命令についての情報を記憶保持し、クロスリファレンス情報表示部に表示される情報が切り替った後で、記録保持した情報をクロスリファレンス情報表示部に再表示可能とするとよい。これは、実施の形態におけるブックマーク機能に対応する。このように一旦表示したクロスリファレンス情報を記憶することにより、後で簡単に戻って再表示することができる。   In addition, information about one or more instructions displayed on the cross-reference information display unit is stored and held, and after the information displayed on the cross-reference information display unit is switched, the recorded and held information is displayed as a cross-reference information display. It is good to be able to display again on the part. This corresponds to the bookmark function in the embodiment. By storing the cross-reference information once displayed in this way, it can be easily returned and displayed again later.

出力命令を抽出し表示すると、ユーザプログラムの中で他の命令に影響を与える出力命令を含む所定のプログラム構成要素を簡単に抽出し、アウトライン表示部に表示することができる。また、クロスリファレンス情報生成手段を設けたことにより、その出力命令と同じオペランドを持つ他の命令を抽出して表示することができる。これらにより、多数存在する命令の中から問題となる命令を探したり、問題のある出力命令に接続される入力命令が複数あるような場合に、それら複数の入力命令を全て探してチェックしたり、また問題となる出力命令に関係するプログラムを修正した場合に、その出力命令と同じオペランドを持つ入力命令を含むプログラム部分が正常に動作することの確認が漏れなくでき、ユーザプログラムのデバッグを容易に行うことができる。   When an output command is extracted and displayed, a predetermined program component including an output command that affects other commands in the user program can be easily extracted and displayed on the outline display unit. Further, by providing the cross reference information generating means, other instructions having the same operand as the output instruction can be extracted and displayed. With these, when there are multiple input instructions connected to the problematic output instruction, search for all the multiple input instructions and check for a problem instruction from among many existing instructions, In addition, when a program related to the output instruction in question is corrected, it can be confirmed that the program part including the input instruction having the same operand as the output instruction operates normally, and the user program can be easily debugged. It can be carried out.

この開発支援装置によれば、プログラム中の各構成要素(ステップ番号が付与されない「コメント」を含む)についても一意に特定でき、ユーザプログラムのデバッグ・編集等が容易に行える。   According to this development support apparatus, each component in the program (including a “comment” to which no step number is assigned) can be uniquely specified, and user programs can be easily debugged and edited.

この発明では、ユーザプログラムの中で他の命令に影響を与える出力命令を含む所定のプログラム構成要素を簡単に抽出し、表示手段に表示することができる。また、クロスリファレンス情報生成手段を設けたことにより、その出力命令と同じオペランドを持つ他の命令を抽出して表示することができる。これらにより、多数存在する命令の中から問題となる命令を探したり、問題のある出力命令に接続される入力命令が複数あるような場合に、それら複数の入力命令を全て探してチェックしたり、また問題となる出力命令に関係するプログラムを修正した場合に、その出力命令と同じオペランドを持つ入力命令を含むプログラム部分が正常に動作することの確認が漏れなくでき、ラダープログラムのデバッグを容易に行うことができる。   According to the present invention, a predetermined program component including an output command that affects other commands in the user program can be easily extracted and displayed on the display means. Further, by providing the cross reference information generating means, other instructions having the same operand as the output instruction can be extracted and displayed. With these, when there are multiple input instructions connected to the problematic output instruction, search for all the multiple input instructions and check for a problem instruction from among many existing instructions, In addition, when a program related to the output instruction in question is corrected, it can be confirmed that the program part including the input instruction having the same operand as the output instruction operates normally, and it is easy to debug the ladder program. It can be carried out.

図1は、本発明の好適な一実施の形態を示している。開発支援装置10とPLC(CPUユニット)20が、所定の通信回線21を介して接続されている。この通信回線21は、例えば、RS232Cなどのシリアル回線を用いて直接ケーブル接続することにより実現される。もちろん、このように直接接続するものに限ることはなく、他の通信回線を用いネットワーク経由でPLC20と開発支援装置10とを接続する構成を採っても良い。開発支援装置10は、プログラマブルコントローラで実行されるユーザプログラムを作成する機能、通信回線21を介して作成したユーザプログラムをPLC20にダウンロードする機能、プログラマブルコントローラの動作に関する各種のパラメータ等を設定する機能、を持っている。ユーザプログラムは、図4のようなラダー言語によって記述されたプログラムである。開発支援装置10は、パソコンに、予めインストールしてあるソフトウェアを起動することにより、上述の機能を実現する。そのハードウエア構成は、キーボード,ポインティングデバイス等の入力装置11と、表示装置12と、中央演算装置13と、記憶装置14とからなる。記憶装置14には図示しないが不揮発性記憶装置と揮発性記憶装置があり、不揮発性記憶装置はラダープログラムやラダープログラムのアウトライン情報、クロスリファレンス情報などを記憶する。また中央演算装置13の実行時のワークメモリとして揮発性記憶装置が適宜使用される。   FIG. 1 shows a preferred embodiment of the present invention. The development support apparatus 10 and a PLC (CPU unit) 20 are connected via a predetermined communication line 21. The communication line 21 is realized by, for example, direct cable connection using a serial line such as RS232C. Of course, it is not limited to such a direct connection, and a configuration in which the PLC 20 and the development support apparatus 10 are connected via a network using another communication line may be adopted. The development support apparatus 10 has a function of creating a user program executed by the programmable controller, a function of downloading a user program created via the communication line 21 to the PLC 20, a function of setting various parameters related to the operation of the programmable controller, have. The user program is a program written in a ladder language as shown in FIG. The development support apparatus 10 realizes the above-described functions by starting software installed in a personal computer in advance. The hardware configuration includes an input device 11 such as a keyboard and a pointing device, a display device 12, a central processing unit 13, and a storage device 14. Although not illustrated, the storage device 14 includes a nonvolatile storage device and a volatile storage device, and the nonvolatile storage device stores ladder programs, ladder program outline information, cross-reference information, and the like. Further, a volatile storage device is appropriately used as a work memory when the central processing unit 13 is executed.

図15は、図1の中央演算装置13、記憶装置14を使って実現される本発明の開発支援装置10の機能ブロック図である。開発支援装置10は、入力装置11からの入力を処理する入力処理部31、表示装置12に出力する表示データを作成する表示処理部32、各機能を実行する演算部33、演算結果やラダープログラム等を格納する記憶部34、PLCとの通信を処理する通信処理部35からなる。演算部33はユーザプログラム編集部33a、アウトライン情報生成部33b、クロスリファレンス情報生成部33cを含む。また記憶部34はユーザプログラム記憶部34a、アウトライン情報記憶部34b、クロスリファレンス情報記憶部34cを含む。   FIG. 15 is a functional block diagram of the development support apparatus 10 of the present invention realized by using the central processing unit 13 and the storage device 14 of FIG. The development support apparatus 10 includes an input processing unit 31 that processes input from the input device 11, a display processing unit 32 that generates display data to be output to the display device 12, a calculation unit 33 that executes each function, a calculation result, and a ladder program And the like, and a communication processing unit 35 for processing communication with the PLC. The calculation unit 33 includes a user program editing unit 33a, an outline information generation unit 33b, and a cross reference information generation unit 33c. The storage unit 34 includes a user program storage unit 34a, an outline information storage unit 34b, and a cross reference information storage unit 34c.

図2は、表示装置12に表示される表示画面を示している。図示するように、ラダープログラムを表示するラダー表示部12aと、ラダープログラムの構成を示すアウトライン情報を表示するアウトライン情報表示部12bと、指定された命令のオペランドと同一のオペランドを持つ命令についての情報を表示するクロスリファレンス情報表示部12cを備えている。具体的には図8,9,12,13などを用いて後述するが、本実施例では命令のオペランドに相当する接点番号やメモリ番号にそれぞれ対応させて変数名をつけることができ、変数名を用いたプログラム編集が可能となっている。変数名を用いたプログラム編集が可能であることにより、ラダー表示部、アウトライン情報表示部、クロスリファレンス情報表示部にもオペランドを変数名で表示することもできる。もちろん、こういった変数名を利用せずに、接点番号や、メモリ番号を利用して表示してもよい。   FIG. 2 shows a display screen displayed on the display device 12. As shown in the figure, a ladder display unit 12a for displaying a ladder program, an outline information display unit 12b for displaying outline information indicating the configuration of the ladder program, and information on an instruction having the same operand as the operand of the designated instruction. Is provided with a cross-reference information display unit 12c. Specifically, as will be described later with reference to FIGS. 8, 9, 12, 13 and the like, in this embodiment, variable names can be assigned in correspondence with contact numbers and memory numbers corresponding to instruction operands. Program editing using is possible. Since program editing using variable names is possible, operands can also be displayed with variable names in the ladder display section, outline information display section, and cross-reference information display section. Of course, you may display using a contact number or a memory number, without using such a variable name.

アウトライン情報表示部12bに表示するアウトライン情報は、アウトライン情報生成部33bが作成し、記憶部34内のアウトライン情報記憶部34bに格納する。そして、表示処理部32は、ラダー表示部12aに表示されているラダープログラムについてのアウトライン情報をアウトライン情報表示部12bに表示する。   Outline information to be displayed on the outline information display unit 12 b is created by the outline information generation unit 33 b and stored in the outline information storage unit 34 b in the storage unit 34. And the display process part 32 displays the outline information about the ladder program currently displayed on the ladder display part 12a on the outline information display part 12b.

アウトライン情報は、ラダープログラムの構成の概要を示す情報のことであり、ラダープログラムに使用されている所定の構成要素をそのラダープログラムの先頭から順に抽出したものである。図4に示すラダープログラムのアウトライン情報は一例として、図6のように表示される。このように、アウトライン情報をアウトライン情報表示部12bに表示する際には、ラダープログラムの先頭から出現順に所定の構成要素を配列するとともに、複数の命令の集合体である回路部品については一列右に字下げしてツリー状に表示する。デバッグ作業者は、このアウトライン情報を見ることにより、抽出した各構成要素がそのラダープログラム中にどんな順番で、どの位置に存在しているかを認識することができる。   The outline information is information indicating an outline of the configuration of the ladder program, and predetermined constituent elements used in the ladder program are extracted in order from the top of the ladder program. The outline information of the ladder program shown in FIG. 4 is displayed as shown in FIG. 6 as an example. As described above, when the outline information is displayed on the outline information display unit 12b, predetermined components are arranged in the order of appearance from the top of the ladder program, and a circuit component that is an assembly of a plurality of instructions is placed to the right of the column. Indent and display in tree form. By viewing this outline information, the debug operator can recognize in what order and in which position each extracted component is present in the ladder program.

アウトライン情報表示部に表示するラダープログラムの構成要素は、固定ではなく選択可能である。本実施の形態では、出力命令,コメント,エンド,ファンクションブロック(FB),インタロック/インタロッククリア,回路部品の開始および終了を選択している。他の例として、出力命令のみを選択した場合には、ラダープログラム中の出力命令だけを抽出し、先頭から出現順に配列して表示する。   The components of the ladder program displayed on the outline information display section can be selected instead of being fixed. In this embodiment, an output command, a comment, an end, a function block (FB), an interlock / interlock clear, and a circuit component start and end are selected. As another example, when only the output command is selected, only the output command in the ladder program is extracted, arranged in the order of appearance from the top, and displayed.

アウトライン情報生成部33bは、アウトライン情報生成命令を受けると、対象となったラダープログラムの先頭から構成要素をひとつずつ走査し、予め抽出対象として選択した構成要素があると、それを抽出するとともに、順次登録し、階層構造を持つアウトライン情報を生成する。図3にアウトライン生成部のフローチャートを示す。すなわち、プログラムの先頭から順に走査し、構成要素があったならば(S10でYes)その構成要素を取得する(S11)。ここではラダープログラムで使用されているすべての構成要素を取得する。そして、取得した構成要素が抽出対象構成要素か否かを判断する(S12)。S11で取得した構成要素が抽出対象の構成要素でなければ、分岐判断はNoとなる。そして、対象構成要素でない場合には、次の構成要素を探すために、走査の続きを行う(S20)。次の構成要素がない場合にはS10の分岐判断がNoとなるので、処理を終了する。   When the outline information generation unit 33b receives the outline information generation command, the outline information generation unit 33b scans the component elements one by one from the top of the ladder program that is the target, and extracts the component elements that are selected in advance as extraction targets, Register sequentially, and generate outline information with a hierarchical structure. FIG. 3 shows a flowchart of the outline generation unit. That is, scanning is performed in order from the top of the program. If there is a component (Yes in S10), the component is acquired (S11). Here, all the components used in the ladder program are acquired. And it is judged whether the acquired component is an extraction object component (S12). If the component acquired in S11 is not the component to be extracted, the branch determination is No. If it is not the target component, scanning is continued to search for the next component (S20). If there is no next component, the branch determination in S10 is No, and the process ends.

一方、取得した構成要素が対象構成要素である場合は、さらに回路部品かそれ以外かを判断する(S12)回路部品以外の場合には、それぞれの構成要素に対応するアイコンを取得し(S13)、ツリーに登録する(S14)。   On the other hand, if the acquired component is a target component, it is further determined whether the component is a circuit component (S12). If it is not a circuit component, an icon corresponding to each component is acquired (S13). And is registered in the tree (S14).

対応するアイコンは、構成要素の種類ごとに異なるとし、各構成要素とアイコンの対応関係は、予めテーブルを作成し、記憶装置14に登録しておく。例えば抽出した構成要素が出力命令の場合には電球のようなマークとし、コメントの場合にはしおりのようなマークとする。これにより、S13の処理では取得した命令の種類を認識し、上記テーブルを参照して、対応するアイコンを取得することになる。また、ツリーへの登録は、現在の階層の一行下に追加する。   Assume that the corresponding icons differ for each type of component, and the correspondence between each component and icon is created in advance in a table and registered in the storage device 14. For example, if the extracted component is an output command, a mark like a light bulb is used, and if it is a comment, a mark like a bookmark is used. Thereby, in the process of S13, the type of the acquired command is recognized, and the corresponding icon is acquired by referring to the table. Also, registration in the tree is added one line below the current hierarchy.

ツリーに登録する情報としては、アイコンと、インデックス番号と、ステップ番号と、変数名である。ここでインデックス番号とは、ラダープログラム上でユニークに存在する番号であり、各命令はもちろんのこと、ステップ番号が付与されないコメントに対しても昇順に設定される。デバッグ作業者は、ラダープログラム内において、インデックス番号を特定すると、任意の命令,コメントを一意に特定することができる。   Information to be registered in the tree includes an icon, an index number, a step number, and a variable name. Here, the index number is a number that uniquely exists in the ladder program, and is set in ascending order not only for each command but also for a comment that is not assigned a step number. When the debug operator specifies the index number in the ladder program, it can uniquely specify an arbitrary instruction and comment.

一方、取得した命令が回路部品の開始または終了の場合には、回路部品の開始か否かを判断し(S15)、開始の場合には、回路部品のアイコンを取得するとともに(S16)、ツリーに登録する(S17)。このツリーへの登録処理は、S14の処理と同様である。その後、ツリーを一列右に字下げをする(S18)。そして、S20(次の構成要素へ進む)を経由してS10に戻る。これにより、これ以降に検出された構成要素についてのツリーの登録(S14の処理)は、この字下げしたツリーの下に追加されることになり、回路部品に属する構成要素であることが一目で分かる。   On the other hand, if the acquired command is the start or end of the circuit component, it is determined whether or not the circuit component is started (S15). If it is started, an icon of the circuit component is acquired (S16), and the tree (S17). This tree registration process is the same as the process of S14. Thereafter, the tree is indented to the right by one column (S18). Then, the process returns to S10 via S20 (proceeds to the next component). As a result, the registration of the tree for the components detected thereafter (the process of S14) is added under the indented tree, and it is at a glance that the component belongs to the circuit component. I understand.

また、取得した構成要素(命令)が、回路部品の終了の場合には、S15の分岐判断はNoとなるのでS19に進み、ツリーの字下げを解除し(S19)、S20(次の構成要素へ進む)を経由してS10に戻る。これにより、これ以降に検出された構成要素(命令等)は、元(字下げされた1つ前、つまり1つ上位の階層)のツリーに追加されることになる。   If the acquired component (command) is the end of the circuit component, the branch determination in S15 is No, so the process proceeds to S19, the indentation of the tree is canceled (S19), and S20 (next component) Go to step S10. As a result, the constituent elements (commands and the like) detected after this are added to the original tree (the one before the indentation, that is, the hierarchy one level higher).

このように、プログラムの先頭から出現順に走査して処理することにより、プログラム上で出現する順番通りに、ツリーの上から順に構成要素を登録することができる。次に、具体例に基づき各処理を説明する。例えば、処理対象のラダープログラムが図4(ラダー図表示)のようになっているとすると、その構成要素リストは図5のようになる。各図において、丸数字がそれぞれ対応する対象構成要素である。図5に示すように、ステップ番号は、命令の先頭から出現する順番で、0番から昇順した番号を付与する。命令に付与されるため、コメントには付与されない。そこで、本実施の形態では、上述したごとく図5に示すようにプログラムの構成要素(命令,コメントなど)に対して出現順に昇順でインデックス番号を付与した。また、図4において、9行目から15行目は1つの回路部品(部品名が[parts1])である。   Thus, by scanning and processing in the order of appearance from the top of the program, the components can be registered in order from the top of the tree in the order in which they appear in the program. Next, each process will be described based on a specific example. For example, if the ladder program to be processed is as shown in FIG. 4 (ladder diagram display), the component list is as shown in FIG. In each figure, a circled number is a corresponding target component. As shown in FIG. 5, step numbers are given in ascending order from 0 in the order of appearance from the top of the instruction. Since it is given to the command, it is not given to the comment. Therefore, in the present embodiment, as described above, as shown in FIG. 5, index numbers are assigned in ascending order to the program components (commands, comments, etc.) in the order of appearance. In FIG. 4, the 9th to 15th lines are one circuit component (part name is [parts1]).

係るラダープログラムに対応した構成要素リスト(図5)対して、先頭の命令から順に処理すると、最初の構成要素(Index000000)は、入力命令であるので、S12でNoとなる。次のIndex000001の構成要素は出力命令(OUT)であるので、S12でYesとなり、対応するアイコン(電球マーク)を取得し(S13)、S14の処理を実行し、ツリーへ登録する。これにより、図6に示すように1行目に「アイコン,ステップ番号(000001),変数名(b)」が追加される。次の構成要素(ステップ番号無し,Index000002)はコメントであるのでS12でYesとなり、対応するアイコン(しおりマーク)を取得し(S13)、S14の処理を実行しツリーへ登録する。これにより、図6に示すように、2行目に「アイコン,コメント」(ステップ番号はないので非表示)が追加される。   When the component list corresponding to the ladder program (FIG. 5) is processed in order from the first command, the first component (Index000000) is an input command, so No in S12. Since the next component of Index000001 is an output command (OUT), the answer is YES in S12, the corresponding icon (light bulb mark) is acquired (S13), the process of S14 is executed, and registered in the tree. As a result, “icon, step number (000001), variable name (b)” is added to the first line as shown in FIG. Since the next component (no step number, Index000002) is a comment, the answer is YES in S12, the corresponding icon (bookmark mark) is acquired (S13), the process of S14 is executed and registered in the tree. Thereby, as shown in FIG. 6, “icon, comment” (not displayed because there is no step number) is added to the second line.

以下順次処理し、例えば、Index00000Aでは、構成要素は回路部品の開始であるため、S15からS17の処理をすることにより、図6に示すように、7行目に「回路部品名([parts1])」が追加される。そして、S18の実行によりツリーが一列右に字下げされるため、その次に検出された対象構成要素であるIndex00000Bのコメント(「*comment2*」)が、8行目に追加されるが、このとき、7行目の[parts1]の下に字下げされて表示される。以降検出された構成要素は、回路部品の終了を示すIndex000013のPARTS_ENDにてS19を実行しツリーの字下げが解除されるまで、全て一列右に字下げされて表示される。   For example, in Index 00000A, since the component is the start of a circuit component, for example, by performing the processing from S15 to S17, as shown in FIG. 6, "circuit component name ([parts1]" ) ”Is added. Then, since the tree is indented to the right by one line by executing S18, the comment (“* comment2 *”) of Index00000B that is the next detected target component is added to the eighth line. Is displayed indented under [parts1] on the seventh line. The components detected thereafter are all displayed indented to the right by one line until S19 is executed in PARTS_END of Index 000013 indicating the end of the circuit component and the indentation of the tree is released.

ツリーの字下げが解除されたあと、Index000015のファンクションブロック(「FB1 inst1」)が、図6の13行目に追加される。そして、Index000017のEND命令についてS14の処理を実行してツリーに追加すると、それ以降は構成要素がないのでS10の分岐判断がNoとなり処理を終了することになる。   After the indentation of the tree is released, a function block (“FB1 inst1”) of Index000015 is added to the 13th line in FIG. Then, when the processing of S14 is executed for the END instruction of Index000017 and added to the tree, since there is no component thereafter, the branch determination of S10 becomes No and the processing is terminated.

上記のようにして生成されたアウトライン情報は、アウトライン情報記憶部34bに格納される。そして、アウトライン情報表示部12bにツリー状に表示されるアウトライン情報を見ると、他の命令に影響を与える出力命令やコメントなどが、プログラムにおける出現順に配置されるとともに、回路部品は字下げ表示により階層的に表示されるため、各構成要素のプログラム中のおおよその存在位置などが一目で分かる。   The outline information generated as described above is stored in the outline information storage unit 34b. When the outline information displayed in a tree shape on the outline information display unit 12b is viewed, output instructions and comments that affect other instructions are arranged in the order of appearance in the program, and circuit components are displayed in an indented display. Since it is displayed hierarchically, the approximate location of each component in the program can be seen at a glance.

次にラダー表示部12aに表示されるラダープログラムと、アウトライン情報表示部12bに表示されるツリー状のアウトライン情報の連動について説明する。すなわち、アウトライン情報表示部12bに表示されたツリー状のアウトライン情報の中から任意の構成要素を選択すると、それに対応したラダープログラムの該当する構成要素を表示するようになる。具体的には、図7に示すフローチャートを実施する機能により、係る連動させることを実現している。   Next, the linkage between the ladder program displayed on the ladder display unit 12a and the tree-shaped outline information displayed on the outline information display unit 12b will be described. That is, when an arbitrary component is selected from the tree-like outline information displayed on the outline information display unit 12b, the corresponding component of the ladder program corresponding to the selected component is displayed. Specifically, the interlocking is realized by the function of executing the flowchart shown in FIG.

すなわち、アウトライン情報表示部12b内のカーソル位置の登録情報を取得する(S21)。これは、例えばユーザは、ポインティングデバイス等の入力装置11を操作して、ツリー状のリストの中で任意の構成要素を選択する。すると、選択された構成要素を認識し、アウトライン情報記憶部34bにアクセスしアウトライン情報の中からインデックス番号を取得する。   That is, the registration information of the cursor position in the outline information display part 12b is acquired (S21). For example, the user operates the input device 11 such as a pointing device to select an arbitrary component in the tree-like list. Then, the selected component is recognized, the outline information storage unit 34b is accessed, and the index number is acquired from the outline information.

次いで、現在ラダー表示部12aに表示されているラダー画面を表示する表示処理部32に対し、ジャンプ依頼をする(S22)。つまり、インデックス番号を渡す。そして、そのインデックス番号を取得したならば、ラダー表示部12aに表示されたラダープログラムの該当位置にジャンプする(S23)。すなわち、取得したインデックス番号をキーにラダープログラム記憶部34aにアクセスし、該当する構成要素を認識する。そして、その構成要素が、現在ラダー表示部12aに表示されている場合には、対応する構成要素にカーソルを移動する。また、ラダー表示部12aに表示されていない場合には、該当する構成要素をラダー表示部12a内に表示するとともに、その構成要素にカーソルを移動する。   Next, a jump request is made to the display processing unit 32 that displays the ladder screen currently displayed on the ladder display unit 12a (S22). In other words, the index number is passed. If the index number is acquired, the program jumps to the corresponding position of the ladder program displayed on the ladder display unit 12a (S23). That is, the ladder program storage unit 34a is accessed using the acquired index number as a key, and the corresponding component is recognized. When the component is currently displayed on the ladder display unit 12a, the cursor is moved to the corresponding component. Further, when not displayed on the ladder display unit 12a, the corresponding component is displayed in the ladder display unit 12a, and the cursor is moved to the component.

これにより、例えば、図8に示すように、アウトライン情報表示部12bのツリーの中で、「ステップ番号:00007,変数名:Complete1」が選択すれると、ラダー表示部12aにおいても対応する出力命令(変数名:Complete1)にカーソルが当てられる(反転表示している)。この状態で、アウトライン情報表示部12bのツリーの中で、「ステップ番号:00010,変数名:Complete2」が選択すれると、図9に示すように、ラダー表示部12aにおいても対応する出力命令(変数名:Complete2)にカーソルが移動する。   Thus, for example, as shown in FIG. 8, when “step number: 00007, variable name: Complete1” is selected in the tree of the outline information display unit 12b, the corresponding output command is also displayed in the ladder display unit 12a. The cursor is placed on (variable name: Complete1) (highlighted). In this state, when “step number: 00010, variable name: Complete2” is selected in the tree of the outline information display unit 12b, as shown in FIG. 9, a corresponding output command ( The cursor moves to variable name: Complete2).

次に、クロスリファレンス情報表示部12cに表示するクロスリファレンス情報について説明する。クロスリファレンス情報表示部12cには、ラダー表示部12aに表示されたラダープログラム中の所定の構成要素を選択すると、その構成要素と同一のオペランド(変数名)を持つ構成要素を抽出し、それをクロスリファレンス情報表示部12cに表示する。係る処理は、ラダープログラム編集部33aが、図10に示すフローチャートを実行することにより得られた情報に基づき、図11に示すフローチャートをクロスリファレンス情報生成部33cが実行することにより行なう。図10でまず、ラダー表示部12aに表示されたラダー画面上でカーソルを移動する(S31)。移動したカーソルのカーソル位置が、オペランド部か否かを判断し(S32)、オペランド部の場合には、そのカーソル位置にある構成要素についてのプログラム名,ステップ番号,オペランド(変数名)をクロスリファレンス情報生成部33cに渡す(S33)。   Next, cross reference information displayed on the cross reference information display unit 12c will be described. When a predetermined component in the ladder program displayed on the ladder display unit 12a is selected, the cross reference information display unit 12c extracts a component having the same operand (variable name) as the component, It displays on the cross reference information display part 12c. Such processing is performed by the cross-reference information generating unit 33c executing the flowchart shown in FIG. 11 based on the information obtained by the ladder program editing unit 33a executing the flowchart shown in FIG. First, in FIG. 10, the cursor is moved on the ladder screen displayed on the ladder display unit 12a (S31). It is determined whether or not the cursor position of the moved cursor is the operand part (S32). If it is the operand part, the program name, step number, and operand (variable name) of the component at the cursor position are cross-referenced. It passes to the information generation part 33c (S33).

図11に示すように、ラダープログラム編集部33aから所定の情報を取得すると(S40)、オペランド(変数名)がグローバル変数か否かを判断する(S41)。グローバル変数とは複数のPLCで共通に使用される変数のことである。グローバル変数か否かは、オペランド(変数名)の前に付加されたパスにより判断できる。例えば、グローバル変数のパスは、「プロジェクト名¥コンフィグレーション名¥変数名」となる。また、特定のPLCでのみ使用されるローカル変数(タスク)の場合は、「プロジェクト名¥コンフィグレーション名¥タスク名¥変数名」となる。このように、グローバル変数かローカル変数かにより、パスが異なるので、容易に判断できる。   As shown in FIG. 11, when predetermined information is acquired from the ladder program editing unit 33a (S40), it is determined whether or not the operand (variable name) is a global variable (S41). A global variable is a variable that is commonly used by a plurality of PLCs. Whether it is a global variable or not can be determined by the path added before the operand (variable name). For example, the path of the global variable is “project name \ configuration name \ variable name”. Further, in the case of a local variable (task) used only in a specific PLC, “project name \ configuration name \ task name \ variable name”. Thus, since the path differs depending on whether it is a global variable or a local variable, it can be easily determined.

グローバル変数の場合には、パスで指定されるプログラムが存在するか否かを判断し(S42)、存在しなければそこで処理を終了し、存在する場合には、プログラムを取得する(S43)。   In the case of a global variable, it is determined whether or not the program specified by the path exists (S42). If it does not exist, the process is terminated, and if it exists, the program is acquired (S43).

取得したプログラムを先頭の命令から順に走査し、命令が存在するか否かを判断する(S44)。そして、命令を検出したならば、その命令を取得し(S45)、その命令のオペランド(変数名)と、ラダーエディタから取得したオペランド(変数名)が一致するか否かを判断する(S46)。そして、一致する場合には、そのプログラムがタスク実行中か否かを判断し(S47)、実行の有無により対応するアイコンを取得する(S48,S49)。その後、その命令についてのクロスリファレンス情報を登録する(S50)。ここで登録する情報としては、少なくともオペランド(変数名),アドレス,言語,パス,タスク実行状態,ステップ番号である。   The acquired program is scanned in order from the head instruction to determine whether or not the instruction exists (S44). If an instruction is detected, the instruction is acquired (S45), and it is determined whether or not the operand (variable name) of the instruction matches the operand (variable name) acquired from the ladder editor (S46). . If they match, it is determined whether or not the program is executing a task (S47), and a corresponding icon is acquired depending on whether or not it is executed (S48, S49). Thereafter, the cross reference information for the instruction is registered (S50). Information to be registered here includes at least an operand (variable name), an address, a language, a path, a task execution state, and a step number.

この登録後、或いはS46の分岐判断でオペランド(変数名)が一致しない場合には、次の命令へ進む(S51)。最後の命令まで処理すると、S44の分岐判断がNoとなるので、S52に飛び、次のプログラムを走査する。このようにして、全てのプログラムに付いてオペランド(変数名)が一致する命令の抽出・登録処理を終了したならば、S42の分岐判断がNoとなるので一連の処理を終了する。   After this registration, or when the operand (variable name) does not match in the branch determination of S46, the process proceeds to the next instruction (S51). When processing up to the last instruction is made, the branch determination in S44 is No, so that the process jumps to S52 and the next program is scanned. In this manner, when the instruction extraction / registration process having the same operand (variable name) is completed for all the programs, the branch determination in S42 is No, and the series of processes is terminated.

一方、グローバル変数でない場合には、S41の分岐判断がNoとなるので、パスにて指定されたプログラムが存在するか否かを判断し(S53)、存在しない場合には、処理を終了する。また、存在する場合には、そのプログラムについてS43からS51までの処理を実行し、そのプログラム中に存在するオペランド(変数名)が一致する命令を取得するともに、関連する情報(アイコン,クロスリファレンス情報)を登録する。なお、プログラムの最後まで走査したならば、S44の分岐判断はNoとなるが、その場合は処理を終了する(S54)。   On the other hand, if it is not a global variable, the branch determination in S41 is No, so it is determined whether or not the program specified by the path exists (S53), and if it does not exist, the process ends. If it exists, the processing from S43 to S51 is executed for the program, and an instruction with the same operand (variable name) existing in the program is acquired, and related information (icon, cross-reference information) is acquired. ). If the program has been scanned to the end, the branch determination in S44 is No, but in this case, the process ends (S54).

これらのクロスリファレンス情報等は、記憶装置4内の一時ファイルに格納されるとともに、例えば図12に示すように、クロスリファレンス情報表示部に表示される。図12では、ラダー表示部に表示されたラダー画面中の変数名がComplete1の出力命令が選択されたため、同一の変数名を持つ入力命令等として4つの命令が抽出され、表示された例を示している。   The cross reference information and the like are stored in a temporary file in the storage device 4 and displayed on a cross reference information display unit as shown in FIG. 12, for example. FIG. 12 shows an example in which four instructions are extracted and displayed as input instructions having the same variable name because the output instruction with the variable name Complete1 in the ladder screen displayed on the ladder display unit is selected. ing.

この状態から、クロスリファレンス情報表示部12cに表示された任意の変数名(例えば、図13に示すように、2行目の変数名)を選択すると、該当する変数名(命令)を含むプログラムをラダー表示部12aに表示する。このとき、カーソルを当てた強調表示することにより、ユーザに容易に理解させることができる。   From this state, when an arbitrary variable name displayed on the cross reference information display unit 12c (for example, the variable name on the second line as shown in FIG. 13) is selected, a program including the corresponding variable name (instruction) is selected. It is displayed on the ladder display unit 12a. At this time, it is possible to make the user easily understand by highlighting the cursor.

係る処理を行うための機能は、図14に示すフローチャートを実行するようなる。まずクロスリファレンス情報表示部12c上のカーソル位置を取得する(S61)。このカーソル位置は、図では、選択されて反転表示されている位置である。そして、そのカーソルで選択された変数名のパス情報から、その変数名が属するプログラムを探索し(S62)、ラダー表示部12aにプログラムが表示されているか否かを判断する(S63)。プログラムが表示されていない場合には、S62で探索したプログラムを表示する(S64)。   The function for performing such processing executes the flowchart shown in FIG. First, the cursor position on the cross reference information display unit 12c is acquired (S61). This cursor position is a position selected and highlighted in the figure. Then, from the path information of the variable name selected by the cursor, the program to which the variable name belongs is searched (S62), and it is determined whether or not the program is displayed on the ladder display unit 12a (S63). If no program is displayed, the program searched in S62 is displayed (S64).

そして、ラダー表示部12aに表示された対応するプログラムにジャンプし(S65)、そのプログラム中の該当する命令位置にジャンプする(S66)。このS66の処理は、図7におけるS23の処理と同様である。これにより、該当する命令をラダー表示部12a上に表示するとともに、カーソルを移動し、強調して表示する。   Then, the program jumps to the corresponding program displayed on the ladder display unit 12a (S65), and jumps to the corresponding command position in the program (S66). The process of S66 is the same as the process of S23 in FIG. As a result, the corresponding command is displayed on the ladder display unit 12a, and the cursor is moved and displayed with emphasis.

また、クロスリファレンス情報表示部12cに表示する情報は、ラダー表示部12aに表示されたラダープログラム中の選択された構成要素(命令)に対応してクロスリファレンス情報生成部33cが都度生成し、表示する。従って、現在クロスリファレンス情報表示部12cに表示されていない構成要素がラダー表示部12a側で選択されると、クロスリファレンス情報表示部12cに表示されるクロスリファレンス情報も変化する。ここでユーザは1つ前に表示していた情報に簡単に戻ることができない。実際のデバッグ処理では、1つ前さらには何回か前の表示に戻したいという要求があるが、従来は係る要求を満たすことができなかった。   The information displayed on the cross reference information display unit 12c is generated by the cross reference information generation unit 33c each time corresponding to the selected component (command) in the ladder program displayed on the ladder display unit 12a, and displayed. To do. Therefore, when a component that is not currently displayed on the cross reference information display unit 12c is selected on the ladder display unit 12a side, the cross reference information displayed on the cross reference information display unit 12c also changes. Here, the user cannot easily return to the previously displayed information. In the actual debugging process, there is a request to return to the previous display one time or several times before, but conventionally, such a request could not be satisfied.

そこで、図2に示すように、クロスリファレンス情報表示部13cの上部に、ブックマークボタンB1と、後退ボタンB2と、前進ボタンB3を用意した。ブックマークボタンB1をクリックしたときに表示されていたクロスリファレンス情報を記憶装置14に記憶保持する機能を備えた。記憶装置14に記憶保持されたクロスリファレンス情報は、記憶した順に番号を付与する。これにより、後退ボタンB1を選択実行する都度、番号を参照し、現在表示されているクロスリファレンス情報の1つ前に表示(格納)されたクロスリファレンス情報を記憶装置14から呼び出して表示する。また、前進ボタンB3をクリックすることにより、番号を参照し、現在表示されているクロスリファレンス情報の次に表示(格納)されたクロスリファレンス情報を記憶装置14から呼び出して表示する。   Therefore, as shown in FIG. 2, a bookmark button B1, a backward button B2, and a forward button B3 are prepared in the upper part of the cross reference information display unit 13c. The memory device 14 has a function of storing and holding the cross-reference information displayed when the bookmark button B1 is clicked. The cross reference information stored and held in the storage device 14 is numbered in the order in which it is stored. Thus, each time the backward button B1 is selected and executed, the number is referred to and the cross-reference information displayed (stored) immediately before the currently displayed cross-reference information is called from the storage device 14 and displayed. Further, by clicking the forward button B3, the number is referred to, and the cross-reference information displayed (stored) next to the currently displayed cross-reference information is called from the storage device 14 and displayed.

このように、クロスリファレンス情報の表示履歴を逐次表示することができ、所望のクロスリファレンス情報を簡単に見ることができるため、ラダープログラムのデバッグ作業を容易に行うことができる。   As described above, the display history of the cross-reference information can be sequentially displayed, and the desired cross-reference information can be easily viewed. Therefore, it is possible to easily debug the ladder program.

本発明の一実施の形態を示すハードウェアブロック図である。It is a hardware block diagram showing an embodiment of the present invention. 表示画面の一例を示す図である。It is a figure which shows an example of a display screen. アウトライン情報生成部の機能を示すフローチャートである。It is a flowchart which shows the function of an outline information generation part. ラダー表示部に表示されるラダープログラムの一例を示す図である。It is a figure which shows an example of the ladder program displayed on a ladder display part. 図4に示すプログラムのリストを示す図である。FIG. 5 is a diagram showing a list of programs shown in FIG. 4. アウトライン情報表示部に表示される図4に示すラダープログラムに対するアウトライン情報を示す図である。It is a figure which shows the outline information with respect to the ladder program shown in FIG. 4 displayed on an outline information display part. アウトライン情報表示部に表示されたリストからラダー表示部に表示されるラダープログラムへのジャンプ機能の一例を示す図である。It is a figure which shows an example of the jump function to the ladder program displayed on a ladder display part from the list | wrist displayed on the outline information display part. 作用効果を説明する表示画面の表示例である。It is a display example of the display screen explaining an effect. 作用効果を説明する表示画面の表示例である。It is a display example of the display screen explaining an effect. ラダーエディタの機能を説明するフローチャートである。It is a flowchart explaining the function of a ladder editor. クロスリファレンス情報生成部の機能を示すフローチャートである。It is a flowchart which shows the function of a cross reference information generation part. 作用効果を説明する表示画面の表示例である。It is a display example of the display screen explaining an effect. 作用効果を説明する表示画面の表示例である。It is a display example of the display screen explaining an effect. クロスリファレンス情報表示部に表示された命令からラダー表示部に表示されるラダープログラムへのジャンプ機能の一例を示す図である。It is a figure which shows an example of the jump function from the command displayed on the cross reference information display part to the ladder program displayed on a ladder display part. 本発明の一実施の形態を示す機能ブロック図である。It is a functional block diagram which shows one embodiment of this invention.

符号の説明Explanation of symbols

10 開発支援装置
11 入力装置
12 表示装置
12a ユーザプログラム表示部
12b アウトライン情報表示部
12c クロスリファレンス情報表示部
13 中央演算装置
14 記憶装置
15 通信I/F
20 PLC
21 通信回線
31 入力処理部
32 表示処理部
33 演算部
33a ユーザプログラム編集部
33b アウトライン情報生成部
33c クロスリファレンス情報生成部
34 記憶部
34a ラダープログラム記憶部
34b アウトライン情報記憶部
34c クロスリファレンス情報記憶部
35 通信処理部
DESCRIPTION OF SYMBOLS 10 Development support apparatus 11 Input apparatus 12 Display apparatus 12a User program display part 12b Outline information display part 12c Cross reference information display part 13 Central processing unit 14 Memory | storage device 15 Communication I / F
20 PLC
21 communication line 31 input processing unit 32 display processing unit 33 arithmetic unit 33a user program editing unit 33b outline information generation unit 33c cross reference information generation unit 34 storage unit 34a ladder program storage unit 34b outline information storage unit 34c cross reference information storage unit 35 Communication processing unit

Claims (4)

出力命令と出力命令以外の構成要素を含むプログラマブルコントローラ用のユーザプログラムを、プログラム記憶手段に記憶し、表示手段に表示する、前記ユーザプログラムを開発するための開発支援装置の制御方法であって、
前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記ユーザプログラムに含まれているすべての出力命令を抽出し、前記抽出した出力命令をユーザプログラム上での出現順に登録することによりアウトライン情報を生成する生成処理を実行し、
前記表示手段に設けたユーザプログラム表示部に前記プログラム記憶手段に記憶されたユーザプログラムを表示し、前記表示手段に設けたアウトライン情報表示部に、前記生成処理で生成した前記アウトライン情報に基づいて出力命令を出現順に表示する
ことを特徴とする開発支援装置の制御方法。
A control method of a development support apparatus for developing the user program, which stores a user program for a programmable controller including components other than an output command and an output command in a program storage unit and displays the program on a display unit,
Scanning the elements of the program the user program stored in the storage unit in order from the head, the issue extract all output instructions contained in the user program, the appearance of the output instruction to the extracted on user program Execute the generation process to generate outline information by registering in order,
The user program stored in the program storage unit is displayed on the user program display unit provided in the display unit, and output to the outline information display unit provided in the display unit based on the outline information generated in the generation process A control method of a development support apparatus, characterized in that instructions are displayed in order of appearance.
前記生成処理は、
ユーザプログラムの構成要素のうち、出力命令及び出力命令以外の所定の構成要素を抽出対象として選択されると、前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記選択された抽出対象である出力命令および出力命令以外の所定の構成要素であるか否かを判断した結果に基づいて、前記選択された抽出対象であるすべての出力命令および出力命令以外の所定の構成要素を抽出するものであり、その抽出した出力命令および出力命令以外の所定の構成要素をユーザプログラム上での出現順に登録することによりアウトライン情報を生成することを特徴とする請求項1に記載の開発支援装置の制御方法。
The generation process includes
Among the user program components, when an output command and a predetermined component other than the output command are selected as an extraction target, the user program components stored in the program storage unit are sequentially scanned from the top, and the selection is performed. A predetermined configuration other than all of the selected output instructions and output instructions based on the result of determining whether or not the output instruction is a predetermined extraction element and a predetermined component other than the output instruction 2. The outline information is generated by extracting an element and registering the extracted output instruction and a predetermined constituent element other than the output instruction in an appearance order on the user program. Control method of development support device.
出力命令と出力命令以外の構成要素を含むプログラマブルコントローラ用のユーザプログラムを、プログラム記憶手段に記憶し、表示手段に表示する、前記ユーザプログラムを開発するための開発支援装置であるコンピュータに、
前記プログラム記憶手段に記憶されたユーザプログラムの構成要素を先頭から順に走査し、前記ユーザプログラムに含まれているすべての出力命令を抽出し、前記抽出した出力命令をユーザプログラム上での出現順に登録することによりアウトライン情報を生成する生成処理、
前記表示手段に設けたユーザプログラム表示部に前記プログラム記憶手段に記憶されたユーザプログラムを表示し、前記表示手段に設けたアウトライン情報表示部に、前記生成処理で生成した前記アウトライン情報に基づいて出力命令を出現順に表示する処理、
を実行させるためのプログラム。
A computer that is a development support apparatus for developing the user program, which stores a user program for a programmable controller including components other than an output instruction and an output instruction in a program storage unit and displays the program on a display unit.
Scanning the elements of the program the user program stored in the storage unit in order from the head, the issue extract all output instructions contained in the user program, the appearance of the output instruction to the extracted on user program Generation process to generate outline information by registering in order,
The user program stored in the program storage unit is displayed on the user program display unit provided in the display unit, and output to the outline information display unit provided in the display unit based on the outline information generated in the generation process Processing to display instructions in order of appearance,
A program for running
請求項3に記載のプログラムを格納したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium storing the program according to claim 3.
JP2006206999A 2004-03-31 2006-07-28 Control method and program for development support apparatus and recording medium Expired - Fee Related JP4517302B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006206999A JP4517302B2 (en) 2004-03-31 2006-07-28 Control method and program for development support apparatus and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004108358 2004-03-31
JP2006206999A JP4517302B2 (en) 2004-03-31 2006-07-28 Control method and program for development support apparatus and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006013759A Division JP2006146955A (en) 2004-03-31 2006-01-23 Development support device

Publications (2)

Publication Number Publication Date
JP2006318504A JP2006318504A (en) 2006-11-24
JP4517302B2 true JP4517302B2 (en) 2010-08-04

Family

ID=37539053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006206999A Expired - Fee Related JP4517302B2 (en) 2004-03-31 2006-07-28 Control method and program for development support apparatus and recording medium

Country Status (1)

Country Link
JP (1) JP4517302B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5786387B2 (en) * 2011-03-15 2015-09-30 オムロン株式会社 PLC development support device and PLC development support program
JP5762154B2 (en) * 2011-06-08 2015-08-12 三菱電機株式会社 Information processing apparatus, information processing method, and program
JP6079817B2 (en) * 2015-04-21 2017-02-15 株式会社安川電機 Ladder program creation device, computer program, and ladder program creation method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01244502A (en) * 1988-03-25 1989-09-28 Fanuc Ltd Pc program display system
JPH0850502A (en) * 1994-08-05 1996-02-20 Toyoda Mach Works Ltd Monitoring device for sequence controller
JPH08305417A (en) * 1995-04-28 1996-11-22 Omron Corp Device and method for debugging sequence program
JPH08339208A (en) * 1995-06-09 1996-12-24 Mitsubishi Electric Corp Program preparation device for programmable controller
JP2616613B2 (en) * 1991-10-07 1997-06-04 株式会社デンソー Programmable controller
JPH1011118A (en) * 1996-06-24 1998-01-16 Keyence Corp Sequence controller, data processor, data recording and reproducing method, and recording medium
JPH10293603A (en) * 1997-04-18 1998-11-04 Omron Corp Program production support device
JP2002062910A (en) * 2000-08-22 2002-02-28 Digital Electronics Corp Editor device and storage medium recording editor program
JP2004005060A (en) * 2002-05-30 2004-01-08 Digital Electronics Corp Control program retrieval device and its program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01244502A (en) * 1988-03-25 1989-09-28 Fanuc Ltd Pc program display system
JP2616613B2 (en) * 1991-10-07 1997-06-04 株式会社デンソー Programmable controller
JPH0850502A (en) * 1994-08-05 1996-02-20 Toyoda Mach Works Ltd Monitoring device for sequence controller
JPH08305417A (en) * 1995-04-28 1996-11-22 Omron Corp Device and method for debugging sequence program
JPH08339208A (en) * 1995-06-09 1996-12-24 Mitsubishi Electric Corp Program preparation device for programmable controller
JPH1011118A (en) * 1996-06-24 1998-01-16 Keyence Corp Sequence controller, data processor, data recording and reproducing method, and recording medium
JPH10293603A (en) * 1997-04-18 1998-11-04 Omron Corp Program production support device
JP2002062910A (en) * 2000-08-22 2002-02-28 Digital Electronics Corp Editor device and storage medium recording editor program
JP2004005060A (en) * 2002-05-30 2004-01-08 Digital Electronics Corp Control program retrieval device and its program

Also Published As

Publication number Publication date
JP2006318504A (en) 2006-11-24

Similar Documents

Publication Publication Date Title
EP1582948B1 (en) Development aid device
JP4242361B2 (en) Development support equipment
JP4366605B2 (en) Development support apparatus, program, and processing method
US11960925B2 (en) Program generating device, program generating method, and information storage medium
JP5726387B2 (en) System construction support device
JP2016506559A (en) Method and device for changing objects in an HMI device
JP4517302B2 (en) Control method and program for development support apparatus and recording medium
JP2006146955A (en) Development support device
JP5935658B2 (en) Design support program, method and apparatus
JP2005228326A (en) Data processing system, method for displaying customized parameter of application program, and computer program product
JP2009245456A (en) Program development support device and processing method
JP3967885B2 (en) Image processing device
KR100432407B1 (en) Ladder circuit editing device
JP2007034797A (en) Image data generator and its program, and recording medium
KR101886986B1 (en) Engineering tool program and engineering tool
JP2019106107A (en) Program, information processing apparatus, and screen test system
JPH10247142A (en) System and method for programming process control program
JPH0660136A (en) Drawing edit device
JP2006268292A (en) Template compiling device and template compiling program
JP2003036170A (en) Device, method and program for cross reference construction
JP2004326161A (en) Device for editing sequence program
JP2021177272A (en) Debug support device, debug support method and program
JPH04367029A (en) Programming device for programmable controller
JP2020149168A (en) Ladder diagram program creation support device, ladder diagram program creation support method, and ladder diagram program creation support program
JPH01307844A (en) Editing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090630

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100115

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100505

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4517302

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

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees