JP5757098B2 - Program creation support apparatus and program creation support method - Google Patents

Program creation support apparatus and program creation support method Download PDF

Info

Publication number
JP5757098B2
JP5757098B2 JP2011024604A JP2011024604A JP5757098B2 JP 5757098 B2 JP5757098 B2 JP 5757098B2 JP 2011024604 A JP2011024604 A JP 2011024604A JP 2011024604 A JP2011024604 A JP 2011024604A JP 5757098 B2 JP5757098 B2 JP 5757098B2
Authority
JP
Japan
Prior art keywords
program
global variable
programmable controller
creation support
variable
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.)
Active
Application number
JP2011024604A
Other languages
Japanese (ja)
Other versions
JP2012164178A (en
Inventor
賢二 比留川
賢二 比留川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2011024604A priority Critical patent/JP5757098B2/en
Publication of JP2012164178A publication Critical patent/JP2012164178A/en
Application granted granted Critical
Publication of JP5757098B2 publication Critical patent/JP5757098B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、プログラマブルコントローラ用プログラムの作成支援を行う装置に関わり、更に詳しくは複数のプロセッサを備えるプログラマブルコントローラ用プログラムの作成を支援することができる装置に関する。   The present invention relates to an apparatus that supports creation of a program for a programmable controller, and more particularly to an apparatus that can support creation of a program for a programmable controller including a plurality of processors.

プログラマブルコントローラ用プログラム作成支援装置とは、システム設計者などのユーザによるプログラマブルコントローラのプログラムの作成、デバックを支援するための装置である。なお、以下の記載および図面においてプログラマブルコントローラをPLCとも記載する。   The programmable controller program creation support device is a device for supporting creation and debugging of a program for a programmable controller by a user such as a system designer. In the following description and drawings, the programmable controller is also referred to as PLC.

プログラマブルコントローラのプログラミングに関しては、IEC61131−3(International Electrotechnical Commission:国際電気標準会議)(非特許文献1)という国際標準規格に準拠したプログラム言語を用いてシステム開発等を行うことが一般的である。   Regarding programming of a programmable controller, it is common to perform system development using a programming language that conforms to an international standard called IEC61131-3 (International Electrotechnical Commission) (Non-patent Document 1).

図15に、IEC61131−3に規定されているソフトウェアモデルを示す。図15のように従来のプログラマブルコントローラ用プログラム作成支援装置においては、単一プロセッサを持つプログラマブルコントローラに、1つのコンフィグレーション、1つのリソース、複数プログラムの構成をサポートするプログラミングが行われている(図16参照)。   FIG. 15 shows a software model defined in IEC61131-3. As shown in FIG. 15, in the conventional programmable controller program creation support apparatus, a programmable controller having a single processor is programmed to support one configuration, one resource, and a plurality of programs (see FIG. 15). 16).

更に近年では、図17に示すような複数のプロセッサとプロセッサ間で共有する共有メモリを備えるプログラマブルコントローラも普及してきており、複数プロセッサを備えるプログラマブルコントローラ用プログラム作成支援装置としては、例えば特許文献1に示すような装置がある。   Furthermore, in recent years, a programmable controller including a plurality of processors and a shared memory shared between the processors as shown in FIG. 17 has been widespread. As a programmable controller program creation support apparatus including a plurality of processors, for example, Patent Document 1 discloses. There is a device as shown.

特許文献1で開示されるプログラマブルコントローラ用プログラム作成支援装置は、複数のプロセッサを備えるプログラマブルコントローラのプログラムを作成するときに、複数プログラムからアクセス可能な変数であるグローバル変数を割り付ける場合、共有メモリをどのプロセッサの変数領域に割り付けるかを明示的に指定させる様にしていた。   The programmable controller program creation support device disclosed in Patent Document 1 is configured to assign a shared memory to a global variable that is a variable accessible from a plurality of programs when creating a program for a programmable controller having a plurality of processors. It was made to specify explicitly whether to allocate to the variable area of a processor.

特開2008−198143号公報JP 2008-198143 A

IEC61131−3IEC61131-3

しかし、共有メモリはいずれのプロセッサからも読み込み/書き込みが可能であるため、他のプロセッサによる誤ったメモリの上書きが発生しないように、通常、各プロセッサの書き込み領域を定めている。   However, since the shared memory can be read / written from any processor, the write area of each processor is usually determined so that erroneous memory overwrite by other processors does not occur.

そのため、グローバル変数は、書き込みを行うプロセッサの共有メモリ領域に割り付ける必要があるため、プロセッサへのプログラムの割付を変更した際には必ずグローバル変数宣言も変更する必要があり、ユーザにとっても使い勝手が悪いものであった。   For this reason, global variables need to be allocated to the shared memory area of the processor that performs the writing. Therefore, whenever the program allocation to the processor is changed, the global variable declaration must also be changed, which is inconvenient for the user. It was a thing.

そこで本願発明は、複数のプロセッサと当該プロセッサごとに領域が割り付けられた共有メモリとを備えたマルチCPUモジュールで構成されたプログラマブルコントローラ用のプログラム作成支援装置またはプログラム作成支援方法を、ユーザにとってより使い易いものにすることを目的とする。   Therefore, the present invention makes it possible for a user to use a program creation support apparatus or program creation support method for a programmable controller including a multi-CPU module having a plurality of processors and a shared memory in which an area is allocated to each processor. The purpose is to make it easy.

上述した課題を解決するために、本発明のプログラマブルコントローラ用プログラム作成支援装置は、
複数のプロセッサと当該プロセッサごとに領域が割り付けられた共有メモリとを備えたマルチCPUモジュールで構成されたプログラマブルコントローラ用のプログラム作成支援装置であって、
前記複数のプロセッサへのプログラムの割り当てをユーザが明示的に指定するためのダイアログを表示し、該ユーザによるプログラム割り当て指示を記憶する処理と、
前記プログラマブルコントローラにおいて、複数のプログラムからアクセス可能な変数であるグローバル変数の宣言をユーザが指定するためのダイアログを表示し、該ユーザによるグローバル変数の宣言の指定を記憶する処理と、
を行うGUI部(Graphical User Interface部)を備え、
前記プログラムごとに前記グローバル変数が読み込み変数か書き込み変数かを判定し、前記プログラムごとにグローバル変数の読み込み/書き込み属性を生成するグローバル変数属性生成部と、
前記プログラム割り当て指示と前記グローバル変数の読み込み/書き込み属性とに基づいて、前記グローバル変数を前記共有メモリに割り付けるグローバル変数割付部と、
有し、
前記グローバル変数割付部は、前記プログラムで用いられる前記グローバル変数が書き込み属性を有する場合に、前記グローバル変数を前記プログラムが割り当てられたプロセッサの共有メモリに割り付けることを特徴とする。
In order to solve the above-described problems, the programmable controller program creation support device of the present invention is
A program creation support apparatus for a programmable controller configured by a multi-CPU module including a plurality of processors and a shared memory in which an area is allocated to each processor,
Processing for displaying a dialog for a user to explicitly specify program allocation to the plurality of processors and storing a program allocation instruction by the user;
In the programmable controller, a process for displaying a dialog for the user to specify a declaration of a global variable that is a variable accessible from a plurality of programs, and storing the specification of the declaration of the global variable by the user;
A GUI part (Graphical User Interface part)
Determining whether the global variable is a read variable or a write variable for each program, and generating a global variable read / write attribute for each program;
A global variable allocation unit that allocates the global variable to the shared memory based on the program allocation instruction and the read / write attribute of the global variable;
Have
The global variable allocation unit is configured to allocate the global variable to a shared memory of a processor to which the program is allocated when the global variable used in the program has a write attribute.

また、本発明のプログラム作成支援方法は、 複数のプロセッサと当該プロセッサごとに領域が割り付けられた共有メモリとを備えたマルチCPUモジュールで構成されたプログラマブルコントローラ用のプログラム作成支援をコンピュータによって行うための方法であって、当該コンピュータは処理部と記憶部とを備え、
前記処理部が、
前記各プロセッサへのプログラムの割り当てをユーザに明示的に指定させるためのダイアログを表示し、該ユーザによるプログラム割り当て指示を前記記憶部に記憶し、
前記プログラマブルコントローラにおいて、複数のプログラムからアクセス可能な変数であるグローバル変数の宣言をユーザに指定させるためのダイアログを表示し、該ユーザによるグローバル変数の宣言の指定を前記記憶部に記憶し、
前記記憶部に記憶されたユーザによるプログラム割り当て指示およびグローバル変数の宣言の指定に基づいて、中間コードおよび中間的なプログラムリストを生成し、
前記中間コードおよび前記中間的なプログラムリストから、前記プログラムごとに前記グローバル変数が読み込み変数か書き込み変数かを判定し、前記プログラムごとにグローバル変数の読み込み/書き込み属性を表したリード/ライト表を生成し、
前記生成された中間コードと中間的なプログラムリストとリード/ライト表をコンパイルし、前記プログラム割り当て指示と前記グローバル変数の読み込み/書き込み属性とに基づき、該グローバル変数が書き込み属性を有する場合に前記グローバル変数を前記プログラムが割り当てられたプロセッサの前記共有メモリに割り付けたマシンコードと最終的なプログラムリストを生成し、
前記生成された最終的なプログラムリストに基づいて、前記生成されたマシンコードを前記各プロセッサにダウンロードする、
処理を行うことによってプログラマブルコントローラ用プログラムの作成支援を行うことを特徴とする。
The program creation support method of the present invention is a program creation support program for a programmable controller composed of a multi-CPU module having a plurality of processors and a shared memory to which an area is allocated for each processor. A method, wherein the computer includes a processing unit and a storage unit,
The processing unit is
Displaying a dialog for allowing a user to explicitly specify program allocation to each of the processors; storing program allocation instructions by the user in the storage unit;
In the programmable controller, a dialog for allowing the user to specify a declaration of a global variable that is a variable accessible from a plurality of programs is displayed, and the specification of the declaration of the global variable by the user is stored in the storage unit,
Based on a program assignment instruction and a global variable declaration specified by the user stored in the storage unit, an intermediate code and an intermediate program list are generated,
From the intermediate code and the intermediate program list, it is determined for each program whether the global variable is a read variable or a write variable, and a read / write table representing the read / write attribute of the global variable is generated for each program. And
Compile the intermediate code and intermediate program list and the read / write table said generated-out based on the read / write attribute of the program allocation instruction and the global variable, if the global variable has a writing attribute Machine code and final program list assigned to the shared memory of the processor to which the program is assigned the global variable,
Downloading the generated machine code to each processor based on the generated final program list.
It is characterized in that the creation of a program for a programmable controller is supported by performing processing.

ユーザは、プロセッサへのプログラムの割り当てを意識することなく、グローバル変数宣言が可能となり、ユーザにとって使い勝手が良いプログラム支援装置またはプログラム作成支援方法が提供できる。   The user can declare a global variable without being conscious of program assignment to the processor, and can provide a program support apparatus or a program creation support method that is convenient for the user.

本発明の実施形態に係るPLC用プログラム作成支援装置の構成を示す図である。It is a figure which shows the structure of the program creation assistance apparatus for PLCs concerning embodiment of this invention. PLCおよびマルチCPUモジュールの概略構成を示す図である。It is a figure which shows schematic structure of PLC and a multi CPU module. 共有メモリの概略構成および各プロセッサとの読み込み/書き込み状態を表した図である。FIG. 3 is a diagram illustrating a schematic configuration of a shared memory and a read / write state with each processor. PLC用プログラム作成支援装置において、1つのコンフィグレーションを作成する場合のフローを示す図である。It is a figure which shows the flow in the case of creating one configuration in the PLC program creation support apparatus. 各プロセッサに割り付けるプログラムを割り当てる際のPLC用プログラム作成支援装置の表示画面例を示す図である。It is a figure which shows the example of a display screen of the program creation assistance apparatus for PLC at the time of allocating the program allocated to each processor. Dialogの一例を示す図である。It is a figure which shows an example of Dialog. PLCの各プロセッサへのプログラムの割り当てが完了したときの一例を示す図である。It is a figure which shows an example when assignment of the program to each processor of PLC is completed. (a1)(a2)はプログラムの一例であり、(b1)(b2)は中間コードの一例であり、(c1)(c2)はリード/ライト表の一例である。(A1) and (a2) are examples of programs, (b1) and (b2) are examples of intermediate codes, and (c1) and (c2) are examples of read / write tables. グローバル変数について説明する図である。It is a figure explaining a global variable. グローバル変数の宣言の記述の一例を示す図である。It is a figure which shows an example of the description of the declaration of a global variable. a)は、図7のTree構造を展開したリストの一例を示す図であり、(b)はMAIN CPU用に分割したリストの一例を示す図であり、(c)はLOCAL CPU用に分割したリストの一例を示す図である。FIG. 8A is a diagram showing an example of a list in which the tree structure of FIG. 7 is expanded, FIG. 8B is a diagram showing an example of a list divided for MAIN CPU, and FIG. 7C is a diagram divided for LOCAL CPU. It is a figure which shows an example of a list. マシンコードが生成されるまでの概要を示す図である。It is a figure which shows the outline | summary until a machine code is produced | generated. PLC用プログラム作成支援装置におけるダウンロード処理を説明する図である。It is a figure explaining the download process in the program creation assistance apparatus for PLC. PLC用プログラム作成支援装置における比較処理を説明する図である。It is a figure explaining the comparison process in the program creation assistance apparatus for PLC. IEC61131−3ソフトウェアモデルを示す図である。It is a figure which shows the IEC61131-3 software model. 従来のPLC用プログラム作成支援装置の一例を示す図である。It is a figure which shows an example of the conventional program creation assistance apparatus for PLC. マルチプロセッサプログラマブルコントローラの構成例を示す図である。It is a figure which shows the structural example of a multiprocessor programmable controller.

以下、図面を参照して、本発明の実施の形態について説明する。
図1に、本発明の実施形態に係るプログラマブルコントローラ用プログラム作成支援装置の構成を示す。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 shows the configuration of a programmable controller program creation support apparatus according to an embodiment of the present invention.

プログラマブルコントローラ用プログラム作成支援装置101は、当該装置内の通信インターフェース113を介してプログラマブルコントローラ102と通信し、マシンコードなどのプログラム等のダウンロード、アップロード等を行う。   The programmable controller program creation support apparatus 101 communicates with the programmable controller 102 via the communication interface 113 in the apparatus, and downloads, uploads, etc. a program such as a machine code.

図2は、プログラマブルコントローラ102の概略構成およびマルチCPUモジュールの概略構成を示す図である。
プログラマブルコントローラ102はベースボード1021に、少なくともCPUモジュールを含む1以上のモジュールが接続されている。ここで本発明の実施形態においてCPUモジュール1022は、マルチCPUモジュール1022である。
FIG. 2 is a diagram illustrating a schematic configuration of the programmable controller 102 and a schematic configuration of the multi-CPU module.
In the programmable controller 102, one or more modules including at least a CPU module are connected to the base board 1021. Here, in the embodiment of the present invention, the CPU module 1022 is a multi-CPU module 1022.

マルチCPUモジュール1022は、第1プロセッサ1024,第2プロセッサ1025、ベースボード用通信インターフェース1027、共有メモリ1028、通信インターフェース1029を備え、これらは共通のバスを介して接続されている。ここで、本実施形態においては、第1プロセッサ1024がMAIN CPUとして機能し、第2プロセッサ1025がLOCAL CPUとして機能している。   The multi-CPU module 1022 includes a first processor 1024, a second processor 1025, a baseboard communication interface 1027, a shared memory 1028, and a communication interface 1029, which are connected via a common bus. Here, in the present embodiment, the first processor 1024 functions as a MAIN CPU, and the second processor 1025 functions as a LOCAL CPU.

ベースボード用通信インターフェース1027は、他のモジュール1023とベースボードを介して各種データや指令を授受するためのインターフェース部である。勿論、他のモジュール1023も備えている。共有メモリ1028は、第1プロセッサ1024および第2プロセッサ1025のいずれもが読み書き可能なメモリである。通信インターフェース1029は、プログラマブルコントローラ用プログラム作成支援装置101やイーサネット(登録商標)に接続するためのインターフェース部である。各プロセッサは、CPU、プログラムメモリ、ローカルメモリをそれぞれ備えている。   The baseboard communication interface 1027 is an interface unit for exchanging various data and commands with other modules 1023 via the baseboard. Of course, another module 1023 is also provided. The shared memory 1028 is a memory that can be read and written by both the first processor 1024 and the second processor 1025. The communication interface 1029 is an interface unit for connecting to the programmable controller program creation support apparatus 101 and Ethernet (registered trademark). Each processor includes a CPU, a program memory, and a local memory.

ここで、共有メモリ1028は、図3のように予め第1プロセッサ用書き込み領域1031と第2プロセッサ用書き込み領域1032とが定められている。第1プロセッサ1024は、共有メモリ1028の第1プロセッサ書き込み領域1031について、データの読み込み/書き込みが自由に可能であるが、第2プロセッサ書き込み領域1032については読み込みのみ可能であり、書き込みは不可能である。同様に、第2プロセッサ1025は、共有メモリ1028の第2プロセッサ書き込み領域1032について、データの読み込み/書き込みが自由に可能であるが、第1プロセッサ書き込み領域1031については読み込みのみ可能であり、書き込みは不可能である。   Here, in the shared memory 1028, as shown in FIG. 3, a first processor write area 1031 and a second processor write area 1032 are determined in advance. The first processor 1024 can freely read / write data in the first processor write area 1031 of the shared memory 1028, but can only read data in the second processor write area 1032, and cannot write data. is there. Similarly, the second processor 1025 can freely read / write data from / to the second processor write area 1032 of the shared memory 1028, but can only read from / write to the first processor write area 1031. Impossible.

なお、図2における他のモジュール1023は、I/Oモジュールや通信モジュール等の任意の機能のモジュールである。また、マルチCPUモジュールはプロセッサを2つ以上備えていても良い。   The other module 1023 in FIG. 2 is a module having an arbitrary function such as an I / O module or a communication module. Further, the multi-CPU module may include two or more processors.

ここで、図1の説明に戻る。図示しないが、プログラマブルコントローラ用プログラム作成支援装置101は、CPUなどの処理部やRAMなどのメモリを備える情報処理装置(Personal Computer)などで構成されるものである。そして、プログラマブルコントローラ用プログラム作成支援装置101のプログラマブルコントローラ102の各プロセッサに割り当てるプログラムを作成する処理を行う部分は、前記情報処理装置におけるCPUなどで実現される処理部とRAMなどのメモリによってプログラムが実行されることによって、次のように実現される。   Here, the description returns to FIG. Although not shown, the programmable controller program creation support apparatus 101 is configured by an information processing apparatus (Personal Computer) including a processing unit such as a CPU and a memory such as a RAM. And the part which performs the process which produces | generates the program allocated to each processor of the programmable controller 102 of the program creation assistance apparatus 101 for programmable controllers is a program by memory | storage parts, such as processing part implement | achieved by CPU in the said information processing apparatus, and RAM. By being executed, it is realized as follows.

すなわち、まず、システム設計者などのユーザがプログラムを作成(記述)するためのインターフェースを提供するGUI部(Graphical User Interface部)103、と、該GUI部103へのユーザからの指示等をキーボードやマウス入力により伝達する入力部104と、GUI部103の出力を表示画面やスピーカ、プリンタなどの出力装置に出力する出力部105とを備える。   That is, first, a GUI unit (Graphical User Interface unit) 103 that provides an interface for a user such as a system designer to create (describe) a program, and instructions from the user to the GUI unit 103 are displayed on a keyboard, An input unit 104 that transmits by mouse input, and an output unit 105 that outputs the output of the GUI unit 103 to an output device such as a display screen, a speaker, or a printer.

GUI部103は、ユーザがプログラムを作成(記述)するために様々な処理を行うが、本実施の形態として特徴がある点は、ユーザがプログラマブルコントローラ上の各プロセッサへのプログラムの割り当てを明示的に指定するためのダイアログを表示し、ユーザによって指定されたプログラム割り当て指示を記憶する処理を行う点と、プログラマブルコントローラにおいて、複数のプログラムからアクセス可能な変数であるグローバル変数の宣言をするためのダイアログを表示し、ユーザによって指定されたグローバル変数の宣言を記憶する処理を行う点である。   The GUI unit 103 performs various processes for the user to create (describe) a program. The feature of this embodiment is that the user explicitly assigns the program to each processor on the programmable controller. A dialog for specifying a global variable, which is a variable that can be accessed from multiple programs in the programmable controller, and a process for storing a program assignment instruction specified by the user. Is displayed, and the process of storing the declaration of the global variable designated by the user is performed.

そして、本実施の形態のプログラマブルコントローラ用プログラム作成支援装置101は、ユーザによって指定された各プロセッサへのプログラムの割り当て、およびグローバル変数の宣言が記述されたグローバル変数シート106に基づいて、中間コード生成部107にて中間コード121とプログラムリスト122を生成する。   Then, the programmable controller program creation support apparatus 101 according to the present embodiment generates intermediate code based on the global variable sheet 106 in which the program assignment to each processor specified by the user and the declaration of the global variable are described. The unit 107 generates an intermediate code 121 and a program list 122.

