[go: up one dir, main page]

JP2006301846A - Retrieval apparatus for user program and program to be applied to the same - Google Patents

Retrieval apparatus for user program and program to be applied to the same Download PDF

Info

Publication number
JP2006301846A
JP2006301846A JP2005121014A JP2005121014A JP2006301846A JP 2006301846 A JP2006301846 A JP 2006301846A JP 2005121014 A JP2005121014 A JP 2005121014A JP 2005121014 A JP2005121014 A JP 2005121014A JP 2006301846 A JP2006301846 A JP 2006301846A
Authority
JP
Japan
Prior art keywords
virtual device
label
user program
master
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
JP2005121014A
Other languages
Japanese (ja)
Other versions
JP4628169B2 (en
Inventor
Hiroshi Sasaki
弘志 佐々木
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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2005121014A priority Critical patent/JP4628169B2/en
Publication of JP2006301846A publication Critical patent/JP2006301846A/en
Application granted granted Critical
Publication of JP4628169B2 publication Critical patent/JP4628169B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a retrieval apparatus for a user program for satisfactory performing the retrieval of a virtual device on the basis of a master level even when the master label of the virtual device is changed, and a program to be applied to this. <P>SOLUTION: When a user program is displayed on a screen, a retrieval apparatus 1 for a user program performs label display on the basis of a change label table stored in a change label table storage part 27, and when a character string to be retrieved is inputted, the retrieval apparatus 1 for a user program converts the inputted character string into a virtual device on the basis of a master label table stored in a master label table storage part 26, and retrieves the user program on the basis of the virtual device after conversion. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、ユーザプログラム用検索装置及びこれに適用されるプログラムに係り、更に詳しくは、プログラマブル・ロジック・コントローラを制御するためのユーザプログラムに含まれる文字列を検索する方法の改良に関する。   The present invention relates to a search apparatus for a user program and a program applied thereto, and more particularly to an improvement in a method for searching for a character string included in a user program for controlling a programmable logic controller.

工場等に設置される各種制御装置を統括的に制御するためのPLC(プログラマブル・ロジック・コントローラ)が知られている(例えば、特許文献1参照)。PLCは、CPUが内蔵されたCPUユニットを備え、このCPUユニットに対して拡張ユニットが着脱可能に構成されている。ユーザは、各種制御装置の機能ごとに拡張ユニットを用意してCPUユニットに取り付けるとともに、拡張ユニットに対応する制御装置を接続することにより、拡張ユニットを介して各制御装置をCPUユニットに接続する。   A PLC (programmable logic controller) for comprehensively controlling various control devices installed in a factory or the like is known (for example, see Patent Document 1). The PLC includes a CPU unit with a built-in CPU, and an expansion unit can be attached to and detached from the CPU unit. The user prepares an expansion unit for each function of the various control devices and attaches the expansion unit to the CPU unit, and connects each control device to the CPU unit via the expansion unit by connecting a control device corresponding to the expansion unit.

拡張ユニットを介してCPUユニットに接続される制御装置には、センサなどの入力装置や、アクチュエータなどの出力装置が含まれる。CPUユニットに内蔵されたCPUは、入力装置から拡張ユニットを介して入力される入力信号に基づいてプログラムを実行することにより、所定の出力装置の動作を拡張ユニットを介して制御する。   The control device connected to the CPU unit via the expansion unit includes an input device such as a sensor and an output device such as an actuator. The CPU built in the CPU unit controls the operation of a predetermined output device via the expansion unit by executing a program based on an input signal input from the input device via the expansion unit.

PLCを制御するためのユーザプログラムとしては、ラダー図を用いて作成されるラダープログラムが知られている。ラダープログラムは、たとえば、パーソナルコンピュータを用いて作成され、パーソナルコンピュータの表示画面上にマトリックス状に表示される複数のセル内に仮想デバイスのシンボルを適宜配置して、視覚的なリレー回路を表すラダー図を構築することにより作成される。   As a user program for controlling the PLC, a ladder program created using a ladder diagram is known. The ladder program is created by using a personal computer, for example, and a ladder that represents a visual relay circuit by appropriately arranging symbols of virtual devices in a plurality of cells displayed in a matrix on the display screen of the personal computer. Created by constructing a diagram.

パーソナルコンピュータにおいて作成されたラダープログラムは、パーソナルコンピュータ内でニモニックコードに変換される。そして、パーソナルコンピュータをPLCのCPUユニットに接続し、ニモニックコードに変換されたプログラムをパーソナルコンピュータからCPUユニットに送ると、そのプログラムがCPUユニット内でマシンコードに変換され、CPUユニットに備えられたメモリ内に記憶される。これにより、CPUユニットのCPUは、メモリ内に記憶されているマシンコードに変換されたプログラムに基づいて制御装置の動作を制御することが可能になる。   A ladder program created in the personal computer is converted into a mnemonic code in the personal computer. Then, when the personal computer is connected to the CPU unit of the PLC and the program converted into the mnemonic code is sent from the personal computer to the CPU unit, the program is converted into the machine code in the CPU unit, and the memory provided in the CPU unit Stored in. Thereby, the CPU of the CPU unit can control the operation of the control device based on the program converted into the machine code stored in the memory.

PLC内のメモリに割り当てられる各仮想デバイスには、その機能に応じたラベルがマスターラベルとして初期設定されており、ラダープログラムを作成するパーソナルコンピュータ内のメモリには、各仮想デバイスにマスターラベルが対応付けられたマスターラベルテーブルが記憶されている。ラダー図を用いたラダープログラムの作成時に、各仮想デバイスのシンボルをセル内に配置したときには、マスターラベルテーブルに基づいて、その仮想デバイスに対応するマスターラベルをシンボルの近傍に表示させることができる。これにより、ラダー図上の各仮想デバイスの機能を明瞭に表示することができるので、そのラダープログラムを作成した者以外の者、たとえば、PLCが設置されている工場の従業員などがラダープログラムを編集するような場合でも、ラダー図で表されたラダープログラムの内容を容易に理解することができる。   Each virtual device assigned to the memory in the PLC is initially set with a label corresponding to its function as a master label. In the memory in the personal computer that creates the ladder program, a master label corresponds to each virtual device. The attached master label table is stored. When creating a ladder program using a ladder diagram, when a symbol of each virtual device is arranged in a cell, a master label corresponding to the virtual device can be displayed in the vicinity of the symbol based on the master label table. As a result, the function of each virtual device on the ladder diagram can be clearly displayed, so that a person other than the person who created the ladder program, for example, an employee of the factory where the PLC is installed, can execute the ladder program. Even when editing, the contents of the ladder program represented by the ladder diagram can be easily understood.

ユーザの中には、各仮想デバイスに対応して初期設定されているマスターラベルの変更を望む者もいる。この様なユーザの要望に応えるために、パーソナルコンピュータ上でのマスターラベルの変更を許容し、マスターラベルが変更された仮想デバイスのシンボルをラダー図上のセル内に配置したときに、そのシンボルの近傍に変更後の変更ラベルを表示させることができるようになっているものもある。この場合、パーソナルコンピュータのメモリに記憶されているマスターラベルテーブルは、マスターラベルが変更された仮想デバイスに変更後の変更ラベルが対応付けられるように書き換えられる。
特開2005−85076号公報
Some users desire to change the default master label corresponding to each virtual device. In order to respond to such a user's request, the change of the master label on the personal computer is allowed, and when the symbol of the virtual device whose master label has been changed is placed in a cell on the ladder diagram, In some cases, a changed label can be displayed in the vicinity. In this case, the master label table stored in the memory of the personal computer is rewritten so that the changed label after the change is associated with the virtual device whose master label has been changed.
JP 2005-85076 A

ラダープログラムの編集中に、その編集中のラダープログラムにおいて先に使用した仮想デバイスと同じ仮想デバイスを使用しようとする場合や、過去に作成したラダープログラムに含まれる仮想デバイスと同じ仮想デバイスを使用しようとする場合などに、その仮想デバイスを検索したい場合がある。   While editing a ladder program, try to use the same virtual device as the virtual device used earlier in the ladder program being edited, or try to use the same virtual device as the virtual device included in the ladder program created in the past In some cases, it is desirable to search for the virtual device.

この様な場合、検索したい仮想デバイスのマスターラベルが変更されているときには、変更前のマスターラベルを入力してラダープログラムを検索しても、書き換えられたマスターラベルテーブルには変更前のマスターラベルが存在しないので、マスターラベルに基づいて仮想デバイスの検索を良好に行うことができないというという問題があった。   In such a case, if the master label of the virtual device you want to search for has been changed, even if you enter the master label before the change and search the ladder program, the master label before the change will be displayed in the rewritten master label table. Since it does not exist, there has been a problem that the virtual device search cannot be performed satisfactorily based on the master label.

本発明は、上記の事情に鑑みてなされたものであり、仮想デバイスのマスターラベルが変更された場合でも、マスターラベルに基づいて仮想デバイスの検索を良好に行うことができるユーザプログラム用検索装置及びこれに適用されるプログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and even when a master label of a virtual device is changed, a search device for a user program that can satisfactorily search for a virtual device based on the master label, and It is an object to provide a program applicable to this.

また、本発明は、利便性が向上されたユーザプログラム用検索装置及びこれに適用されるプログラムを提供することを目的とする。   It is another object of the present invention to provide a user program search apparatus with improved convenience and a program applied thereto.

本発明によるユーザプログラム用検索装置は、ユーザにより作成されるプログラマブル・ロジック・コントローラを制御するためのユーザプログラムに含まれる文字列を検索するためのユーザプログラム用検索装置において、上記プログラマブル・ロジック・コントローラ内の仮想デバイスにマスターラベルが対応付けられたマスターラベルテーブルを記憶するマスターラベルテーブル記憶手段と、上記マスターラベルが変更された場合に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルを記憶する変更ラベルテーブル記憶手段と、ユーザプログラムを画面表示する際に、上記変更ラベルテーブルに変更ラベルが対応付けられている仮想デバイスに対して、上記変更ラベルテーブルに基づいてラベル表示を行うユーザプログラム表示手段と、検索すべき文字列を入力するための入力手段と、上記入力手段により入力された文字列を、上記マスターラベルテーブルに基づいて仮想デバイスに変換する仮想デバイス変換手段と、上記仮想デバイス変換手段により変換された後の仮想デバイスに基づいて、ユーザプログラムを検索するユーザプログラム検索手段とを備えて構成される。   A user program search device according to the present invention is a user program search device for searching for a character string included in a user program for controlling a programmable logic controller created by a user. A master label table storage unit for storing a master label table in which a master label is associated with a virtual device in the device, and when the master label is changed, the changed label is changed to the virtual device corresponding to the master label. The change label table storage unit for storing the associated change label table and the virtual device associated with the change label in the change label table when the user program is displayed on the screen are displayed in the change label table. User program display means for performing label display based on the above, input means for inputting a character string to be searched, and a virtual device for converting the character string input by the input means into a virtual device based on the master label table Device conversion means and user program search means for searching for a user program based on the virtual device converted by the virtual device conversion means are configured.

この様な構成によれば、マスターラベルが変更された場合には、ユーザプログラムを画面表示する際に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルに基づいてラベル表示が行われる。したがって、仮想デバイスに変更後の変更ラベルを対応付けて表示させることができるので、マスターラベルの変更を望むユーザにとって利便性が向上する。   According to such a configuration, when the master label is changed, when the user program is displayed on the screen, the changed label table in which the changed change label is associated with the virtual device corresponding to the master label is displayed. Based on this, a label is displayed. Therefore, since the changed label after the change can be displayed in association with the virtual device, the convenience for the user who desires to change the master label is improved.

また、マスターラベルが変更された場合でも、変更前のマスターラベルを入力してユーザプログラムを検索すれば、その入力された文字列、すなわちマスターラベルが、マスターラベルテーブルに基づいて仮想デバイスに変換され、その変換された後の仮想デバイスに基づいてユーザプログラムが検索される。したがって、仮想デバイスのマスターラベルが変更された場合でも、マスターラベルに基づいて仮想デバイスの検索を良好に行うことができ、検索を行うユーザにとっても利便性が向上する。   Even if the master label is changed, if the user program is searched by inputting the master label before the change, the input character string, that is, the master label is converted into a virtual device based on the master label table. The user program is searched based on the converted virtual device. Therefore, even when the master label of the virtual device is changed, the search for the virtual device can be performed satisfactorily based on the master label, and convenience for the user who performs the search is improved.

また、本発明によるユーザプログラム用検索装置は、上記ユーザプログラム検索手段による検索結果を画面表示する検索結果表示手段を備えて構成される。   The user program search device according to the present invention comprises search result display means for displaying the search results of the user program search means on the screen.

この様な構成によれば、変更前のマスターラベルに基づいて仮想デバイスの検索を行った場合でも、変更後の変更ラベルが対応付けられた仮想デバイスを検索結果として画面表示することができる。   According to such a configuration, even when a virtual device is searched based on the master label before the change, the virtual device associated with the changed label after the change can be displayed on the screen as a search result.

また、本発明によるユーザプログラム用検索装置は、上記入力手段により入力された文字列に基づいて、ヘルプファイルを検索するヘルプファイル検索手段を備えて構成される。   A user program search device according to the present invention comprises a help file search means for searching for a help file based on the character string input by the input means.

この様な構成によれば、変更前のマスターラベルを入力してユーザプログラムを検索した場合、その入力されたマスターラベルに基づいて仮想デバイスを良好に検索できる上に、その入力されたマスターラベルに関するヘルプ情報をヘルプファイルから検索し閲覧することができる。したがって、検索を行うユーザにとって利便性がさらに向上する。   According to such a configuration, when the user program is searched by inputting the master label before the change, the virtual device can be satisfactorily searched based on the input master label, and the input master label is related to the input master label. Help information can be searched and browsed from help files. Therefore, convenience for the user who performs the search is further improved.

また、本発明において、上記プログラマブル・ロジック・コントローラは、制御ユニットを備え、この制御ユニットに対して拡張ユニットを着脱可能に構成されており、上記制御ユニットは、上記制御ユニットに取り付けられた拡張ユニットごとに割当領域が割り当てられ、各割当領域内に仮想デバイスが割り当てられるメモリを備え、上記マスターラベルテーブルには、上記制御ユニットに取り付けられた拡張ユニットごとに、上記割当領域内における仮想デバイスの相対的な位置情報が記憶されており、上記仮想デバイス変換手段は、上記メモリ内における拡張ユニットごとの上記割当領域の位置情報と、上記マスターラベルテーブルに記憶されている上記割当領域内における仮想デバイスの相対的な位置情報とに基づいて、上記入力手段により入力された文字列を仮想デバイスに変換するように構成される。   In the present invention, the programmable logic controller includes a control unit, and an extension unit can be attached to and detached from the control unit, and the control unit is an extension unit attached to the control unit. Each of the allocation areas includes a memory to which a virtual device is allocated, and the master label table includes, for each expansion unit attached to the control unit, a virtual device relative to the allocation area. The virtual device converting means stores the positional information of the allocation area for each expansion unit in the memory and the virtual device in the allocation area stored in the master label table. Based on the relative position information Configured to convert the virtual device a character string input by.

この様な構成によれば、プログラマブル・ロジック・コントローラごとに制御ユニットに取り付ける拡張ユニットが異なる場合でも、メモリ内における拡張ユニットごとの割当領域の位置情報と、マスターラベルテーブルに記憶されている割当領域内における仮想デバイスの相対的な位置情報とに基づいて、仮想デバイスの検索を良好に行うことができる。   According to such a configuration, even when the extension unit attached to the control unit is different for each programmable logic controller, the location information of the allocation area for each extension unit in the memory and the allocation area stored in the master label table Based on the relative position information of the virtual device, the search for the virtual device can be performed satisfactorily.

また、本発明によるプログラムは、ユーザにより作成されるプログラマブル・ロジック・コントローラを制御するためのユーザプログラムに含まれる文字列を検索するためのユーザプログラム用検索装置を、上記プログラマブル・ロジック・コントローラ内の仮想デバイスにマスターラベルが対応付けられたマスターラベルテーブルを記憶するマスターラベルテーブル記憶手段と、上記マスターラベルが変更された場合に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルを記憶する変更ラベルテーブル記憶手段と、ユーザプログラムを画面表示する際に、上記変更ラベルテーブルに変更ラベルが対応付けられている仮想デバイスに対して、上記変更ラベルテーブルに基づいてラベル表示を行うユーザプログラム表示手段と、検索すべき文字列が入力された場合に、その入力された文字列を、上記マスターラベルテーブルに基づいて仮想デバイスに変換する仮想デバイス変換手段と、上記仮想デバイス変換手段により変換された後の仮想デバイスに基づいて、ユーザプログラムを検索するユーザプログラム検索手段として機能させるするように構成される。   In addition, a program according to the present invention provides a user program search device for searching for a character string included in a user program for controlling a programmable logic controller created by a user in the programmable logic controller. Master label table storage means for storing a master label table in which a master label is associated with a virtual device, and when the master label is changed, the changed label after the change is associated with the virtual device corresponding to the master label Change label table storage means for storing the changed label table and a virtual device associated with the change label in the change label table when the user program is displayed on the screen based on the change label table. Label table A user program display means for performing, when a character string to be searched is input, a virtual device conversion means for converting the input character string into a virtual device based on the master label table, and the virtual device conversion Based on the virtual device converted by the means, it is configured to function as a user program search means for searching for a user program.

この様な構成によれば、マスターラベルが変更された場合には、ユーザプログラムを画面表示する際に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルに基づいてラベル表示が行われる。したがって、仮想デバイスに変更後の変更ラベルを対応付けて表示させることができるので、マスターラベルの変更を望むユーザにとって利便性が向上する。   According to such a configuration, when the master label is changed, when the user program is displayed on the screen, the changed label table in which the changed change label is associated with the virtual device corresponding to the master label is displayed. Based on this, a label is displayed. Therefore, since the changed label after the change can be displayed in association with the virtual device, the convenience for the user who desires to change the master label is improved.

また、マスターラベルが変更された場合でも、変更前のマスターラベルを入力してユーザプログラムを検索すれば、その入力された文字列、すなわちマスターラベルが、マスターラベルテーブルに基づいて仮想デバイスに変換され、その変換された後の仮想デバイスに基づいてユーザプログラムが検索される。したがって、仮想デバイスのマスターラベルが変更された場合でも、マスターラベルに基づいて仮想デバイスの検索を良好に行うことができ、検索を行うユーザにとって利便性が向上する。   Even if the master label is changed, if the user program is searched by inputting the master label before the change, the input character string, that is, the master label is converted into a virtual device based on the master label table. The user program is searched based on the converted virtual device. Therefore, even when the master label of the virtual device is changed, the search for the virtual device can be favorably performed based on the master label, and convenience for the user who performs the search is improved.

本発明によれば、ユーザプログラムを画面表示する際に、仮想デバイスに変更後の変更ラベルを対応付けて表示させることにより、マスターラベルの変更を望むユーザにとって利便性を向上させることができるとともに、仮想デバイスのマスターラベルが変更された場合でも、マスターラベルに基づいて仮想デバイスの検索を良好に行うことができ、検索を行うユーザにとっても利便性を向上させることができるユーザプログラム用検索装置及びこれに適用されるプログラムを提供することができる。   According to the present invention, when displaying the user program on the screen, by displaying the changed label in association with the virtual device, it is possible to improve convenience for the user who desires to change the master label, Even when the master label of a virtual device is changed, a search device for a user program that can perform a search of a virtual device satisfactorily based on the master label and can improve convenience for a user who performs the search, and the same It is possible to provide a program that is applied to.

図1は、本発明の実施の形態によるラダープログラム用検索システムの一構成例を示す概念図である。   FIG. 1 is a conceptual diagram showing a configuration example of a ladder program search system according to an embodiment of the present invention.

図1に示すように、このラダープログラム用検索システムは、パーソナルコンピュータ1と、工場等に設置される各種制御装置を統括的に制御するためのPLC(プログラマブル・ロジック・コントローラ)2とを備えている。   As shown in FIG. 1, this ladder program search system includes a personal computer 1 and a PLC (programmable logic controller) 2 for comprehensively controlling various control devices installed in a factory or the like. Yes.

PLC2は、CPUが内蔵されたCPUユニット3を備え、このCPUユニット3に対して1つないし複数の拡張ユニット4が着脱可能に構成されている。   The PLC 2 includes a CPU unit 3 with a built-in CPU, and one or a plurality of expansion units 4 can be attached to and detached from the CPU unit 3.

CPUユニット3には、表示部5及び操作部6が備えられている。表示部5には、CPUユニット3に取り付けられている各拡張ユニット4の動作状況などを表示することができ、表示部5の表示内容は、操作部6を操作することにより切り替えることができる。   The CPU unit 3 includes a display unit 5 and an operation unit 6. The display unit 5 can display the operation status of each expansion unit 4 attached to the CPU unit 3, and the display content of the display unit 5 can be switched by operating the operation unit 6.

拡張ユニット4は、PLC2の機能を拡張するために機能ごとに用意され、CPUユニット3に対して側方から取り付けられる。1つ目の拡張ユニット4は、CPUユニット3に対して側方から直接取り付けられる。2つ目以降の拡張ユニット4は、既に取り付けられている拡張ユニット4に対して、側方から直列的に順次取り付けられる。このようにして、CPUユニット3と複数の拡張ユニット4が直列的に取り付けられると、各拡張ユニット4内に備えられた配線を介して、各拡張ユニット4がCPUユニット3に対して通信可能に接続される。各拡張ユニット4には、その拡張ユニット4の機能に対応する制御装置が接続され、これにより、各制御装置が拡張ユニット4を介してCPUユニット3に接続される。   The expansion unit 4 is prepared for each function in order to expand the function of the PLC 2 and is attached to the CPU unit 3 from the side. The first extension unit 4 is directly attached to the CPU unit 3 from the side. The second and subsequent expansion units 4 are sequentially attached in series from the side with respect to the already-installed expansion units 4. Thus, when the CPU unit 3 and the plurality of expansion units 4 are attached in series, each expansion unit 4 can communicate with the CPU unit 3 via the wiring provided in each expansion unit 4. Connected. Each expansion unit 4 is connected to a control device corresponding to the function of the expansion unit 4, whereby each control device is connected to the CPU unit 3 via the expansion unit 4.

パーソナルコンピュータ1は、たとえば、携帯可能ないわゆるノートタイプのパーソナルコンピュータであって、表示部7及び操作部8が備えられている。PLC2を制御するためのラダープログラムは、このパーソナルコンピュータ1を用いて作成され、作成されたラダープログラムは、パーソナルコンピュータ1内でニモニックコードに変換される。そして、パーソナルコンピュータ1を、USB(Universal Serial Bus)などのケーブル9を介してPLC2のCPUユニット3に接続し、ニモニックコードに変換されたプログラムをパーソナルコンピュータ1からCPUユニット3に送ると、そのプログラムがCPUユニット3内でマシンコードに変換され、CPUユニット3に備えられたメモリ内に記憶される。   The personal computer 1 is a portable so-called notebook type personal computer, for example, and includes a display unit 7 and an operation unit 8. A ladder program for controlling the PLC 2 is created using the personal computer 1, and the created ladder program is converted into a mnemonic code in the personal computer 1. When the personal computer 1 is connected to the CPU unit 3 of the PLC 2 via a cable 9 such as a USB (Universal Serial Bus) and the program converted into the mnemonic code is sent from the personal computer 1 to the CPU unit 3, the program Is converted into a machine code in the CPU unit 3 and stored in a memory provided in the CPU unit 3.

なお、図1では図示していないが、パーソナルコンピュータ1の操作部8には、パーソナルコンピュータ1に接続されたマウスが含まれていてもよい。   Although not shown in FIG. 1, the operation unit 8 of the personal computer 1 may include a mouse connected to the personal computer 1.

図2は、図1のPLC2の電気的構成について説明するためのブロック図である。   FIG. 2 is a block diagram for explaining the electrical configuration of the PLC 2 of FIG.

図2に示すように、CPUユニット3には、CPU10、表示部5、操作部6及びメモリ11が備えられている。表示部5、操作部6及びメモリ11は、それぞれCPU10に対して電気的に接続されている。   As shown in FIG. 2, the CPU unit 3 includes a CPU 10, a display unit 5, an operation unit 6, and a memory 11. The display unit 5, the operation unit 6 and the memory 11 are electrically connected to the CPU 10, respectively.

メモリ11は、少なくともRAMを含む構成であり、概念的に、CPU10が実行するプログラムを記憶するプログラムメモリ12と、制御時に必要なデータが書き込まれるフラグなどの内部メモリ13と、CPUユニット3に取り付けられた拡張ユニット4ごとに割当領域15が割り当てられ、各割当領域15内に仮想デバイスが割り当てられる入出力メモリ14とを備えている。   The memory 11 is configured to include at least a RAM, and is conceptually attached to the program memory 12 that stores a program executed by the CPU 10, an internal memory 13 such as a flag in which data necessary for control is written, and the CPU unit 3. An allocation area 15 is allocated to each of the extended units 4, and an input / output memory 14 to which a virtual device is allocated is provided in each allocation area 15.

拡張ユニット4を介してCPUユニット3に接続される制御装置16には、センサなどの入力装置や、アクチュエータなどの出力装置が含まれる。CPUユニット3のCPU10は、入力装置16から拡張ユニット4を介して入力される入力信号に基づいて、プログラムメモリ12に記憶されているプログラムを実行することにより、拡張ユニット4を介して出力装置16の動作を制御する。   The control device 16 connected to the CPU unit 3 via the expansion unit 4 includes an input device such as a sensor and an output device such as an actuator. The CPU 10 of the CPU unit 3 executes a program stored in the program memory 12 based on an input signal input from the input device 16 via the expansion unit 4, thereby causing the output device 16 via the expansion unit 4. To control the operation.

各拡張ユニット4は、外観上、図1に示すように、CPUユニット3に対して直列的に取り付けられているが、概念的には、図2に示すように、入出力メモリ14の対応する割当領域15にそれぞれ接続されている。各拡張ユニット4に接続された制御装置16のうち、入力装置16からの入力信号に基づいて、その入力装置16に対応する拡張ユニット4に割り当てられた割当領域15内の仮想デバイスがオン/オフされ、それに基づいて、CPU10が、所定の出力装置16に対応する拡張ユニット4に割り当てられた割当領域15内の仮想デバイスをオン/オフすることにより、出力装置16の動作が制御される。   Each expansion unit 4 is externally attached in series to the CPU unit 3 as shown in FIG. 1, but conceptually corresponds to the input / output memory 14 as shown in FIG. Each is connected to the allocation area 15. Based on the input signal from the input device 16 among the control devices 16 connected to each expansion unit 4, the virtual devices in the allocation area 15 allocated to the expansion unit 4 corresponding to the input device 16 are turned on / off. Based on this, the CPU 10 controls the operation of the output device 16 by turning on / off the virtual devices in the allocation area 15 allocated to the expansion unit 4 corresponding to the predetermined output device 16.

なお、図2では、各拡張ユニット4に制御装置16が一対一に対応付けられて接続されているが、この様な構成に限らず、1つの拡張ユニット4に対して複数の制御装置16が接続されていてもよい。   In FIG. 2, the control devices 16 are connected to the respective expansion units 4 in a one-to-one correspondence. However, the configuration is not limited to such a configuration, and a plurality of control devices 16 are provided for one expansion unit 4. It may be connected.

また、仮想デバイスが割り当てられるメモリは、1つの入出力メモリ14により構成されるものに限らず、入力装置16が接続される拡張ユニット4に対応付けられた入力メモリと、出力装置16が接続される拡張ユニット4に対応付けられた出力メモリとにより構成されていてもよい。   Further, the memory to which the virtual device is allocated is not limited to one configured by one input / output memory 14, and the input memory associated with the expansion unit 4 to which the input device 16 is connected and the output device 16 are connected. And an output memory associated with the expansion unit 4.

図3は、ラダープログラムの作成時にパーソナルコンピュータ1の表示部7に表示されるラダー図17の一例を示す図である。   FIG. 3 is a diagram showing an example of a ladder diagram 17 displayed on the display unit 7 of the personal computer 1 when a ladder program is created.

図3に示すように、PLC2を制御するためのラダープログラムは、パーソナルコンピュータ1の表示部7にマトリックス状に表示される複数のセル18内に仮想デバイスのシンボル19を適宜配置して、視覚的なリレー回路を表すラダー図17を構築することにより作成される。   As shown in FIG. 3, the ladder program for controlling the PLC 2 visually arranges virtual device symbols 19 in a plurality of cells 18 displayed in a matrix on the display unit 7 of the personal computer 1. It is created by constructing a ladder diagram 17 representing a simple relay circuit.

ラダー図17には、たとえば、10列×N行(Nは任意の自然数)のセル18が配置されている。そして、各行のセル18内に、図3に示す左側から右側に向かって、時系列的に仮想デバイスのシンボル19を適宜配置することにより、視覚的なリレー回路を作成することができる。作成されるリレー回路は、1行で表される直列的なリレー回路であってもよいし、複数行に並列的に表されたリレー回路を、いずれかのセル18内(図3に示す例では、たとえば2列目の1行目)で結合することにより作成された、並列的なリレー回路であってもよい。   In the ladder diagram 17, for example, cells 18 of 10 columns × N rows (N is an arbitrary natural number) are arranged. A visual relay circuit can be created by appropriately arranging the virtual device symbols 19 in time series in the cells 18 of each row from the left side to the right side shown in FIG. The relay circuit to be created may be a serial relay circuit represented by one row, or a relay circuit represented in parallel in a plurality of rows in any cell 18 (example shown in FIG. 3). Then, for example, a parallel relay circuit created by coupling in the first row of the second column may be used.

ラダー図17のいずれかの行には、仮想デバイスのシンボル19を配置せずに、任意の文字列を行コメントとして表示させることもできる。   An arbitrary character string can be displayed as a line comment without arranging the virtual device symbol 19 on any line of the ladder diagram 17.

ラダー図17は、機能ごとに、10列×M行(Mは任意の自然数であって、M<N)のセル18からなる複数のモジュール20に分割することができる。このように、ラダー図17を複数のモジュール20により構成すれば、PLC2が実行する機能の変更に応じてモジュール20を適宜入れ替えることにより、ラダープログラムを容易に編集することができる。   The ladder diagram 17 can be divided into a plurality of modules 20 composed of cells 18 of 10 columns × M rows (M is an arbitrary natural number, M <N) for each function. In this way, if the ladder diagram 17 is configured by a plurality of modules 20, the ladder program can be easily edited by appropriately replacing the modules 20 in accordance with changes in the functions executed by the PLC 2.

図4の(a),(b)は、ラダー図17を用いて作成されるリレー回路の具体例を示す図である。   4A and 4B are diagrams showing a specific example of a relay circuit created using the ladder diagram 17.

図4(a)に示すリレー回路は、入力装置16からの入力信号に基づいてオン/オフされる3つの仮想デバイス(以下、「入力デバイス」と呼ぶ。)のシンボル19a,19b,19cと、出力装置16の動作を制御するためにオン/オフされる仮想デバイス(以下、「出力デバイス」と呼ぶ。)のシンボル19dとが、適宜結合されることにより構成されている。   The relay circuit shown in FIG. 4A includes symbols 19a, 19b, and 19c of three virtual devices (hereinafter referred to as “input devices”) that are turned on / off based on an input signal from the input device 16. A symbol 19d of a virtual device (hereinafter referred to as “output device”) that is turned on / off to control the operation of the output device 16 is appropriately combined.

各入力デバイスのシンボル19a,19b,19cの上方に表示されている文字(「R0001」、「R0002」及び「R0003」)は、その入力デバイスのデバイス名(アドレス名)21を表している。各入力デバイスのシンボル19a,19b,19cの下方に表示されている文字(「フラグ1」、「フラグ2」及び「フラグ3」)は、その入力デバイスに対応付けられたデバイスコメント22を表している。出力デバイスのシンボル19dの上方に表示されている文字(「原点復帰」)は、その出力デバイスの機能を表す文字列からなるラベル23である。   The characters (“R0001”, “R0002”, and “R0003”) displayed above the symbols 19a, 19b, and 19c of each input device represent the device name (address name) 21 of the input device. The characters (“flag 1”, “flag 2”, and “flag 3”) displayed below the symbols 19a, 19b, and 19c of each input device represent a device comment 22 associated with the input device. Yes. A character (“origin return”) displayed above the symbol 19d of the output device is a label 23 composed of a character string representing the function of the output device.

このように、ラダー図17上に配置される各仮想デバイスのシンボル19の近傍には、デバイス名21、デバイスコメント22及びラベル23などを適宜配置することができる。図4に示す出力デバイスのシンボル19dのように、仮想デバイスのシンボル19の近傍に、その仮想デバイスの機能を表すラベル23を表示すれば、その仮想デバイスの機能を明瞭に表示することができるので、ラダープログラムを作成した者以外の者、たとえば、PLC2が設置されている工場の従業員などがラダープログラムを編集するような場合でも、ラダー図17で表されたラダープログラムの内容を容易に理解することができる。   As described above, the device name 21, the device comment 22, the label 23, and the like can be appropriately arranged in the vicinity of the symbol 19 of each virtual device arranged on the ladder diagram 17. If the label 23 indicating the function of the virtual device is displayed in the vicinity of the virtual device symbol 19 as in the output device symbol 19d shown in FIG. 4, the function of the virtual device can be clearly displayed. Even if a person other than the person who created the ladder program, for example, an employee of the factory where the PLC 2 is installed, edits the ladder program, the contents of the ladder program shown in FIG. 17 are easily understood. can do.

図4(a)に示す例では、デバイス名「R0001」及び「R0002」にそれぞれ対応する2つの入力デバイスのシンボル19a,19bが直列的に結合されることにより、AND回路が構成されている。また、これらの2つの入力デバイスのシンボル19a,19bからなるAND回路に対して、デバイス名「R0003」に対応する入力デバイスのシンボル19cが並列的に結合されることにより、OR回路が構成されている。すなわち、このリレー回路では、2つのシンボル19a,19bに対応する入力デバイスがいずれもオンした場合、又は、シンボル19cに対応する入力デバイスがオンした場合にのみ、シンボル19dに対応する出力デバイスがオンされるようになっている。   In the example shown in FIG. 4A, two input device symbols 19a and 19b respectively corresponding to the device names “R0001” and “R0002” are coupled in series to constitute an AND circuit. In addition, an OR circuit is configured by parallelly connecting the input device symbol 19c corresponding to the device name “R0003” to the AND circuit including the symbols 19a and 19b of these two input devices. Yes. That is, in this relay circuit, the output device corresponding to the symbol 19d is turned on only when both of the input devices corresponding to the two symbols 19a and 19b are turned on or when the input device corresponding to the symbol 19c is turned on. It has come to be.

各仮想デバイスには、メーカにより、その機能に応じたラベル23がマスターラベル23aとして初期設定されており、図4(a)に示す例において、出力デバイスのシンボル19dの上方に表示されている「原点復帰」というラベル23は、この出力デバイスのマスターラベル23aを示している。   In each virtual device, a label 23 corresponding to the function is initially set as a master label 23a by the manufacturer, and is displayed above the output device symbol 19d in the example shown in FIG. The label 23 “return to origin” indicates the master label 23a of this output device.

ここで、「原点復帰」の仮想デバイスは、対象物の2次元的な位置決めを行うためのXYステージなどの位置決め装置を制御装置(出力装置)16としてPLC2に接続した場合に、その位置決め装置を予め定められた初期位置に戻すためにオンされる仮想デバイスである。   Here, the virtual device of “return to origin” is a positioning device such as an XY stage for performing two-dimensional positioning of an object when the positioning device is connected to the PLC 2 as a control device (output device) 16. This is a virtual device that is turned on to return to a predetermined initial position.

ユーザの中には、各仮想デバイスに対応して初期設定されているマスターラベル23aの変更を望む者もいる。この様なユーザの要望に応えるために、本実施の形態では、パーソナルコンピュータ1上でのマスターラベル23aの変更を許容し、マスターラベル23aが変更された仮想デバイスのシンボル19をラダー図17上に配置したときに、そのシンボル19の上方に変更後のラベル23を変更ラベル23bとして表示させることができるようになっている。すなわち、図4(a)に示す例において、ユーザが、「原点復帰」のマスターラベル23aを「位置リセット」というラベル23に変更した場合には、図4(b)に示すように、対応する仮想デバイスのシンボル19dの上方に、その変更後のラベル23(「位置リセット」)が変更ラベル23bとして表示される。   Some users desire to change the master label 23a that is initially set corresponding to each virtual device. In order to meet such a user's request, in this embodiment, the change of the master label 23a on the personal computer 1 is allowed, and the symbol 19 of the virtual device whose master label 23a has been changed is displayed on the ladder diagram 17. When arranged, the changed label 23 can be displayed as the changed label 23 b above the symbol 19. That is, in the example shown in FIG. 4A, when the user changes the master label 23a of “return to origin” to the label 23 of “position reset”, as shown in FIG. The changed label 23 (“position reset”) is displayed as the changed label 23b above the virtual device symbol 19d.

図5は、図1のパーソナルコンピュータ1の電気的構成について説明するためのブロック図である。   FIG. 5 is a block diagram for explaining the electrical configuration of the personal computer 1 of FIG.

図5に示すように、パーソナルコンピュータ1には、CPU24、表示部7、操作部8及びメモリ25が備えられている。表示部7、操作部8及びメモリ25は、それぞれCPU24に対して電気的に接続されている。   As shown in FIG. 5, the personal computer 1 includes a CPU 24, a display unit 7, an operation unit 8, and a memory 25. The display unit 7, the operation unit 8, and the memory 25 are electrically connected to the CPU 24, respectively.

メモリ25は、少なくともRAMを含む構成であり、概念的に、マスターラベルテーブルを記憶するマスターラベルテーブル記憶部26と、変更ラベルテーブルを記憶する変更ラベルテーブル記憶部27と、CPUユニット3の入出力メモリ14における各拡張ユニット4の割当領域15の位置情報を記憶する割当位置記憶部28と、編集中のラダープログラムを記憶する編集中プログラム記憶部29と、過去に作成したラダープログラムを記憶する過去作成プログラム記憶部30と、メーカが用意したサンプル用のラダープログラムを記憶するサンプルプログラム記憶部31と、ヘルプファイルを記憶するヘルプファイル記憶部32とを備えている。   The memory 25 includes at least a RAM, and conceptually includes a master label table storage unit 26 that stores a master label table, a change label table storage unit 27 that stores a change label table, and input / output of the CPU unit 3. An allocation position storage unit 28 that stores the position information of the allocation area 15 of each expansion unit 4 in the memory 14, an editing program storage unit 29 that stores a ladder program being edited, and a past that stores a ladder program created in the past A creation program storage unit 30, a sample program storage unit 31 for storing a sample ladder program prepared by the manufacturer, and a help file storage unit 32 for storing a help file are provided.

マスターラベルテーブル記憶部26に記憶されるマスターラベルテーブルは、CPUユニット3の入出力メモリ14に記憶される各仮想デバイスにマスターラベル23aが対応付けられたテーブルであって、メーカにより予め用意されるものである。マスターラベルテーブルには、拡張ユニット4ごとに、CPUユニット3の入出力メモリ14に割り当てられた割当領域15内における仮想デバイスの相対的な位置情報が記憶されている。たとえば、制御装置16としての位置決め装置が接続される拡張ユニット4に対応するマスターラベルテーブルには、その拡張ユニット4に対応するCPUユニット3の入出力メモリ14の割当領域15内において、相対的にK番目(Kは自然数)のアドレスに、「原点復帰」の仮想デバイスが記憶されているといった情報が記憶されている。   The master label table stored in the master label table storage unit 26 is a table in which the master label 23a is associated with each virtual device stored in the input / output memory 14 of the CPU unit 3, and is prepared in advance by the manufacturer. Is. In the master label table, the relative position information of the virtual device in the allocation area 15 allocated to the input / output memory 14 of the CPU unit 3 is stored for each expansion unit 4. For example, the master label table corresponding to the expansion unit 4 to which the positioning device as the control device 16 is connected is relatively in the allocation area 15 of the input / output memory 14 of the CPU unit 3 corresponding to the expansion unit 4. Information indicating that the “origin return” virtual device is stored at the K-th (K is a natural number) address is stored.

変更ラベルテーブル記憶部27に記憶される変更ラベルテーブルは、マスターラベルテーブルをメモリ25内でコピーすることにより作成され、マスターラベル23aが変更された場合に、そのマスターラベル23aに対応する仮想デバイスに変更後の変更ラベル23bが対応付けられるように書き換えられる。   The change label table stored in the change label table storage unit 27 is created by copying the master label table in the memory 25. When the master label 23a is changed, the change label table is stored in the virtual device corresponding to the master label 23a. The change label 23b after the change is rewritten so as to be associated.

パーソナルコンピュータ1のCPU24は、ラダープログラムをラダー図17として表示部7に表示する際、変更ラベルテーブルに基づいてラベル表示を行う。これにより、マスターラベル23aが変更されている仮想デバイスに対しては、変更ラベルテーブルにその仮想デバイスに対応付けて記憶されている変更ラベル23bが表示され、マスターラベル23aが変更されていない仮想デバイスに対しては、変更ラベルテーブルにその仮想デバイスに対応付けて記憶されているマスターラベル23aが表示される。   When the CPU 24 of the personal computer 1 displays the ladder program on the display unit 7 as a ladder diagram 17, the CPU 24 performs label display based on the changed label table. Thus, for a virtual device whose master label 23a has been changed, the change label 23b stored in association with the virtual device is displayed in the change label table, and the virtual device whose master label 23a has not been changed. Is displayed, the master label 23a stored in association with the virtual device is displayed in the change label table.

ただし、マスターラベル23aが変更されていない仮想デバイスに対するラベル表示は、変更ラベルテーブルに基づいて行われるような構成に限らず、マスターラベルテーブルに基づいて行われるようになっていてもよい。   However, the label display for the virtual device in which the master label 23a has not been changed is not limited to the configuration performed based on the changed label table, but may be performed based on the master label table.

割当位置記憶部28に記憶される位置情報は、PLC2のCPUユニット3からパーソナルコンピュータ1に通知(入力)されることにより自動的に割り当てられてもよいし、パーソナルコンピュータ1で指定して、その情報がCPUユニット3に転送されるようになっていてもよい。拡張ユニット4は、ユーザの好みに応じて任意に選択され、CPUユニット3に取り付けられるため、PLC2ごとにCPUユニット3に取り付けられる拡張ユニット4の個数及び順序が異なる。したがって、CPUユニット3の入出力メモリ14内において拡張ユニット4ごとに割り当てられる割当領域15の位置もPLC2ごとに異なることとなるが、各拡張ユニット4ごとの割当領域15の位置情報が割当位置記憶部28に記憶されるので、この割当位置記憶部28に記憶されている各拡張ユニット4ごとの割当領域15の位置情報と、マスターラベルテーブルに記憶されている割当領域15内における仮想デバイスの相対的な位置情報とに基づいて、CPUユニット3の入出力メモリ14内における各仮想デバイスを特定することができる。   The position information stored in the assigned position storage unit 28 may be automatically assigned by being notified (input) from the CPU unit 3 of the PLC 2 to the personal computer 1, or specified by the personal computer 1 Information may be transferred to the CPU unit 3. The expansion unit 4 is arbitrarily selected according to the user's preference and is attached to the CPU unit 3. Therefore, the number and order of the expansion units 4 attached to the CPU unit 3 are different for each PLC 2. Therefore, the position of the allocation area 15 allocated for each expansion unit 4 in the input / output memory 14 of the CPU unit 3 also differs for each PLC 2, but the position information of the allocation area 15 for each expansion unit 4 is stored in the allocation position storage. Since it is stored in the unit 28, the position information of the allocation area 15 for each expansion unit 4 stored in the allocation position storage unit 28 and the relative of the virtual device in the allocation area 15 stored in the master label table Each virtual device in the input / output memory 14 of the CPU unit 3 can be specified based on the positional information.

たとえば、制御装置16としての位置決め装置が接続される拡張ユニット4がCPUユニット3に取り付けられ、CPUユニット3の入出力メモリ14内におけるL番目(Lは自然数)のアドレスを開始点として、その拡張ユニット4に割当領域15が割り当てられた場合について説明する。この場合、割当位置記憶部28に記憶されているその拡張ユニット4の割当領域15の位置情報(入出力メモリ14内におけるL番目のアドレス)と、マスターラベルテーブルに記憶されているその割当領域15内における「原点復帰」の仮想デバイスの相対的な位置情報(割当領域15内におけるK番目のアドレス)とに基づいて、CPUユニット3の入出力メモリ14内における「原点復帰」の仮想デバイスを特定することができる。   For example, the expansion unit 4 to which the positioning device as the control device 16 is connected is attached to the CPU unit 3, and the expansion starts from the Lth address (L is a natural number) in the input / output memory 14 of the CPU unit 3. A case where the allocation area 15 is allocated to the unit 4 will be described. In this case, the position information (Lth address in the input / output memory 14) of the allocation area 15 of the expansion unit 4 stored in the allocation position storage unit 28 and the allocation area 15 stored in the master label table. The “origin return” virtual device in the input / output memory 14 of the CPU unit 3 is identified based on the relative position information of the “origin return” virtual device (K-th address in the allocation area 15). can do.

パーソナルコンピュータ1は、たとえばLANなどの通信回線33を介して、サーバ34と通信可能に接続されている。サーバ34には、PLC2に関する情報が格納されたデータベース35が備えられており、パーソナルコンピュータ1のCPU24は、サーバ34との通信により、データベース35からパーソナルコンピュータ1のメモリ25内に情報を読み込むことができる。   The personal computer 1 is communicably connected to a server 34 via a communication line 33 such as a LAN. The server 34 is provided with a database 35 in which information related to the PLC 2 is stored, and the CPU 24 of the personal computer 1 reads information from the database 35 into the memory 25 of the personal computer 1 by communication with the server 34. it can.

このラダープログラム用検索システムにおいて、パーソナルコンピュータ1は、ラダープログラム用検索装置として機能し、パーソナルコンピュータ1の操作部8を操作することにより、検索リソース36からラダープログラムに含まれる文字列を検索することができる。検索リソース36には、編集中プログラム記憶部29に記憶されている編集中のラダープログラム、過去作成プログラム記憶部30に記憶されている過去に作成したラダープログラム、サンプルプログラム記憶部31に記憶されているサンプル用のラダープログラム、ヘルプファイル記憶部32に記憶されているヘルプファイル、及び、サーバ34に備えられたデータベース35などが含まれる。   In this ladder program search system, the personal computer 1 functions as a ladder program search device, and searches the character string included in the ladder program from the search resource 36 by operating the operation unit 8 of the personal computer 1. Can do. The search resource 36 stores the ladder program being edited stored in the program storage unit 29 being edited, the ladder program created in the past stored in the past program storage unit 30, and the sample program storage unit 31. A sample ladder program, a help file stored in the help file storage unit 32, a database 35 provided in the server 34, and the like.

図6は、ラダープログラムを検索する際にパーソナルコンピュータ1の表示部7に表示される検索画面37の一例を示す図である。   FIG. 6 is a diagram illustrating an example of a search screen 37 displayed on the display unit 7 of the personal computer 1 when searching for a ladder program.

図6に示すように、ラダープログラムを検索する際にパーソナルコンピュータ1の表示部7に表示される検索画面37には、検索すべき文字列をキーワードとして入力するためのキーワード入力部38と、検索リソース36の中から検索対象を選択して入力するための検索対象入力部39と、検索を開始させるために選択される検索開始キー40と、検索の実行をキャンセルするために選択されるキャンセルキー41とが配置されている。   As shown in FIG. 6, when searching for a ladder program, a search screen 37 displayed on the display unit 7 of the personal computer 1 includes a keyword input unit 38 for inputting a character string to be searched as a keyword, and a search A search target input unit 39 for selecting and inputting a search target from among the resources 36, a search start key 40 selected for starting the search, and a cancel key selected for canceling the execution of the search 41 are arranged.

パーソナルコンピュータ1の操作部8を操作して、キーワード入力部38に検索すべき文字列を入力するとともに、検索対象入力部39に検索対象を入力し、検索開始キー40を選択すると、パーソナルコンピュータ1のCPU24は、検索対象入力部39に入力された検索対象内において、キーワード入力部38に入力された文字列に基づく検索を行う。   When the operation unit 8 of the personal computer 1 is operated to input a character string to be searched for into the keyword input unit 38, a search target is input into the search target input unit 39, and the search start key 40 is selected, the personal computer 1 The CPU 24 performs a search based on the character string input to the keyword input unit 38 within the search target input to the search target input unit 39.

このとき、パーソナルコンピュータ1のCPU24は、キーワード入力部38に入力された文字列を、マスターラベルテーブル記憶部26に記憶されているマスターラベルテーブルに基づいて仮想デバイスに変換し、その変換後の仮想デバイスに基づいて検索を行う。たとえば、図6に示すように、キーワード入力部38に「原点復帰」という文字列が入力されて検索が行われた場合には、上述したように、割当位置記憶部28に記憶されている位置決め装置が接続される拡張ユニット4の割当領域15の位置情報(入出力メモリ14内におけるL番目のアドレス)と、マスターラベルテーブルに記憶されているその割当領域15内における「原点復帰」の仮想デバイスの相対的な位置情報(割当領域15内におけるK番目のアドレス)とに基づいて、CPUユニット3の入出力メモリ14内における「原点復帰」の仮想デバイスを特定し、入力された文字列をその特定した仮想デバイスに変換して検索を行う。   At this time, the CPU 24 of the personal computer 1 converts the character string input to the keyword input unit 38 into a virtual device based on the master label table stored in the master label table storage unit 26, and the converted virtual device. Search based on device. For example, as shown in FIG. 6, when a character string “return to origin” is input to the keyword input unit 38 and a search is performed, the positioning stored in the allocated position storage unit 28 as described above. Position information (Lth address in the input / output memory 14) of the allocation area 15 of the expansion unit 4 to which the apparatus is connected, and a virtual device of “origin return” in the allocation area 15 stored in the master label table Based on the relative position information (the Kth address in the allocation area 15), the virtual device of “origin return” in the input / output memory 14 of the CPU unit 3 is specified, and the input character string is Search by converting to the specified virtual device.

図7は、パーソナルコンピュータ1の表示部7に表示されるラダープログラムの検索結果の表示例を示す図である。   FIG. 7 is a diagram illustrating a display example of the search result of the ladder program displayed on the display unit 7 of the personal computer 1.

図7に示すように、ラダープログラムの検索結果は、ラダー図17上に表示されるとともに、ラダー図17とは別のウィンドウにより構成される検索結果表示部42にも表示される。   As shown in FIG. 7, the search result of the ladder program is displayed on the ladder diagram 17 and also displayed on the search result display unit 42 configured by a window different from the ladder diagram 17.

たとえば、「原点復帰」という文字列がキーワードとして入力されて検索が行われた場合には、上述の通り、マスターラベルテーブルに基づいて、その文字列が「原点復帰」の仮想デバイスに変換され、その変換後の仮想デバイスに基づいて検索が行われる。そして、検索結果表示部42には、検索画面37において検索対象入力部39に入力された検索対象に対するすべての検索結果が列記される。検索結果表示部42に列記される検索結果には、入力された文字列に対応する仮想デバイスのシンボル19が存在するモジュール名44、モジュール20内の位置(行列)45及びその仮想デバイスのニモニックコード46などが含まれる。   For example, when a search is performed by inputting a character string of “origin return” as a keyword, as described above, the character string is converted into a virtual device of “origin return” based on the master label table, A search is performed based on the converted virtual device. The search result display unit 42 lists all search results for the search target input to the search target input unit 39 on the search screen 37. The search results listed in the search result display section 42 include the module name 44 in which the virtual device symbol 19 corresponding to the input character string exists, the position (matrix) 45 in the module 20, and the mnemonic code of the virtual device. 46 and the like are included.

検索対象としてヘルプファイル記憶部32を選択した場合には、入力された文字列に基づいて、ヘルプファイル記憶部32に記憶されているヘルプファイルが検索され、その検索結果が検索結果表示部42に表示される。また、検索対象としてサーバ34のデータベース35を選択した場合には、そのデータベース35に対して検索が行われ、検索結果が検索結果表示部42に表示される。   When the help file storage unit 32 is selected as a search target, the help file stored in the help file storage unit 32 is searched based on the input character string, and the search result is displayed in the search result display unit 42. Is displayed. When the database 35 of the server 34 is selected as a search target, a search is performed on the database 35 and the search result is displayed on the search result display unit 42.

検索後、パーソナルコンピュータ1の操作部8を操作して、検索結果表示部42に列記されているいずれかの検索結果を選択すると、パーソナルコンピュータ1の表示部7に表示されたラダー図17上において、「原点復帰」に対応する仮想デバイスのシンボル19が配置されているセル18にカーソル43が合わせられることにより、強調表示が行われる。   After the search, if one of the search results listed in the search result display unit 42 is selected by operating the operation unit 8 of the personal computer 1, the ladder diagram 17 displayed on the display unit 7 of the personal computer 1 is displayed. When the cursor 43 is placed on the cell 18 in which the virtual device symbol 19 corresponding to “return to origin” is placed, highlighting is performed.

このとき、「原点復帰」というマスターラベル23aが、「位置リセット」という変更ラベル23bに変更され、変更ラベルテーブルにおいて、そのマスターラベル23aに対応する仮想デバイスに変更後の変更ラベル23bが対応付けられている場合には、図7に示すように、カーソル43が合わせられたセル18内の仮想デバイスのシンボル19には、検索時のキーワードに対応する「原点復帰」というマスターラベル23aではなく、「位置リセット」という変更ラベル23bが対応付けて表示されている。   At this time, the master label 23a “return to origin” is changed to the change label 23b “position reset”, and the changed change label 23b is associated with the virtual device corresponding to the master label 23a in the change label table. 7, the virtual device symbol 19 in the cell 18 on which the cursor 43 is placed is not the master label 23 a “return to origin” corresponding to the keyword at the time of search, but “ A change label 23b “position reset” is displayed in association with it.

本実施の形態では、マスターラベル23aが変更された場合には、ラダープログラムをパーソナルコンピュータ1の表示部7上に画面表示する際に、そのマスターラベル23aに対応する仮想デバイスに変更後の変更ラベル23bが対応付けられた変更ラベルテーブルに基づいてラベル表示が行われる。したがって、仮想デバイスに変更後の変更ラベル23bを対応付けて表示させることができるので、マスターラベル23aの変更を望むユーザにとって利便性が向上する。   In the present embodiment, when the master label 23a is changed, when the ladder program is displayed on the display unit 7 of the personal computer 1, the changed label is changed to the virtual device corresponding to the master label 23a. Label display is performed based on the changed label table associated with 23b. Therefore, since the changed label 23b after the change can be displayed in association with the virtual device, convenience is improved for a user who desires to change the master label 23a.

また、マスターラベル23aが変更された場合でも、変更前のマスターラベル23aを入力してラダープログラムを検索すれば、その入力された文字列、すなわちマスターラベルが、マスターラベルテーブルに基づいて仮想デバイスに変換され、その変換された後の仮想デバイスに基づいてラダープログラムが検索される。したがって、仮想デバイスのマスターラベル23aが変更された場合でも、マスターラベル23aに基づいて仮想デバイスの検索を良好に行うことができ、検索を行うユーザにとっても利便性が向上する。   Further, even when the master label 23a is changed, if the ladder label is searched by inputting the master label 23a before the change, the input character string, that is, the master label is stored in the virtual device based on the master label table. The ladder program is searched based on the converted virtual device after conversion. Therefore, even when the master label 23a of the virtual device is changed, the search for the virtual device can be favorably performed based on the master label 23a, and convenience for the user who performs the search is improved.

また、変更前のマスターラベル23aに基づいて仮想デバイスの検索を行った場合でも、変更後の変更ラベル23bが対応付けられた仮想デバイスをラダー図17上に検索結果として表示することができる。   Even when a virtual device is searched based on the master label 23a before the change, the virtual device associated with the changed label 23b after the change can be displayed as a search result on the ladder diagram 17.

また、変更前のマスターラベル23aを入力してラダープログラムを検索した場合、その入力されたマスターラベル23aに基づいて仮想デバイスを良好に検索できる上に、検索対象としてヘルプファイル記憶部32を選択した場合には、その入力されたマスターラベル23aに関するヘルプ情報をヘルプファイルから検索し閲覧することができる。したがって、検索を行うユーザにとって利便性がさらに向上する。   Further, when the ladder program is searched by inputting the master label 23a before the change, the virtual device can be satisfactorily searched based on the input master label 23a, and the help file storage unit 32 is selected as a search target. In this case, help information related to the inputted master label 23a can be searched from the help file and browsed. Therefore, convenience for the user who performs the search is further improved.

また、PLC2ごとにCPUユニット3に取り付ける拡張ユニット4が異なる場合でも、入出力メモリ14内における拡張ユニット4ごとの割当領域15の位置情報と、マスターラベルテーブルに記憶されている割当領域15内における仮想デバイスの相対的な位置情報とに基づいて、仮想デバイスの検索を良好に行うことができる。   Even when the expansion unit 4 attached to the CPU unit 3 is different for each PLC 2, the positional information of the allocation area 15 for each expansion unit 4 in the input / output memory 14 and the allocation area 15 stored in the master label table Based on the relative position information of the virtual device, the search for the virtual device can be performed satisfactorily.

本実施の形態では、ラダープログラム用検索装置がノートタイプのパーソナルコンピュータ1により構成される場合について説明したが、ラダープログラム用検索装置は、ノートタイプのパーソナルコンピュータに限らず、たとえば、デスクトップタイプのパーソナルコンピュータであってもよいし、PDA(Personal Digital Assistance)などの他の情報端末装置であってもよい。   In the present embodiment, the case where the ladder program search device is configured by the notebook type personal computer 1 has been described. However, the ladder program search device is not limited to the notebook type personal computer, and for example, a desktop type personal computer. It may be a computer or another information terminal device such as a PDA (Personal Digital Assistance).

また、ラダープログラム用検索装置は、パーソナルコンピュータ1などの汎用の情報端末装置に限らず、ラダープログラムを検索するための専用の検索装置であってもよい。   Further, the ladder program search device is not limited to a general-purpose information terminal device such as the personal computer 1 but may be a dedicated search device for searching for a ladder program.

また、PLC2を制御するためのプログラムは、ユーザにより作成されるユーザプログラムであれば、ラダープログラムに限らず、他のプログラムであってもよい。例えば、PLC2を制御するためのプログラムは、SFC(Sequential Function Chart)、FBD(Function Block Diagram)、LD(Ladder Diagram)、IL(Instruction List)、ST(Struction Text)などのプログラム言語で作成されていてもよい。   Further, the program for controlling the PLC 2 is not limited to the ladder program as long as it is a user program created by the user, and may be another program. For example, a program for controlling the PLC 2 is created in a programming language such as SFC (Sequential Function Chart), FBD (Function Block Diagram), LD (Ladder Diagram), IL (Instruction List), or ST (Struction Text). May be.

本発明は、以上の実施の形態の内容に限定されるものではなく、請求項記載の範囲内において種々の変更が可能である。   The present invention is not limited to the contents of the above-described embodiment, and various modifications can be made within the scope of the claims.

本発明の実施の形態によるラダープログラム用検索システムの一構成例を示す概念図である。It is a conceptual diagram which shows one structural example of the search system for ladder programs by embodiment of this invention. 図1のPLCの電気的構成について説明するためのブロック図である。It is a block diagram for demonstrating the electrical structure of PLC of FIG. ラダープログラムの作成時にパーソナルコンピュータの表示部に表示されるラダー図の一例を示す図である。It is a figure which shows an example of the ladder figure displayed on the display part of a personal computer at the time of creation of a ladder program. ラダー図を用いて作成されるリレー回路の具体例を示す図である。It is a figure which shows the specific example of the relay circuit created using a ladder diagram. 図1のパーソナルコンピュータの電気的構成について説明するためのブロック図である。It is a block diagram for demonstrating the electrical structure of the personal computer of FIG. ラダープログラムを検索する際にパーソナルコンピュータの表示部に表示される検索画面の一例を示す図である。It is a figure which shows an example of the search screen displayed on the display part of a personal computer, when searching a ladder program. パーソナルコンピュータの表示部に表示されるラダープログラムの検索結果の表示例を示す図である。It is a figure which shows the example of a display of the search result of the ladder program displayed on the display part of a personal computer.

符号の説明Explanation of symbols

1 パーソナルコンピュータ
2 PLC(プログラマブル・ロジック・コントローラ)
3 CPUユニット(制御ユニット)
4 拡張ユニット
7 表示部
8 操作部
14 入出力メモリ
15 割当領域
17 ラダー図
23a マスターラベル
23b 変更ラベル
26 マスターラベルテーブル記憶部
27 変更ラベルテーブル記憶部
32 ヘルプファイル記憶部
1 Personal Computer 2 PLC (Programmable Logic Controller)
3 CPU unit (control unit)
4 expansion unit 7 display unit 8 operation unit 14 input / output memory 15 allocation area 17 ladder diagram 23a master label 23b change label 26 master label table storage unit 27 change label table storage unit 32 help file storage unit

Claims (5)

ユーザにより作成されるプログラマブル・ロジック・コントローラを制御するためのユーザプログラムに含まれる文字列を検索するためのユーザプログラム用検索装置において、
上記プログラマブル・ロジック・コントローラ内の仮想デバイスにマスターラベルが対応付けられたマスターラベルテーブルを記憶するマスターラベルテーブル記憶手段と、
上記マスターラベルが変更された場合に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルを記憶する変更ラベルテーブル記憶手段と、
ユーザプログラムを画面表示する際に、上記変更ラベルテーブルに変更ラベルが対応付けられている仮想デバイスに対して、上記変更ラベルテーブルに基づいてラベル表示を行うユーザプログラム表示手段と、
検索すべき文字列を入力するための入力手段と、
上記入力手段により入力された文字列を、上記マスターラベルテーブルに基づいて仮想デバイスに変換する仮想デバイス変換手段と、
上記仮想デバイス変換手段により変換された後の仮想デバイスに基づいて、ユーザプログラムを検索するユーザプログラム検索手段とを備えたことを特徴とするユーザプログラム用検索装置。
In a user program search device for searching for a character string included in a user program for controlling a programmable logic controller created by a user,
Master label table storage means for storing a master label table in which a master label is associated with a virtual device in the programmable logic controller;
When the master label is changed, a changed label table storage unit that stores a changed label table in which the changed label after the change is associated with the virtual device corresponding to the master label;
User program display means for displaying a label based on the change label table for the virtual device associated with the change label in the change label table when displaying the user program on the screen;
An input means for inputting a character string to be searched;
Virtual device conversion means for converting a character string input by the input means into a virtual device based on the master label table;
A user program search device comprising user program search means for searching for a user program based on a virtual device converted by the virtual device conversion means.
上記ユーザプログラム検索手段による検索結果を画面表示する検索結果表示手段を備えることを特徴とする請求項1に記載のユーザプログラム用検索装置。   2. The search apparatus for user programs according to claim 1, further comprising search result display means for displaying a search result by the user program search means on a screen. 上記入力手段により入力された文字列に基づいて、ヘルプファイルを検索するヘルプファイル検索手段を備えることを特徴とする請求項1又は2に記載のユーザプログラム用検索装置。   The user program search device according to claim 1 or 2, further comprising help file search means for searching for a help file based on the character string input by the input means. 上記プログラマブル・ロジック・コントローラは、制御ユニットを備え、この制御ユニットに対して拡張ユニットを着脱可能に構成されており、
上記制御ユニットは、上記制御ユニットに取り付けられた拡張ユニットごとに割当領域が割り当てられ、各割当領域内に仮想デバイスが割り当てられるメモリを備え、
上記マスターラベルテーブルには、上記制御ユニットに取り付けられた拡張ユニットごとに、上記割当領域内における仮想デバイスの相対的な位置情報が記憶されており、
上記仮想デバイス変換手段は、上記メモリ内における拡張ユニットごとの上記割当領域の位置情報と、上記マスターラベルテーブルに記憶されている上記割当領域内における仮想デバイスの相対的な位置情報とに基づいて、上記入力手段により入力された文字列を仮想デバイスに変換することを特徴とする請求項1から3のいずれかに記載のユーザプログラム用検索装置。
The programmable logic controller includes a control unit, and an extension unit can be attached to and detached from the control unit.
The control unit includes a memory in which an allocation area is allocated for each expansion unit attached to the control unit, and a virtual device is allocated in each allocation area,
In the master label table, the relative position information of the virtual device in the allocation area is stored for each expansion unit attached to the control unit,
The virtual device conversion means is based on the location information of the allocation area for each expansion unit in the memory and the relative location information of the virtual device in the allocation area stored in the master label table. 4. The user program search device according to claim 1, wherein the character string input by the input means is converted into a virtual device.
ユーザにより作成されるプログラマブル・ロジック・コントローラを制御するためのユーザプログラムに含まれる文字列を検索するためのユーザプログラム用検索装置を、
上記プログラマブル・ロジック・コントローラ内の仮想デバイスにマスターラベルが対応付けられたマスターラベルテーブルを記憶するマスターラベルテーブル記憶手段と、
上記マスターラベルが変更された場合に、そのマスターラベルに対応する仮想デバイスに変更後の変更ラベルが対応付けられた変更ラベルテーブルを記憶する変更ラベルテーブル記憶手段と、
ユーザプログラムを画面表示する際に、上記変更ラベルテーブルに変更ラベルが対応付けられている仮想デバイスに対して、上記変更ラベルテーブルに基づいてラベル表示を行うユーザプログラム表示手段と、
検索すべき文字列が入力された場合に、その入力された文字列を、上記マスターラベルテーブルに基づいて仮想デバイスに変換する仮想デバイス変換手段と、
上記仮想デバイス変換手段により変換された後の仮想デバイスに基づいて、ユーザプログラムを検索するユーザプログラム検索手段として機能させることを特徴とするプログラム。
A search apparatus for a user program for searching a character string included in a user program for controlling a programmable logic controller created by a user,
Master label table storage means for storing a master label table in which a master label is associated with a virtual device in the programmable logic controller;
When the master label is changed, a changed label table storage unit that stores a changed label table in which the changed label after the change is associated with the virtual device corresponding to the master label;
User program display means for displaying a label based on the change label table for the virtual device associated with the change label in the change label table when displaying the user program on the screen;
Virtual device conversion means for converting the input character string into a virtual device based on the master label table when a character string to be searched is input;
A program that functions as a user program search unit that searches for a user program based on a virtual device that has been converted by the virtual device conversion unit.
JP2005121014A 2005-04-19 2005-04-19 User program search device and program applied thereto Expired - Fee Related JP4628169B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005121014A JP4628169B2 (en) 2005-04-19 2005-04-19 User program search device and program applied thereto

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005121014A JP4628169B2 (en) 2005-04-19 2005-04-19 User program search device and program applied thereto

Publications (2)

Publication Number Publication Date
JP2006301846A true JP2006301846A (en) 2006-11-02
JP4628169B2 JP4628169B2 (en) 2011-02-09

Family

ID=37470076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005121014A Expired - Fee Related JP4628169B2 (en) 2005-04-19 2005-04-19 User program search device and program applied thereto

Country Status (1)

Country Link
JP (1) JP4628169B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020013528A (en) * 2018-10-23 2020-01-23 株式会社キーエンス Engineering tool for programmable logic controller
WO2024100895A1 (en) * 2022-11-11 2024-05-16 ファナック株式会社 Sequence programming assistance device and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1083206A (en) * 1996-09-10 1998-03-31 Mitsubishi Electric Corp Sequence program creation device and sequence program creation method
JP2002245065A (en) * 2001-02-14 2002-08-30 Ricoh Co Ltd Document processing apparatus, document processing method, program, and recording medium
JP2005085076A (en) * 2003-09-10 2005-03-31 Keyence Corp Ladder diagram editing device, ladder diagram editing method, ladder diagram editing program and computer-readable recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1083206A (en) * 1996-09-10 1998-03-31 Mitsubishi Electric Corp Sequence program creation device and sequence program creation method
JP2002245065A (en) * 2001-02-14 2002-08-30 Ricoh Co Ltd Document processing apparatus, document processing method, program, and recording medium
JP2005085076A (en) * 2003-09-10 2005-03-31 Keyence Corp Ladder diagram editing device, ladder diagram editing method, ladder diagram editing program and computer-readable recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020013528A (en) * 2018-10-23 2020-01-23 株式会社キーエンス Engineering tool for programmable logic controller
JP7412076B2 (en) 2018-10-23 2024-01-12 株式会社キーエンス Engineering tools for programmable logic controllers
WO2024100895A1 (en) * 2022-11-11 2024-05-16 ファナック株式会社 Sequence programming assistance device and computer-readable storage medium

Also Published As

Publication number Publication date
JP4628169B2 (en) 2011-02-09

Similar Documents

Publication Publication Date Title
JP4541418B2 (en) Programmable controller peripheral device, replacement method and program
US20120290539A1 (en) Methods and apparatus for a file system on a programmable logic controller
JP6372308B2 (en) Information processing apparatus, information processing method, information processing program, and recording medium
JP5619328B1 (en) Sequence program creation support device
CN100501617C (en) Programmable End System
WO2016194099A1 (en) Debug device, debug method, and debug program
JP4628169B2 (en) User program search device and program applied thereto
WO2012066683A1 (en) System construction support tool and system construction support device
JP4780308B2 (en) Control program development support apparatus and computer program
US20210149938A1 (en) Information processing device and setting device
JP5870214B2 (en) Programmable controller system, its programmable display, support device, program
JP2007280092A (en) Picture data preparation method
JP2006330865A (en) User program display device, and program applied to the same
JP2006309538A (en) Program collating device and program applied thereto
JP2003303100A (en) Information processing system, information processing system construction method, and program used therefor
JP4005605B2 (en) Vehicle quality analysis system, multiple data management method and program thereof
JP2009157534A (en) Program creation support system, programmable controller support device thereof, programmable display support device
JP2006330866A (en) Programmable logic controller
JP2001318796A (en) Program execution control method using internal and external event driven system, recording medium and program preparation support system
EP4498229A1 (en) Information processing apparatus, information processing method, and program
JP2002229613A (en) Ladder diagram preparing method and device, ladder preparation supporting program and recording medium for recording the same
CN111597323B (en) Key field filtering method and device, storage medium and electronic equipment
JP2009237947A (en) Programmable controller, programmable controller support device, and programmable controller system
WO2006090504A1 (en) Vehicle quality analysis system and program file management method
JP4247189B2 (en) Vehicle quality analysis system, file management method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080402

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101022

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

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

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

Free format text: PAYMENT UNTIL: 20131119

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4628169

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees