JP2015053022A - Programming tool for plc - Google Patents

Programming tool for plc Download PDF

Info

Publication number
JP2015053022A
JP2015053022A JP2013200761A JP2013200761A JP2015053022A JP 2015053022 A JP2015053022 A JP 2015053022A JP 2013200761 A JP2013200761 A JP 2013200761A JP 2013200761 A JP2013200761 A JP 2013200761A JP 2015053022 A JP2015053022 A JP 2015053022A
Authority
JP
Japan
Prior art keywords
variable
program
plc
sequence
sequence program
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
JP2013200761A
Other languages
Japanese (ja)
Other versions
JP6201574B2 (en
Inventor
吉田 健二
Kenji Yoshida
健二 吉田
輝一 千田
Terukazu Senda
輝一 千田
加藤 聖
Sei Kato
聖 加藤
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.)
JTEKT Corp
Original Assignee
JTEKT 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 JTEKT Corp filed Critical JTEKT Corp
Priority to JP2013200761A priority Critical patent/JP6201574B2/en
Publication of JP2015053022A publication Critical patent/JP2015053022A/en
Application granted granted Critical
Publication of JP6201574B2 publication Critical patent/JP6201574B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a programming tool for a PLC capable of promoting efficient programming by automatically generating a link program that links between variables of the PLC.SOLUTION: A reference variable is a variable that refers to the variable of other sequence program having a different objective PLC among variables used in a sequence program, and has an identification code showing the PLC that is the object of the referenced sequence program. A programming tool 20 includes a link program generation unit 22 that generates a link program for specifying a referenced variable on the basis of the name of the reference variable to link the reference variable with the referenced variable.

Description

本発明は、プログラマブルロジックコントローラ(以下、PLC)を対象とするシーケンスプログラムを編集するプログラミングツールに関するものである。   The present invention relates to a programming tool for editing a sequence program intended for a programmable logic controller (hereinafter referred to as PLC).

工作機械などの制御装置において、互いに連携してシーケンス制御を行う複数のPLCが用いられることがある。各PLCには、例えばモジュール単位に生成されたシーケンス回路やPLCの間での通信を行うためのインターフェース回路が書き込まれている。また、上記のような制御装置においては、機能拡張などに伴ってPLCの台数が増減されることがある。そうすると、各PLCの間でシーケンス回路の移動や、インターフェース回路の修正などが必要となる。   In a control device such as a machine tool, a plurality of PLCs that perform sequence control in cooperation with each other may be used. In each PLC, for example, a sequence circuit generated in units of modules and an interface circuit for performing communication between the PLCs are written. Further, in the control device as described above, the number of PLCs may be increased or decreased as functions are expanded. Then, it is necessary to move the sequence circuit between the PLCs and modify the interface circuit.

PLC用のプログラミングツールは、所定のプログラミング言語により記述されたシーケンスプログラム(ソースプログラム)等をコンパイルして、対象とするPLCに書き込み可能なシーケンス回路やインターフェース回路などの実行プログラムを生成する。例えば特許文献1には、信号出力するデバイスなどを任意に選択した名称により記述可能なプログラミンツールが開示されている。また、特許文献2には、シーケンスプログラムの分割や集約に係る作業の簡易化を目的として、ローカル変数とグローバル変数を変換するプログラミングツールが開示されている。   The PLC programming tool compiles a sequence program (source program) or the like described in a predetermined programming language, and generates an execution program such as a sequence circuit or an interface circuit that can be written to the target PLC. For example, Patent Document 1 discloses a programming tool that can be described by a name that arbitrarily selects a device that outputs a signal. Further, Patent Document 2 discloses a programming tool for converting local variables and global variables for the purpose of simplifying work related to division and aggregation of sequence programs.

特開2003−67013号公報JP 2003-67013 A 特開2010−49484号公報JP 2010-49484 A

ところで、複数のPLCが連携してシーケンス制御を行う構成において、対象とするPLCが相違するシーケンスプログラムの間で相手側の変数を条件として使用する場合がある。そうすると、特許文献1のように、変数を任意の名称で記述したとしても、名称の登録情報などに基づいてインターフェース回路を生成するためのプログラミングが必要となる。また、特許文献2にように、シーケンスプログラムが分割された場合に、グローバル変数を使用することでPLC間の通信を成立させることができる。しかしながら、このような構成では、他のシーケンスプログラムでもグローバル変数によって制約され、またローカル変数との変換において誤りが生じるおそれがあった。   By the way, in a configuration in which a plurality of PLCs cooperate to perform sequence control, there is a case where a counterpart variable is used as a condition between sequence programs having different target PLCs. Then, even if a variable is described with an arbitrary name as in Patent Document 1, programming for generating an interface circuit based on name registration information or the like is required. Further, as in Patent Document 2, when a sequence program is divided, communication between PLCs can be established by using a global variable. However, with such a configuration, other sequence programs are also constrained by global variables, and there is a risk of errors in conversion to local variables.

本発明は、このような事情に鑑みてなされたものであり、PLCの変数間をリンクさせるリンクプログラムを自動生成することにより、プログラミングの効率化を図ることができるPLC用のプログラミングツールを提供することを目的とする。   The present invention has been made in view of such circumstances, and provides a programming tool for a PLC that can improve the efficiency of programming by automatically generating a link program for linking PLC variables. For the purpose.

(請求項1)本手段に係るPLC用のプログラミングツールは、互いに連携してシーケンス制御を行う複数のプログラマブルロジックコントローラ(以下、PLC)を対象とするシーケンスプログラムを編集するためのプログラミングツールであって、前記シーケンスプログラムにおいて使用される変数のうち、対象とする前記PLCが相違する他の前記シーケンスプログラムの変数を参照する前記変数を参照変数とし、前記参照変数は、その変数名に、参照先の前記シーケンスプログラムが対象とする前記PLCを示す識別符号を有し、前記プログラミングツールは、前記参照変数の変数名に基づいて参照先の前記変数を特定して、前記参照変数と参照先の前記変数とをリンクさせるリンクプログラムを生成するリンクプログラム生成部を備える。   (Claim 1) A programming tool for PLC according to this means is a programming tool for editing a sequence program for a plurality of programmable logic controllers (hereinafter referred to as PLCs) that perform sequence control in cooperation with each other. Among the variables used in the sequence program, the variable that refers to the variable of the other sequence program that is different from the target PLC is used as a reference variable, and the reference variable includes the reference destination The sequence program has an identification code indicating the target PLC, and the programming tool identifies the reference destination variable based on the variable name of the reference variable, and the reference variable and the reference destination variable A link program generator for generating a link program for linking Obtain.

このような構成によると、リンクプログラム生成部により参照変数と参照先の変数とをリンクさせるリンクプログラムを自動生成することができる。これにより、シーケンスプログラムに参照変数が含まれている場合に、従来のようにインターフェース回路をプログラミングする必要がないので、プログラミングの効率化を図ることができる。また、リンクプログラムは、グローバル変数を使用することなくPLC間の通信を成立させることができる。よって、本手段により、グローバル変数の使用に伴う制約を受けることなくシーケンスプログラムのプログラミングが可能となる。また、参照変数の変数名を表示することによって、参照変数がどのPLCを対象としたシーケンスプログラムの変数を参照しているのかを認識することができるので、プログラミングの作業性を向上できる。   According to such a configuration, the link program that links the reference variable and the reference destination variable can be automatically generated by the link program generation unit. As a result, when the reference variable is included in the sequence program, it is not necessary to program the interface circuit as in the conventional case, so that the programming efficiency can be improved. Further, the link program can establish communication between PLCs without using global variables. Therefore, this means makes it possible to program a sequence program without being restricted by the use of global variables. Further, by displaying the variable name of the reference variable, it is possible to recognize which PLC of the sequence program the reference variable refers to, so that the workability of programming can be improved.

以下に、本手段に係るPLC用のプログラミングツールの好適な態様について説明する。
(請求項2)好ましくは、前記リンクプログラム生成部は、参照先の前記変数に演算結果が入力された場合に前記参照変数に当該演算結果の入力を行うことによって、前記参照変数と参照先の前記変数とをリンクさせるインターフェース回路を前記リンクプログラムとして生成する。
Below, the suitable aspect of the programming tool for PLC which concerns on this means is demonstrated.
(Claim 2) Preferably, when the calculation result is input to the reference destination variable, the link program generation unit inputs the calculation result to the reference variable, so that the reference variable and the reference destination An interface circuit that links the variables is generated as the link program.

このような構成によると、従来においてはPLC間での通信を行うためのインターフェース回路のプログラミングを必要とされていたのに対して、このプログラミングの作業を自動化して省略することができる。これにより、既存のシーケンスプログラムを他のPLCへの流用が容易となり、シーケンスプログラムの汎用性を向上できる。また、インターフェース回路は、参照変数の変数名に基づいて自動生成され、プログラミングを行う作業者が確認することができる。よって、上記のような構成により、プログラミングの作業性を向上できる。   According to such a configuration, programming of an interface circuit for performing communication between PLCs is conventionally required, but this programming operation can be automated and omitted. Thereby, it becomes easy to divert the existing sequence program to other PLCs, and the versatility of the sequence program can be improved. The interface circuit is automatically generated based on the variable name of the reference variable, and can be confirmed by an operator who performs programming. Therefore, the workability of programming can be improved by the above configuration.

(請求項3)好ましくは、複数の前記PLCは、当該PLCにおける固有データを相互に変換する通信用デバイスを介して通信を行い、前記リンクプログラム生成部は、前記通信用デバイスに書き込まれる変換プログラムであって、参照先の前記変数の入力値を前記参照変数への入力値に変換する前記変換プログラムを前記リンクプログラムとして生成する。   (Claim 3) Preferably, the plurality of PLCs communicate via communication devices that mutually convert unique data in the PLCs, and the link program generation unit is a conversion program written to the communication devices. And the said conversion program which converts the input value of the said reference variable into the input value to the said reference variable is produced | generated as the said link program.

このような構成によると、従来においては変換プログラムのプログラミングを必要とされていたのに対して、このプログラミングの作業を自動化して省略することができる。これにより、既存のシーケンスプログラムを他のPLCへの流用が容易となり、シーケンスプログラムの汎用性を向上できる。ここで、複数のPLCが連携してシーケンス制御を行う場合には、PLC同士が直接通信を行う構成の他に、PLCの間に通信用デバイスを介在させる構成が考えられる。この構成では、例えば一部のPLCの構成に変更があった場合でも、PLCにおけるシーケンス回路やインターフェース回路を書き換えることなく、通信用デバイスにおける変換プログラムを書き換えることで通信を成立させることができる。   According to such a configuration, programming of the conversion program is conventionally required, but this programming work can be automated and omitted. Thereby, it becomes easy to divert the existing sequence program to other PLCs, and the versatility of the sequence program can be improved. Here, when a plurality of PLCs perform sequence control in cooperation, a configuration in which a communication device is interposed between the PLCs is conceivable in addition to a configuration in which PLCs directly communicate with each other. With this configuration, for example, even if there is a change in the configuration of some PLCs, communication can be established by rewriting the conversion program in the communication device without rewriting the sequence circuit and interface circuit in the PLC.

(請求項4)好ましくは、前記シーケンスプログラムの少なくとも一部が対象とする前記PLCを移動された場合に、当該移動に伴って参照先が変更される既存の前記参照変数、または当該移動に伴って新たに前記参照変数となる前記変数について、その変数名に前記移動に整合させた前記識別符号が含まれるように当該変数名を設定する変数名設定部をさらに備え、前記リンクプログラム生成部は、設定された前記変数の変数名に基づいて参照先の前記変数を特定して、前記リンクプログラムを再度生成する。   (Claim 4) Preferably, when the PLC to which at least a part of the sequence program is moved is moved, the existing reference variable whose reference destination is changed with the movement, or with the movement A variable name setting unit that sets the variable name so that the variable code includes the identification code that is matched with the movement, and the link program generation unit Then, the variable of the reference destination is specified based on the variable name of the set variable, and the link program is generated again.

このような構成によると、リンクプログラム生成部が変更された変数名に基づいてリンクプログラムを生成するので、シーケンスプログラムの移動に対応したリンクプログラムが生成される。よってプログラミングの作業者は、従来においては移動されるシーケンスプログラムなどで整合が取れているかの確認作業を必要とされていたのに対して、上記のような構成により簡易にシーケンスプログラムの移動を行うことができる。よって、連携する複数のPLCの構成に対応して、シーケンスプログラムの分割や集約のプログラミングをより簡易に行うことができる。   According to such a configuration, the link program is generated based on the variable name changed by the link program generation unit, so that a link program corresponding to the movement of the sequence program is generated. Therefore, the programming operator has conventionally been required to confirm whether the consistency is achieved with the moved sequence program or the like, but easily moves the sequence program with the above configuration. be able to. Therefore, it is possible to more easily perform sequence program division and aggregation programming in accordance with the configuration of a plurality of linked PLCs.

(請求項5)好ましくは、前記プログラミングツールは、前記シーケンスプログラムを編集可能に表示する場合に、前記参照変数の変数名および対応する表示記号の少なくとも一方を、参照先の前記シーケンスプログラムが対象とする前記PLCに対応して設定された表示属性に基づいて表示する。   (Claim 5) Preferably, when the programming tool displays the sequence program in an editable manner, at least one of the variable name of the reference variable and the corresponding display symbol is targeted for the sequence program to be referred to. Display based on the display attribute set corresponding to the PLC.

プログラミングツールは、シーケンスプログラムを編集可能に表示する場合に、使用するプログラミング言語によっては、各変数について、その変数名をテキスト表示し、または変数に対応した表示記号を表示する。そのため、上記のような構成によると、表示されたシーケンスプログラムにおいて、各変数が参照変数であるか否かを視認できる。さらに、表示属性によって、参照変数のリンク先を認識できるので、プログラミングの効率化を図ることができる。   When the programming tool displays the sequence program in an editable manner, depending on the programming language to be used, for each variable, the variable name is displayed as text or a display symbol corresponding to the variable is displayed. Therefore, according to the configuration as described above, it is possible to visually check whether each variable is a reference variable in the displayed sequence program. Further, since the link destination of the reference variable can be recognized by the display attribute, the programming efficiency can be improved.

(請求項6)好ましくは、前記プログラミングツールは、前記シーケンスプログラムを編集可能に表示する場合に、参照先の前記変数の変数名および対応する表示記号の少なくとも一方を、参照先の前記変数にリンクされる前記参照変数を使用する前記シーケンスプログラムが対象とする前記PLCに対応して設定された表示属性に基づいて表示する。   (Claim 6) Preferably, when the sequence program is displayed in an editable manner, the programming tool links at least one of the variable name of the reference destination variable and the corresponding display symbol to the reference destination variable. The sequence program using the reference variable is displayed based on the display attribute set corresponding to the PLC targeted.

このような構成によると、表示されたシーケンスプログラムにおいて、各変数が参照先の変数であるか否かを視認できる。さらに、表示属性によって、参照変数が使用されるシーケンスプログラムを認識できるので、プログラミングの効率化を図ることができる。   According to such a configuration, it is possible to visually check whether each variable is a reference destination variable in the displayed sequence program. Furthermore, since the sequence program in which the reference variable is used can be recognized by the display attribute, the programming efficiency can be improved.

(請求項7)好ましくは、前記表示属性には、表示対象の形状、模様、色彩、および書体の少なくとも一つが含まれる。   (Claim 7) Preferably, the display attribute includes at least one of a shape, a pattern, a color, and a typeface to be displayed.

このような構成によると、プログラミングツールは、適宜設定された表示属性に基づいて変数名や表示記号を表示することができる。これにより、シーケンスプログラムが対象とするPLCごとに色彩等を割り付けられ、作業者は、変数名を解読しなくても、そのシーケンスプログラムに参照変数または参照先の変数が含まれるか否かを容易に認識できる。   According to such a configuration, the programming tool can display variable names and display symbols based on display attributes set as appropriate. As a result, colors and the like can be assigned to each PLC targeted by the sequence program, and the operator can easily determine whether the sequence program includes a reference variable or a reference destination variable without decoding the variable name. Can be recognized.

実施形態におけるシーケンスプログラムの編集装置を示すブロック図である。It is a block diagram which shows the edit apparatus of the sequence program in embodiment. シーケンスプログラムの表示状態を示す図である。It is a figure which shows the display state of a sequence program. リンクプログラムの生成処理を示すフロー図である。It is a flowchart which shows the production | generation process of a link program. 分割前のシーケンスプログラムの表示状態を示す図である。It is a figure which shows the display state of the sequence program before a division | segmentation. 変数名の設定処理を示すフロー図である。It is a flowchart which shows the setting process of a variable name. 変形態様におけるシーケンスプログラムの表示状態を示す図である。It is a figure which shows the display state of the sequence program in a deformation | transformation aspect.

以下、本発明のPLC用のプログラミングツールを具体化した実施形態について図面を参照して説明する。実施形態においては、プログラミングツールは、互いに連携してシーケンス制御を行う複数のPLCを対象とするシーケンスプログラムを編集するソフトウェアである。本実施形態では、このプログラミングツールがパーソナルコンピュータなどにより構成されるシーケンスプログラムの編集装置にインストールされ、プログラミング環境を構成する形態を例示する。   Hereinafter, an embodiment in which a programming tool for PLC of the present invention is embodied will be described with reference to the drawings. In the embodiment, the programming tool is software that edits a sequence program for a plurality of PLCs that perform sequence control in cooperation with each other. In the present embodiment, an example in which the programming tool is installed in a sequence program editing apparatus constituted by a personal computer or the like to configure a programming environment is illustrated.

<実施形態>
(シーケンスプログラムの編集装置の構成)
実施形態のシーケンスプログラムの編集装置1の全体構成について、図1および図2を参照して説明する。編集装置1は、汎用のパーソナルコンピュータであって、図1に示すように、種々の演算処理を実行するCPU(central processing unit)11と、記憶装置12と、ディスプレイ13と、入力デバイス14と、通信インターフェース15とを備えて構成される。編集装置1は、PLC用のプログラミングツール20を含む種々のソフトウェアをインストールされて、シーケンスプログラムの編集機能を有する構成となっている。
<Embodiment>
(Configuration of sequence program editing device)
The overall configuration of the sequence program editing apparatus 1 according to the embodiment will be described with reference to FIGS. 1 and 2. The editing apparatus 1 is a general-purpose personal computer, and as shown in FIG. 1, a CPU (central processing unit) 11 that executes various arithmetic processes, a storage device 12, a display 13, an input device 14, And a communication interface 15. The editing apparatus 1 has a configuration in which various software including a PLC programming tool 20 is installed and has a sequence program editing function.

記憶装置12は、図示しないRAMやROM、ハードディスクドライブなどにより構成され、各プログラムの読み出しや書き込みを行う。ディスプレイ13は、表示装置であって、シーケンスプログラムのラダー図の画面出力等に使用される出力デバイスである。入力デバイス14は、例えばキーボードやマウスなどであって、シーケンスプログラムのラダー図などの編集作業において情報の入力等に使用される。通信インターフェース15は、図示しない通信ケーブルを介してPLCとの通信を行う際に、各種のデータを入出力する装置である。   The storage device 12 includes a RAM, a ROM, a hard disk drive, and the like (not shown), and reads and writes each program. The display 13 is a display device, and is an output device used for screen output of a ladder diagram of a sequence program. The input device 14 is, for example, a keyboard or a mouse, and is used for inputting information in editing work such as a ladder diagram of a sequence program. The communication interface 15 is a device that inputs and outputs various data when communicating with the PLC via a communication cable (not shown).

プログラミングツール20は、複数のPLCに書き込まれる実行プログラムに対応するシーケンスプログラムの編集を行う。このプログラミングツール20は、プログラム編集部21と、リンクプログラム生成部22と、変数名設定部23とを備える。プログラム編集部21は、本実施形態において、シーケンスプログラムのプログラム言語であるラダー図を編集する機能を有する。プログラム編集部21は、ディスプレイ13にラダー図を編集可能に表示させるとともに、入力デバイス14による編集を受け付ける。既存のシーケンスプログラムは記憶装置12から読み出され、また編集されたシーケンスプログラムは記憶装置12に書き込まれて記憶される。   The programming tool 20 edits a sequence program corresponding to an execution program written in a plurality of PLCs. The programming tool 20 includes a program editing unit 21, a link program generation unit 22, and a variable name setting unit 23. In the present embodiment, the program editing unit 21 has a function of editing a ladder diagram that is a program language of a sequence program. The program editing unit 21 displays the ladder diagram on the display 13 so as to be editable, and accepts editing by the input device 14. The existing sequence program is read from the storage device 12, and the edited sequence program is written and stored in the storage device 12.

リンクプログラム生成部22は、参照変数と参照先の変数とをリンクさせるリンクプログラムを生成する。ここで、上記の「参照変数」とは、シーケンスプログラムにおいて使用される変数のうち、対象とするPLCが相違する他のシーケンスプログラムの変数を参照する変数をいう。シーケンスプログラムは、PLCに書き込まれる実行プログラムのソースプログラムであって、当該実行プログラムが書き込まれるPLCを対象とする。また、シーケンスプログラムは、PLCにおける複数の入出力デバイスにそれぞれ割り付けられる変数を使用する。   The link program generation unit 22 generates a link program that links a reference variable and a reference destination variable. Here, the above-mentioned “reference variable” refers to a variable that refers to a variable of another sequence program having a different target PLC among variables used in the sequence program. The sequence program is a source program of an execution program written in the PLC and targets the PLC in which the execution program is written. The sequence program uses variables assigned to a plurality of input / output devices in the PLC.

ここで、各PLCの実行プログラムに対応するシーケンスプログラムは、複数のPLCがシーケンス制御を互いに連携して行うことから、対象とするPLCが相違する他のシーケンスプログラムの変数を参照することがある。本実施形態において、複数のPLCは、ネットワークを介して通信可能に接続され、当該PLCの固有データを通信により入出力可能に構成されている。つまり、シーケンスプログラムの変数のうち、当該シーケンスプログラムに対応する実行プログラムが書き込まれたPLCがネットワークを介した通信により固有データの取得を要する変数を「参照変数」としている。また、PLCの「固有データ」とは、シーケンス制御における演算結果に対応し、例えば当該PCLのローカル変数に入力されるデータである。   Here, the sequence program corresponding to the execution program of each PLC may refer to variables of other sequence programs having different target PLCs because a plurality of PLCs perform sequence control in cooperation with each other. In the present embodiment, the plurality of PLCs are communicably connected via a network, and are configured to be able to input / output the unique data of the PLC by communication. That is, among the variables of the sequence program, the variable in which the PLC in which the execution program corresponding to the sequence program is written needs to acquire unique data through communication via the network is referred to as “reference variable”. Further, the “unique data” of the PLC corresponds to the calculation result in the sequence control, and is data input to the local variable of the PCL, for example.

また、各PLCの間でデータのやり取りを行う場合には、各PLCのローカル変数をリンクするリンクプログラムを要する。このリンクプログラムは、PLCに書き込まれる実行プログラムに含まれ、例えばラダー図により表記してプログラミングされるインターフェース回路とすることが可能である。このインターフェース回路では、PLC間の通信でローカル変数そのものをやり取りすることができないので、信号名変換を行って、通信の対象とする変数を割り当てている。そして、インターフェース回路は、参照先のローカル変数に演算結果(入出力デバイスの信号)が入力された場合に参照変数に当該演算結果の入力を行うように動作(通信)を行うことによって、参照変数と参照先の変数とをリンクさせる。   Further, when data is exchanged between the PLCs, a link program for linking the local variables of the PLCs is required. This link program is included in an execution program written in the PLC, and can be an interface circuit that is programmed by being represented by a ladder diagram, for example. In this interface circuit, since local variables themselves cannot be exchanged by communication between PLCs, signal name conversion is performed and variables to be communicated are assigned. The interface circuit performs an operation (communication) to input the calculation result to the reference variable when the calculation result (input / output device signal) is input to the local variable of the reference destination. And the referenced variable are linked.

本実施形態において、リンクプログラム生成部22は、上記のインターフェース回路をリンクプログラムとして生成する構成としている。また、参照変数の変数名は予め定められた規則に従って変数名を設定されており、リンクプログラム生成部22は、参照変数の変数名に基づいて、リンクプログラムを自動的に生成する構成としている。リンクプログラム生成部22によるリンクプログラムの生成処理の詳細については後述する。また、参照変数は、その変数名に、参照先のシーケンスプログラムが対象とするPLCを示す識別符号を有する。参照変数の変数名の設定については、プログラミングを行う作業者が直接入力してもよいし、後述する変数名設定部23による自動入力であってもよい。   In the present embodiment, the link program generation unit 22 is configured to generate the interface circuit as a link program. The variable name of the reference variable is set according to a predetermined rule, and the link program generation unit 22 is configured to automatically generate a link program based on the variable name of the reference variable. Details of link program generation processing by the link program generation unit 22 will be described later. Further, the reference variable has an identification code indicating the PLC targeted by the reference sequence program in its variable name. The setting of the variable name of the reference variable may be directly input by an operator who performs programming, or may be automatic input by a variable name setting unit 23 described later.

ここで、第一のPLC(PLC1)を対象とするシーケンスプログラムPs1の参照変数Vr1が、第二のPLC(PLC2)を対象とするシーケンスプログラムPs2における第四ステップ(M4)での演算結果を入力される変数(D10X)を参照するものとする。この場合には、参照変数Vr1の変数名は、第二のPLCを示す識別符号として文字列”PLC2”を有する。具体的には、参照変数Vr1の変数名は、図2に示すように、”PLC2_D10X”のように表記される。このように、参照変数は、識別符号”PLC2”を含むように予め定められた規則に従って変数名を設定されている。   Here, the reference variable Vr1 of the sequence program Ps1 targeted for the first PLC (PLC1) inputs the calculation result in the fourth step (M4) in the sequence program Ps2 targeted for the second PLC (PLC2). It is assumed that the variable (D10X) to be referred to is referred to. In this case, the variable name of the reference variable Vr1 has a character string “PLC2” as an identification code indicating the second PLC. Specifically, the variable name of the reference variable Vr1 is represented as “PLC2_D10X” as shown in FIG. As described above, the reference variable is set with a variable name according to a predetermined rule so as to include the identification code “PLC2”.