さらに、グローバル変数属性生成部108は、中間コード121を解析してプログラム単位でグローバル変数が読み込み変数か書き込み変数かを判定し、プログラムごとにグローバル変数のリード/ライト表109を作成する。   Further, the global variable attribute generation unit 108 analyzes the intermediate code 121 to determine whether the global variable is a read variable or a write variable for each program, and creates a global variable read / write table 109 for each program.

グローバル変数割付部110は、リードライト表109に基づいてグローバル変数を共有メモリの第1プロセッサ用書き込み領域1031と第2プロセッサ用書き込み領域1032に割付を行う。   The global variable allocation unit 110 allocates global variables to the first processor write area 1031 and the second processor write area 1032 of the shared memory based on the read / write table 109.

マシンコード生成部111は、中間コード121とプログラムリスト122とグローバル変数割付部110からの変数割付情報とから、マシンコード123やプログラムリスト124を生成する。   The machine code generation unit 111 generates a machine code 123 and a program list 124 from the intermediate code 121, the program list 122, and the variable allocation information from the global variable allocation unit 110.

マシンコード生成部111は、生成された中間コード121、中間的なプログラムリスト122、グローバル変数割付部110から出力される変数割付情報を複数回以上(プロセッサの数分)コンパイルし、プログラマブルコントローラの各プロセッサに対応するマシンコードを生成する。尚、コンパイルの際、マシンコードは1つのプロセッサに対して複数生成される場合もある。   The machine code generation unit 111 compiles the generated intermediate code 121, the intermediate program list 122, and variable allocation information output from the global variable allocation unit 110 a plurality of times (for the number of processors). Generate machine code corresponding to the processor. When compiling, a plurality of machine codes may be generated for one processor.

更に、本実施の形態のプログラマブルコントローラ用プログラム作成支援装置101は、通信インターフェース113を介して、生成されたマシンコード123を生成されたプログラムリスト124に基づいて、プログラマブルコントローラの各プロセッサにダウンロードするダウンロード部112を備える。   Further, the programmable controller program creation support apparatus 101 according to the present embodiment downloads the generated machine code 123 to each processor of the programmable controller based on the generated program list 124 via the communication interface 113. The unit 112 is provided.

また、本実施の形態のプログラマブルコントローラ用プログラム作成支援装置101は、プログラマブルコントローラ102にダウンロードされたマシンコードや、プログラマブルコントローラ102で作成されるプログラムリストを、通信インターフェース113を介してプログラマブルコントローラ用プログラム作成支援装置101にアップロードするアップロード部114を備える。   In addition, the programmable controller program creation support apparatus 101 according to the present embodiment creates a programmable controller program creation via the communication interface 113 for the machine code downloaded to the programmable controller 102 and the program list created by the programmable controller 102. An upload unit 114 for uploading to the support apparatus 101 is provided.

アップロード部114によってアップロードされたマシンコード125やプログラムリスト126は、プログラマブルコントローラ用プログラム作成支援装置101からダウンロードされたマシンコード123およびプログラムリスト124と、比較部115によって比較することが可能である。比較部115の比較処理によって、ダウンロード時には、生成されたマシンコードが間違いなくダウンロードされているか確認することが可能であり、また、ダウンロード後に随時装置内のプログラム等とプログラマブルコントローラ102内のプログラム等を比較可能であるため、例えばプログラマブルコントローラ用プログラム作成支援装置101内のプログラムを変更してしまったかどうかわからない場合などは確認を行うことが可能である。   The machine code 125 and the program list 126 uploaded by the upload unit 114 can be compared with the machine code 123 and the program list 124 downloaded from the programmable controller program creation support apparatus 101 by the comparison unit 115. By the comparison process of the comparison unit 115, it is possible to check whether the generated machine code is definitely downloaded at the time of download. Also, after the download, the program in the device and the program in the programmable controller 102 are updated as needed. Since comparison is possible, for example, when it is not known whether or not the program in the programmable controller program creation support apparatus 101 has been changed, confirmation can be performed.

図1に示したプログラマブルコントローラ用プログラム作成支援装置101において、例えばユーザが或るシステム構成を設定する、すなわち、新規に1つのコンフィグレーションを作成する場合のフローは図4に示すようになる。   In the programmable controller program creation support apparatus 101 shown in FIG. 1, for example, the flow when a user sets a certain system configuration, that is, creates a new configuration is as shown in FIG.

まず、S201で、新たなコンフィグレーションの名前を作成するなどの設定を行う。次にS202で、制御するリソースを設定し、S203でタスクの設定を行う。S204で、POU(Program Organization Unit)を作成し、S205でPOUをインスタンス化し、S206でコンパイルし、S207でプログラマブルコントローラ102にコンパイルして生成されたマシンコードをダウンロードする。S208で、デバックを行う。   First, in S201, settings such as creating a new configuration name are performed. Next, a resource to be controlled is set in S202, and a task is set in S203. In S204, a POU (Program Organization Unit) is created, the POU is instantiated in S205, compiled in S206, and compiled into the programmable controller 102 in S207 to download the generated machine code. In step S208, debugging is performed.

図4に示したフローの各処理と上述の図1の各部との説明の対応は次のようになる。
S203におけるタスクの設定の処理において、ユーザがGUI部103に対しプログラマブルコントローラ102の各プロセッサに割り当てるプログラム(タスク)の指定を行う。次に、S206のコンパイルにおいて中間コード生成部107やマシンコード生成部111におけるプログラムの生成が行われる。そして、S207のダウンロードは、ダウンロード部112により行われる。
Correspondence between the description of each process of the flow shown in FIG. 4 and each part of FIG. 1 described above is as follows.
In the task setting process in S203, the user designates a program (task) to be assigned to each processor of the programmable controller 102 to the GUI unit 103. Next, in the compilation of S206, the intermediate code generation unit 107 and the machine code generation unit 111 generate a program. Then, the download in step S207 is performed by the download unit 112.

以下、本実施の形態のプログラマブルコントローラ用プログラム作成支援装置の各部の処理についてより詳細に説明する。
まず、図5、図6、図7を参照して、GUI部103において行われる、プログラマブルコントローラのプロセッサへのプログラムの割り当て処理について説明する。
Hereinafter, the processing of each part of the programmable controller program creation support device of the present embodiment will be described in more detail.
First, with reference to FIGS. 5, 6, and 7, a process of assigning a program to a processor of a programmable controller performed in the GUI unit 103 will be described.

図5に、プロセッサへプログラム(タスク)を割り当てる際の、プログラマブルコントローラ用プログラム作成支援装置の表示画面例を示す。GUI上で、例えばLOCAL CPUのあるTASKにプログラムを割り付けるには、図5のように、該当TASKを選択後、入力装置であるマウスで右クリックする。すると挿入のポップアップメニューが表示され、プログラムインスタンスを選択する。   FIG. 5 shows a display screen example of the programmable controller program creation support apparatus when a program (task) is assigned to the processor. To assign a program to a TASK with a LOCAL CPU on the GUI, for example, as shown in FIG. An insert pop-up menu will then appear and you can select a program instance.