変数名設定部23は、シーケンスプログラムにおける参照変数について、その変数名の設定を自動で行う。例えば、変数名設定部23は、入力デバイス14により指定された変数が、他のシーケンスプログラムの変数を参照する場合に、対象のPLCを示す識別符号を生成し、当該変数の変数名に付加する。また、変数名設定部23は、シーケンスプログラムの少なくとも一部が、対象とするPLCを移動された場合に、当該移動に伴って参照先が変更される既存の参照変数、またはこの移動に伴って新たに参照変数となる変数について、その変数名に移動に整合させた識別符号が含まれるように変数名を設定する。シーケンスプログラムの移動に伴う変数名設定部23による変数名の設定処理の詳細については後述する。   The variable name setting unit 23 automatically sets the variable name for the reference variable in the sequence program. For example, when the variable specified by the input device 14 refers to a variable of another sequence program, the variable name setting unit 23 generates an identification code indicating the target PLC and adds it to the variable name of the variable. . Further, the variable name setting unit 23 is configured so that when at least a part of the sequence program is moved to the target PLC, an existing reference variable whose reference destination is changed along with the movement, or along with the movement. The variable name is set so that an identification code matched to the movement is included in the variable name for the variable to be a new reference variable. Details of the variable name setting process by the variable name setting unit 23 accompanying the movement of the sequence program will be described later.

(リンクプログラムの生成処理)
上記のシーケンスプログラムの編集装置1によるリンクプログラムの生成処理について、図2および図3を参照して説明する。編集装置1は、例えば入力デバイス14からリンクプログラムの生成の要求を受け付けると、図3に示すようなプログラムを実行する。
(Link program generation processing)
A link program generation process performed by the sequence program editing apparatus 1 will be described with reference to FIGS. For example, when the editing apparatus 1 receives a link program generation request from the input device 14, the editing apparatus 1 executes the program as shown in FIG. 3.

プログラミングツール20のリンクプログラム生成部22は、先ず、全てのシーケンスプログラムを対象として、各シーケンスプログラムから参照変数を抽出する(S11)。例えば、第一のPLCを対象とするシーケンスプログラムPs1において、第一のPLC以外の識別符号を有する変数を参照変数として抽出する。図2に示すシーケンスプログラムにおいては、PLC1を対象とするシーケンスプログラムPs1から参照変数Vr1,Vr2が抽出され、PLC2を対象とするシーケンスプログラムから参照変数Vr3,Vr4,Vr5が抽出される。   First, the link program generation unit 22 of the programming tool 20 extracts reference variables from each sequence program for all sequence programs (S11). For example, in the sequence program Ps1 targeted for the first PLC, a variable having an identification code other than the first PLC is extracted as a reference variable. In the sequence program shown in FIG. 2, reference variables Vr1 and Vr2 are extracted from the sequence program Ps1 targeted for PLC1, and reference variables Vr3, Vr4 and Vr5 are extracted from the sequence program targeted for PLC2.

次に、リンクプログラム生成部22は、抽出した参照変数の変数名を順に解析して、参照先の変数を特定する(S12)。例えば、参照変数Vr1は、その変数名が”PLC2_D10X”であることから、第二のPLC(PLC2)を対象とするシーケンスプログラムPs2の第四ステップ(M4)において演算結果を入力されるローカル変数D10Xを、参照先の変数として特定する。   Next, the link program generation unit 22 analyzes the variable names of the extracted reference variables in order, and specifies the reference destination variable (S12). For example, since the variable name of the reference variable Vr1 is “PLC2_D10X”, the local variable D10X to which the operation result is input in the fourth step (M4) of the sequence program Ps2 targeted for the second PLC (PLC2). Is specified as a reference destination variable.

続いて、リンクプログラム生成部22は、参照変数と参照先の変数とをリンクするステップを生成する(S13)。このリンクは、通信の対象とする変数を割り当てる信号名変換に相当する。具体的には、上記の例であれば、図2に示すように、ローカル変数D10Xに演算結果が入力された場合に参照変数Vr1に当該演算結果の入力を行うために、ローカル変数D10Xを通信用変数B2[1]に変換するリンクL2が生成される。リンクプログラム生成部22は、S11にて抽出した全ての参照変数について対応するインターフェース回路のステップが生成されたか否かを判定し(S14)、終わっていない場合には(S14:No)、S12,S13の処理を繰り返す。   Subsequently, the link program generating unit 22 generates a step of linking the reference variable and the reference destination variable (S13). This link corresponds to signal name conversion for assigning a variable to be communicated. Specifically, in the above example, as shown in FIG. 2, when an operation result is input to the local variable D10X, the local variable D10X is communicated to input the operation result to the reference variable Vr1. A link L2 to be converted into the work variable B2 [1] is generated. The link program generation unit 22 determines whether or not corresponding interface circuit steps have been generated for all the reference variables extracted in S11 (S14), and if not completed (S14: No), S12, The process of S13 is repeated.

全てのシーケンスプログラムの参照変数について対応するインターフェース回路のステップが生成されると(S14:Yes)、図2の破線で囲んだ範囲に示すように、シーケンスプログラムPs1の参照変数Vr1,Vr2に対応するリンクL1,L2がPLC2側に生成され、シーケンスプログラムPs2の参照変数Vr3,Vr4,Vr5に対応するリンクL1,L2,L3がPLC1側に生成される。各リンクでは、それぞれのローカル変数がPLC1で用いられる通信用変数B1[*]と、PLC2で用いられる通信用変数B2[*]とに変換されている([*]は、0〜2の対応する値。以下同じ)。   When the interface circuit steps corresponding to the reference variables of all the sequence programs are generated (S14: Yes), they correspond to the reference variables Vr1 and Vr2 of the sequence program Ps1, as shown in the range surrounded by the broken line in FIG. Links L1, L2 are generated on the PLC2 side, and links L1, L2, L3 corresponding to the reference variables Vr3, Vr4, Vr5 of the sequence program Ps2 are generated on the PLC1 side. In each link, each local variable is converted into a communication variable B1 [*] used in PLC1 and a communication variable B2 [*] used in PLC2 ([*] corresponds to 0 to 2). The same value).

このように、リンクプログラム生成部22は、各PLC1,2を対象としたシーケンスプログラムPs1,Ps2に対応したリンクプログラムPn1,Pn2をそれぞれ生成する。このリンクプログラムPn1,Pn2は、図2に示すように、シーケンスプログラムPs1,Ps2と同様にラダー図にて表記されており、プログラミングを行う作業者によって視認、および必要に応じた編集が可能となっている。   In this way, the link program generation unit 22 generates link programs Pn1 and Pn2 corresponding to the sequence programs Ps1 and Ps2 for the PLCs 1 and 2, respectively. As shown in FIG. 2, the link programs Pn1 and Pn2 are represented in a ladder diagram in the same manner as the sequence programs Ps1 and Ps2, and can be viewed and edited as necessary by an operator who performs programming. ing.

また、シーケンスプログラムPs1,Ps2およびリンクプログラムPn1,Pn2は、プログラミングツール20によるコンパイルによって、各PLCに書き込まれる実行プログラム(シーケンス回路、インターフェース回路)に変換される(S15)。このとき、各シーケンスプログラムPs1,Ps2の参照変数Vr1〜Vr5は、図2の括弧内に示すように、対応する通信用変数B1[*],B2[*]に置換される。   Further, the sequence programs Ps1, Ps2 and the link programs Pn1, Pn2 are converted into execution programs (sequence circuit, interface circuit) written in each PLC by compilation by the programming tool 20 (S15). At this time, the reference variables Vr1 to Vr5 of the sequence programs Ps1 and Ps2 are replaced with corresponding communication variables B1 [*] and B2 [*] as shown in parentheses in FIG.

なお、プログラミングツール20により各プログラムがコンパイルされる際には、シーケンスプログラムに含まれる各変数に対して自動でメモリのアドレスが割り付けられる。このとき、プログラミングツール20は、本実施形態においては、複数の参照変数に対応した通信用変数が連続したアドレスとなるように割り付けを行う。具体的には、プログラミングツール20は、PLC1で用いられる通信用変数B1[0]〜B1[2]、PLC2で用いられる通信用変数B2[0]〜B2[1]をそれぞれ連続するアドレスに割り付ける。   When each program is compiled by the programming tool 20, a memory address is automatically assigned to each variable included in the sequence program. At this time, in this embodiment, the programming tool 20 performs allocation so that communication variables corresponding to a plurality of reference variables have consecutive addresses. Specifically, the programming tool 20 assigns the communication variables B1 [0] to B1 [2] used in the PLC1 and the communication variables B2 [0] to B2 [1] used in the PLC2 to continuous addresses, respectively. .

上記のように、プログラミングツール20が同一のシーケンスプログラムに含まれる参照変数に対応した通信用変数に連続したアドレスを割り付けるのは、複数のPLCが互いに連携してシーケンス制御を行う際の通信量の低減を図るためである。PLC間の通信は、プログラミングツール20が各プログラムをコンパイルする際に生成されるリンクパラメータに基づいて行われる。このリンクパラメータには、PLC間の通信要求に対して、通信要求されたPLCがデータとして出力するメモリのアドレス範囲が記述されている。このとき、参照されるアドレスが不連続であると、個別に通信要求を行う必要があるため、通信回数が増加してしまうことになる。   As described above, the programming tool 20 assigns consecutive addresses to communication variables corresponding to reference variables included in the same sequence program because the amount of communication when a plurality of PLCs perform sequence control in cooperation with each other. This is for the purpose of reduction. Communication between PLCs is performed based on link parameters generated when the programming tool 20 compiles each program. This link parameter describes the address range of the memory that is output as data by the PLC requested for communication in response to a communication request between PLCs. At this time, if the address to be referred to is discontinuous, it is necessary to make a communication request individually, so that the number of communication increases.

そこで、本実施形態では、リンクプログラムPn1,Pn2の生成処理において、参照変数の抽出(S11)およびリンクの生成処理(S13)を行うことから、これにより取得された情報を利用したアドレスの割り付け、およびリンクパラメータの生成を行う構成としている。これにより、従来と比較して、効率的なアドレスの割り付けが可能となり、シーケンス制御におけるPLC間の通信回数の増加を抑制できるリンクパラメータの生成を可能としている。   Therefore, in the present embodiment, since the reference variable extraction (S11) and the link generation process (S13) are performed in the generation process of the link programs Pn1 and Pn2, address allocation using the information acquired thereby is performed. The link parameter is generated. Thereby, as compared with the conventional case, it is possible to assign addresses more efficiently, and it is possible to generate link parameters that can suppress an increase in the number of communications between PLCs in sequence control.

(変数名の設定処理)
上記のシーケンスプログラムの編集装置1による参照変数の変数名の設定処理について、図2、図4および図5を参照して説明する。ここでは、一台のPLCを対象としてプログラミングされた既存のシーケンスプログラムPs0(図4を参照)を、二台のPLCを対象とするシーケンスプログラムPs1,Ps2に分割する場合を例示する。具体的には、既存のシーケンスプログラムPs0の一部(ステップM4,M6〜M8)を、PLC2を対象とするシーケンスプログラムPs2となるように移動させ、シーケンスプログラムPs0の残りを、PLC1を対象とするシーケンスプログラムPs1とするように編集を行う。
(Variable name setting process)
The variable name setting process of the reference variable by the sequence program editing apparatus 1 will be described with reference to FIGS. Here, a case where an existing sequence program Ps0 (see FIG. 4) programmed for one PLC is divided into sequence programs Ps1 and Ps2 targeted for two PLCs is illustrated. Specifically, a part of the existing sequence program Ps0 (steps M4, M6 to M8) is moved to become the sequence program Ps2 targeted for PLC2, and the rest of the sequence program Ps0 is targeted for PLC1. Editing is performed so that the sequence program Ps1 is obtained.

編集装置1は、例えば入力デバイス14からシーケンスプログラムを分割して、一部を他のPLCを対象とするように編集の要求を受け付けると、図5に示すようなプログラムを実行する。プログラム編集部21は、先ず、部分的なシーケンスプログラムの移動情報を取得する(S21)。移動情報としては、例えば移動対象として指定されたシーケンスプログラムの範囲(ここでは、ステップM4,M6〜M8)、移動後のシーケンスプログラムが対象とするPLC(ここでは、PLC2)などの情報が含まれる。   For example, when the editing apparatus 1 divides a sequence program from the input device 14 and receives an editing request so that a part of the sequence program targets another PLC, the editing apparatus 1 executes the program as shown in FIG. The program editing unit 21 first acquires partial sequence program movement information (S21). The movement information includes, for example, information such as a range of a sequence program designated as a movement target (here, steps M4 and M6 to M8), a PLC targeted by the sequence program after movement (here, PLC2), and the like. .

次に、変数名設定部23は、シーケンスプログラムPs1および移動されるシーケンスプログラムPs2の各変数において、この移動に伴って参照先が変更される既存の参照変数、または当該移動に伴って新たに参照変数となる変数を抽出する(S22)。既存のシーケンスプログラムPs0では、シーケンスプログラムの移動前には一台のPLCを対象としていたので、既存の参照変数は抽出されない。一方で、分割後の各シーケンスプログラムPs1,Ps2に含まれる複数のステップにおいては、移動元の変数を参照する変数が抽出される。具体的には、図4に示すように、分割前のシーケンスプログラムPs0におけるステップM1の変数D1X、ステップM4の変数D2X、ステップM5の変数D4X、ステップM6の変数D3X、ステップM7の変数D1Xが抽出される。   Next, in each variable of the sequence program Ps1 and the sequence program Ps2 to be moved, the variable name setting unit 23 is an existing reference variable whose reference destination is changed with this movement, or a new reference with the movement. A variable to be a variable is extracted (S22). In the existing sequence program Ps0, since one PLC is targeted before the sequence program is moved, the existing reference variables are not extracted. On the other hand, in a plurality of steps included in each divided sequence program Ps1, Ps2, a variable that refers to a source variable is extracted. Specifically, as shown in FIG. 4, the variable D1X of step M1, the variable D2X of step M4, the variable D4X of step M5, the variable D3X of step M6, and the variable D1X of step M7 in the sequence program Ps0 before division are extracted. Is done.

続いて、変数名設定部23は、抽出された変数について、S21で取得した移動情報に基づいて、移動に整合させた識別符号を生成する。具体的には、例えばステップM1の変数D10Xについては、部分的なシーケンスプログラムPs2が移動されることにより、当該シーケンスプログラムPs2が対象とするPLCが第二のPLC(PLC2)となることから、識別符号として文字列”PLC2”を生成する(S23)。   Subsequently, the variable name setting unit 23 generates an identification code matched to the movement of the extracted variable based on the movement information acquired in S21. Specifically, for example, the variable D10X in step M1 is identified by moving the partial sequence program Ps2 so that the PLC targeted by the sequence program Ps2 becomes the second PLC (PLC2). A character string “PLC2” is generated as a code (S23).

そして、変数名設定部23は、抽出された各変数について、その変数名に移動に整合させた識別符号が含まれるように変数名を設定する(S24)。具体的には、シーケンスプログラムPs1のステップM1の変数D10Xについては、識別符号を先頭部分に付加され、”PLC2_D10X”に変数名が変更される。変数名設定部23は、S22にて抽出した全ての参照変数について、整合させた変数名に設定されたか否かを判定し(S25)、終わっていない場合には(S25:No)、S23,S24の処理を繰り返す。   And the variable name setting part 23 sets a variable name about each extracted variable so that the identification code matched with the movement may be included in the variable name (S24). Specifically, for the variable D10X in step M1 of the sequence program Ps1, an identification code is added to the head part, and the variable name is changed to “PLC2_D10X”. The variable name setting unit 23 determines whether or not all the reference variables extracted in S22 have been set to the matched variable names (S25), and if not completed (S25: No), S23, The process of S24 is repeated.

全ての抽出された参照変数について、整合させた変数名に設定されると(S25:Yes)、図4の右欄に示すように、各PLC1,2を対象としたシーケンスプログラムPs1,Ps2における参照変数が移動に整合された変数名となる。これにより、プログラミングツール20は、変数名の設定処理を終了する。なお、上記のような処理によって参照変数の変数名が自動的にシーケンスプログラムの移動に整合された後に、リンクプログラム生成部22によるリンクプログラムの生成処理を実行することによって、移動後の各シーケンスプログラムPs1,Ps2に対応したリンクプログラムを生成することが可能となる。   When all extracted reference variables are set to matched variable names (S25: Yes), as shown in the right column of FIG. 4, the references in the sequence programs Ps1 and Ps2 for the PLCs 1 and 2 are used. The variable becomes the variable name that is consistent with the move. Thereby, the programming tool 20 ends the variable name setting process. In addition, after the variable name of the reference variable is automatically matched with the movement of the sequence program by the above processing, each sequence program after the movement is executed by executing the link program generation process by the link program generation unit 22 It becomes possible to generate a link program corresponding to Ps1 and Ps2.