次に、図6に示すようなDialog(ダイアログ)が表示され、ユーザがインスタンス化するプログラムタイプを選択し、名称を設定すると、図5のTree構造を示す部分に挿入したプログラムインスタンスが表示される。   Next, a dialog (dialog) as shown in FIG. 6 is displayed. When the user selects a program type to instantiate and sets a name, the program instance inserted in the portion showing the tree structure in FIG. 5 is displayed. .

図6に示すDialogが表示され、ユーザがインスタンス化するプログラムを設定する際に、ユーザはプログラマブルコントローラのLOCAL CPUに割り当てたいプログラム(タスク)については、‘L_’が付くタスクの名称(プログラムインスタンス)をつけ、またプログラマブルコントローラのMAIN CPUに割り当てたいプログラム(タスク)については‘L_’が付かないタスクの名称(プログラムインスタンス)をつける。   When the dialog shown in FIG. 6 is displayed and the user sets the program to be instantiated, the name of the task (program instance) with “L_” for the program (task) that the user wants to assign to the LOCAL CPU of the programmable controller. In addition, for a program (task) to be assigned to the MAIN CPU of the programmable controller, a task name (program instance) without “L_” is attached.

すなわち、プログラマブルコントローラのプロセッサへのプログラムの割り当てが完了した際の図5のTree構造部分を拡大して表示すると、図7に示すようになる。つまり、ユーザがLOCAL CPUに割り当てたいプログラム(タスク)については‘L_’が付いた名称になっており、またMAIN CPUに割り当てたいプログラム(タスク)については‘L_’が付いていない名称となっている。   That is, when the tree structure portion of FIG. 5 when assignment of the program to the processor of the programmable controller is completed is enlarged and displayed, it is as shown in FIG. That is, a program (task) that the user wants to assign to the LOCAL CPU has a name with “L_”, and a program (task) that the user wants to assign to the MAIN CPU has a name without “L_”. Yes.

GUI部103は、図5〜図7に示したように、ユーザがプログラマブルコントローラ上の各プロセッサへのプログラムの割り当てを明示的に指定するためのダイアログ(図6)を表示し、ユーザによって指定されたプログラム割り当て指示を記憶する処理を行う(図7)。   As shown in FIGS. 5 to 7, the GUI unit 103 displays a dialog (FIG. 6) for the user to explicitly specify the program assignment to each processor on the programmable controller, and is designated by the user. The program allocation instruction is stored (FIG. 7).

次に、図8(a1)および図8(a2)は作成されたプログラムの一例である。ここで、図8(a1)がMAIN CPUに割り当てられたプログラムの一部であり、図8(a2)がLOCAL CPUに割り当てられたプログラムの一部である。   Next, FIG. 8 (a1) and FIG. 8 (a2) are examples of the created program. 8A1 is a part of the program assigned to the MAIN CPU, and FIG. 8A2 is a part of the program assigned to the LOCAL CPU.

次に、図9に示す、複数のプログラムからアクセス可能な変数であるグローバル変数について説明する。グローバル変数とは1リソース内の複数プログラムからアクセス可能な変数を言う。プログラム作成支援装置では、図7に示したTree構造のグローバル変数シートにて、IEC61131−3に準拠し宣言される。なお、グローバル変数シートはMAIN CPU,LOCAL CPUごとに存在せず、どちらのCPUについてのグローバル変数宣言かの区別なく宣言を行う。   Next, global variables that are accessible from a plurality of programs shown in FIG. 9 will be described. A global variable is a variable accessible from a plurality of programs in one resource. In the program creation support device, the global variable sheet having a tree structure shown in FIG. 7 is declared in conformity with IEC61131-3. Note that there is no global variable sheet for each of the MAIN CPU and the LOCAL CPU, and the declaration is made regardless of the global variable declaration for which CPU.

そこで、本実施の形態のプログラマブルコントローラ用プログラム作成支援装置では、どちらのCPUの変数宣言かを区別せず、図10に示すように宣言する。つまり、グローバル変数シート106の段階では、グローバル変数C000〜C003は、MAIN CPU(第1プロセッサ1024)およびLOCAL CPU(第2プロセッサ1025)についての変数宣言かは行わない。GUI部103は、図10に示すように、ユーザによって入力され、グローバル変数シート106を生成する。   Therefore, the programmable controller program creation support apparatus according to the present embodiment makes a declaration as shown in FIG. 10 without distinguishing which CPU variable declaration. That is, at the stage of the global variable sheet 106, the global variables C000 to C003 are not variable declarations for the MAIN CPU (first processor 1024) and the LOCAL CPU (second processor 1025). As shown in FIG. 10, the GUI unit 103 is input by a user and generates a global variable sheet 106.

次に、ユーザにより指定されたプログラムの割り当てやグローバル変数の指定に基づいて各プロセッサにダウンロードされるプログラムの生成処理(コンパイル)について説明する。   Next, generation processing (compilation) of a program downloaded to each processor based on program assignment specified by the user or global variable specification will be described.

まず、図7に示したTree構造は、中間コード生成部107によって図11(a)に示すようなリスト(図1の‘プログラムリスト112’)にされる。図11(a)のうち、‘NPGI:2’は、プログラムの本数を示しており、L_DEF,DEFAULTはタスク名を示している。他の記号は特に本発明には関係がないので説明は省略する。さらに、中間コード生成部107によって図8(b1)および図8(b2)に示すような中間コード(図1の‘中間コード121’)が生成される。ここで、図8(b1)に示すMAIN CPU用中間コードは、図8(a1)に示したMAIN CPU用プログラムから生成した中間コードである。さらに、図8(b2)に示すLOCAL CPU用中間コードは、図8(a2)に示したLOCAL CPU用プログラムから生成した中間コードである。   First, the tree structure shown in FIG. 7 is made into a list as shown in FIG. 11A (“program list 112” in FIG. 1) by the intermediate code generation unit 107. In FIG. 11A, “NPGI: 2” indicates the number of programs, and L_DEF and DEFAULT indicate task names. Since other symbols are not particularly relevant to the present invention, the description thereof is omitted. Further, the intermediate code generation unit 107 generates an intermediate code ('intermediate code 121' in FIG. 1) as shown in FIGS. 8 (b1) and 8 (b2). Here, the MAIN CPU intermediate code shown in FIG. 8 (b1) is an intermediate code generated from the MAIN CPU program shown in FIG. 8 (a1). Further, the LOCAL CPU intermediate code shown in FIG. 8 (b2) is an intermediate code generated from the LOCAL CPU program shown in FIG. 8 (a2).

次に、グローバル変数属性生成部108は、中間コード121を解析してプログラム単位でグローバル変数が読み込み変数か書き込み変数かを判定し、プログラムごとに図8(c1)および図8(c2)に示すようなグローバル変数のリード/ライト表(図1の‘リード/ライト表109’)を作成する。ここで、図8(c1)に示すMAIN CPU用リード/ライト表は、図8(b1)に示したMAIN CPU用中間コードから生成したリード/ライト表である。さらに、図8(c2)に示すLOCAL CPU用リード/ライト表は、図8(b2)に示すLOCAL CPU用中間コードから生成したリード/ライト表である。ここで、「R」の欄に「○」が付与されている変数が読み込みを行う変数、「W」の欄に「○」が付与されている変数が書き込みを行う変数である。   Next, the global variable attribute generation unit 108 analyzes the intermediate code 121 to determine whether the global variable is a read variable or a write variable for each program, and each program is shown in FIG. 8 (c1) and FIG. 8 (c2). A global variable read / write table ('read / write table 109' in FIG. 1) is created. Here, the MAIN CPU read / write table shown in FIG. 8C1 is a read / write table generated from the MAIN CPU intermediate code shown in FIG. 8B1. Further, the LOCAL CPU read / write table shown in FIG. 8 (c2) is a read / write table generated from the LOCAL CPU intermediate code shown in FIG. 8 (b2). Here, a variable with “O” in the “R” column is a variable to be read, and a variable with “O” in the “W” column is a variable to be written.

さらに、グローバル変数割付部110は、リードライト表109に基づいてグローバル変数の共有メモリへの割付を行う。具体的には、図8(c1)に示したMAIN CPU用リード/ライト表から、書き込みを行う変数(リード/ライト表の「R」欄に「○」が付与された変数)であるグローバル変数C001およびC002を、共有メモリ1028の第1プロセッサ用書き込み領域1031のアドレスに割り付ける。さらに、図8(c2)に示したLOCAL CPU用リード/ライト表から、書き込みを行う変数(リード/ライト表の「R」欄に「○」が付与された変数)であるグローバル変数C000およびC003を、共有メモリ1028の第2プロセッサ用書き込み領域1032のアドレスに割り付ける。   Further, the global variable allocation unit 110 allocates global variables to the shared memory based on the read / write table 109. Specifically, a global variable that is a variable (a variable in which “O” is assigned to the “R” column of the read / write table) from the MAIN CPU read / write table shown in FIG. 8C1. C001 and C002 are assigned to the addresses of the first processor write area 1031 of the shared memory 1028. Furthermore, from the LOCAL CPU read / write table shown in FIG. 8 (c2), global variables C000 and C003, which are variables to be written (variables marked with “◯” in the “R” column of the read / write table). Is assigned to the address of the second processor write area 1032 of the shared memory 1028.

さらに、マシンコード生成部109により図11(a)に示したリストが分割される。この分割は、タスク名をキーワードに、MAIN CPUのリストとLOCAL CPUのリストに分割される。図11(b)にMAIN CPU用に分割したリストを示し、図11(c)にLOCAL CPU用に分割したリストを示す。マシンコード生成部111は、グローバル変数割付部110からの変数割付情報を用い、該分割したリストをコンパイルし、各プロセッサ(CPU)に対応するプログラムリストとプログラムのマシンコードを生成する。   Further, the list shown in FIG. 11A is divided by the machine code generation unit 109. This division is divided into a MAIN CPU list and a LOCAL CPU list using the task name as a keyword. FIG. 11B shows a list divided for the MAIN CPU, and FIG. 11C shows a list divided for the LOCAL CPU. The machine code generation unit 111 uses the variable allocation information from the global variable allocation unit 110, compiles the divided list, and generates a program list corresponding to each processor (CPU) and a machine code of the program.

図12に、マシンコードが生成されるまでの概要を示した。
即ち、図11(a)のリストは、マシンコード生成部111によりMAIN CPU用のリスト(図11(b))とLOCAL CPU用のリスト(図11(c))に分割され、コンパイル処理される。
FIG. 12 shows an outline until a machine code is generated.
That is, the list in FIG. 11A is divided into a list for MAIN CPU (FIG. 11B) and a list for LOCAL CPU (FIG. 11C) by the machine code generation unit 111, and is compiled. .

また、MAIN CPU用プログラム(図8(a1))とLOCAL CPU用プログラム(図8(a2))のプログラムは、マシンコード生成部111によりMAIN CPU用中間ソース(図8(b1))およびLOCAL CPU用中間ソース(図8(b2))が生成される。MAIN CPU用中間ソース(図8(b1))およびLOCAL CPU用中間ソース(図8(b2))から、グローバル変数属性生成部108によりMAIN CPU用リード/ライト表(図8(c1))およびLOCAL CPU用リード/ライト表(図8(c2))が生成され、グローバル変数割付部110にてグローバル変数が共有メモリのアドレスに割り付ける。   The MAIN CPU program (FIG. 8 (a1)) and the LOCAL CPU program (FIG. 8 (a2)) are stored in the MAIN CPU intermediate source (FIG. 8 (b1)) and the LOCAL CPU by the machine code generator 111. An intermediate source (FIG. 8 (b2)) is generated. From the intermediate source for MAIN CPU (FIG. 8 (b1)) and the intermediate source for LOCAL CPU (FIG. 8 (b2)), the global variable attribute generation unit 108 uses the MAIN CPU read / write table (FIG. 8 (c1)) and LOCAL. A CPU read / write table (FIG. 8C2) is generated, and the global variable allocation unit 110 allocates global variables to the addresses of the shared memory.

コンパイル処理では、CPU毎にコンパイルが行われるため、この場合は2回コンパイルが行われる。例えば、1回目のコンパイルでMAIN CPU用のプログラムリストおよびマシンコードが生成され、2回目のコンパイルでLOCAL CPU用のプログラムリストおよびマシンコードが生成される。TASKに紐付けられるプログラムは複数可能であるため、1回のコンパイルで複数のマシンコードが生成されることが可能である。   In the compiling process, compiling is performed for each CPU. In this case, compiling is performed twice. For example, a program list and machine code for MAIN CPU are generated by the first compilation, and a program list and machine code for LOCAL CPU are generated by the second compilation. Since there can be a plurality of programs associated with TASK, a plurality of machine codes can be generated by one compilation.

次に、マシンコード生成部111によって生成されたマシンコードのプログラマブルコントローラへのダウンロード処理(ダウンロード部112の処理)について説明する。図13に示すように、マシンコードのプログラマブルコントローラの各プロセッサへのダウンロードは、マシンコードと同時に各プロセッサ(CPU)毎のプログラムリストに基づいて、各CPUに対して行われる。   Next, a process of downloading the machine code generated by the machine code generation unit 111 to the programmable controller (processing of the download unit 112) will be described. As shown in FIG. 13, the machine code is downloaded to each processor of the programmable controller based on the program list for each processor (CPU) simultaneously with the machine code.

次に、マシンコードとプログラムリストの比較処理(比較部115の処理)について説明する。図14に示すように、プログラマブルコントローラ内にダウンロードされているマシンコード125と、プログラマブルコントローラが作成したプログラムリスト126がアップロード部114のアップロード処理により読み出され、プログラマブルコントローラ用プログラム作成支援装置内で持っているマシンコード123とプログラムリスト124が比較部115によって比較される。   Next, the machine code / program list comparison process (the process of the comparison unit 115) will be described. As shown in FIG. 14, the machine code 125 downloaded in the programmable controller and the program list 126 created by the programmable controller are read out by the upload process of the upload unit 114 and held in the programmable controller program creation support device. The machine code 123 and the program list 124 are compared by the comparison unit 115.

比較部115における上述のような比較処理によって、プログラマブルコントローラへのダウンロード時、生成されたプログラムが間違いなくダウンロードできているかの確認を行うことが可能で、また、ダウンロード後、プログラマブルコントローラ用プログラム作成支援装置内のプログラムを変更してしまった場合は、比較することによって不一致となるため、変更したことを確認することができる。   By the comparison processing as described above in the comparison unit 115, it is possible to confirm whether the generated program is definitely downloaded when downloading to the programmable controller, and after the download, support for creating a program for the programmable controller If the program in the device has been changed, the comparison results in a mismatch, so that the change can be confirmed.

以上のように本発明のプログラマブルコントローラ用プログラム作成支援装置について詳細に説明したが、本発明は以上に述べたことに限定されるものではなく、その他、本発明の要旨を逸脱しない範囲で様々の構成、または形状をつくることができることはいうまでもない。   As described above, the programmable controller program creation support apparatus of the present invention has been described in detail. However, the present invention is not limited to the above description, and various other modifications can be made without departing from the scope of the present invention. It goes without saying that the configuration or shape can be made.

101 プログラマブルコントローラ用プログラム作成支援装置
102 プログラマブルコントローラ
103 GUI部
104 入力部
105 出力部
106 グローバル変数シート
107 中間コード生成部
108 グローバル変数属性生成部
109 リード/ライト表
110 グローバル変数割付部
111 マシンコード生成部
112 ダウンロード部
113 通信インターフェース
114 アップロード部
115 比較部
121 中間コード
122 プログラムリスト
123,125 マシンコード
124,126 プログラムリスト
101 Program Controller for Programmable Controller 102 Programmable Controller 103 GUI Unit 104 Input Unit 105 Output Unit 106 Global Variable Sheet 107 Intermediate Code Generation Unit 108 Global Variable Attribute Generation Unit 109 Read / Write Table 110 Global Variable Allocation Unit 111 Machine Code Generation Unit 112 Download unit 113 Communication interface 114 Upload unit 115 Comparison unit 121 Intermediate code 122 Program list 123, 125 Machine code 124, 126 Program list

Claims (8)

複数のプロセッサと当該プロセッサごとに領域が割り付けられた共有メモリとを備えたマルチCPUモジュールで構成されたプログラマブルコントローラ用のプログラム作成支援装置であって、
前記複数のプロセッサへのプログラムの割り当てをユーザが明示的に指定するためのダイアログを表示し、該ユーザによるプログラム割り当て指示を記憶する処理と、
前記プログラマブルコントローラにおいて、複数のプログラムからアクセス可能な変数であるグローバル変数の宣言をユーザが指定するためのダイアログを表示し、該ユーザによるグローバル変数の宣言の指定を記憶する処理と、
を行うGUI部(Graphical User Interface部)を備え、
前記プログラムごとに前記グローバル変数が読み込み変数か書き込み変数かを判定し、前記プログラムごとにグローバル変数の読み込み/書き込み属性を生成するグローバル変数属性生成部と、
前記プログラム割り当て指示と前記グローバル変数の読み込み/書き込み属性とに基づいて、前記グローバル変数を前記共有メモリに割り付けるグローバル変数割付部と、
を有し、
前記グローバル変数割付部は、前記プログラムで用いられる前記グローバル変数が書き込み属性を有する場合に、前記グローバル変数を前記プログラムが割り当てられたプロセッサの共有メモリに割り付けることを特徴とするプログラマブルコントローラ用プログラム作成支援装置。
A program creation support apparatus for a programmable controller configured by a multi-CPU module including a plurality of processors and a shared memory in which an area is allocated to each processor,
Processing for displaying a dialog for a user to explicitly specify program allocation to the plurality of processors and storing a program allocation instruction by the user;
In the programmable controller, a process for displaying a dialog for the user to specify a declaration of a global variable that is a variable accessible from a plurality of programs, and storing the specification of the declaration of the global variable by the user;
A GUI part (Graphical User Interface part)
Determining whether the global variable is a read variable or a write variable for each program, and generating a global variable read / write attribute for each program;
A global variable allocation unit that allocates the global variable to the shared memory based on the program allocation instruction and the read / write attribute of the global variable;
I have a,
The global variable allocation unit allocates the global variable to a shared memory of a processor to which the program is allocated when the global variable used in the program has a write attribute. apparatus.
前記GUI部が記憶したユーザによるプログラム割り当て指示に基づいて、中間コードおよび中間的なプログラムリストを生成する中間コード生成部と、
前記生成された中間コード、中間的なプログラムリスト、グローバル変数の読み込み/書き込み属性をコンパイルして、前記プログラム割り当て指示と前記グローバル変数の読み込み/書き込み属性とに基づいて前記グローバル変数を前記共有メモリに割り付けたマシンコードと最終的なプログラムリストを生成するマシンコード生成部と、
を備えることを特徴とする請求項1に記載のプログラマブルコントローラ用プログラム作成支援装置。
An intermediate code generation unit that generates an intermediate code and an intermediate program list based on a program allocation instruction by a user stored in the GUI unit;
Compile the generated intermediate code, intermediate program list, and read / write attribute of global variable, and store the global variable in the shared memory based on the program assignment instruction and the read / write attribute of the global variable A machine code generation unit for generating the assigned machine code and a final program list;
The program creation support device for a programmable controller according to claim 1, comprising:
前記マシンコード生成部は、中間的なプログラムリスト内のタスク名に基づいて、当該中間的なプログラムリストを各プロセッサに該当する内容のみを含む形に分割し、前記中間コードと該分割されたリストとをコンパイルして、マシンコードと最終的なプログラムリストを生成することを特徴とする請求項2記載のプログラマブルコントローラ用プログラム作成支援装置。 The machine code generation unit divides the intermediate program list into a form including only contents corresponding to each processor based on a task name in the intermediate program list, and the intermediate code and the divided list The program creation support apparatus for a programmable controller according to claim 2 , wherein a machine code and a final program list are generated. 前記マシンコードは、1以上生成されることを特徴とする請求項2記載のプログラマブルコントローラ用プログラム作成支援装置。 3. The programmable controller program creation support apparatus according to claim 2 , wherein at least one of the machine codes is generated. 更に、前記生成されたマシンコードを、前記生成された最終的なプログラムリストに基づいて各プロセッサにダウンロードするダウンロード部を備えることを特徴とする請求項2記載のプログラマブルコントローラ用プログラム作成支援装置。 The programmable controller program creation support apparatus according to claim 2 , further comprising a download unit that downloads the generated machine code to each processor based on the generated final program list. 更に、前記プロセッサにダウンロードされたマシンコードを前記プログラマブルコントローラ用プログラム作成支援装置にアップロードするアップロード部と、
前記アップロードされたマシンコードと、当該プログラマブルコントローラ用プログラム作成支援装置内のマシンコードを比較する比較部と、
を備えることを特徴とする請求項5記載のプログラマブルコントローラ用プログラム作成支援装置。
Furthermore, an upload unit that uploads the machine code downloaded to the processor to the programmable controller program creation support device;
A comparison unit that compares the uploaded machine code with the machine code in the programmable controller program creation support device;
The program creation support device for a programmable controller according to claim 5, comprising:
複数のプロセッサと当該プロセッサごとに領域が割り付けられた共有メモリとを備えたマルチCPUモジュールで構成されたプログラマブルコントローラ用のプログラム作成支援をコンピュータによって行うための方法であって、当該コンピュータは処理部と記憶部とを備え、
前記処理部が、
前記各プロセッサへのプログラムの割り当てをユーザに明示的に指定させるためのダイアログを表示し、該ユーザによるプログラム割り当て指示を前記記憶部に記憶し、
前記プログラマブルコントローラにおいて、複数のプログラムからアクセス可能な変数であるグローバル変数の宣言をユーザに指定させるためのダイアログを表示し、該ユーザによるグローバル変数の宣言の指定を前記記憶部に記憶し、
前記記憶部に記憶されたユーザによるプログラム割り当て指示およびグローバル変数の宣言の指定に基づいて、中間コードおよび中間的なプログラムリストを生成し、
前記中間コードおよび前記中間的なプログラムリストから、前記プログラムごとに前記グローバル変数が読み込み変数か書き込み変数かを判定し、前記プログラムごとにグローバル変数の読み込み/書き込み属性を表したリード/ライト表を生成し、
前記生成された中間コードと中間的なプログラムリストとリード/ライト表をコンパイルし、前記プログラム割り当て指示と前記グローバル変数の読み込み/書き込み属性とに基づき、該グローバル変数が書き込み属性を有する場合に前記グローバル変数を前記プログラムが割り当てられたプロセッサの前記共有メモリに割り付けたマシンコードと最終的なプログラムリストを生成し、
前記生成された最終的なプログラムリストに基づいて、前記生成されたマシンコードを前記各プロセッサにダウンロードする、
処理を行うことによってプログラマブルコントローラ用プログラムの作成支援を行うことを特徴とするプログラム作成支援方法。
A method for performing program creation support for a programmable controller configured by a multi-CPU module including a plurality of processors and a shared memory in which an area is allocated to each processor by a computer, the computer including a processing unit A storage unit,
The processing unit is
Displaying a dialog for allowing a user to explicitly specify program allocation to each of the processors; storing program allocation instructions by the user in the storage unit;
In the programmable controller, a dialog for allowing the user to specify a declaration of a global variable that is a variable accessible from a plurality of programs is displayed, and the specification of the declaration of the global variable by the user is stored in the storage unit,
Based on a program assignment instruction and a global variable declaration specified by the user stored in the storage unit, an intermediate code and an intermediate program list are generated,
From the intermediate code and the intermediate program list, it is determined for each program whether the global variable is a read variable or a write variable, and a read / write table representing the read / write attribute of the global variable is generated for each program. And
Compile the intermediate code and intermediate program list and the read / write table said generated-out based on the read / write attribute of the program allocation instruction and the global variable, if the global variable has a writing attribute Machine code and final program list assigned to the shared memory of the processor to which the program is assigned the global variable,
Downloading the generated machine code to each processor based on the generated final program list.
A program creation support method characterized in that a program creation support for a programmable controller is performed by performing processing.
更に、前記各プロセッサにダウンロードされたマシンコードをアップロードし、
前記アップロードされたマシンコードと、前記ダウンロードされたマシンコードを比較することを特徴とする請求項7記載のプログラム作成支援方法。
Furthermore, the machine code downloaded to each processor is uploaded,
8. The program creation support method according to claim 7, wherein the uploaded machine code is compared with the downloaded machine code.
JP2011024604A 2011-02-08 2011-02-08 Program creation support apparatus and program creation support method Active JP5757098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011024604A JP5757098B2 (en) 2011-02-08 2011-02-08 Program creation support apparatus and program creation support method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011024604A JP5757098B2 (en) 2011-02-08 2011-02-08 Program creation support apparatus and program creation support method

Publications (2)

Publication Number Publication Date
JP2012164178A JP2012164178A (en) 2012-08-30
JP5757098B2 true JP5757098B2 (en) 2015-07-29

Family

ID=46843503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011024604A Active JP5757098B2 (en) 2011-02-08 2011-02-08 Program creation support apparatus and program creation support method

Country Status (1)

Country Link
JP (1) JP5757098B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112013006915T5 (en) * 2013-04-08 2015-12-24 Mitsubishi Electric Corp. Program editing device, program editing method and program editing program
JP6292096B2 (en) * 2014-04-24 2018-03-14 富士電機株式会社 Programmable controller system and its support device
US9851712B2 (en) * 2014-11-12 2017-12-26 Yokogawa Electric Corporation Process control system and configuration system for an industrial plant
JP6409755B2 (en) * 2015-12-02 2018-10-24 株式会社安川電機 Machine control program creation device, library generation method, and machine control program addition method
JP6969460B2 (en) 2018-03-15 2021-11-24 オムロン株式会社 Program development support system, program development support method and program development support program
JP7124556B2 (en) * 2018-08-22 2022-08-24 オムロン株式会社 Programming support device, programming support method, and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3690106B2 (en) * 1998-04-02 2005-08-31 三菱電機株式会社 Device system monitoring and control method
JP3737650B2 (en) * 1999-07-09 2006-01-18 株式会社東芝 Integrated controller and control system
JP2008198143A (en) * 2007-02-15 2008-08-28 Fuji Electric Fa Components & Systems Co Ltd Program preparation support device and program preparation support method for programmable controller

Also Published As

Publication number Publication date
JP2012164178A (en) 2012-08-30

Similar Documents

Publication Publication Date Title
JP5757098B2 (en) Program creation support apparatus and program creation support method
US20120227028A1 (en) Graphical programming object population user interface autogeneration
JP5619328B1 (en) Sequence program creation support device
JP5119902B2 (en) Dynamic reconfiguration support program, dynamic reconfiguration support method, dynamic reconfiguration circuit, dynamic reconfiguration support device, and dynamic reconfiguration system
JP5790128B2 (en) Programmable controller system and its support device
JP2009146229A (en) Programmable controller system
JP2016506559A (en) Method and device for changing objects in an HMI device
JP2016091066A (en) Information processor, information processing method, information processing program and record medium
JP6292096B2 (en) Programmable controller system and its support device
JP2018502391A (en) Computer-implemented method for displaying a user interface
JP2008198143A (en) Program preparation support device and program preparation support method for programmable controller
JP5849592B2 (en) Programmable controller system, programming device thereof, programmable controller, program, and debugging method
JP2009157533A (en) Programmable controller system
JP5141889B2 (en) PLC program development support device
JP4870956B2 (en) Embedded program generation method, embedded program development system, and information table section
JP4735854B2 (en) PLC program development support device
JP6020071B2 (en) Programmable controller system, its support device, programmable controller
JP4760607B2 (en) Programmable controller
JP5079166B1 (en) Symbol table generation method, communication method with peripheral device, and programmable logic controller
JP6071782B2 (en) PLANT CONTROL DEVICE, PLANT CONTROL METHOD, AND PLANT CONTROL PROGRAM
JP6076564B2 (en) System design support tool
JP5978775B2 (en) PROGRAMMABLE CONTROLLER, ITS SUPPORT DEVICE, PROGRAM, PROGRAM TRANSFER METHOD
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
US10802808B2 (en) Compiler and programming support device
JP7208441B1 (en) FA control test support program, FA control test support device, FA control test support method and FA control test support system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141028

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141104

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141204

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150520

R150 Certificate of patent or registration of utility model

Ref document number: 5757098

Country of ref document: JP

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250