また、本実施形態では、シーケンスプログラムを二台のPLCを対象としたシーケンスプログラムに分割する態様を例示したが、シーケンスプログラムを1本化するなどの集約においても同様の処理により対応することが可能である。具体的には、図2に示すような複数のシーケンスプログラムを、図4の左欄に示すようなシーケンスプログラムPs0に集約する場合には、分割と同様に移動情報の取得(S21)を行うことにより、どのステップがどこに移動したかを認識することが可能である。そして、変数名設定部23は、この移動情報に基づいて、既存の参照変数を抽出し(S22)、移動に整合させた識別符号を生成する(S23)とともに、変数名の設定を行う(S24)。   In the present embodiment, the mode in which the sequence program is divided into the sequence programs for two PLCs has been exemplified. However, it is possible to cope with the aggregation by integrating the sequence programs into one. It is. Specifically, when a plurality of sequence programs as shown in FIG. 2 are consolidated into a sequence program Ps0 as shown in the left column of FIG. 4, acquisition of movement information (S21) is performed in the same manner as division. It is possible to recognize which step has moved to where. Then, the variable name setting unit 23 extracts an existing reference variable based on the movement information (S22), generates an identification code matched with the movement (S23), and sets the variable name (S24). ).

なお、このようにシーケンスプログラムの集約を行った結果、参照変数が自己のシーケンスプログラムの変数を参照先とすることがある。このような場合には、識別符号を削除するように変数名の設定を行うようにしてもよい。また、シーケンスプログラムの流用性を向上させるために、分割や集約を想定して、全ての変数について、参照変数と同様に識別符号を有する変数名に設定してもよい。このような構成では、プログラミングの際に、作業者が変数名を視認することができるので、参照先を容易に認識できるという利点がある。   As a result of the aggregation of the sequence programs in this way, the reference variable may use the variable of the own sequence program as the reference destination. In such a case, the variable name may be set so as to delete the identification code. Further, in order to improve the applicability of the sequence program, all variables may be set to variable names having identification codes as with reference variables, assuming division and aggregation. In such a configuration, the operator can visually recognize the variable name during programming, and thus has an advantage that the reference destination can be easily recognized.

(実施形態の構成による効果)
上述したPLC用のプログラミングツール20によると、リンクプログラム生成部22により参照変数と参照先の変数とをリンクさせるリンクプログラムPn1,Pn2を自動生成することができる。これにより、シーケンスプログラムに参照変数が含まれている場合に、従来のようにインターフェース回路をプログラミングする必要がないので、プログラミングの効率化を図ることができる。また、リンクプログラムPn1,Pn2は、グローバル変数を使用することなくPLC間の通信を成立させることができる。よって、本実施形態の構成により、グローバル変数の使用に伴う制約を受けることなくシーケンスプログラムのプログラミングが可能となる。
(Effects of the configuration of the embodiment)
According to the programming tool 20 for PLC described above, the link program generation unit 22 can automatically generate link programs Pn1 and Pn2 for linking a reference variable and a reference destination variable. As a result, when the reference variable is included in the sequence program, it is not necessary to program the interface circuit as in the conventional case, so that the programming efficiency can be improved. The link programs Pn1 and Pn2 can establish communication between PLCs without using global variables. Therefore, the configuration of the present embodiment makes it possible to program a sequence program without being restricted by the use of global variables.

また、リンクプログラム生成部22は、リンクプログラムPn1,Pn2としてインターフェース回路を自動で生成する構成とした。これにより、従来においてはPLC間での通信を行うためのインターフェース回路のプログラミングを必要とされていたのに対して、このプログラミングの作業を自動化して省略することができる。これにより、既存のシーケンスプログラムを他のPLCへの流用が容易となり、シーケンスプログラムの汎用性を向上できる。また、インターフェース回路は、ラダー図などにより表記可能であり、プログラミングを行う作業者が確認することができるので、プログラミングの作業性を向上できる。   The link program generation unit 22 is configured to automatically generate interface circuits as the link programs Pn1 and Pn2. Thereby, in the past, programming of an interface circuit for performing communication between PLCs was required, but this programming operation can be automated and omitted. Thereby, it becomes easy to divert the existing sequence program to other PLCs, and the versatility of the sequence program can be improved. In addition, the interface circuit can be represented by a ladder diagram and the like, and can be confirmed by an operator who performs programming, so that the programming workability can be improved.

また、変数名設定部23は、シーケンスプログラムの分割や集約によって、シーケンスプログラムの少なくとも一部が対象とするPLCを移動された場合に、シーケンスプログラムの変数について、その変数名に当該移動に整合させた識別符号が含まれるように変数名を設定する構成とした。これにより、プログラミングを行う作業者は、従来においては移動されるシーケンスプログラムなどで整合が取れているかの確認作業を必要とされていたのに対して、変数名の設定の作業を自動化して省略することができる。よって、連携する複数のPLCの構成に対応して、シーケンスプログラムの分割や集約のプログラミングをより簡易に行うことができる。   In addition, when the PLC targeted for at least a part of the sequence program is moved by dividing or consolidating the sequence program, the variable name setting unit 23 matches the movement of the sequence program variable to the variable name. The variable name is set so that the identification code is included. As a result, the operator who performs programming was previously required to check whether the consistency was achieved with the sequence program to be moved, etc., whereas the variable name setting operation was automated and omitted. can do. Therefore, it is possible to more easily perform sequence program division and aggregation programming in accordance with the configuration of a plurality of linked PLCs.

<実施形態の変形態様>
(シーケンスプログラムの表示)
実施形態おいて、プログラミングツール20は、図2に示すように、シーケンスプログラムPs1,Ps2をラダー図により表示するものとした。このラダー図は、各変数に対応した表示記号を用いて論理回路を記述するものであり、実施形態のように変数名が表示記号に併記される。
<Modification of Embodiment>
(Display sequence program)
In the embodiment, the programming tool 20 displays the sequence programs Ps1 and Ps2 in a ladder diagram as shown in FIG. In this ladder diagram, a logic circuit is described using a display symbol corresponding to each variable, and a variable name is written together with the display symbol as in the embodiment.

ここで、プログラミングツール20は、シーケンスプログラムを編集可能に表示する場合に、参照変数の変数名および対応する表示記号の少なくとも一方を、参照先のシーケンスプログラムが対象とするPLCに対応して設定された表示属性に基づいて表示する構成としてもよい。参照先のシーケンスプログラムが対象とするPLCは、当該参照変数の変数名に含まれる参照符号が示すPLCに等しい。   Here, when displaying the sequence program in an editable manner, the programming tool 20 sets at least one of the variable name of the reference variable and the corresponding display symbol corresponding to the PLC targeted by the reference sequence program. The display may be based on the display attributes. The PLC targeted by the reference sequence program is equal to the PLC indicated by the reference sign included in the variable name of the reference variable.

また、本実施形態において、表示属性には、表示対象の形状、模様、色彩、および書体の少なくとも一つが含まれる。よって、表示対象が参照変数の変数名の場合には、図6に示すように、PLC1で使用される参照変数Vr1,Vr2の変数名は、参照符号が示すPLC2に対応して設定された表示属性である「太字」且つ「斜体」により表示される。また、参照変数Vr1,Vr2に対応する表示記号は、PLC2に対応して設定された表示属性である「太線」且つ「矩形形状」により表示される。   In the present embodiment, the display attribute includes at least one of the shape, pattern, color, and typeface to be displayed. Therefore, when the display target is the variable name of the reference variable, as shown in FIG. 6, the variable names of the reference variables Vr1 and Vr2 used in the PLC1 are set in correspondence with the PLC2 indicated by the reference symbol. It is displayed with the attributes “bold” and “italic”. The display symbols corresponding to the reference variables Vr1 and Vr2 are displayed by “thick line” and “rectangular shape” which are display attributes set corresponding to the PLC2.

一方で、PLC2で使用される参照変数Vr3〜Vr5の変数名は、参照符号が示すPLC1に対応して設定された表示属性である「白抜き文字」により表示される。また、参照変数Vr3〜Vr5の表示記号は、PLC1に対応して設定された表示属性である「矩形形状」且つ「ハッチング」により表示される。   On the other hand, the variable names of the reference variables Vr3 to Vr5 used in the PLC2 are displayed by “white characters” which are display attributes set corresponding to the PLC1 indicated by the reference numerals. Further, the display symbols of the reference variables Vr3 to Vr5 are displayed by “rectangular shape” and “hatching” which are display attributes set corresponding to the PLC1.

さらに、プログラミングツール20は、シーケンスプログラムを編集可能に表示する場合に、参照先の変数の変数名および対応する表示記号の少なくとも一方を、当該参照先の変数にリンクされる参照変数を使用するシーケンスプログラムが対象とするPLCに対応して設定された表示属性に基づいて表示する構成としてもよい。表示属性については、参照変数の変数名および表示記号に使用されたものと同様である。   Furthermore, when the programming tool 20 displays the sequence program in an editable manner, the programming tool 20 uses at least one of the variable name of the reference destination variable and the corresponding display symbol as a reference variable linked to the reference destination variable. It is good also as a structure displayed based on the display attribute set corresponding to PLC which the program makes object. The display attributes are the same as those used for the variable name and display symbol of the reference variable.

具体的には、表示対象が参照先の変数の変数名の場合には、図6に示すように、PLC1で使用される参照変数Vr1,Vr2の参照先の変数(D4X,D10X)の表示記号は、PLC1に対応して設定された表示属性である「二重線」により表示される。一方で、PLC2で使用される参照変数Vr3〜Vr5の参照先の変数(D1X,D2X,D3X)の表示記号は、PLC2に対応して設定された表示属性である「太線」且つ「ハッチング」により表示される。   Specifically, when the display target is the variable name of the reference destination variable, as shown in FIG. 6, reference symbols of the reference destination variables (D4X, D10X) of the reference variables Vr1 and Vr2 used in the PLC 1 Is displayed by a “double line” which is a display attribute set corresponding to the PLC 1. On the other hand, the display symbols of the reference destination variables (D1X, D2X, D3X) of the reference variables Vr3 to Vr5 used in the PLC2 are “thick lines” and “hatching” which are display attributes set in correspondence with the PLC2. Is displayed.

ここでは、参照先の変数の変数名については、通常の表示属性に基づいて表示するものとしたが、参照符号Vr1〜Vr5と同様に、所定の書体などを用いて表示される構成としてもよい。また、表示属性は、上記の他に、色彩や枠線、下線などを含むものとし、また、これらの結合により適宜設定される。複数のPLCに対して、互いに異なる固有の表示属性を設定してもよいし、機能や制御内容によっては一部を共通または類似の表示属性を設定してもよい。   Here, the variable names of the reference destination variables are displayed based on the normal display attributes. However, as with the reference characters Vr1 to Vr5, the variable names may be displayed using a predetermined typeface. . In addition to the above, the display attributes include colors, frame lines, underlines, and the like, and are appropriately set by combining them. Different unique display attributes may be set for a plurality of PLCs, or some common or similar display attributes may be set depending on functions and control contents.

上記のように、参照変数および参照先の変数について、その変数名と表示記号を所定の表示属性により表示する構成とすることにより、表示されたシーケンスプログラムPs1,Ps2において、各変数が参照変数であるか否かが視認可能となる。また、視認した変数が参照変数であった場合には、参照変数のリンク先を表示属性により認識できる。さらに、表示されたシーケンスプログラムPs1,Ps2において、各変数が参照先の変数であるか否かが視認可能となる。また、視認した変数が参照先の変数であった場合には、参照先の変数にリンクされた参照変数が使用されるシーケンスプログラムを表示属性により認識できる。このように、シーケンスプログラムPs1,Ps2に、参照変数または参照先の変数の有無を認識しながらプログラミングが可能となるのとで、リンクされている変数を誤って移動させるなどの誤操作を防止し、プログラミングの効率化を図ることができる。   As described above, with respect to the reference variable and the reference destination variable, the variable name and the display symbol are displayed with the predetermined display attributes, so that each variable is a reference variable in the displayed sequence programs Ps1 and Ps2. Whether or not there is can be visually confirmed. If the visually recognized variable is a reference variable, the link destination of the reference variable can be recognized by the display attribute. Further, in the displayed sequence programs Ps1, Ps2, it is possible to visually check whether each variable is a reference destination variable. Further, when the visually recognized variable is a reference destination variable, the sequence program in which the reference variable linked to the reference destination variable is used can be recognized by the display attribute. In this way, programming can be performed while recognizing the presence or absence of reference variables or reference destination variables in the sequence programs Ps1 and Ps2, thus preventing erroneous operations such as erroneously moving linked variables, Programming efficiency can be improved.

表示属性には、表示対象の形状、模様、色彩、および書体の少なくとも一つが含まれるものとした。このような構成によると、プログラミングツール20は、適宜設定された表示属性に基づいて変数名や表示記号を表示することができる。これにより、シーケンスプログラムPs1,Ps2が対象とするPLCごとに色彩等を割り付けられ、作業者は、変数名を解読しなくても、そのシーケンスプログラムに参照変数または参照先の変数が含まれるか否かを容易に認識できる。   The display attributes include at least one of the shape, pattern, color, and typeface of the display target. According to such a configuration, the programming tool 20 can display variable names and display symbols based on display attributes set as appropriate. As a result, the color or the like is assigned to each PLC targeted by the sequence programs Ps1 and Ps2, and the operator can determine whether the sequence program includes a reference variable or a reference destination variable without decoding the variable name. Can be easily recognized.

(その他)
実施形態において、リンクプログラム生成部22は、リンクプログラムPn1,Pn2として、参照変数と参照先の変数とをリンクさせるインターフェース回路を生成する構成とした。これに対して、複数のPLCが通信用デバイスを介して通信を行って当該PLCにおける固有データを相互に交換する場合には、リンクプログラム生成部22は、リンクプログラムとして、通信用デバイスに書き込まれる変換プログラムを生成する構成としてもよい。
(Other)
In the embodiment, the link program generation unit 22 is configured to generate an interface circuit that links a reference variable and a reference destination variable as the link programs Pn1 and Pn2. On the other hand, when a plurality of PLCs communicate with each other via a communication device and exchange unique data in the PLC with each other, the link program generation unit 22 is written in the communication device as a link program. The conversion program may be generated.

より詳細には、複数のPLCが互いに連携してシーケンス制御を行う場合に、実施形態のようにネットワークを介してPLC間が直接通信を行う構成の他に、マイコンなどの通信用デバイスを介在させる構成がある。この通信用デバイスは、内部に書き込まれる変換プログラムによって、PLCごとの固有データを要求に応じて相互に変換することにより、PLCにおけるインターフェース回路に対して動作環境に合わせた変更を加えることなく、通信を可能とするものである。   More specifically, when a plurality of PLCs perform sequence control in cooperation with each other, a communication device such as a microcomputer is interposed in addition to a configuration in which PLCs directly communicate with each other via a network as in the embodiment. There is a configuration. This communication device performs communication without changing the interface circuit in the PLC according to the operating environment by mutually converting the unique data for each PLC as required by a conversion program written therein. Is possible.

そこで、リンクプログラム生成部22は、シーケンスプログラムの編集において分割や集約があった場合に、インターフェース回路に換えて、通信用デバイスに書き込まれる変換プログラムをリンクプログラムとして生成する構成としてもよい。これにより生成された変換プログラムは、参照先の変数の入力値を参照変数への入力値に変換し、PLC間の通信を成立させることができる。よって、従来においては通信用デバイスを用いる場合に変換プログラムのプログラミングを必要とされていたのに対して、このプログラミングの作業を省略することができる。また、上記の構成により、既存のシーケンスプログラムを他のPLCへの流用が容易となり、シーケンスプログラムの汎用性を向上できる。   Therefore, the link program generation unit 22 may be configured to generate a conversion program written in the communication device as a link program instead of the interface circuit when the sequence program is divided or aggregated. The conversion program generated thereby converts the input value of the reference destination variable into the input value to the reference variable, and can establish communication between the PLCs. Therefore, in the past, when the communication device was used, programming of the conversion program was required, but this programming work can be omitted. Also, with the above configuration, the existing sequence program can be easily used for other PLCs, and the versatility of the sequence program can be improved.

1:編集装置、 20:プログラミングツール、 22:リンクプログラム生成部、 23:変数名設定部、 Ps1,Ps2:シーケンスプログラム、 Pn1,Pn2:リンクプログラム、 Vr1〜Vr5:参照変数   1: Editing device, 20: Programming tool, 22: Link program generation unit, 23: Variable name setting unit, Ps1, Ps2: Sequence program, Pn1, Pn2: Link program, Vr1 to Vr5: Reference variables

Claims (7)

互いに連携してシーケンス制御を行う複数のプログラマブルロジックコントローラ(以下、PLC)を対象とするシーケンスプログラムを編集するためのプログラミングツールであって、
前記シーケンスプログラムにおいて使用される変数のうち、対象とする前記PLCが相違する他の前記シーケンスプログラムの変数を参照する前記変数を参照変数とし、
前記参照変数は、その変数名に、参照先の前記シーケンスプログラムが対象とする前記PLCを示す識別符号を有し、
前記プログラミングツールは、前記参照変数の変数名に基づいて参照先の前記変数を特定して、前記参照変数と参照先の前記変数とをリンクさせるリンクプログラムを生成するリンクプログラム生成部を備えるPLC用のプログラミングツール。
A programming tool for editing a sequence program for a plurality of programmable logic controllers (hereinafter, PLCs) that perform sequence control in cooperation with each other,
Among the variables used in the sequence program, the variable that refers to the variable of the other sequence program with a different target PLC is used as a reference variable,
The reference variable has, in its variable name, an identification code indicating the PLC targeted by the sequence program of the reference destination,
The programming tool includes a link program generation unit that specifies a reference destination variable based on a variable name of the reference variable and generates a link program that links the reference variable and the reference destination variable. Programming tools.
前記リンクプログラム生成部は、参照先の前記変数に演算結果が入力された場合に前記参照変数に当該演算結果の入力を行うことによって、前記参照変数と参照先の前記変数とをリンクさせるインターフェース回路を前記リンクプログラムとして生成する、請求項1のPLC用のプログラミングツール。   The link program generating unit is an interface circuit that links the reference variable and the reference destination variable by inputting the calculation result to the reference variable when the operation result is input to the reference destination variable. The programming tool for PLC according to claim 1, wherein: is generated as the link program. 複数の前記PLCは、当該PLCにおける固有データを相互に変換する通信用デバイスを介して通信を行い、
前記リンクプログラム生成部は、前記通信用デバイスに書き込まれる変換プログラムであって、参照先の前記変数の入力値を前記参照変数への入力値に変換する前記変換プログラムを前記リンクプログラムとして生成する、請求項1のPLC用のプログラミングツール。
The plurality of PLCs communicate via communication devices that mutually convert unique data in the PLC,
The link program generation unit is a conversion program written to the communication device, and generates the conversion program that converts an input value of the reference destination variable into an input value to the reference variable as the link program. The programming tool for PLC according to claim 1.
前記シーケンスプログラムの少なくとも一部が対象とする前記PLCを移動された場合に、当該移動に伴って参照先が変更される既存の前記参照変数、または当該移動に伴って新たに前記参照変数となる前記変数について、その変数名に前記移動に整合させた前記識別符号が含まれるように当該変数名を設定する変数名設定部をさらに備え、
前記リンクプログラム生成部は、設定された前記変数の変数名に基づいて参照先の前記変数を特定して、前記リンクプログラムを再度生成する、請求項1〜3の何れか一項のPLC用のプログラミングツール。
When the target PLC is moved by at least a part of the sequence program, the existing reference variable whose reference destination is changed with the movement, or becomes the reference variable newly with the movement The variable further includes a variable name setting unit for setting the variable name so that the variable code includes the identification code matched to the movement.
The said link program production | generation part specifies the said variable of a reference destination based on the variable name of the set said variable, and produces | generates the said link program again, The PLC use as described in any one of Claims 1-3 Programming tool.
前記プログラミングツールは、前記シーケンスプログラムを編集可能に表示する場合に、前記参照変数の変数名および対応する表示記号の少なくとも一方を、参照先の前記シーケンスプログラムが対象とする前記PLCに対応して設定された表示属性に基づいて表示する、請求項1〜4の何れか一項のPLC用のプログラミングツール。   When displaying the sequence program in an editable manner, the programming tool sets at least one of the variable name of the reference variable and the corresponding display symbol corresponding to the PLC targeted by the sequence program to be referred to The programming tool for PLC according to any one of claims 1 to 4, wherein display is performed based on the displayed display attribute. 前記プログラミングツールは、前記シーケンスプログラムを編集可能に表示する場合に、参照先の前記変数の変数名および対応する表示記号の少なくとも一方を、参照先の前記変数にリンクされる前記参照変数を使用する前記シーケンスプログラムが対象とする前記PLCに対応して設定された表示属性に基づいて表示する、請求項1〜5の何れか一項のPLC用のプログラミングツール。   When displaying the sequence program in an editable manner, the programming tool uses at least one of the variable name of the reference destination variable and the corresponding display symbol as the reference variable linked to the reference destination variable. The programming tool for PLC according to claim 1, wherein the PLC is displayed based on a display attribute set corresponding to the PLC targeted by the sequence program. 前記表示属性には、表示対象の形状、模様、色彩、および書体の少なくとも一つが含まれる、請求項5または6のPLC用のプログラミングツール。   The programming tool for PLC according to claim 5 or 6, wherein the display attribute includes at least one of a shape, a pattern, a color, and a typeface to be displayed.
JP2013200761A 2013-08-08 2013-09-27 Programming tool for PLC Expired - Fee Related JP6201574B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013200761A JP6201574B2 (en) 2013-08-08 2013-09-27 Programming tool for PLC

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2013164753 2013-08-08
JP2013164753 2013-08-08
JP2013200761A JP6201574B2 (en) 2013-08-08 2013-09-27 Programming tool for PLC

Publications (2)

Publication Number Publication Date
JP2015053022A true JP2015053022A (en) 2015-03-19
JP6201574B2 JP6201574B2 (en) 2017-09-27

Family

ID=52701985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013200761A Expired - Fee Related JP6201574B2 (en) 2013-08-08 2013-09-27 Programming tool for PLC

Country Status (1)

Country Link
JP (1) JP6201574B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5911044B1 (en) * 2015-07-10 2016-04-27 三菱電機株式会社 Program generating apparatus and method thereof
JP2017142767A (en) * 2016-02-09 2017-08-17 富士電機株式会社 Controller system and variable coordination support device
JP2018018248A (en) * 2016-07-27 2018-02-01 ファナック株式会社 Programmable controller
US11307554B2 (en) 2019-11-20 2022-04-19 Younes Faraj System and method for keyword-based PLC programming
US11415957B2 (en) 2018-05-31 2022-08-16 Fanuc Corporation Ladder display system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535317A (en) * 1991-07-31 1993-02-12 Toyota Motor Corp Programming device for pc
JPH06250709A (en) * 1993-02-26 1994-09-09 Toyoda Mach Works Ltd Peripheral equipment of programmable controller
JP2000163107A (en) * 1998-11-30 2000-06-16 Mitsubishi Electric Corp Program editing device for programmable controller
JP2007265252A (en) * 2006-03-29 2007-10-11 Mitsubishi Electric Corp Program preparation support device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535317A (en) * 1991-07-31 1993-02-12 Toyota Motor Corp Programming device for pc
JPH06250709A (en) * 1993-02-26 1994-09-09 Toyoda Mach Works Ltd Peripheral equipment of programmable controller
JP2000163107A (en) * 1998-11-30 2000-06-16 Mitsubishi Electric Corp Program editing device for programmable controller
JP2007265252A (en) * 2006-03-29 2007-10-11 Mitsubishi Electric Corp Program preparation support device and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5911044B1 (en) * 2015-07-10 2016-04-27 三菱電機株式会社 Program generating apparatus and method thereof
WO2017009895A1 (en) * 2015-07-10 2017-01-19 三菱電機株式会社 Program generation device and method therefor
US10126726B2 (en) 2015-07-10 2018-11-13 Mitsubishi Electric Corporation Apparatus and method for generating program
JP2017142767A (en) * 2016-02-09 2017-08-17 富士電機株式会社 Controller system and variable coordination support device
JP2018018248A (en) * 2016-07-27 2018-02-01 ファナック株式会社 Programmable controller
US10488841B2 (en) 2016-07-27 2019-11-26 Fanuc Corporation Programmable controller
US11415957B2 (en) 2018-05-31 2022-08-16 Fanuc Corporation Ladder display system
US11307554B2 (en) 2019-11-20 2022-04-19 Younes Faraj System and method for keyword-based PLC programming

Also Published As

Publication number Publication date
JP6201574B2 (en) 2017-09-27

Similar Documents

Publication Publication Date Title
JP6201574B2 (en) Programming tool for PLC
JP6375666B2 (en) Programming tools for PLC and PLC
CN103814333B (en) For the method and apparatus to programmable control unit programming and configuration
CN108829024B (en) PLC program generation method and system
CN102467108B (en) For the method and system of operation automation machine
JP6450708B2 (en) Information processing apparatus for processing machining information among a plurality of manufacturing cells
US9176734B2 (en) Ladder program creation apparatus
JP7031627B2 (en) Analytical equipment, analysis method, and analysis program
CN110221828B (en) Visual programming method for communication program of automobile electronic control unit
CN105408823A (en) Engineering tool, program editing device, and program editing system
JP6950665B2 (en) Engineering equipment, control methods and programs for engineering equipment
JP6129444B1 (en) Engineering tools
CN105229542A (en) Programming tool
US9342064B2 (en) Motion SFC program component creation device
JP5153437B2 (en) Control program creation device
CN111880793A (en) HMI configuration system and method based on binary file
CN104238438A (en) PLC universal platform and design method thereof
US20220057780A1 (en) Scada web hmi system
CN110968051A (en) Method and engineering system for planning an automation system
JP5253324B2 (en) Sequence control device, program creation device, and interpreter execution engine
CN111475159B (en) Method, device and storage medium for automatically generating program
JP6632692B1 (en) Control program creation support tool and control program creation method
JP6175844B2 (en) Screen definition device for operation panel
JP2008532130A (en) Method for subprogram translation by a controller interpreter
US20150370547A1 (en) Program editing device, program editing method and program editing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170718

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170814

R150 Certificate of patent or registration of utility model

Ref document number: 6201574

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees