JP5849592B2 - Programmable controller system, programming device thereof, programmable controller, program, and debugging method - Google Patents
Programmable controller system, programming device thereof, programmable controller, program, and debugging method Download PDFInfo
- Publication number
- JP5849592B2 JP5849592B2 JP2011223458A JP2011223458A JP5849592B2 JP 5849592 B2 JP5849592 B2 JP 5849592B2 JP 2011223458 A JP2011223458 A JP 2011223458A JP 2011223458 A JP2011223458 A JP 2011223458A JP 5849592 B2 JP5849592 B2 JP 5849592B2
- Authority
- JP
- Japan
- Prior art keywords
- machine language
- language object
- optimized
- source code
- optimized machine
- 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
Links
- 238000000034 method Methods 0.000 title claims description 97
- 238000003860 storage Methods 0.000 claims description 102
- 230000008569 process Effects 0.000 claims description 85
- 238000012545 processing Methods 0.000 claims description 72
- 230000006870 function Effects 0.000 claims description 58
- 238000005457 optimization Methods 0.000 claims description 36
- 238000012546 transfer Methods 0.000 claims description 6
- 238000011161 development Methods 0.000 description 27
- 238000004891 communication Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 11
- 230000001343 mnemonic effect Effects 0.000 description 10
- 238000003780 insertion Methods 0.000 description 4
- 230000037431 insertion Effects 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 230000000368 destabilizing effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
- Programmable Controllers (AREA)
Description
本発明は、プログラマブルコントローラシステムに係わり、特にプログラムのデバッグ方法に関する。 The present invention relates to a programmable controller system, and more particularly to a program debugging method.
従来、プログラマブルコントローラ(PLC)に係るシステムとして、例えば、プログラマブルコントローラ本体(PLC本体と記す)と、このPLC本体で実行するプログラム(特に各種制御対象機器の制御プログラム等;以下、PLCプログラムと記す)をユーザが任意に作成できるように支援する支援装置等から成るプログラマブルコントローラシステムが知られている。 Conventionally, as a system related to a programmable controller (PLC), for example, a programmable controller main body (referred to as a PLC main body) and a program executed by the PLC main body (particularly control programs for various control target devices; hereinafter referred to as a PLC program) There is known a programmable controller system including a support device for assisting a user to arbitrarily create an image.
この様な支援装置(プログラミング装置)において、ユーザは、例えばニーモニック言語、あるいはラダー言語、FBD言語等の図形言語プログラムを用いて、任意のPLCプログラムを作成する。そして、作成されたPLCプログラムは、支援装置内でコンパイルされて機械語オブジェクトが生成される。支援装置は、この機械語オブジェクトを、PLC本体にダウンロードする。PLC本体は、ダウンロードされた機械語オブジェクトを記憶する。 In such a support device (programming device), the user creates an arbitrary PLC program using, for example, a mnemonic language or a graphic language program such as a ladder language or an FBD language. The created PLC program is compiled in the support device to generate a machine language object. The support apparatus downloads the machine language object to the PLC main body. The PLC main body stores the downloaded machine language object.
その後、PLC本体は、この機械語オブジェクトを実行して各種制御対象機器の制御等を行う。あるいは、PLC本体側で機械語オブジェクトを実行しつつ支援装置側でこれをモニタする形式のデバッグ(実機デバッグ等という)が行われる場合もある。 Thereafter, the PLC main body executes this machine language object to control various devices to be controlled. Alternatively, there is a case where debugging (referred to as real machine debugging) is performed in which the machine language object is executed on the PLC main body side and the support apparatus side monitors the machine language object.
上記PLC本体における制御処理等の高速化を図るため、上記支援装置におけるPLCプログラムのコンパイル時に最適化を行なう方法が提案されている。しかし、最適化された機械語オブジェクト(以降、最適化機械語オブジェクトと記す)は、最適化の際にプログラムの実行順序の変更や不要な変数など(ブレークポイント等も含まれる)の削除等が行われて成るものである為、ソースコード上でデバッグすることが困難となる。 In order to increase the speed of control processing and the like in the PLC main body, a method of performing optimization at the time of compiling the PLC program in the support apparatus has been proposed. However, an optimized machine language object (hereinafter referred to as an optimized machine language object) can be used to change the program execution order or delete unnecessary variables (including breakpoints) during optimization. Because it is done, it becomes difficult to debug on the source code.
ここで、以下、上記最適化について説明しておく。
最近では、プログラムサイズの肥大化、システムの複雑化に伴い、ユーザアプリケーションの高速化が望まれており、ハードウェアだけでなくソフトウェア(コンパイラ)による高速化が実現されている。
Here, the above optimization will be described below.
Recently, with an increase in program size and system complexity, it has been desired to increase the speed of user applications, and not only hardware but also software (compiler) has been realized.
この様な最適化コンパイルの具体例を以下に示す。
例えば、まず「C=A+B」が実行され、続いて「F=(A+B)×D」が実行されるソースコードがあった場合、これをコンパイルすると、まず「C=A+B」に関しては最適化困難なため通常のコンパイルが行われ、下記の機械語オブジェクトが生成される。
A specific example of such optimization compilation is shown below.
For example, if there is a source code in which “C = A + B” is first executed and subsequently “F = (A + B) × D” is executed, it is difficult to optimize “C = A + B” by compiling it. Therefore, normal compilation is performed and the following machine language object is generated.
LD A
ADD B
ST C
次に、「F=(A+B)×D」関しては、最適化コンパイルが可能であり、コンパイルの結果、例えば(A+B)の部分が「LD C」となる。例えばこの様にして、不要な変数や演算の削除が行われる。この様にして作成された機械語オブジェクト(最適化機械語オブジェクト)は、その実行の際に、A+Bに係る演算を行う必要がなく、変数Cの値のロードを行えば済むので、処理の高速化が図れる。
LD A
ADD B
ST C
Next, with respect to “F = (A + B) × D”, optimization compilation is possible. As a result of the compilation, for example, the part (A + B) becomes “LDC”. For example, unnecessary variables and operations are deleted in this way. The machine language object (optimized machine language object) created in this way does not need to perform an operation related to A + B during execution, and only needs to load the value of the variable C. Can be achieved.
また、最適化コンパイルでは、ソースコードにブレークポイントが設定されている場合、これを削除する場合がある。
ここで、上記のように最適化機械語オブジェクトではソースコード上でデバッグすること(所謂“ソースコードレベルデバッグ/ソースコードデバッグ”)が困難となる問題に対して、例えば下記の従来技術が知られている。
In the optimization compilation, if a breakpoint is set in the source code, it may be deleted.
Here, for example, the following conventional techniques are known for the problem that it is difficult to debug on the source code with the optimized machine language object as described above (so-called “source code level debugging / source code debugging”). ing.
すなわち、従来、上記最適化機械語オブジェクトを入力し、この最適化機械語オブジェクトを逆コンパイルしてソースコードでデバッグするためのデバッグ用ソースコードを生成し、このデバッグ用ソースコードとシンボル情報などを用いてソースコード上でデバッグするようにしたソースコードレベルデバッグ装置が提案されている(例えば特許文献1参照)。 In other words, conventionally, the optimized machine language object is input, the optimized machine language object is decompiled, and a debugging source code for debugging with the source code is generated. There has been proposed a source code level debugging apparatus that is used for debugging on source code (see, for example, Patent Document 1).
また、特許文献2に記載の従来技術が知られている。 Moreover, the prior art described in Patent Document 2 is known.
しかしながら、上記特許文献1に記載の従来例にあっては、デバッグの都度、最適化機械語オブジェクトを逆コンパイルしてデバッグ用のソースコードを生成する必要があり、このため作業が煩雑になり、デバッグの効率がよくないという問題がある。 However, in the conventional example described in Patent Document 1, it is necessary to decompile the optimized machine language object every time debugging is performed and to generate a source code for debugging, which makes the work complicated. There is a problem that debugging efficiency is not good.
また、上記ニーモニック言語の場合は問題ないが、上記ラダー言語、FBD言語等の図形言語プログラムの場合、コンパイルの際に各図形要素をどの順番でコンパイルするのかをコンパイラが決定するが、必ずしもユーザが意図した通りの順番で図形要素が展開されてコンパイルされるとは限らない。 In the case of the mnemonic language, there is no problem, but in the case of the graphic language program such as the ladder language or the FBD language, the compiler determines in which order each graphic element is compiled at the time of compilation. The graphic elements are not necessarily expanded and compiled in the intended order.
本発明の課題は、任意のソースコードに対して2つのコンパイラによって通常の機械語オブジェクトと最適化機械語オブジェクトの両方を生成すると共に、その際にこれら2つのコンパイラで図形要素の展開順番を一致させることで、デバッグ時に逆コンパイル等を行う必要なく且つシステム動作を不安定にすることなく、ソースコードレベルデバッグを行えるようにするプログラマブルコントローラシステム、そのプログラミング装置、プログラマブルコントローラ等を提供することである。 It is an object of the present invention to generate both a normal machine language object and an optimized machine language object by using two compilers for an arbitrary source code, and at the same time, match the expansion order of graphic elements by these two compilers. It is to provide a programmable controller system, a programming device thereof, a programmable controller, and the like that can perform source code level debugging without the need for decompilation or the like during debugging and without making the system operation unstable. .
本発明のPLCシステムは、プログラミング装置とプログラマブルコントローラとを有するPLCシステムであって、前記プログラミング装置は、任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素の展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも前記各図形要素の展開順序を記憶手段に記憶する第一のコンパイラ手段と、前記ソースコードを、前記記憶手段に記憶された前記各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成する第二のコンパイラ手段と、前記第一の機械語オブジェクトと前記第二の機械語オブジェクトとを、前記プログラマブルコントローラにダウンロードするダウンロード手段とを有する。 The PLC system of the present invention is a PLC system having a programming device and a programmable controller, and the programming device determines the source code of an arbitrary graphic language program and the order of expansion of each graphic element constituting the source code. While compiling in accordance with the expansion order to generate a first machine language object, at least first compiler means for storing the expansion order of each graphic element in the storage means, and the source code in the storage means A second compiler means for generating a second machine language object by referring to the expansion order of the stored graphic elements and compiling in accordance with the expansion order; the first machine language object; A machine language object is downloaded to the programmable controller. And an unload means.
上記構成のPLCシステムにおいて、例えば、前記第一の機械語オブジェクトと前記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトである。 In the PLC system configured as described above, for example, one of the first machine language object and the second machine language object is a non-optimized machine language object generated by a normal compilation process. A machine language object, and the other is an optimized machine language object that is an optimized machine language object generated by an optimization compilation process.
任意の図形言語プログラムのソースコードに対して、2種類のコンパイラ手段によって2種類の機械語オブジェクトを生成すると共に、その際の各図形要素の展開順序が同じくなるようにする。生成した2種類の機械語オブジェクトは、プログラマブルコントローラにダウンロードする。 Two kinds of machine language objects are generated by two kinds of compiler means for the source code of an arbitrary figure language program, and the development order of each figure element at that time is made the same. The two generated machine language objects are downloaded to the programmable controller.
プログラマブルコントローラ側では、例えば通常時は上記最適化機械語オブジェクトを実行し、デバッグ時には上記非最適化機械語オブジェクトに切り替えて実行する。上記のように、コンパイルの際に各図形要素の展開順序が同じくなるようにしているので、2種類の機械語オブジェクトで相互に演算結果が異なるような事態にはならず、非最適化機械語オブジェクトに切り替えても問題なく動作する。 On the programmable controller side, for example, the optimized machine language object is executed during normal times, and is switched to the non-optimized machine language object during debugging. As described above, since the expansion order of each graphic element is made the same at the time of compiling, there is no situation where the operation results differ between the two types of machine language objects, and the non-optimized machine language Switching to an object works fine.
本発明のプログラマブルコントローラシステム、その支援装置、プログラマブルコントローラ等によれば、任意のソースコードに対して2つのコンパイラによって通常の機械語オブジェクトと最適化機械語オブジェクトの両方を生成すると共に、その際にこれら2つのコンパイラで図形要素の展開順番を一致させることで、デバッグ時に逆コンパイル等を行う必要なく且つシステム動作を不安定にすることなく、ソースコードレベルデバッグを行えるようになる。 According to the programmable controller system, the supporting device, the programmable controller, etc. of the present invention, both a normal machine language object and an optimized machine language object are generated for two arbitrary compilers by two compilers. By matching the expansion order of the graphic elements with these two compilers, it becomes possible to perform source code level debugging without the need for decompilation or the like during debugging and without destabilizing the system operation.
以下、図面を参照して、本発明の実施の形態について説明する。
図1、図2は、本例のプログラマブルコントローラシステムの構成例である。特に図1はプログラミング装置の詳細構成例を示し、図2はプログラマブルコントローラの詳細構成例を示すものである。
Embodiments of the present invention will be described below with reference to the drawings.
1 and 2 are configuration examples of the programmable controller system of this example. In particular, FIG. 1 shows a detailed configuration example of the programming device, and FIG. 2 shows a detailed configuration example of the programmable controller.
図1、図2に示すように、本例のプログラマブルコントローラシステムは、任意の制御機器300を制御するものであって、プログラミング装置100、プログラマブルコントローラ(以下、PLC(プログラマブル・ロジック・コントローラ)という)200等を有する。プログラミング装置100とPLC200とは信号線400により接続されている。PLC200は、制御対象となる各種機器である制御機器300に接続されている。PLC200は、シーケンス制御プログラム等を実行して制御機器300を制御する。 As shown in FIGS. 1 and 2, the programmable controller system of this example controls an arbitrary control device 300, and includes a programming device 100, a programmable controller (hereinafter referred to as PLC (programmable logic controller)). 200 etc. The programming device 100 and the PLC 200 are connected by a signal line 400. The PLC 200 is connected to a control device 300 that is various devices to be controlled. The PLC 200 controls the control device 300 by executing a sequence control program or the like.
プログラミング装置100は、概略的には、ユーザが任意のシーケンス制御プログラム(そのソースコード)を作成するのを支援する機能や、作成されたソースコードをコンパイルして機械語オブジェクトを生成する機能や、生成した機械語オブジェクトを信号線400を介してPLC200にダウンロードする機能等を有する。 In general, the programming device 100 has a function for supporting a user to create an arbitrary sequence control program (its source code), a function for compiling a generated source code to generate a machine language object, A function of downloading the generated machine language object to the PLC 200 via the signal line 400 is provided.
上記ユーザが作成するシーケンス制御プログラム(ソースコード)は、通常、例えばニーモニック言語、あるいはラダー言語、FBD言語等の図形言語プログラムを用いて作成される。プログラミング装置100の機能については、詳しくは後述するものとする。 The sequence control program (source code) created by the user is usually created using, for example, a mnemonic language or a graphic language program such as a ladder language or FBD language. The function of the programming device 100 will be described later in detail.
プログラミング装置100のハードウェア構成例は、例えば図1に示すように、中央演算処理装置(CPU)101、内部メモリ104、記憶装置105、マウスやキーボード等である入力装置102、ディスプレイ等である表示器103、入出力インタフェース(I/O)106などから構成され、これらが共通バス107に接続されている。 As an example of the hardware configuration of the programming device 100, for example, as shown in FIG. 1, a central processing unit (CPU) 101, an internal memory 104, a storage device 105, an input device 102 such as a mouse or a keyboard, a display or the like Device 103, input / output interface (I / O) 106, etc., which are connected to a common bus 107.
記憶装置105には、各種のデータが記憶されている。入力装置102は、オペレータによって外部から操作されるマウスやキーボード等からの入力イベントを、CPU101に通知する。また、記憶装置105には、予め、所定のアプリケーションプログラムが記憶されている。記憶装置105は、例えばハードディスク装置等である。 The storage device 105 stores various data. The input device 102 notifies the CPU 101 of an input event from a mouse, a keyboard, or the like operated from the outside by an operator. The storage device 105 stores a predetermined application program in advance. The storage device 105 is, for example, a hard disk device.
表示器103は、例えば液晶ディスプレイ等からなり、例えば入力イベント等に応じて、各種データや画像を表示する。I/O106は、信号線400と接続している。CPU101は、I/O106、信号線400を介して、PLC200との通信(データの送受信)を行う。 The display device 103 is composed of, for example, a liquid crystal display and displays various data and images according to, for example, an input event. The I / O 106 is connected to the signal line 400. The CPU 101 performs communication (data transmission / reception) with the PLC 200 via the I / O 106 and the signal line 400.
CPU101は、記憶装置105に記憶されている上記アプリケーションプログラムを、例えば内部メモリ104に読出し・実行することにより、各種処理機能(例えば後述する図3のユーザインタフェース部11やコンパイラ12の処理機能;あるいは例えば後述する図12のインタフェース機能部61やコンパイラ62の処理機能等)を実現する。これらについては、後に、図3や図12を参照して詳細に説明するが、ユーザインタフェース部11やインタフェース機能部61は、基本的には既存の処理機能であってよく、ユーザが任意のシーケンス制御プログラム(ソースプログラム)を作成するのを支援する処理機能である。このソースプログラムは、本例では上記の通り、例えばニーモニック言語、あるいはラダー言語、FBD言語等の図形言語を用いて作成されるものである。 The CPU 101 reads out and executes the application program stored in the storage device 105, for example, in the internal memory 104, thereby performing various processing functions (for example, processing functions of the user interface unit 11 and the compiler 12 in FIG. 3 described later; or For example, an interface function unit 61 and a processing function of the compiler 62 shown in FIG. These will be described later in detail with reference to FIG. 3 and FIG. 12, but the user interface unit 11 and the interface function unit 61 may basically be existing processing functions, and the user can select any sequence. This is a processing function that supports creation of a control program (source program). In this example, the source program is created using a mnemonic language or a graphic language such as a ladder language or FBD language as described above.
また、CPU101は、上記ユーザによってプログラミングされたシーケンス制御プログラム(ソースプログラム)をコンパイルして、PLC200側(後述する図2のCPU211)が直接実行可能な実行コード(機械語オブジェクト)に変換する処理機能も有する。この処理機能自体は、既存の処理であってよいが、コンパイラ12やコンパイラ62では、更に、後述する処理機能も有する。詳しくは後述する。 Further, the CPU 101 compiles the sequence control program (source program) programmed by the user and converts it into an execution code (machine language object) that can be directly executed by the PLC 200 (CPU 211 in FIG. 2 described later). Also have. This processing function itself may be an existing process, but the compiler 12 and the compiler 62 further have a processing function described later. Details will be described later.
また、CPU101は、PLC200に対する動作指示(コマンド/データ等;パラメータ等も含む場合もある)を、I/O106を介してPLC200に送信したり、PLC200で実行させる上記シーケンス制御プログラム(機械語オブジェクト)を、I/O106を介してPLC200にダウンロードする処理機能等も有する。 In addition, the CPU 101 transmits an operation instruction (command / data, etc .; may include parameters, etc.) to the PLC 200 to the PLC 200 via the I / O 106 or the PLC 200 executes the sequence control program (machine language object). For example, a processing function for downloading to the PLC 200 via the I / O 106.
尚、各種処理は、例えば記憶装置105から各種データを読み出しながら、あるいは記憶装置105に各種のデータを書き込みながら、実行されるものである場合もある。
上記シーケンス制御プログラムの実行コード(機械語オブジェクト)が、I/O106を介してPLC200にダウンロードされることにより、PLC200側の図2に示すCPUモジュール210は、ユーザプログラムメモリ213などに保持されていたシーケンス制御プログラムの実行コード(旧バージョン等)を、ダウンロードされた実行コード(新バージョン等)に更新することができる。
Note that the various processes may be executed while reading various data from the storage device 105 or writing various data to the storage device 105, for example.
The execution code (machine language object) of the sequence control program is downloaded to the PLC 200 via the I / O 106, whereby the CPU module 210 shown in FIG. 2 on the PLC 200 side is held in the user program memory 213 or the like. The execution code (old version or the like) of the sequence control program can be updated to the downloaded execution code (new version or the like).
PLC200のハードウェア構成例は、例えば図2に示すように、CPUモジュール210、入出力モジュール222等を有するものである。
このCPUモジュール210は、図2に示す例では、CPU211、システムプログラムメモリ(FLASH)212、ユーザプログラムメモリ(RAM)213、PLC固有バスインタフェース214、ユーザデータメモリ(RAM)215、システムワークメモリ(RAM)216、ドライバ/レシーバ217等を有し、これらがバス218に接続されている。
A hardware configuration example of the PLC 200 includes a CPU module 210, an input / output module 222, and the like as shown in FIG.
In the example shown in FIG. 2, the CPU module 210 includes a CPU 211, a system program memory (FLASH) 212, a user program memory (RAM) 213, a PLC specific bus interface 214, a user data memory (RAM) 215, a system work memory (RAM 216, driver / receiver 217, etc., which are connected to the bus 218.
また、CPUモジュール210は、PLC固有バスインタフェース214を介して、入出力モジュール222と接続される。入出力モジュール222は、制御機器300に接続されている。CPU211は、PLC固有バスインタフェース214、入出力モジュール222等を介して、制御機器300との通信(データ入出力)を行える。また、CPU211は、ドライバ/レシーバ217等を介して、プログラミング装置100との通信を行える。 The CPU module 210 is connected to the input / output module 222 via the PLC specific bus interface 214. The input / output module 222 is connected to the control device 300. The CPU 211 can communicate (data input / output) with the control device 300 via the PLC specific bus interface 214, the input / output module 222, and the like. The CPU 211 can communicate with the programming device 100 via the driver / receiver 217 or the like.
また、PLC200は、パワーオンまたはリセットスタート後、システムの初期化を経て、ユーザプログラムメモリ213に保持された上記シーケンス制御プログラム(実行コード;機械語オブジェクト)を、サイクリックに実行して、所定の制御周期で制御機器300の制御を行うように構成されている。 The PLC 200 cyclically executes the sequence control program (execution code: machine language object) held in the user program memory 213 through system initialization after power-on or reset start, The control device 300 is configured to be controlled at a control cycle.
図2に示す構成自体は、既存のPLCの一般的な構成であるので、これ以上詳細には説明しないが、例えばユーザプログラムメモリ213には、予め所定のアプリケーションプログラムが記憶されており、CPU211がこのアプリケーションプログラムを読出し・実行することにより、例えば図3に示す各種機能部(オブジェクト展開部25、デバッグ制御部26、プログラム実行部27など)の処理が実現される。また、図3のアドレステーブル24は、例えばユーザデータメモリ215に記憶されるものであるが、この例に限らない。 The configuration shown in FIG. 2 is a general configuration of an existing PLC and will not be described in detail. For example, a user application memory 213 stores a predetermined application program in advance, and the CPU 211 By reading and executing this application program, for example, the processing of various functional units (object development unit 25, debug control unit 26, program execution unit 27, etc.) shown in FIG. 3 is realized. The address table 24 of FIG. 3 is stored in the user data memory 215, for example, but is not limited to this example.
図3は、上記プログラマブルコントローラシステムの機能構成図である。
プログラミング装置100(プログラミングローダ)は、上記の通り、ユーザによって任意のプログラム・ソースコード(上記シーケンス制御プログラムのソースプログラム等)を作成させる支援機能(図示のユーザインタフェース部11)や、このソースコードを機械語オブジェクトに変換するコンパイル機能(図示のコンパイラ12)を備える。
FIG. 3 is a functional configuration diagram of the programmable controller system.
The programming device 100 (programming loader), as described above, supports a user to create an arbitrary program / source code (such as the source program of the sequence control program) by the user (the user interface unit 11 shown in the figure), A compiling function (the illustrated compiler 12) for converting to a machine language object is provided.
プログラミング装置100によってコンパイルされて生成される上記機械語オブジェクト(実行コード)は、PLC200などのターゲットにダウンロードされる(不図示のダウンロード機能によるものとする)。 The machine language object (execution code) generated by being compiled by the programming device 100 is downloaded to a target such as the PLC 200 (assuming that the download function is not shown).
ユーザは、ユーザインタフェース部11によって、ニーモニック言語、あるいはラダー言語、FBD言語等の図形言語で、任意のシーケンス制御プログラム(ソースコード)を記述・作成する。ユーザインタフェース部11は、作成されたソースコードをコンパイラ12に渡す。 The user describes and creates an arbitrary sequence control program (source code) in the mnemonic language, or a graphical language such as a ladder language or FBD language, by the user interface unit 11. The user interface unit 11 passes the created source code to the compiler 12.
コンパイラ12は、渡されたソースコードをコンパイルして2種類の機械語オブジェクトを生成して記憶する。すなわち、コンパイラ12は、渡されたソースコードをコンパイルして、最適化機械語オブジェクト13を生成・出力すると共に、非最適化機械語オブジェクト15も生成・出力し、これらを不図示の記憶領域に格納する。その後、これら最適化機械語オブジェクト13および非最適化機械語オブジェクト15は、それぞれ通信部14を介してPLC200へダウンロードされる。 The compiler 12 compiles the passed source code to generate and store two types of machine language objects. That is, the compiler 12 compiles the passed source code, generates and outputs an optimized machine language object 13, and also generates and outputs a non-optimized machine language object 15, which is stored in a storage area (not shown). Store. Thereafter, the optimized machine language object 13 and the non-optimized machine language object 15 are downloaded to the PLC 200 via the communication unit 14, respectively.
最適化機械語オブジェクト13は、上記背景技術で説明した通りであり、最適化の際にプログラムの実行順序の変更や不要な変数の削除等が行われて成るものである。一方、非最適化機械語オブジェクト15は、最適化が行われない、通常のコンパイルによって生成される機械語オブジェクトであり、従って上記実機デバッグによるソースコードレベルデバッグが可能となるものである。 The optimized machine language object 13 is as described in the above background art, and is formed by changing the execution order of programs, deleting unnecessary variables, and the like during optimization. On the other hand, the non-optimized machine language object 15 is a machine language object generated by normal compilation that is not optimized, and thus enables source code level debugging by actual machine debugging.
PLC200にダウンロードされるデータパケット(機械語オブジェクト含む)は、図8に示すように、識別番号41、種別42、機械語オブジェクト(機械語オブジェクト本体)43で構成される。 A data packet (including a machine language object) downloaded to the PLC 200 includes an identification number 41, a type 42, and a machine language object (machine language object body) 43 as shown in FIG.
識別番号41は、例えばコンパイラ12が、上記生成した機械語オブジェクト(最適化機械語オブジェクト13および非最適化機械語オブジェクト15)に付与する任意の番号(例えばシリアル番号等であってよい)であり、ソースコードに対して一意に識別するための識別子である。これは、例えば、同一のソースコードから生成された最適化機械語オブジェクト13と非最適化機械語オブジェクト15は、その識別番号が同一となるようにする。あるいは、識別番号は、各ソースコード(特にPOU)毎に固有のユニークなIDであり、これより、任意のソースコードから生成される機械語オブジェクトには(それが最適化であっても非最適化であっても)生成元のソースコードの識別番号が付与されるものと考えても良い。これによって、例えば後に図10、図11で説明する例のようになる(詳しくは後述する)。 The identification number 41 is, for example, an arbitrary number (for example, a serial number or the like) that the compiler 12 gives to the generated machine language object (the optimized machine language object 13 and the non-optimized machine language object 15). , An identifier for uniquely identifying the source code. For example, the optimized machine language object 13 and the non-optimized machine language object 15 generated from the same source code have the same identification number. Alternatively, the identification number is a unique ID unique to each source code (especially POU), which makes it non-optimal for machine language objects generated from any source code (even if it is optimized) It may be considered that the identification number of the source code of the generation source is given. Thus, for example, an example described later with reference to FIGS. 10 and 11 (details will be described later).
機械語オブジェクト43は、上記コンパイラ12によって生成された機械語オブジェクトそのものであり、最適化機械語オブジェクト13または非最適化機械語オブジェクト15である。 The machine language object 43 is the machine language object itself generated by the compiler 12, and is the optimized machine language object 13 or the non-optimized machine language object 15.
種別42は、機械語オブジェクト43が上記最適化機械語オブジェクト13と非最適化機械語オブジェクト15のどちらであるのかを示す種別コードである。ここでは、機械語オブジェクト43は、種別42=‘1’の場合には最適化機械語オブジェクト13であり、種別42=‘2’の場合には非最適化機械語オブジェクト15であるものとする。 The type 42 is a type code indicating whether the machine language object 43 is the optimized machine language object 13 or the non-optimized machine language object 15. Here, the machine language object 43 is an optimized machine language object 13 when the type 42 = '1', and is a non-optimized machine language object 15 when the type 42 = '2'. .
尚、後に図10、図11に示すように、上記データパケットには基本的に、同一のソースコードから生成された最適化機械語オブジェクト13と非最適化機械語オブジェクト15の両方が格納されるものである。 As shown in FIGS. 10 and 11 later, the data packet basically stores both the optimized machine language object 13 and the non-optimized machine language object 15 generated from the same source code. Is.
尚、プログラミング装置100−PLC200間の通信は、図示の通信部14、通信部21を介して行われる。
一方、PLC200は、図3に示すオブジェクト展開部25、デバッグ制御部26、プログラム実行部27等の各種機能部を有する。
Communication between the programming device 100 and the PLC 200 is performed via the communication unit 14 and the communication unit 21 shown in the figure.
On the other hand, the PLC 200 has various functional units such as an object expansion unit 25, a debug control unit 26, and a program execution unit 27 shown in FIG.
上記オブジェクト展開部25は、プログラミング装置100が送信した上記データパケットを通信部21により受信すると、このデータパケットの種別42が‘1’である場合には、その機械語オブジェクト43を最適化機械語オブジェクト22としてユーザプログラムメモリ213に格納する。一方、受信した上記データパケットの種別42が‘2’である場合には、その機械語オブジェクト43を非最適化機械語オブジェクト23としてユーザプログラムメモリ213に格納する。また、オブジェクト展開部25は、上記最適化機械語オブジェクト22のユーザプログラムメモリ213上での格納アドレス(格納領域の先頭アドレスなど)を、アドレステーブル24に書き込む(詳細は後述する)。 When the object expansion unit 25 receives the data packet transmitted from the programming device 100 by the communication unit 21, when the type 42 of the data packet is “1”, the object expansion unit 25 converts the machine language object 43 into the optimization machine language. The object 22 is stored in the user program memory 213. On the other hand, when the type 42 of the received data packet is “2”, the machine language object 43 is stored in the user program memory 213 as the non-optimized machine language object 23. Further, the object expansion unit 25 writes the storage address (such as the start address of the storage area) of the optimized machine language object 22 on the user program memory 213 into the address table 24 (details will be described later).
また、PLC200は、機械語オブジェクトを順次実行するプログラム実行部27を有し、このプログラム実行部27は、アドレステーブル24に保持されたアドレスデータ(通常は上記最適化機械語オブジェクト22の格納アドレス)を参照して、該アドレスデータを間接アドレス指定して、そのアドレス先に保持された機械語オブジェクトを実行するように構成されている。 The PLC 200 has a program execution unit 27 that sequentially executes machine language objects. The program execution unit 27 stores address data (usually the storage address of the optimized machine language object 22) stored in the address table 24. , The address data is indirectly addressed, and the machine language object held at the address destination is executed.
プログラム実行部27は、たとえば不図示のプログラム実行管理部によって所定の周期毎に呼び出されることで(コールされて)、前述のようにサイクリックに制御を実行するが、この例に限らない。上記の通り、通常時(PLC運用時)には、アドレステーブル24には最適化機械語オブジェクト22の格納アドレスが書き込まれているため、プログラム実行部27は最適化機械語オブジェクト22を実行することになる。 The program execution unit 27 is cyclically controlled as described above by being called (called) by a program execution management unit (not shown) at predetermined intervals, for example, but is not limited to this example. As described above, since the storage address of the optimized machine language object 22 is written in the address table 24 during normal operation (PLC operation), the program execution unit 27 executes the optimized machine language object 22. become.
一方、デバッグ時には、プログラミング装置100からデバッグ開始通知が送信されてくる。このデバッグ開始通知を受信したPLC200は、デバッグ制御部26によって、アドレステーブル24のアドレスデータを、非最適化機械語オブジェクト23の格納アドレス(格納領域の先頭アドレスなど)に書き換える。よって、デバッグ時には、プログラム実行部27が、上記のようにアドレステーブル24のアドレスデータを参照して機械語オブジェクトを実行すると、非最適化機械語オブジェクト23を実行することになる。 On the other hand, during debugging, a debug start notification is transmitted from the programming device 100. The PLC 200 that has received the debug start notification rewrites the address data in the address table 24 to the storage address of the non-optimized machine language object 23 (such as the start address of the storage area) by the debug control unit 26. Therefore, at the time of debugging, when the program execution unit 27 executes the machine language object by referring to the address data in the address table 24 as described above, the non-optimized machine language object 23 is executed.
その後、デバッグの終了時には、プログラミング装置100からデバッグ完了通知が送信されてくる。このデバッグ完了通知を受信したPLC200は、デバッグ制御部26によって、アドレステーブル24のアドレスデータを、最適化機械語オブジェクト22の格納アドレスに書き換える。つまり、通常時の状態(最適化機械語オブジェクト22が実行される状態)に戻すものである。 Thereafter, at the end of debugging, a debugging completion notification is transmitted from the programming device 100. The PLC 200 that has received the debug completion notification rewrites the address data in the address table 24 to the storage address of the optimized machine language object 22 by the debug control unit 26. That is, the state is returned to the normal state (a state in which the optimized machine language object 22 is executed).
このようにして、PLC200は、通常時とデバッグ時とで、実行する機械語オブジェクトとを切り替えている。つまり、通常時には最適化された機械語オブジェクトを実行し、デバッグ時には最適化されない(デバッグ可能な)機械語オブジェクトを実行する。 In this way, the PLC 200 switches the machine language object to be executed between the normal time and the debug time. That is, an optimized machine language object is executed in normal times, and a machine language object that is not optimized (debuggable) is executed in debugging.
すなわち、通常時は最適化機械語オブジェクト22の格納アドレスをアドレステーブル24に登録し、デバッグ時には非最適化機械語オブジェクト23の格納アドレスをアドレステーブル24に登録することにより、通常時とデバッグ時とで機械語オブジェクトを切り替えて実行することができる。これによって、通常時は最適化機械語オブジェクトを実行するPLC200のデバッグ作業が極めて容易になる。詳しくは後述する。 That is, the storage address of the optimized machine language object 22 is registered in the address table 24 during normal time, and the storage address of the non-optimized machine language object 23 is registered in the address table 24 during debugging. The machine language object can be switched and executed. This makes it extremely easy to debug the PLC 200 that normally executes the optimized machine language object. Details will be described later.
ここで、プログラミング装置100の具体的な処理例について説明する。
図4は、プログラミング装置における支援処理の一例を示すフローチャート図である。
尚、図4の処理は、プログラミング装置100において図3には示していない不図示の全体制御部が行うものとして説明する。
Here, a specific processing example of the programming device 100 will be described.
FIG. 4 is a flowchart showing an example of support processing in the programming device.
Note that the processing in FIG. 4 will be described as being performed by the overall control unit (not shown) that is not shown in FIG.
図4に示す処理例では、上記全体制御部は、まず、所定の処理メニューを表示する(ステップS1)。これは、任意のソースコードが作成される毎に表示してもよいし、ユーザの指示に応じて表示してもよい。 In the processing example shown in FIG. 4, the overall control unit first displays a predetermined processing menu (step S1). This may be displayed every time arbitrary source code is created, or may be displayed according to a user instruction.
図5は、この処理メニューの一例である。
図5の例の処理メニュー画面上には、少なくとも、コンパイル開始ボタン31、デバッグ開始ボタン32、終了ボタン33、デバッグ終了ボタン34の各種コマンドボタンが配置されている。ユーザがマウス、キーボード等の入力装置102を操作して、これらボタン31〜34のうちの任意のボタンを選択することで、所望のコマンドを選択・指定することができる。
FIG. 5 is an example of this processing menu.
On the processing menu screen in the example of FIG. 5, at least various command buttons such as a compile start button 31, a debug start button 32, an end button 33, and a debug end button 34 are arranged. A user can select / designate a desired command by operating the input device 102 such as a mouse or a keyboard and selecting any of these buttons 31 to 34.
そして、上記全体制御部は、コンパイル開始ボタン31が選択されたか否かを判定する(ステップS2)。もし、コンパイル開始ボタン31が選択されていない場合には(ステップS2,NO)、続いて、デバッグ開始ボタン32が選択されたか否かを判定する(ステップS6)。 Then, the overall control unit determines whether or not the compile start button 31 has been selected (step S2). If the compile start button 31 is not selected (step S2, NO), it is subsequently determined whether or not the debug start button 32 is selected (step S6).
コンパイル開始ボタン31が選択された場合には(ステップS2,YES)、ステップS3〜S5の処理を実行する。すなわち、まず、ソースコードを最適化コンパイルして最適化機械語オブジェクト13を生成する(ステップS3)。また、ソースコードを最適化せずにコンパイルして(通常のコンパイルを行って;非最適化コンパイルと言う場合もあるものとする)、通常の(デバッグ可能な)機械語オブジェクトとしての非最適化機械語オブジェクト15を生成する(ステップS4)。そして、生成した最適化機械語オブジェクト13及び非最適化機械語オブジェクト15を、通信部14を介してPLC200にダウンロードする(ステップS5)。そして、ステップS6へ移行する。 When the compile start button 31 is selected (step S2, YES), the processes of steps S3 to S5 are executed. That is, first, the optimized machine language object 13 is generated by optimizing and compiling the source code (step S3). Also, compile the source code without optimization (perform normal compilation; it may be called non-optimized compilation), and de-optimize it as a normal (debuggable) machine language object A machine language object 15 is generated (step S4). Then, the generated optimized machine language object 13 and non-optimized machine language object 15 are downloaded to the PLC 200 via the communication unit 14 (step S5). Then, the process proceeds to step S6.
ここで、プログラミング装置100における上記コンパイラ12は、例えば、最適化用のコンパイラと非最適化用のコンパイラの2つのコンパイラから成るものと見做してもよい。この例の場合、上記ステップS3では最適化用のコンパイラが動作し、上記ステップS4では非最適化用のコンパイラが動作することになる。 Here, the compiler 12 in the programming device 100 may be regarded as comprising two compilers, for example, an optimization compiler and a non-optimization compiler. In this example, the optimization compiler operates in step S3, and the non-optimization compiler operates in step S4.
あるいは、上記コンパイラ12は、例えば、上記ステップS3の最適化コンパイル機能と、上記ステップS4の非最適化コンパイル機能の2つの機能を有するものと見做してもよい。この例では、当然、コンパイラ12は、最適化する機能によってステップS3の処理を行って最適化機械語オブジェクト13を生成し、最適化しない機能によってステップS4の処理を行って非最適化機械語オブジェクト15を生成することになる。但し、本質的には、この様な2つの機能を有するものは、上記2つのコンパイラから成るものと同じであると見做すことができる。 Alternatively, the compiler 12 may be regarded as having two functions, for example, the optimized compilation function in step S3 and the non-optimized compilation function in step S4. In this example, of course, the compiler 12 generates the optimized machine language object 13 by performing the process of step S3 with the function to be optimized, and performs the process of step S4 with the function that is not optimized to perform the process of step S4. 15 will be generated. However, it can be considered that the one having such two functions is essentially the same as the one composed of the two compilers.
尚、上記2つの機能の例の場合、上記全体制御部は、例えばコンパイラ12に対して所定のパラメータを与えることで、上記2つの機能(モード)を切り替えさせるようにしてもよい。つまり、例えば、最適化モードのパラメータをコンパイラ12に与えることでステップS3の処理を実行させ、非最適化モードのパラメータをコンパイラ12に与えることでステップS4の処理を実行させる。 In the example of the two functions, the overall control unit may switch the two functions (modes) by giving a predetermined parameter to the compiler 12, for example. That is, for example, the process of step S3 is executed by giving the parameter of the optimization mode to the compiler 12, and the process of step S4 is executed by giving the parameter of the non-optimization mode to the compiler 12.
上述したように、2つのコンパイラによって、あるいは1つのコンパイラをモードを切り替えて使用することで、最適化機械語オブジェクト13及び非最適化機械語オブジェクト15が、生成されることになる。 As described above, the optimized machine language object 13 and the non-optimized machine language object 15 are generated by using two compilers or by switching the mode of one compiler.
尚、最適化機械語オブジェクト13及び非最適化機械語オブジェクト15には、ソースコードに対して一意に識別するための上記識別番号が付与され、この識別番号とソースコードとの対応が容易に管理されるように、所定に対応表(不図示)が、上記コンパイル時に作成されるようにしてもよい。 The optimized machine language object 13 and the non-optimized machine language object 15 are given the identification numbers for uniquely identifying the source code, and the correspondence between the identification numbers and the source code is easily managed. As described above, a predetermined correspondence table (not shown) may be created at the time of compilation.
次に、ステップS6以降の処理について説明する。
まず、上記の通り、ステップS6では、デバッグ開始ボタン32が選択されたか否かを判定する。
Next, the process after step S6 is demonstrated.
First, as described above, in step S6, it is determined whether or not the debug start button 32 has been selected.
そして、デバッグ開始ボタン32が選択されたものではない場合には(ステップS6,NO)、ステップS13に移行して、本処理(支援処理)を終了するか否かを判定する。この判定は、例えば、上記図5の処理メニューの終了ボタン33が選択されたか否かを判定するものであり、もしユーザが終了ボタン33を選択操作したならば(ステップS13,YES)、本処理は終了する。一方、未だ終了ボタン33が操作されないならば(ステップS13,NO)ステップS1に戻る。 If the debug start button 32 is not selected (step S6, NO), the process proceeds to step S13 to determine whether or not to end the present process (support process). This determination is made, for example, to determine whether or not the end button 33 of the process menu in FIG. 5 has been selected. If the user selects the end button 33 (step S13, YES), this process is performed. Ends. On the other hand, if the end button 33 has not been operated yet (step S13, NO), the process returns to step S1.
一方、ユーザによってデバッグ開始ボタン32が選択されたならば(ステップS6,YES)、ステップS7〜S12の処理を実行する。
すなわち、まず、デバッグ時にPLCの処理を停止させるべき箇所(ユーザが任意に決める;通常、複数個所となる)に、それぞれ、“ブレークポイント”を設定させる(ステップS7)。これは、例えば不図示のブレークポイント設定画面を表示する等して、この画面上でユーザに所望の“ブレークポイント”箇所を設定させる。
On the other hand, if the debug start button 32 is selected by the user (step S6, YES), the processing of steps S7 to S12 is executed.
That is, first, “breakpoints” are set at locations where the PLC processing should be stopped at the time of debugging (which is arbitrarily determined by the user; usually, a plurality of locations) (step S7). This allows the user to set a desired “breakpoint” location on this screen, for example, by displaying a breakpoint setting screen (not shown).
尚、“ブレークポイント”の設定については後述するが、“ブレークポイント”とは、ソースコードにおける任意の位置に相当する箇所でプログラム実行を一時中止(一旦停止)させるための一種のマーカー(識別子)であり、その実現方法はどの様な形式であっても構わない。以降の説明では、一例として、ブレークポイント処理コード(ブレーク命令)を挿入する方法を用いるものとする。 The setting of “breakpoint” will be described later. “Breakpoint” is a kind of marker (identifier) for temporarily suspending (pausing) program execution at a position corresponding to an arbitrary position in the source code. Therefore, the realization method may be in any form. In the following description, as an example, a method of inserting a breakpoint processing code (break instruction) is used.
続いて、PLC200に対してデバッグ開始通知を送信する(ステップS8)。尚、このデバッグ開始通知には、例えば後述する図9のデバッグ情報(デバッグ対象となる機械語オブジェクトと“ブレークポイント”箇所の情報)が付加される。 Subsequently, a debug start notification is transmitted to the PLC 200 (step S8). Note that, for example, debug information shown in FIG. 9 (information about a machine language object to be debugged and a “breakpoint” portion) to be described later is added to the debug start notification.
そして、このデバッグ開始通知に対してPLC200から処理完了通知が返信されてくるまで待機し、この処理完了通知を受信したら(ステップS9、YES)ステップS10へ移行する。尚、上記処理完了通知は、PLC200側でブレークポイント処理コードの挿入処理(後述する)が完了したこと(PLC200側で準備完了したこと)を意味する通知である。 Then, the process waits until the process completion notification is returned from the PLC 200 in response to the debug start notification. When the process completion notification is received (YES in step S9), the process proceeds to step S10. The process completion notification is a notification indicating that the breakpoint processing code insertion process (described later) has been completed on the PLC 200 side (preparation has been completed on the PLC 200 side).
ステップS10の処理は、“実機デバッグ”の為の既存の処理であり、ここでは特に詳細には説明しないが、例えばPLC200の状態を表示して(例えばPLC200がブレークしたときのステータス表示等)デバッグを行うための処理である。ユーザは、例えば各ブレークポイント毎のステータス表示を参照しながら所定のデバッグ作業を行い、デバッグ作業が完了したならば、図5のデバッグ終了ボタン34を操作する。これにより、デバッグ処理終了と判定し(ステップS11,YES)、ステップS12の処理へ移行する。 The process in step S10 is an existing process for “real machine debugging”, and is not described in detail here. For example, the state of the PLC 200 is displayed (for example, a status display when the PLC 200 breaks) or the like. It is a process for performing. The user performs a predetermined debugging work while referring to the status display for each breakpoint, for example, and operates the debug end button 34 in FIG. 5 when the debugging work is completed. Thereby, it is determined that the debugging process is finished (step S11, YES), and the process proceeds to step S12.
ステップS12の処理では、デバッグ完了通知を通信部14を介してPLC200へ送信する。そして、上記ステップS13の判定処理を行う。
一方、PLC200は、例えば図6や図7に示す処理を実行する。
In the process of step S12, a debug completion notification is transmitted to the PLC 200 via the communication unit 14. And the determination process of said step S13 is performed.
On the other hand, the PLC 200 executes, for example, the processing shown in FIGS.
図6は、プログラマブルコントローラにおけるオブジェクト展開処理の一例を示すフローチャート図である。
図7は、プログラマブルコントローラにおけるデバッグ制御処理の一例を示すフローチャート図である。
FIG. 6 is a flowchart showing an example of object expansion processing in the programmable controller.
FIG. 7 is a flowchart illustrating an example of debug control processing in the programmable controller.
まず、図6の処理について説明する。尚、図6の処理は、上記オブジェクト展開部25の処理であると見做してもよい。上記ステップS5の処理によってプログラミング装置100側から機械語オブジェクトがダウンロードされると、図6の処理が実行される。 First, the process of FIG. 6 will be described. Note that the process of FIG. 6 may be regarded as the process of the object development unit 25. When the machine language object is downloaded from the programming device 100 side in the process of step S5, the process of FIG. 6 is executed.
すなわち、まず、受信した機械語オブジェクトが、最適化されたものであるか否かを判定する(ステップS20)。これは既に述べたように、受信パケットの種別42を参照して判定する。つまり、種別42が‘1’である場合には最適化されたものであると判定して(ステップS20,YES)ステップS21へ移行する。種別42が‘2’である場合には最適化されたものではないと判定して(ステップS20,NO)ステップS23へ移行する。 That is, first, it is determined whether or not the received machine language object is optimized (step S20). As already described, this is determined with reference to the received packet type 42. That is, when the type 42 is “1”, it is determined that the type 42 is optimized (step S20, YES), and the process proceeds to step S21. If the type 42 is “2”, it is determined that the type 42 is not optimized (NO in step S20), and the process proceeds to step S23.
ステップS21では、受信パケットの機械語オブジェクト43を最適化機械語オブジェクト22としてユーザプログラムメモリ213に格納する。これは、例えば、受信した機械語オブジェクト43を、ユーザプログラムメモリ213内の不図示の最適化機械語オブジェクト保存領域(予め決められている;保存領域αとする)内の任意の格納領域に転送・格納するものである。更に、受信パケットの識別番号41と上記機械語オブジェクト43の転送先アドレス(格納アドレス;保存領域α内の格納領域の先頭アドレス等)とを対応付けて、不図示のバックアップ領域に記憶するようにしてもよい。 In step S21, the machine language object 43 of the received packet is stored in the user program memory 213 as the optimized machine language object 22. For example, the received machine language object 43 is transferred to an arbitrary storage area in an optimization machine language object storage area (not shown) in the user program memory 213 (predetermined; storage area α).・ It is to be stored. Further, the identification number 41 of the received packet and the transfer destination address (storage address; the start address of the storage area in the storage area α) of the machine language object 43 are associated with each other and stored in a backup area (not shown). May be.
上記ステップS21の処理に続いて、最適化機械語オブジェクトである上記機械語オブジェクト43の転送先アドレス(格納アドレス;上記保存領域α内の格納領域の先頭アドレス等)を、アドレステーブル24に書き込む(ステップS22)ことで、本処理を終了する。 Following the processing of step S21, the transfer destination address (storage address; the top address of the storage area in the storage area α, etc.) of the machine language object 43, which is an optimized machine language object, is written into the address table 24 ( In step S22), the process is terminated.
一方、上記のようにステップS20の判定がNOの場合にはステップS23を実行する。ステップS23では、受信パケットの機械語オブジェクト43を非最適化機械語オブジェクト23としてユーザプログラムメモリ213に格納する。これは、例えば、機械語オブジェクト43を、ユーザプログラムメモリ213内の不図示の非最適化機械語オブジェクト保存領域(予め決められている;保存領域βとする)内の任意の格納領域に転送・格納するものである。更に、受信パケットの識別番号41と上記機械語オブジェクト43の転送先アドレス(格納アドレス;保存領域β内の格納領域の先頭アドレス等)とを対応付けて、不図示のバックアップ領域に記憶するようにしてもよい。 On the other hand, if the determination in step S20 is NO as described above, step S23 is executed. In step S23, the machine language object 43 of the received packet is stored in the user program memory 213 as the non-optimized machine language object 23. For example, the machine language object 43 is transferred to an arbitrary storage area in a non-optimized machine language object storage area (not shown) in the user program memory 213 (predetermined; storage area β). To store. Further, the identification number 41 of the received packet and the transfer destination address (storage address; the start address of the storage area in the storage area β) of the machine language object 43 are associated with each other and stored in a backup area (not shown). May be.
次に、以下、図7のデバッグ制御処理について説明する。尚、図7の処理は、上記デバッグ制御部26の処理であると見做してもよい。
図7の処理は、上記ステップS7やS8の処理に伴ってプログラミング装置100側から送られてくるデバッグ開始通知(上記の通り、デバッグ情報(一例を図9に示す)が付加されている)を受信することで開始する。図9に示す例では、デバッグ情報は、識別番号51とブレーク位置52から成る。識別番号51は、上記識別番号41と同様であるが、ここでは特にデバッグ対象のソースコードに対応する機械語オブジェクトを示すIDを意味する。ブレーク位置52は、例えば上記ステップS7で設定されたブレークポイントの位置を示す情報であり、複数あってもよい。
Next, the debug control process of FIG. 7 will be described below. Note that the process of FIG. 7 may be regarded as the process of the debug control unit 26.
The processing of FIG. 7 is a debug start notification (with debug information (an example shown in FIG. 9 is added) as described above) sent from the programming device 100 side in the processing of steps S7 and S8. Start by receiving. In the example shown in FIG. 9, the debug information includes an identification number 51 and a break position 52. The identification number 51 is the same as the identification number 41, but here means an ID indicating a machine language object corresponding to the source code to be debugged. The break position 52 is information indicating the position of the break point set in step S7, for example, and there may be a plurality of break positions.
デバッグ制御部26は、上記受信したデバッグ情報に基づいて、まず、上記不図示のバックアップ領域を参照することで、上記識別番号51に対応する非最適化機械語オブジェクト23の格納アドレス(保存領域β内の格納領域の先頭アドレス等)を取得する。そして、この格納アドレスをアドレステーブル24に上書きする(ステップS30)。これによって、プログラム実行部27が最適化機械語オブジェクト22を実行する状態から、非最適化機械語オブジェクト23を実行する状態へと切り換わる。 Based on the received debug information, the debug control unit 26 first refers to the backup area (not shown) to store the storage address (save area β) of the non-optimized machine language object 23 corresponding to the identification number 51. In the storage area within the storage area). Then, this storage address is overwritten on the address table 24 (step S30). As a result, the program execution unit 27 switches from a state in which the optimized machine language object 22 is executed to a state in which the non-optimized machine language object 23 is executed.
続いて、上記ブレーク位置52を参照してブレークポイントの位置を認識し、認識した位置にブレークポイント処理コード(ブレーク命令)を挿入する(ステップS31)。そして、挿入処理が終了したか否かを判定する(ステップS32)。つまり、ブレーク位置52は複数あってもよいので、未処理のブレーク位置52がある場合には挿入処理は未終了と判定して(ステップS32,NO)ステップS31に戻り、未処理のブレーク位置52に関して上記ブレークポイント処理コードを挿入する処理を行う。 Subsequently, the breakpoint position is recognized with reference to the break position 52, and a breakpoint processing code (break instruction) is inserted at the recognized position (step S31). Then, it is determined whether or not the insertion process has been completed (step S32). That is, since there may be a plurality of break positions 52, if there is an unprocessed break position 52, it is determined that the insertion process has not been completed (step S32, NO), and the process returns to step S31. The above breakpoint processing code is inserted.
そして、全てのブレーク位置52に関して挿入処理が終了したならば(ステップS32,YES)、上記“処理完了通知”を通信部21を介してプログラミング装置100に送信する(ステップS33)。 If the insertion process is completed for all break positions 52 (step S32, YES), the “processing completion notification” is transmitted to the programming device 100 via the communication unit 21 (step S33).
その後は、特に図示・説明は行わないが、PLC200において、上記ステップS10のデバッグ処理に係る既存の処理(プログラム実行部27による非最適化機械語オブジェクト23の実行とブレークポイントにおける停止およびそのときの状態をプログラミング装置100へ送信するなど)が実行される。 Thereafter, although not shown or described in particular, in the PLC 200, the existing processing related to the debugging processing in the step S10 (execution of the non-optimized machine language object 23 by the program execution unit 27 and stop at the breakpoint and at that time) The status is transmitted to the programming device 100, etc.).
一方、デバッグ制御部26自体は、プログラミング装置100から上記デバッグ完了通知が送られてくるまで待機する(ステップS34)。そして、プログラミング装置100からの上記デバッグ完了通知を受信したならば(ステップS34,YES)、アドレステーブル24の格納内容を、最適化機械語オブジェクト22の格納アドレスに変更して、本処理を終了する。 On the other hand, the debug control unit 26 waits until the debug completion notification is sent from the programming device 100 (step S34). If the debug completion notification is received from the programming device 100 (YES in step S34), the stored content of the address table 24 is changed to the storage address of the optimized machine language object 22, and this process is terminated. .
上記本例のプログラマブルコントローラシステムについて、以下、具体例を用いて更に詳細に説明する。
プログラミング装置100を使用してPLC200に機械語オブジェクトをダウンロードする為には、ユーザは、まず、プログラミング装置100のユーザインタフェース部11の上記機能によって、ニーモニック言語、あるいはラダー言語、FBD言語等の図形言語で記述した、制御プログラムのソースコードを作成する。次に、ユーザは、作成したソースコードをコンパイルさせて機械語オブジェクトを生成させる。これは、例えば、プログラミング装置100の表示器103に上記図5の処理メニュー画面を表示させて、上記コンパイル開始ボタン31を選択・指示することで実現させる。この指示に応じて、コンパイラ12は、上記ソースコードをコンパイルして上記最適化機械語オブジェクト13を生成し、これを不図示の記憶領域に格納する。
Hereinafter, the programmable controller system of the present example will be described in more detail using specific examples.
In order to download a machine language object to the PLC 200 using the programming device 100, the user first uses a mnemonic language or a graphic language such as a ladder language or FBD language by the above function of the user interface unit 11 of the programming device 100. Create the source code of the control program described in. Next, the user compiles the created source code to generate a machine language object. This is realized, for example, by displaying the processing menu screen of FIG. 5 on the display 103 of the programming device 100 and selecting / instructing the compile start button 31. In response to this instruction, the compiler 12 compiles the source code to generate the optimized machine language object 13 and stores it in a storage area (not shown).
最適化機械語オブジェクト13は、例えばソースコードの実行順序の変更、レジスタの有効活用等が行われてコードサイズが縮小された(すなわち、最適化された)機械語オブジェクトである。最適化機械語オブジェクト13は、例えばPOU(Program Organization Unit)毎に生成される。POUとは、プログラム構成単位であり、PLC200の言語要素である。尚、POUの種類は、アプリケーションプログラム、ファンクションブロック等があり、C言語における関数に相当するものである。 The optimized machine language object 13 is a machine language object whose code size is reduced (that is, optimized) by changing the execution order of source code, effectively using registers, and the like. The optimized machine language object 13 is generated for each POU (Program Organization Unit), for example. The POU is a program constituent unit and is a language element of the PLC 200. Note that POU types include application programs and function blocks, and correspond to functions in the C language.
また、コンパイラ12は、上記コンパイルの際、更に非最適化機械語オブジェクト15も生成し、これを不図示の記憶領域に格納する。非最適化機械語オブジェクト15は、上記のような最適化が行われていない機械語オブジェクトである(つまり、通常のコンパイル処理によって生成される通常の機械語オブジェクトであり、当然、ソースコードレベルの実機デバッグが可能となるものである)。非最適化機械語オブジェクト15も、POU毎に生成される。 The compiler 12 also generates a non-optimized machine language object 15 at the time of the above compilation, and stores it in a storage area (not shown). The non-optimized machine language object 15 is a machine language object that has not been optimized as described above (that is, a normal machine language object generated by a normal compile process. Real machine debugging is possible). A non-optimized machine language object 15 is also generated for each POU.
プログラミング装置100は、上述したコンパイル処理が終了すると、上記生成した2種類の機械語オブジェクト(最適化機械語オブジェクト13と非最適化機械語オブジェクト15)を、通信部14を介してPLC200へダウンロードする。 When the above-described compiling process is completed, the programming device 100 downloads the generated two types of machine language objects (the optimized machine language object 13 and the non-optimized machine language object 15) to the PLC 200 via the communication unit 14. .
このとき、既に述べたように例えば図8に示すように、各POU毎の機械語オブジェクトは、それぞれ、その機械語オブジェクト(本体)43に、上記識別番号41及び種別42が付加されて、PLC200へダウンロードされる。 At this time, as already described, for example, as shown in FIG. 8, the machine language object for each POU has the identification number 41 and the type 42 added to the machine language object (main body) 43. To be downloaded.
識別番号41及び種別42に関しては既に述べた通りであり、識別番号はソースコード毎に与えられるものと見做してよいが、ここではソースコードはPOU単位で扱うものとする。従って、ここでは識別番号は各POUに固有の識別用IDであると見做してもよい。これより、本例では、任意の1つのPOUについて生成された2つの機械語オブジェクト(最適化機械語オブジェクト13と非最適化機械語オブジェクト15)には、同一の識別番号(そのPOUの識別番号)が与えられる。 The identification number 41 and the type 42 are as described above, and it may be considered that the identification number is given for each source code. Here, however, the source code is handled in POU units. Therefore, here, the identification number may be regarded as an identification ID unique to each POU. Thus, in this example, two machine language objects (optimized machine language object 13 and non-optimized machine language object 15) generated for any one POU have the same identification number (the identification number of that POU). ) Is given.
PLC200は、プログラミング装置100からのデータパケット(上記機械語オブジェクト(本体)43に、上記識別番号41及び種別42が付加されたパケット)を受信すると、その機械語オブジェクト43をユーザプログラムメモリ213に格納すると共に、それが最適化された機械語オブジェクトである場合には、その格納アドレスをアドレステーブル24に登録する。 When the PLC 200 receives a data packet (a packet in which the identification number 41 and the type 42 are added to the machine language object (main body) 43) from the programming device 100, the PLC 200 stores the machine language object 43 in the user program memory 213. At the same time, if it is an optimized machine language object, its storage address is registered in the address table 24.
ここで、例えば図10に示すように、受信したデータパケット55が、4つの機械語オブジェクト(55a,55b,55c,55d)を含むものであったとする。図10に示すように、これら4つの機械語オブジェクト(55a,55b,55c,55d)それぞに、上記識別番号41及び種別42が付加されている。 Here, for example, as shown in FIG. 10, it is assumed that the received data packet 55 includes four machine language objects (55a, 55b, 55c, 55d). As shown in FIG. 10, the identification number 41 and the type 42 are added to each of these four machine language objects (55a, 55b, 55c, 55d).
ここでは仮に図10に示すように、機械語オブジェクト55a、55bは、種別42=‘1’(つまり最適化機械語オブジェクト)であり、機械語オブジェクト55c、55dは、種別42=‘2’(つまり非最適化機械語オブジェクト)であるものとする。また、機械語オブジェクト55aと55cとが同じPOUから生成されたものであり、同一の識別番号(識別番号1)が与えられている。同様に、機械語オブジェクト55bと55dとが同じPOUから生成されたものであり、同一の識別番号(識別番号2)が与えられている。 Here, as shown in FIG. 10, the machine language objects 55a and 55b are of the type 42 = '1' (that is, the optimized machine language object), and the machine language objects 55c and 55d are of the type 42 = '2' ( That is, it is assumed that it is a non-optimized machine language object). The machine language objects 55a and 55c are generated from the same POU and are given the same identification number (identification number 1). Similarly, the machine language objects 55b and 55d are generated from the same POU and are given the same identification number (identification number 2).
また、ここでは、ユーザプログラムメモリ213における上記最適化機械語オブジェクト保存領域(保存領域α)は、0番地〜7FFF番地であり、非最適化機械語オブジェクト保存領域(保存領域β)は、8000番地以降であるものとする。 Here, the optimized machine language object storage area (storage area α) in the user program memory 213 is address 0 to 7FFF, and the non-optimized machine language object storage area (storage area β) is address 8000. It shall be after that.
以上の具体例の場合、上記データパケット55を受信したPLC200は、まず、上記の通り機械語オブジェクト55a、55bは最適化機械語オブジェクトであると判別するので、これらを上記最適化機械語オブジェクト保存領域(保存領域α)に転送・格納する。これは、例えば識別番号41を参照して識別番号順に(例えば番号が若い順に)格納するが、この例に限らない。また、本例では1000番地区切りで管理するものとする。これより例えば図10に示すように、機械語オブジェクト55aは先頭アドレス=0番地の領域に格納され、機械語オブジェクト55bは先頭アドレス=1000番地の領域に格納される(そして、通常は空き領域が生じることになる)。 In the case of the above specific example, the PLC 200 that has received the data packet 55 first determines that the machine language objects 55a and 55b are optimized machine language objects as described above. Transfer / store in area (storage area α). This is stored in order of identification numbers (for example, in ascending order of numbers) with reference to the identification number 41, but is not limited to this example. Further, in this example, management is performed by dividing into 1000 addresses. Thus, for example, as shown in FIG. 10, the machine language object 55a is stored in the area of the start address = 0 address, and the machine language object 55b is stored in the area of the start address = 1000 address (and usually the free area is Will occur).
更に、これら各格納領域の先頭アドレス(0番地と1000番地)を、図示のように、アドレステーブル24に登録する。すなわち、アドレステーブル24の識別番号1用のアドレス欄には「0000」番地が格納され、識別番号2用のアドレス欄には「1000」番地が格納される。また、これら各格納領域の先頭アドレス(0番地と1000番地)は、その格納領域に格納された機械語オブジェクトの識別番号と対応付けされて、不図示のバックアップ領域に記憶される。 Further, the top addresses (address 0 and address 1000) of these storage areas are registered in the address table 24 as shown. That is, “0000” is stored in the address field for the identification number 1 in the address table 24, and “1000” is stored in the address field for the identification number 2. The head addresses (address 0 and address 1000) of these storage areas are stored in a backup area (not shown) in association with the machine language object identification number stored in the storage area.
一方、上記の通り機械語オブジェクト55c、55dは非最適化機械語オブジェクトであると判別されるので、これらを上記非最適化機械語オブジェクト保存領域(保存領域β)に転送・格納する。これも、例えば識別番号41を参照して識別番号順に(例えば番号が若い順に)格納するが、この例に限らない。これより例えば図10に示すように、機械語オブジェクト55cは先頭アドレス=8000番地の領域に格納され、機械語オブジェクト55dは先頭アドレス=9000番地の領域に格納される。 On the other hand, since the machine language objects 55c and 55d are determined to be non-optimized machine language objects as described above, they are transferred and stored in the non-optimized machine language object storage area (storage area β). This is also stored in order of identification numbers (for example, in ascending order of numbers) with reference to the identification number 41, but is not limited to this example. Thus, for example, as shown in FIG. 10, the machine language object 55c is stored in the area of the start address = 8000, and the machine language object 55d is stored in the area of the start address = 9000.
また、これら各格納領域の先頭アドレス(8000番地と9000番地)は、その格納領域に格納された機械語オブジェクトの識別番号と対応付けされて、不図示のバックアップ領域に記憶される。但し、これらは非最適化機械語オブジェクトであるので、上記アドレステーブル24への登録は行われない(後に、デバッグ処理の際に一時的に登録される)。 The head addresses (addresses 8000 and 9000) of each storage area are stored in a backup area (not shown) in association with the identification number of the machine language object stored in the storage area. However, since these are non-optimized machine language objects, they are not registered in the address table 24 (later registered temporarily in the debugging process).
尚、図示のように、機械語オブジェクト55aと55cは両方とも識別番号が‘1’である。これは、同一のPOUについて最適化コンパイルしたことで機械語オブジェクト55aが生成され、非最適化コンパイルしたことで機械語オブジェクト55cが生成されたことを意味する。これは機械語オブジェクト55bと55d(両方とも識別番号が‘2’)についても同様である。 As shown in the figure, both machine language objects 55a and 55c have the identification number "1". This means that the machine language object 55a is generated by performing optimization compilation for the same POU, and the machine language object 55c is generated by performing non-optimization compilation. The same applies to the machine language objects 55b and 55d (both have an identification number “2”).
上述したように、PLC200は、受信した複数の機械語オブジェクトを、最適化機械語オブジェクトと非最適化機械語オブジェクトとに分類したうえで、それぞれの保存領域(α、β)に例えば識別番号順に格納する。 As described above, the PLC 200 classifies the received plurality of machine language objects into optimized machine language objects and non-optimized machine language objects, and then assigns them to respective storage areas (α, β), for example, in the order of identification numbers. Store.
その後、PLC200は、アドレステーブル24を参照して制御プログラム(機械語オブジェクト)を実行する。すなわち、アドレステーブル24を参照して、該アドレステーブル24のアドレスデータを間接アドレス指定して、機械語オブジェクトを実行する。通常時は、アドレステーブル24には上記のように最適化機械語オブジェクト22の格納アドレス(格納領域の先頭アドレス)が登録されているので、PLC200は最適化機械語オブジェクト22を実行することになり、高速化が図られている。 Thereafter, the PLC 200 refers to the address table 24 and executes a control program (machine language object). That is, referring to the address table 24, the address data of the address table 24 is indirectly addressed and the machine language object is executed. Normally, the storage address of the optimized machine language object 22 (the start address of the storage area) is registered in the address table 24 as described above, so the PLC 200 executes the optimized machine language object 22. , Speeding up.
一方、ユーザは、デバッグを行う場合には、上記のようにプログラミング装置100のメニュー画面上でデバッグ開始ボタン32を選択・指定することで、デバッグ処理を開始させる。ユーザは、まず、所望のソースコードにブレークポイントを設定する。つまり、所望のソースコードをオープンして、任意の箇所(行など)にブレークポイントを設定する(複数個所に設定してもよい)。但し、このソースコードは、新規のものではなく、既にコンパイル済みでありその機械語オブジェクトをPLC200へダウンロード済みであるプログラムのソースコードである。 On the other hand, when debugging, the user selects and designates the debug start button 32 on the menu screen of the programming device 100 as described above to start the debugging process. The user first sets a breakpoint in a desired source code. That is, a desired source code is opened, and breakpoints are set at arbitrary locations (lines, etc.) (may be set at a plurality of locations). However, this source code is not new, but is a source code of a program that has already been compiled and the machine language object has been downloaded to the PLC 200.
尚、上記識別番号は、ソースコードの識別用IDであるものとする例に限らず、例えばソースコードをコンパイルして機械語オブジェクトを生成したときに、この機械語オブジェクトに対して生成・付与するものとしてもよい。但し、この場合でも既に述べた通り、同じソースコードから複数の(2つの)機械語オブジェクトが生成される場合には、この複数の(2つの)機械語オブジェクトには同一の識別番号が付与されることになる。 The identification number is not limited to an example of an ID for identifying a source code. For example, when a machine language object is generated by compiling a source code, the identification number is generated and assigned to the machine language object. It may be a thing. However, even in this case, as already described, when a plurality of (two) machine language objects are generated from the same source code, the same identification number is assigned to the plurality of (two) machine language objects. Will be.
ここで、プログラミング装置100は、上記ソースコードをコンパイルした際に、そのファイル名(ソースコード名)と、これをコンパイルして得た機械語オブジェクトの識別番号とを対応付けるテーブル(不図示;ソースコード識別番号対応テーブルというものとする)を、不図示の記憶領域に保持している。これより、ユーザによって開かれているソースコードのソースコード名に対応する機械語オブジェクトの識別番号を、このソースコード識別番号対応テーブルを参照することで獲得できる。 Here, when compiling the source code, the programming device 100 associates the file name (source code name) with the machine language object identification number obtained by compiling the table (not shown; source code). An identification number correspondence table) is held in a storage area (not shown). Thus, the machine language object identification number corresponding to the source code name of the source code opened by the user can be obtained by referring to this source code identification number correspondence table.
そして、獲得した識別番号と上記ユーザによるブレークポイント設定内容に基づいて、上記図9に示すデバッグ情報を生成する。すなわち、プログラミング装置100は、上記ユーザによって指定されたブレークポイントの位置(行など)を認識して、これを図9のデバッグ情報のブレーク位置52とすると共に、上記獲得した識別番号を識別番号51とするデバッグ情報を生成する。そして、このデバッグ情報をPLC200へ送信する。 Then, based on the acquired identification number and the breakpoint setting content by the user, the debug information shown in FIG. 9 is generated. That is, the programming device 100 recognizes the position (line or the like) of the breakpoint designated by the user, sets this as the break position 52 of the debug information in FIG. 9, and uses the acquired identification number as the identification number 51. Debug information is generated. Then, this debug information is transmitted to the PLC 200.
但し、上述したことは一例であり、識別番号は予め各POU毎に付与されているものであってもよい。
図11に示す例では、上記デバッグ情報は、識別番号51=‘2’であり、ブレーク位置52=‘2’となっている。
However, what has been described above is an example, and the identification number may be assigned in advance for each POU.
In the example shown in FIG. 11, the debug information has the identification number 51 = “2” and the break position 52 = “2”.
ここで、従来からある既存技術として、コンパイラは、例えばソースコードがニーモニック言語等である場合(換言すれば、図形言語プログラムではない場合)、ソースコードをコンパイルすることで、ソースコードの各行が、機械語オブジェクトのどの位置(どの行;但し、1対1の関係とは限らない)に変換されたのかを記録している。つまり、ソースコードの各行と、機械語オブジェクトの各位置(各行)との関連付けが可能となっている。 Here, as a conventional technique, the compiler, for example, when the source code is a mnemonic language or the like (in other words, not a graphic language program), each line of the source code is compiled by compiling the source code. It records which position (which row; however, it is not necessarily a one-to-one relationship) of the machine language object. That is, it is possible to associate each line of the source code with each position (each line) of the machine language object.
これより、プログラミング装置100において、ソースコードにおける上記ユーザによるブレークポイント設定位置(行)に対応する機械語オブジェクト上の位置(行)が分かるので、これを上記ブレーク位置52とすることになる。よって、上記図11の例のように、ブレーク位置52=‘2’となっている場合、これはソースコード上におけるブレークポイント設定位置に対応する機械語オブジェクト上の位置が、2行目であることを意味している(尚、ソースコード上におけるブレークポイント設定位置は、図11だけを見ても分からない。例えば1行目かもしれないし2行目かもしれない)。 As a result, in the programming device 100, since the position (line) on the machine language object corresponding to the breakpoint setting position (line) by the user in the source code is known, this is set as the break position 52. Therefore, when the break position 52 = '2' as in the example of FIG. 11, the position on the machine language object corresponding to the breakpoint setting position on the source code is the second line. (Note that the breakpoint setting position on the source code is not understood even if only FIG. 11 is seen. For example, it may be the first line or the second line).
また、上記のことは、ソースコードがニーモニック言語等である場合に限らず、図形言語プログラムである場合も、略同様である。すなわち、プログラミング装置100は、ユーザが任意の図形言語プログラム(ソースコード)上の任意の位置(図形)にブレークポイントを設定すると、この位置(図形)に対応する機械語オブジェクト上の位置(行)が分かるので、これを上記ブレーク位置52とすることになる。これは、例えば、任意の図形言語プログラム(ソースコード)を、一旦、中間コードに変換するが、その際、図形はある一定の規則で中間コードに変換できるので、図形の位置と、その図形が変換された中間コードの位置(行)とをコンパイラ12が記録できる。よって、この図形言語プログラム(ソースコード)上にブレークポイント設定されていた場合、ソースコード上におけるブレークポイント設定位置(図形)に対応する中間コード上の位置(行)も、分かることになる。 Further, the above is not limited to the case where the source code is a mnemonic language or the like, but is substantially the same when the source code is a graphic language program. That is, when the user sets a breakpoint at an arbitrary position (graphic) on an arbitrary graphic language program (source code), the programming device 100 sets a position (line) on a machine language object corresponding to this position (graphic). Therefore, this is set as the break position 52. For example, an arbitrary graphic language program (source code) is temporarily converted into intermediate code. At this time, the graphic can be converted into intermediate code according to a certain rule. The compiler 12 can record the position (line) of the converted intermediate code. Therefore, when a breakpoint is set on the graphic language program (source code), the position (line) on the intermediate code corresponding to the breakpoint setting position (graphic) on the source code is also known.
よって、この様な中間コード上のブレークポイント位置(行)を記録しておけば、後は、この中間コードを機械語オブジェクトに変換する際に、上記ニーモニック言語等の場合と略同様にして、機械語オブジェクト上でのブレークポイント位置(行)が分かるので、これを上記ブレーク位置52とすることになる。 Therefore, if such a breakpoint position (line) on the intermediate code is recorded, after that, when this intermediate code is converted into a machine language object, in the same manner as in the case of the mnemonic language or the like, Since the break point position (line) on the machine language object is known, this is used as the break position 52 described above.
PLC200は、この例のようなデバッグ情報を受信した場合、まず、その識別番号51=‘2’に応じて、アドレステーブル24における識別番号‘2’用アドレス欄に保持されたアドレス「1000」を、識別番号=‘2’の非最適化機械語オブジェクトである非最適化機械語オブジェクト55dが格納されたアドレスを指すように更新する(つまり、「9000」に更新する)。尚、このアドレス「9000」は、上記不図示のバックアップ領域を参照することで取得できる。上記の通り、上記ダウンロードされた非最適化機械語オブジェクトを保存領域βに転送・格納する際に、上記不図示のバックアップ領域に各非最適化機械語オブジェクトに関してその識別番号に対応付けてその格納アドレスが記憶されているので、これを参照することで、識別番号=‘2’に対応する格納アドレス(ここでは「9000」)が取得できる。 When receiving the debug information as in this example, the PLC 200 first sets the address “1000” held in the address field for the identification number “2” in the address table 24 according to the identification number 51 = “2”. The non-optimized machine language object 55d, which is the non-optimized machine language object with the identification number = “2”, is updated to point to the stored address (that is, updated to “9000”). The address “9000” can be acquired by referring to the backup area (not shown). As described above, when the downloaded non-optimized machine language object is transferred / stored in the storage area β, the non-optimized machine language object is stored in the backup area (not shown) in association with its identification number. Since the address is stored, the storage address (here, “9000”) corresponding to the identification number = “2” can be acquired by referring to the address.
PLC200は、このようにしてアドレステーブル24における識別番号‘2’用アドレス欄を更新したら、続いて、上記識別番号‘2’の非最適化機械語オブジェクト55dにおいて、上記デバッグ情報のブレーク位置52によって示される箇所(行)に、ブレークポイント処理コード(ブレーク命令)を挿入する。図11に示す例ではデバッグ情報のブレーク位置52は‘2’であるので、非最適化機械語オブジェクト55dの2行目にブレークポイント処理コードを挿入する。但し、ブレーク位置52は1つとは限らず、複数個所あってもよく、それぞれについて該当する箇所(行)にブレークポイント処理コードを挿入する。 After updating the address field for the identification number “2” in the address table 24 in this way, the PLC 200 subsequently updates the non-optimized machine language object 55d with the identification number “2” according to the break position 52 of the debug information. Insert breakpoint processing code (break instruction) at the indicated location (line). In the example shown in FIG. 11, since the break position 52 of the debug information is “2”, the breakpoint processing code is inserted in the second line of the non-optimized machine language object 55d. However, the number of break positions 52 is not limited to one, and a plurality of break positions 52 may be provided, and a breakpoint processing code is inserted into a corresponding place (line) for each.
そして、全ての該当箇所にブレークポイント処理コードを挿入したら、上記処理完了通知をプログラミング装置100へ送信する。
その後、PLC200のプログラム実行部27は、識別番号‘2’のPOUに関しては、非最適化機械語オブジェクト23(ここでは55d)を実行することになる。そして、このオブジェクト55dを実行中に、ブレークポイント処理コード(上記例では2行目に挿入されている)を実行した時点で、当該オブジェクト55dの実行を停止し、待機状態となる。そして、例えば、プログラムをブレーク(停止)したこと、及び所定のデータ(たとえばCPU211のレジスタ値や入出力モジュール222の入出力データなど)を、プログラミング装置100へ送信する。
Then, when the breakpoint processing code is inserted in all the corresponding portions, the processing completion notification is transmitted to the programming device 100.
Thereafter, the program execution unit 27 of the PLC 200 executes the non-optimized machine language object 23 (here, 55d) for the POU with the identification number “2”. Then, when the breakpoint processing code (inserted in the second line in the above example) is executed while the object 55d is being executed, the execution of the object 55d is stopped and a standby state is entered. Then, for example, the program breaks (stops) and predetermined data (for example, the register value of the CPU 211 and the input / output data of the input / output module 222) are transmitted to the programming device 100.
尚、上記の通り、非最適化機械語オブジェクト23を実行するのは識別番号‘2’のPOUに関するものだけであり、それ以外のPOUに関しては引き続き最適化機械語オブジェクト22を実行することになる。 As described above, the non-optimized machine language object 23 is executed only for the POU with the identification number “2”, and the optimized machine language object 22 is continuously executed for the other POUs. .
プログラミング装置100は、PLC200からの上記処理完了通知を受信した後は、例えば、PLC200から上記ブレーク時に送信される上記所定のデータ等の受信待ち状態となり、上記所定のデータ等を受信する毎に、このデータ(上記レジスタ値や入出力データなど)を表示器103に表示することで、ユーザにブレーク状態を通知する(デバッグ処理)。そして、ユーザは、デバッグ作業終了の際には上記デバッグ終了ボタン34を選択・操作するので、これに応じてプログラミング装置100は上記デバッグ完了通知をPLC200へ送信する。 After receiving the processing completion notification from the PLC 200, for example, the programming device 100 waits for reception of the predetermined data transmitted from the PLC 200 at the time of the break, and every time the predetermined data is received, By displaying this data (the register value, the input / output data, etc.) on the display unit 103, the break state is notified to the user (debugging process). The user selects and operates the debug end button 34 at the end of the debug operation, and accordingly, the programming device 100 transmits the debug completion notification to the PLC 200.
上記デバッグ完了通知を受信したPLC200は、アドレステーブル24の格納内容を、デバッグ時用から通常用へ切り替える。すなわち、アドレステーブル24における識別番号‘2’用アドレス欄に保持されている上記アドレス「9000」を、元のアドレス「1000」に戻す。これによって、識別番号‘2’のPOUに関して、最適化機械語オブジェクト22(55b)が実行される状態に戻る。PLC200は、更に、識別番号‘2’の非最適化機械語オブジェクト23(55d)に挿入されたブレークポイント処理コードを削除する。上記の例では、非最適化機械語オブジェクト55dの2行目に挿入されていたブレークポイント処理コードを削除する。このようにして、PLC200は、デバッグ状態から運用状態(通常時)に復帰する。これは、本例では、識別番号‘2’のPOUに関しては最適化機械語オブジェクト22の実行を再開し、それ以外のPOUに関しては引き続き最適化機械語オブジェクト22を実行することになる。 The PLC 200 that has received the debug completion notification switches the content stored in the address table 24 from the debug time to the normal time. That is, the address “9000” held in the address field for the identification number “2” in the address table 24 is returned to the original address “1000”. Thus, the state returns to the state in which the optimized machine language object 22 (55b) is executed for the POU with the identification number “2”. The PLC 200 further deletes the breakpoint processing code inserted in the non-optimized machine language object 23 (55d) having the identification number “2”. In the above example, the breakpoint processing code inserted in the second line of the non-optimized machine language object 55d is deleted. In this way, the PLC 200 returns from the debug state to the operation state (normal time). In this example, the execution of the optimized machine language object 22 is resumed for the POU with the identification number “2”, and the optimized machine language object 22 is continuously executed for the other POUs.
尚、PLC200には、通常、複数のPOUに対応する機械語オブジェクトが実装され、これら複数の機械語オブジェクトが連携して動作することで所定の制御処理が実行されるように構成されているため、運用状態からデバッグ状態への切り替えの際のアドレステーブル24へのアドレスデータの登録や、デバッグ状態から運用状態に復帰する際のアドレステーブル24へのアドレスデータの登録は、PLC200が制御機器300を制御するための制御周期に同期して実行することが望ましい。 Note that the PLC 200 is usually configured with machine language objects corresponding to a plurality of POUs, and the plurality of machine language objects operate in cooperation to execute predetermined control processing. When the address data is registered in the address table 24 at the time of switching from the operating state to the debug state and the address data is registered in the address table 24 at the time of returning from the debug state to the operating state, the PLC 200 controls the control device 300. It is desirable to execute in synchronization with the control cycle for controlling.
以上説明した実施の形態を、実施例1とする。
ここで、上記実施例1のようにプログラミング装置側で1つのソースコードに対して2つのコンパイラによって最適化と非最適化の2種類の機械語オブジェクトを生成してPLC側にダウンロードし、PLC側でこれら2種類の機械語オブジェクトの両方を実行する(実行時期は異なる)構成の場合、この2種類の機械語オブジェクトの実行論理(演算結果)が同一となることが必要となる。もし同一ソースコードに係わる2種類の機械語オブジェクトの演算結果が異なると、これら2種類の機械語オブジェクトを切り替えて実行した場合、システムの動作が不安定となり、ユーザに存在を与える可能性がある。
The embodiment described above is referred to as Example 1.
Here, as in the first embodiment, two types of machine language objects of optimization and non-optimization are generated and downloaded to the PLC side by two compilers on one source code on the programming device side, and downloaded to the PLC side. In the case of a configuration in which both of these two types of machine language objects are executed (with different execution times), the execution logic (calculation results) of these two types of machine language objects must be the same. If the operation results of two types of machine language objects related to the same source code are different, if these two types of machine language objects are switched and executed, the operation of the system may become unstable and may give the presence to the user. .
しかしながら、ソースコードがニーモニック言語で記述される場合はともかく、ラダー言語、FBD言語等の図形言語を用いてPLCプログラム(複数の図形要素を任意の位置に配置して成るプログラム)を作成した場合、上記のように2つのコンパイラを用いる構成の場合、同一ソースコードに係わる2種類の機械語オブジェクトの演算結果が異なる可能性がある。つまり、コンパイルの際の図形要素の展開順番が演算結果に影響する(図形要素の展開順番が異なれば演算結果が異なる)可能性がある。 However, if the source code is written in a mnemonic language, a PLC program (a program in which a plurality of graphic elements are arranged at arbitrary positions) is created using a graphic language such as a ladder language or FBD language. In the case of the configuration using two compilers as described above, the calculation results of two types of machine language objects related to the same source code may be different. In other words, there is a possibility that the expansion order of the graphic elements at the time of compilation affects the calculation result (the calculation results differ if the expansion order of the graphic elements is different).
この様になる原因は、図形言語の場合、図形要素の展開順番の基本的な規則は、上から下、左から右であるが、ユーザがフリーで自由に記述できるため、図形要素を様々な大きさと位置に配置でき、図形要素間の接続の組み合わせも自由にできるため、基本的な規則だけでは展開順番を一義的に確定させることができず、このため現実上、各コンパイラ独自の展開方法が存在するからである。 The reason for this is that in the case of graphic languages, the basic rules for the expansion order of graphic elements are from top to bottom and from left to right. Since it can be arranged in the size and position, and the combination of connections between graphic elements can be freely set, the expansion order cannot be uniquely determined only by basic rules. Because there exists.
このように、同一ソースコードを2つのコンパイラで別々にコンパイルして生成した2種類の機械語オブジェクトが、図形要素の展開順番が相互に異なることを主な原因として、その演算結果が異なることになる可能性がある。実施例2では、上記実施例1の構成においてこの様な問題が生じるのを防止するものである。 As described above, the two machine language objects generated by compiling the same source code separately with two compilers have different calculation results mainly due to the difference in the expansion order of the graphic elements. There is a possibility. In the second embodiment, such a problem is prevented from occurring in the configuration of the first embodiment.
以下、実施例2について詳細に説明する。
図12は、実施例2のプログラマブルコントローラシステムの機能構成例である。
図示のプログラマブルコントローラシステムは、開発支援装置(ローダ)60、PLC(ターゲット)80等から成る。
Hereinafter, Example 2 will be described in detail.
FIG. 12 is a functional configuration example of the programmable controller system according to the second embodiment.
The illustrated programmable controller system includes a development support device (loader) 60, a PLC (target) 80, and the like.
開発支援装置60は、上記プログラミング装置100と略同様の機能を有すると共に、更に実施例2における機能(上記問題を解消するための機能)を有する。
開発支援装置60は、インタフェース機能部61、コンパイラ62、通信機能部63等の各種機能部を有する。尚、開発支援装置60は、画面(ディスプレイ)64、入力装置65等も有する。
The development support device 60 has substantially the same function as the programming device 100, and further has the function (function for solving the above problem) in the second embodiment.
The development support apparatus 60 includes various function units such as an interface function unit 61, a compiler 62, and a communication function unit 63. The development support device 60 also includes a screen (display) 64, an input device 65, and the like.
インタフェース機能部61と通信機能部63は、図1のユーザインタフェース部11、通信部14と同じであってよく、これらの説明は省略するが、ユーザはユーザインタフェース部11の機能によって、所望の制御プログラムのソースコード66を作成することになる。 The interface function unit 61 and the communication function unit 63 may be the same as the user interface unit 11 and the communication unit 14 in FIG. 1, and the description thereof will be omitted, but the user can perform desired control depending on the function of the user interface unit 11. The source code 66 of the program is created.
コンパイラ62も、基本的な機能は図1のコンパイラ12と同じであってよい。すなわち、コンパイラ62は、例えば2つのコンパイラから成り、任意のソースコード66を入力して、2つのコンパイラそれぞれで、このソースコード66に対応する機械語オブジェクトを生成する。これより、コンパイラ62は、2種類の機械語オブジェクト(最適化機械語オブジェクト67、デバッグ可能機械語オブジェクト68)を生成する。 The basic function of the compiler 62 may be the same as that of the compiler 12 of FIG. That is, the compiler 62 is composed of, for example, two compilers, and an arbitrary source code 66 is input, and a machine language object corresponding to the source code 66 is generated by each of the two compilers. Thus, the compiler 62 generates two types of machine language objects (optimized machine language object 67 and debuggable machine language object 68).
最適化機械語オブジェクト67、デバッグ可能機械語オブジェクト68は、基本的には、上記図1の最適化機械語オブジェクト13、非最適化機械語オブジェクト15と略同様であってよい。すなわち、最適化機械語オブジェクト67は、上記最適化機械語オブジェクト13と同様、ソースコードを最適化コンパイルして生成されたものである。デバッグ可能機械語オブジェクト68は、上記非最適化機械語オブジェクト15と同様、ソースコードに対して通常のコンパイルを行って生成されたものである。 The optimized machine language object 67 and the debuggable machine language object 68 may be basically the same as the optimized machine language object 13 and the non-optimized machine language object 15 shown in FIG. That is, the optimized machine language object 67 is generated by optimizing and compiling the source code, like the optimized machine language object 13. Similar to the non-optimized machine language object 15, the debuggable machine language object 68 is generated by performing normal compilation on the source code.
但し、上記のことから最適化機械語オブジェクト13と非最適化機械語オブジェクト15とでは演算結果が異なる(その生成の際の図形要素の展開順番が異なる)場合があり得るが、最適化機械語オブジェクト67とデバッグ可能機械語オブジェクト68とでは常に演算結果は同じであり(その生成の際の図形要素の展開順番が同一である)、演算結果が異なる可能性はない。 However, from the above, there may be a case where the calculation result is different between the optimized machine language object 13 and the non-optimized machine language object 15 (the development order of the graphic elements at the time of generation is different). The calculation results are always the same between the object 67 and the debuggable machine language object 68 (the development order of the graphic elements at the time of generation is the same), and there is no possibility that the calculation results are different.
これを実現する為に、コンパイラ62は、例えば最適化機械語オブジェクト67生成の際に、その図形要素展開順番を示す展開順番対応表69を生成しておく。そして、デバッグ可能機械語オブジェクト68の生成の為のコンパイル処理の際に、この展開順番対応表69を参照することで、最適化機械語オブジェクト67の場合と同じ展開順番でコンパイル処理を実行できる。 In order to realize this, the compiler 62 generates an expansion order correspondence table 69 indicating the graphic element expansion order, for example, when the optimized machine language object 67 is generated. Then, the compiling process can be executed in the same expansion order as in the case of the optimized machine language object 67 by referring to the expansion order correspondence table 69 in the compiling process for generating the debuggable machine language object 68.
また、コンパイラ62は、最適化機械語オブジェクト67生成の際に、当然、各変数のメモリアドレス割付け処理(一般的な処理であり説明は省略する)も行うが、この様に各変数に割り付けたアドレス情報を、変数アドレス対応表70に記憶するようにしてもよい。この場合、コンパイラ62は、デバッグ可能機械語オブジェクト68の生成の為のコンパイル処理の際に、この変数アドレス対応表70を参照することで、各変数に対して最適化機械語オブジェクト67の場合と同じメモリアドレスを割り付けることができる。 In addition, the compiler 62 naturally performs memory address allocation processing of each variable (general processing and description thereof is omitted) when the optimized machine language object 67 is generated. Address information may be stored in the variable address correspondence table 70. In this case, the compiler 62 refers to the variable address correspondence table 70 at the time of the compilation process for generating the debuggable machine language object 68, so that the variable machine optimization object 67 can be obtained for each variable. The same memory address can be assigned.
尚、図示のソースコード識別番号対応表71は、上記実施例1において説明した「ソースコード識別番号対応テーブル」と同じものと見做してよく、ここでは特に説明しないが、実施例1で説明したように、例えば、ソースコードのファイル名と、このソースコードの識別番号(または、このソースコードから生成された機械語オブジェクトに付与される識別番号)とを対応付けて記憶したものである。 Note that the illustrated source code identification number correspondence table 71 may be regarded as the same as the “source code identification number correspondence table” described in the first embodiment, and is not particularly described here, but is described in the first embodiment. As described above, for example, the source code file name and the identification number of the source code (or the identification number assigned to the machine language object generated from the source code) are stored in association with each other.
上記生成された2種類の機械語オブジェクト(最適化機械語オブジェクト67、デバッグ可能機械語オブジェクト68)は、PLC80にダウンロードされる。尚、ダウンロードの際のデータパケット構成は、実施例1と同じであってよい(図8に示す)。 The two generated machine language objects (optimized machine language object 67 and debuggable machine language object 68) are downloaded to the PLC 80. The data packet configuration at the time of downloading may be the same as that in the first embodiment (shown in FIG. 8).
ここで、図示のPLC80の機能は、上記PLC200と同じであってよい(多少、名称や形式が変わっていても、実質的には同じと考えてよい)。
すなわち、PLC80は、プログラム実行管理機能部81、アドレステーブル82、通信機能部83等の処理機能部を有する。アドレステーブル82、通信機能部83は、図1のアドレステーブル24、通信部21と同じであると見做してよく、ここでの説明は省略する。プログラム実行管理機能部81は、図1のオブジェクト展開部25、デバッグ制御部26、プログラム実行部27のすべての機能を含むものと見做してもよい。従って、PLC80の処理機能については、ここでは説明を省略するが、PLC80は、上記ダウンロードされる最適化機械語オブジェクト67、デバッグ可能機械語オブジェクト68を、図示の最適化機械語オブジェクト84、デバッグ可能機械語オブジェクト85として記憶する。
Here, the function of the illustrated PLC 80 may be the same as that of the PLC 200 (although it may be considered to be substantially the same even if the name and format are somewhat changed).
That is, the PLC 80 includes processing function units such as a program execution management function unit 81, an address table 82, and a communication function unit 83. The address table 82 and the communication function unit 83 may be regarded as the same as the address table 24 and the communication unit 21 in FIG. 1, and a description thereof is omitted here. The program execution management function unit 81 may be regarded as including all the functions of the object development unit 25, the debug control unit 26, and the program execution unit 27 of FIG. Therefore, although the description of the processing function of the PLC 80 is omitted here, the PLC 80 converts the downloaded optimized machine language object 67 and debuggable machine language object 68 into the optimized machine language object 84 shown in FIG. It is stored as a machine language object 85.
図13に、上記コンパイラ62の処理動作の一例を示す。
尚、図13に示す例では、コンパイル処理の際に、ソースコードから一旦、中間コード(中間言語)を生成して、その後、中間コードから機械語オブジェクトを生成する例であるが、この例に限るものではない。中間コードを生成することなく、ソースコードから直接的に機械語オブジェクトを生成するものであってよい。尚、中間コード(中間言語)は、例えばC言語であるが、この例に限らない。
FIG. 13 shows an example of the processing operation of the compiler 62.
The example shown in FIG. 13 is an example in which intermediate code (intermediate language) is once generated from the source code and then a machine language object is generated from the intermediate code at the time of compilation processing. It is not limited. The machine language object may be generated directly from the source code without generating the intermediate code. The intermediate code (intermediate language) is, for example, C language, but is not limited to this example.
尚、上記特許文献2には、インストラクションリスト等のシーケンス処理用の言語で記述された制御プログラム(ソースファイル)を、C言語等の高級プログラミング言語に変換して、このC言語表現のプログラムファイルをコンパイルしてオブジェクトファイルを生成することにより実行コードが得られる旨の開示がある。この様に、C言語等の中間言語を介することは、既存技術であり、ここではこれ以上説明しない。 In Patent Document 2, a control program (source file) described in a sequence processing language such as an instruction list is converted into a high-level programming language such as C language, and a program file of this C language expression is converted into a program file. There is a disclosure that an executable code can be obtained by compiling and generating an object file. In this way, using an intermediate language such as C language is an existing technology and will not be described further here.
図13に示す例では、上記コンパイラ62は、2つのコンパイラ(コンパイラ62a,62b)から成るものとする。これら2つのコンパイラは、上記の通り、一旦、中間コードを生成するタイプであるものとする。 In the example shown in FIG. 13, the compiler 62 is composed of two compilers (compilers 62a and 62b). These two compilers are assumed to be of a type that once generates intermediate code as described above.
コンパイラ62aは、通常のコンパイル処理を行って上記デバッグ可能機械語オブジェクト68を生成する。コンパイラ62bは、最適化コンパイル処理を行って上記最適化機械語オブジェクト67を生成する。本例では、コンパイラ62a,62bはそれぞれ、まずフロントエンド処理で中間コード(中間コード1、中間コード2)を生成し、その後、バックエンド処理で機械語オブジェクト(68,67)を生成する。 The compiler 62a performs normal compilation processing to generate the debuggable machine language object 68. The compiler 62b performs optimization compilation processing to generate the optimized machine language object 67. In this example, the compilers 62a and 62b respectively generate intermediate code (intermediate code 1 and intermediate code 2) by front-end processing, and then generate machine language objects (68 and 67) by back-end processing.
従来であれば中間コード1と中間コード2とでは、その生成の際の図形要素の展開順番等が異なる可能性がある。既に説明した通り、展開順番が異なると、PLC80側で上記最適化機械語オブジェクト84を実行したときとデバッグ可能機械語オブジェクト85を実行したときとで、演算結果が異なるため問題となる。 Conventionally, the intermediate code 1 and the intermediate code 2 may be different in the expansion order of the graphic elements at the time of generation. As described above, if the development order is different, there is a problem because the calculation result differs between when the optimized machine language object 84 is executed on the PLC 80 side and when the debuggable machine language object 85 is executed.
これに対して、本例のコンパイラ62では、まず、コンパイラ62aは、ソースコード66をコンパイル(フロントエンド処理)して中間コード1を生成する際に、例えばコンパイラ62bとは異なる独自の規則により図形要素の展開順番を決定するかもしれないが、この展開順番を展開順番対応表69に記憶しておく。 On the other hand, in the compiler 62 of this example, when the compiler 62a first generates the intermediate code 1 by compiling the source code 66 (front-end processing), for example, a graphic according to a unique rule different from that of the compiler 62b. Although the element expansion order may be determined, this expansion order is stored in the expansion order correspondence table 69.
尚、コンパイラ62bにおける最適化の処理は、例えばバックエンド処理において実現してもよい。これは例えば、コンパイラ62bは、例えばC言語コンパイラ(不図示)を有し、このC言語コンパイラがコンパイラ62bのバックエンド処理を実行する。C言語コンパイラは、C言語プログラムをコンパイルして機械語を生成する機能を有する、C言語用の既存の一般的なコンパイラであり、上記最適化のための処理機能も備えている。図13に示す構成例では、特に上記中間言語をC言語とした場合、この様な既存のC言語コンパイラの最適化機能を利用して、最適化を実現できるというメリットがある。 Note that the optimization processing in the compiler 62b may be realized, for example, in back-end processing. For example, the compiler 62b has, for example, a C language compiler (not shown), and the C language compiler executes the back-end processing of the compiler 62b. The C language compiler is an existing general compiler for C language that has a function of generating a machine language by compiling a C language program, and also includes a processing function for the optimization. The configuration example shown in FIG. 13 has an advantage that optimization can be realized by using the optimization function of such an existing C language compiler, particularly when the intermediate language is C language.
図14に、展開順番対応表69の具体例を示す。
図示の例では、展開順番対応表69は、各図形要素の識別用IDである図形ID91に対応付けて、各図形要素の展開順番を示す実行順番(展開順番)92が登録される。図示の例では、図形ID91=‘1’、‘2’、‘3’の3つの図形要素の展開順番(実行順番)は、‘1’→‘3’→‘2’の順となる。
FIG. 14 shows a specific example of the development order correspondence table 69.
In the illustrated example, in the development order correspondence table 69, an execution order (development order) 92 indicating the development order of each graphic element is registered in association with the graphic ID 91 which is an ID for identifying each graphic element. In the illustrated example, the expansion order (execution order) of the three graphic elements of graphic ID 91 = '1', '2', '3' is in the order of '1' → '3' → '2'.
そして、コンパイラ62aにおいてコンパイル処理が完了してデバッグ可能機械語オブジェクト68が生成された後、コンパイラ62bのコンパイル処理を開始する(あるいは、中間コード1が生成された後であっても構わない。換言すれば、展開順番対応表69の作成が完了した後であればよい)。尚、コンパイラ62aが、例えば自己のコンパイル処理が完了したら、ソースコード66をコンパイラ62bに渡すことで、コンパイラ62bがコンパイル処理を開始できるようにしてもよい。あるいは、コンパイラ62aが処理完了をコンパイラ62bに通知すると、コンパイラ62bがソースコード66を取得してコンパイル処理を開始するようにしてもよい。 Then, after the compiling process is completed in the compiler 62a and the debuggable machine language object 68 is generated, the compiling process of the compiler 62b is started (or after the intermediate code 1 is generated). Then, it may be after the creation of the development order correspondence table 69 is completed). For example, when the compiler 62a completes its own compiling process, the compiler 62b may start the compiling process by passing the source code 66 to the compiler 62b. Alternatively, when the compiler 62a notifies the compiler 62b of the completion of processing, the compiler 62b may acquire the source code 66 and start the compilation process.
そして、コンパイラ62bは、展開順番対応表69を参照しながら、コンパイル処理を実行する。これより、コンパイラ62bにおいても、図形要素の展開順番はコンパイラ62aと同じとなる。例えば図14の例であればコンパイラ62aにおける図形要素の展開順番は‘1’→‘3’→‘2’の順であったことになり、コンパイラ62bにおいても同じ展開順番でコンパイル処理を行って中間コード2を生成することになる。 Then, the compiler 62b executes compilation processing while referring to the expansion order correspondence table 69. As a result, also in the compiler 62b, the expansion order of the graphic elements is the same as in the compiler 62a. For example, in the example of FIG. 14, the expansion order of the graphic elements in the compiler 62 a is “1” → “3” → “2”, and the compiler 62 b performs compiling processing in the same expansion order. The intermediate code 2 is generated.
従来であれば、コンパイラ62bは、独自の規則(図形要素コード生成規則)に従って展開順番を決めていたので、図形要素の展開順番が例えば‘1’→‘2’→‘3’の順となる可能性もあったが、本手法ではこの様な問題は起こらない。 Conventionally, the compiler 62b determines the expansion order according to its own rule (graphic element code generation rule), so the expansion order of graphic elements is, for example, “1” → “2” → “3”. Although there is a possibility, this method does not cause such a problem.
また、よく知られているように、PLCの制御プログラムのコンパイル処理では、各変数に任意のメモリアドレスを割当てる処理(既存の処理)も行われるが、本手法では、コンパイラ62aが、例えば中間コード1生成の際に各変数に割当てたアドレス情報を、変数アドレス対応表70に記憶するようにしてもよい。この場合には、コンパイラ62bは、更に変数アドレス対応表70も参照することで、各変数へのメモリアドレス割当てを、コンパイラ62aと同じとすることができる。 As is well known, in the process of compiling the PLC control program, a process of allocating an arbitrary memory address to each variable (existing process) is also performed. In this method, the compiler 62 a The address information assigned to each variable at the time of generating one may be stored in the variable address correspondence table 70. In this case, the compiler 62b can also refer to the variable address correspondence table 70 to make the memory address assignment to each variable the same as the compiler 62a.
変数アドレス対応表70の具体例は、特に示さないが、例えば各変数の識別用IDに対応付けて、その変数に割り付けたメモリアドレスが格納されるものである。
この様に、本手法では、2つのコンパイラ62a、62bで、図形要素の展開順番および各変数へのメモリアドレス割当て内容を、同一にすることができる。尚、変数アドレス対応表70の具体例は、特に示さないが、例えば各変数の識別用IDに対応付けて、その変数に割当てたアドレスの情報(例えば割当てたメモリ領域の先頭アドレスとサイズ等)が登録される。
Although a specific example of the variable address correspondence table 70 is not particularly shown, for example, a memory address assigned to the variable is stored in association with the identification ID of each variable.
As described above, in this method, the two compilers 62a and 62b can make the expansion order of the graphic elements and the contents of the memory address assigned to each variable the same. Although a specific example of the variable address correspondence table 70 is not particularly shown, for example, information on the address assigned to the variable in association with the identification ID of each variable (for example, the start address and size of the assigned memory area). Is registered.
コンパイラ62aは、中間コード1をバックエンド処理で機械語オブジェクトに変換してデバッグ可能機械語オブジェクト68を生成する。コンパイラ62bは、中間コード2をバックエンド処理で機械語オブジェクトに変換して最適化機械語オブジェクト67を生成する。ここで、上述したように、中間コード1と中間コード2は、その生成の際の図形要素の展開順番が同じとなる。従って、これら中間コード1、中間コード2の機械語オブジェクト(デバッグ可能機械語オブジェクト、最適化機械語オブジェクト)をPLC80側で実行した場合、上述した問題は起こらない。すなわち、同一のソースコードに係る2種類の機械語オブジェクトの演算結果が、相互に異なるという事態が生じ、それによってシステム動作が不安定になる等という問題が生じる心配はない。 The compiler 62a converts the intermediate code 1 into a machine language object by back-end processing, and generates a debuggable machine language object 68. The compiler 62b converts the intermediate code 2 into a machine language object by back-end processing, and generates an optimized machine language object 67. Here, as described above, the intermediate code 1 and the intermediate code 2 have the same expansion order of the graphic elements at the time of generation. Therefore, when the machine language objects (debuggable machine language object and optimized machine language object) of the intermediate code 1 and the intermediate code 2 are executed on the PLC 80 side, the above-described problem does not occur. That is, there is no concern that the operation results of the two types of machine language objects related to the same source code are different from each other, thereby causing a problem that the system operation becomes unstable.
尚、言うまでもないが、上記デバッグ可能機械語オブジェクト68と最適化機械語オブジェクト67を、PLC80側へダウンロードして上記デバッグ可能機械語オブジェクト85、最適化機械語オブジェクト84として記憶させることになる。そして、PLC80では、通常時は最適化機械語オブジェクト84を実行し、デバッグ時にはデバッグ可能機械語オブジェクト85に切り替えて実行することになるが、実施例2では、この切り替え後に、切り替え前とは演算結果が異なる等というような事態が生じることはなく、システム動作が不安定になるようなことはない。 Needless to say, the debuggable machine language object 68 and the optimized machine language object 67 are downloaded to the PLC 80 and stored as the debuggable machine language object 85 and the optimized machine language object 84. In the PLC 80, the optimized machine language object 84 is executed in normal times, and is switched to the debuggable machine language object 85 in debugging. In the second embodiment, after the switching, the operation before the switching is calculated. There will be no situation such as different results, and system operation will not become unstable.
尚、図13は一例を示すものであり、この例に限らない。例えば、コンパイラ62bを先に実行し、その後にコンパイラ62aを実行するようにしてもよい。勿論、この場合には、コンパイラ62bが上記展開順番対応表69、変数アドレス対応表70を生成することになり、その後、コンパイラ62aが、これらの対応表69、70を参照しながらコンパイル処理を実行することで、図形要素の展開順番がコンパイラ62bと同じとなると共に、各変数へ割当てるメモリアドレスもコンパイラ62bと同じとなる。 FIG. 13 shows an example and is not limited to this example. For example, the compiler 62b may be executed first and then the compiler 62a may be executed. Of course, in this case, the compiler 62b generates the expansion order correspondence table 69 and the variable address correspondence table 70, and then the compiler 62a executes the compilation process with reference to the correspondence tables 69 and 70. As a result, the expansion order of the graphic elements is the same as that of the compiler 62b, and the memory address assigned to each variable is also the same as that of the compiler 62b.
この様に、2つのコンパイラ62a、62bのうち何れか一方(基本的には先に処理実行する方)が上記展開順番対応表69、変数アドレス対応表70を生成し、他方がこれらの対応表69、70を参照しながらコンパイル処理を実行することで、同一のソースコードに係るデバッグ可能機械語オブジェクト68(85)と最適化機械語オブジェクト67(84)とで、演算結果が異なる事態となることは回避される。 In this way, either one of the two compilers 62a and 62b (basically, the one that executes the process first) generates the expansion order correspondence table 69 and the variable address correspondence table 70, and the other is the correspondence table thereof. By executing the compiling process with reference to 69 and 70, the operation result differs between the debuggable machine language object 68 (85) and the optimized machine language object 67 (84) related to the same source code. This is avoided.
あるいは、図13では、一旦、中間コードを生成するタイプのコンパイラに本手法を適用した場合を示したが、勿論、この様な例に限らず、中間コードを生成することなくソースコードからダイレクトに機械語オブジェクトを生成するコンパイラにも、本手法は問題なく適用できる。 Alternatively, FIG. 13 shows a case where the present technique is applied to a type of compiler that generates intermediate code. However, the present invention is not limited to such an example. This method can also be applied without problems to compilers that generate machine language objects.
図15に、図形言語プログラムの具体例を示す。
図15(a)には、ラダー図やファンクションブロック図等の図形言語プログラムの図形要素を示す。
FIG. 15 shows a specific example of the graphic language program.
FIG. 15A shows graphic elements of a graphic language program such as a ladder diagram and a function block diagram.
図15(b)、(c)には、ファンクションブロック図によるプログラム記述の具体例を示す。
図15(a),(b)の例については特に説明しないが、図15(b)の例では3つの図形要素が任意の位置に配置されていることになる。
FIGS. 15B and 15C show specific examples of program description using function block diagrams.
The example of FIGS. 15A and 15B is not particularly described, but in the example of FIG. 15B, three graphic elements are arranged at arbitrary positions.
以下、図15(c)の例について説明する。
この例では、C=A+Bを演算する図形要素95と、F=C+Dを演算する図形要素96を示している。これら図形要素95、96の処理のどちらを先に実行するかによって、演算結果が異なる場合が有り得る。しかしながら、図15(c)に示す例では、図形要素95と図形要素96のどちらを先に実行するか明確ではない。
Hereinafter, the example of FIG. 15C will be described.
In this example, a graphic element 95 for calculating C = A + B and a graphic element 96 for calculating F = C + D are shown. Depending on which of the graphic elements 95 and 96 is executed first, the calculation result may differ. However, in the example shown in FIG. 15C, it is not clear which one of the graphic element 95 and the graphic element 96 is executed first.
すなわち、上記の通り、左から右、上から下の順番が基本規則であるが、図15(c)の場合、“左から右”ルールの方を優先させると図形要素95が先に実行されるが、“上から下”ルールの方を優先させると図形要素96が先に実行される可能性がある。あるいは、図15(c)の場合、“上から下”ルールに関して、図形要素95、96のどちらが上であるのか不明瞭である。 In other words, as described above, the order from left to right and top to bottom is the basic rule, but in the case of FIG. 15C, if the “left to right” rule is prioritized, the graphic element 95 is executed first. However, if the “top to bottom” rule is prioritized, the graphic element 96 may be executed first. Alternatively, in the case of FIG. 15C, it is unclear which of the graphic elements 95 and 96 is on the “from top to bottom” rule.
そして、例えば、各変数A,B,C,D,Fに係る現在のメモリ保持値が、A=1、B=2、C=100、D=10、F=0であったとする。
この例の場合、仮に図形要素95→図形要素96の順に実行されると、まず、C=A+B=1+2=3となってCの値が上記100から3へと更新された後、F=C+D=3+10=13となる。よって、演算結果(上記演算後の各変数A,B,C,D,Fに係るメモリ保持値)は、A=1、B=2、C=3、D=10、F=13となる。
For example, suppose that the current memory holding values for the variables A, B, C, D, and F are A = 1, B = 2, C = 100, D = 10, and F = 0.
In this example, if the graphic element 95 is executed in the order of the graphic element 96, first, C = A + B = 1 + 2 = 3 and the value of C is updated from 100 to 3, and then F = C + D = 3 + 10 = 13. Therefore, the calculation results (memory holding values related to the variables A, B, C, D, and F after the calculation) are A = 1, B = 2, C = 3, D = 10, and F = 13.
一方、上記の例で図形要素96→図形要素95の順に実行された場合には、まず、F=C+D=100+10=110となってFの値が上記0から110へと更新された後、C=A+B=1+2=3となる。よって、演算結果(上記演算後の各変数A,B,C,D,Fに係るメモリ保持値)は、A=1、B=2、C=3、D=10、F=110となる。このように、図形要素95→図形要素96の順に実行された場合と、図形要素96→図形要素95の順に実行された場合とでは、演算結果が異なることになる。 On the other hand, when the graphic element 96 is executed in the order of the graphic element 95 in the above example, first, F = C + D = 100 + 10 = 110 and the value of F is updated from 0 to 110, and then C = A + B = 1 + 2 = 3. Therefore, the calculation results (memory holding values related to the variables A, B, C, D, and F after the calculation) are A = 1, B = 2, C = 3, D = 10, and F = 110. As described above, the calculation results are different between the case where the graphic element 95 is executed in the order of the graphic element 96 and the case where the graphic element 96 is executed in the order of the graphic element 95.
また、図16(a)は通常時、図16(b)はデバッグ時のアドレステーブル82の展開状態の具体例を示す図である。図示の通り、これらは内容的には図10、図11に示したものと略同様であり、図12において名称が図3とは異なるもの(非最適化機械語オブジェクト→デバッグ可能機械語オブジェクト)が存在することから、例えば図16(a),(b)に示すようになる。 FIG. 16A is a diagram illustrating a specific example of the expanded state of the address table 82 during normal time, and FIG. 16B is a diagram illustrating the expanded state of the address table 82 during debugging. As shown in the figure, these contents are substantially the same as those shown in FIGS. 10 and 11, and the names in FIG. 12 are different from those in FIG. 3 (non-optimized machine language object → debuggable machine language object). For example, as shown in FIGS. 16 (a) and 16 (b).
よって、ここでは図16(a)、(b)については特にこれ以上詳細には説明しないが、実施例1の場合と同様に実施例2においてもPOU単位で2種類の機械語オブジェクトを生成・ダウンロードすると共に、POU単位でデバッグの実行(デバッグ可能機械語オブジェクトの実行)を指示できる。よって、例えば、制御プログラム全体のなかで、その都度、ユーザが必要とする部分(POU)についてのみデバッグ可能機械語オブジェクトに切り替えて実行させることができ、デバッグ作業時間の短縮化、作業負担の軽減を図ることができる。 Accordingly, FIGS. 16A and 16B are not particularly described in detail here, but in the same way as in the first embodiment, in the second embodiment, two types of machine language objects are generated for each POU. In addition to downloading, it is possible to instruct execution of debugging (execution of debuggable machine language object) in units of POUs. Therefore, for example, in the entire control program, only the part (POU) required by the user can be switched to a debuggable machine language object and executed, thereby shortening the debugging work time and the work load. Can be achieved.
尚、実施例2の開発支援装置60、PLC80のハードウェア構成例は、上記実施例1のプログラミング装置100、PLC200と同じであってよい。すなわち、開発支援装置60のハードウェア構成例は図1に示す通りであり、PLC80のハードウェア構成例は図2に示す通りであると考えてよい。但し、この例に限るものではない。 The hardware configuration example of the development support device 60 and the PLC 80 according to the second embodiment may be the same as the programming device 100 and the PLC 200 according to the first embodiment. That is, it may be considered that the hardware configuration example of the development support apparatus 60 is as shown in FIG. 1, and the hardware configuration example of the PLC 80 is as shown in FIG. However, the present invention is not limited to this example.
また、図12に示す開発支援装置60の処理機能(符号61、62等)は、上記プログラミング装置100の場合と同様、例えば記憶装置105に予め記憶されているアプリケーションプログラムを、CPU101が実行することにより実現される。同様に、図12に示すPLC80の処理機能(符号81等)は、上記PLC200の場合と同様、例えばユーザプログラムメモリ213に予め記憶されているアプリケーションプログラムを、CPU211が実行することにより実現される。また、上記デバッグ可能機械語オブジェクト85、最適化機械語オブジェクト84は、ユーザプログラムメモリ213に格納される。 Further, the processing functions (reference numerals 61, 62, etc.) of the development support device 60 shown in FIG. It is realized by. Similarly, the processing functions (reference numeral 81 and the like) of the PLC 80 shown in FIG. 12 are realized by the CPU 211 executing, for example, an application program stored in advance in the user program memory 213, as in the case of the PLC 200. The debuggable machine language object 85 and the optimized machine language object 84 are stored in the user program memory 213.
実施例2は、基本的に、上記実施例1における図4〜図9の具体例において、ステップS3、S4の処理が多少変わるものであると見做しても構わない。すなわち、ステップS3の処理の際に、上記展開順番対応表69、変数アドレス対応表70を生成する処理が加わる。また、ステップS4の処理では、例えば独自の規定によって図形要素の展開順番を決定する代わりに、展開順番対応表69を参照することで、ステップS3の処理における図形要素の展開順番と同じ順番で、図形要素の展開を行ってコンパイル処理を実現するものとなる。また、ステップS4の処理では、更に、変数アドレス対応表70を参照することで、ソースコードの各変数に割り付けるメモリアドレスを、ステップS3の処理の場合と同じにする。これら以外は、実施例1と略同様であって構わないので、ここでは特に説明しない。 In the second embodiment, basically, in the specific examples of FIGS. 4 to 9 in the first embodiment, the processes in steps S3 and S4 may be slightly changed. That is, in the process of step S3, a process for generating the expansion order correspondence table 69 and the variable address correspondence table 70 is added. Further, in the process of step S4, for example, instead of determining the development order of the graphic elements according to a unique rule, by referring to the development order correspondence table 69, in the same order as the development order of the graphic elements in the process of step S3, Compile processing is realized by expanding graphic elements. In the process of step S4, the memory address assigned to each variable of the source code is further made the same as in the process of step S3 by referring to the variable address correspondence table 70. Except for these, it may be substantially the same as that of the first embodiment, so that it will not be described here.
以上のことから、特に図示しないが、上記実施例2の開発支援装置60(プログラミング装置)、PLC80(プログラマブルコントローラ)は、例えば下記の処理機能を有するものと考えても良い。 From the above, although not particularly illustrated, the development support device 60 (programming device) and the PLC 80 (programmable controller) of the second embodiment may be considered to have the following processing functions, for example.
まず、上記プログラミング装置(開発支援装置60)は、第一のコンパイラと第二のコンパイラとダウンロード部とを有するものと見做してもよい。
第一のコンパイラは、任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素の展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも上記各図形要素の展開順序を所定の記憶領域(記憶部)に記憶する。
First, the programming device (development support device 60) may be regarded as having a first compiler, a second compiler, and a download unit.
The first compiler compiles the source code of an arbitrary graphic language program according to the expansion order while determining the expansion order of each graphic element constituting the source code, and generates a first machine language object. At least the expansion order of the graphic elements is stored in a predetermined storage area (storage unit).
第二のコンパイラは、上記ソースコードを、上記記憶部に記憶された各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成する。 The second compiler refers to the expansion order of each graphic element stored in the storage unit and compiles the source code according to the expansion order to generate a second machine language object.
ダウンロード部は、上記第一の機械語オブジェクトと上記第二の機械語オブジェクトとを、プログラマブルコントローラにダウンロードする。
そして、例えば、上記第一の機械語オブジェクトと上記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトである。
The download unit downloads the first machine language object and the second machine language object to the programmable controller.
For example, one of the first machine language object and the second machine language object is a non-optimized machine language object that is a machine language object that can be debugged and generated by a normal compilation process. The other is an optimized machine language object that is an optimized machine language object generated by the optimization compilation process.
一方、上記プログラマブルコントローラ(PLC80)は、通常時は上記最適化機械語オブジェクトを実行し、デバッグ時には上記非最適化機械語オブジェクトに切り替えて実行するプログラム実行部を有する。 On the other hand, the programmable controller (PLC 80) has a program execution unit that executes the optimized machine language object during normal operation and switches to the non-optimized machine language object during execution for debugging.
また、例えば、上記第一のコンパイラは、上記第一の機械語オブジェクト生成の際に、上記ソースコードから一旦中間言語を生成した後に該中間言語から上記第一の機械語オブジェクトを生成するものであって、該中間言語生成の際に上記各図形要素を展開順序の決定と上記記憶部への記憶を行う。 Further, for example, the first compiler generates the first machine language object from the intermediate language after the intermediate language is once generated from the source code when the first machine language object is generated. Therefore, when the intermediate language is generated, the graphic elements are determined in the order of expansion and stored in the storage unit.
また、例えば、上記第二のコンパイラは、上記第二の機械語オブジェクト生成の際に、上記ソースコードから一旦中間言語を生成した後に該中間言語から上記第二の機械語オブジェクトを生成するものであって、該中間言語生成の際に上記記憶部に記憶された上記各図形要素の展開順序を参照して該中間言語の生成を行う。 In addition, for example, the second compiler generates the second machine language object from the intermediate language after generating the intermediate language from the source code once when generating the second machine language object. Then, the intermediate language is generated with reference to the expansion order of the graphic elements stored in the storage unit when the intermediate language is generated.
また、例えば、上記第一のコンパイラは、更に、上記コンパイルの際にソースコードの各変数に割当てたメモリアドレスの情報を上記記憶部に記憶する。一方、上記第二のコンパイラは、上記コンパイルの際に更に、該記憶されたメモリアドレス情報を参照することで、上記各変数に上記第一のコンパイラと同じメモリアドレスを割当てる。 Further, for example, the first compiler further stores, in the storage unit, information on a memory address assigned to each variable of the source code at the time of the compilation. On the other hand, the second compiler further allocates the same memory address as that of the first compiler to each of the variables by referring to the stored memory address information during the compilation.
また、例えば、上記プログラマブルコントローラは、更に下記の構成を有するものであってよい。
すなわち、上記プログラマブルコントローラは、
上記最適化機械語オブジェクトを保持する第一の記憶領域と、上記非最適化機械語オブジェクトを保持する第二の記憶領域と、上記最適化機械語オブジェクトの格納アドレスまたは上記非最適化機械語オブジェクトの格納アドレスを登録するアドレステーブルとを有する。
For example, the programmable controller may further have the following configuration.
That is, the programmable controller is
A first storage area for holding the optimized machine language object; a second storage area for holding the non-optimized machine language object; and a storage address of the optimized machine language object or the non-optimized machine language object And an address table for registering the storage addresses.
そして、上記プログラム実行部は、例えば、該アドレステーブルに登録されている格納アドレスに応じて、上記最適化機械語オブジェクトと上記非最適化機械語オブジェクトの何れか一方を実行する。 The program execution unit executes, for example, one of the optimized machine language object and the non-optimized machine language object in accordance with the storage address registered in the address table.
また、上記プログラマブルコントローラは、例えば、上記アドレステーブルに上記最適化機械語オブジェクトの格納アドレスを登録することで、上記プログラム実行部に上記最適化機械語オブジェクトを実行させる最適化機械語オブジェクト実行部と、上記プログラミング装置からのデバッグ指示に応じて上記アドレステーブルに上記非最適化機械語オブジェクトの格納アドレスを登録することで、上記プログラム実行部に上記非最適化機械語オブジェクトを実行させるデバッグ制御部とを更に有する。 In addition, the programmable controller, for example, by registering the storage address of the optimized machine language object in the address table, causing the program execution unit to execute the optimized machine language object, A debug control unit that causes the program execution unit to execute the non-optimized machine language object by registering a storage address of the non-optimized machine language object in the address table in accordance with a debug instruction from the programming device; It has further.
また、上記プログラマブルコントローラは、上記プログラミング装置から上記最適化機械語オブジェクト、上記非最適化機械語オブジェクトがダウンロードされると、受信した最適化機械語オブジェクトは上記第一の記憶領域内に格納すると共に該格納領域の先頭アドレスを上記テーブルに登録すると共に、受信した非最適化機械語オブジェクトは上記第二の記憶領域内に格納するオブジェクト転送部を更に有する。 Further, when the optimized machine language object and the non-optimized machine language object are downloaded from the programming device, the programmable controller stores the received optimized machine language object in the first storage area. The start address of the storage area is registered in the table, and the received non-optimized machine language object further includes an object transfer unit for storing in the second storage area.
また、例えば、上記プログラミング装置は、上記デバッグ指示を上記プログラマブルコントローラへ送信すると共に、これに伴って、任意に設定された上記非最適化機械語オブジェクトの実行の停止位置を示すブレーク位置情報も上記プログラマブルコントローラへ送信するデバッグ指示部を更に有する。 In addition, for example, the programming device transmits the debug instruction to the programmable controller, and accordingly, break position information indicating a stop position of execution of the non-optimized machine language object set arbitrarily is also described above. It further has a debug instruction unit for transmitting to the programmable controller.
また、上記プログラマブルコントローラにおいて、例えば、上記デバッグ制御部は、上記デバッグ指示と共に上記ブレーク位置情報を受信すると、上記非最適化機械語オブジェクトにおいて、該ブレーク位置情報に応じた所定位置に、機械語オブジェクトの実行を停止するためのブレーク命令を挿入する。 In the programmable controller, for example, when the debug control unit receives the break position information together with the debug instruction, in the non-optimized machine language object, the machine language object is placed at a predetermined position according to the break position information. Insert a break instruction to stop execution of.
また、上記プログラム実行部は、上記非最適化機械語オブジェクトの実行中には、上記ブレーク命令の実行に伴い、該非最適化機械語オブジェクトの実行を停止すると共に該停止状態を上記プログラミング装置へ送信する。 In addition, during execution of the non-optimized machine language object, the program execution unit stops execution of the non-optimized machine language object and transmits the stop state to the programming device along with execution of the break instruction. To do.
あるいは、上最適化機械語オブジェクトは、POU単位で前記第一の記憶領域に保持され、上記非最適化機械語オブジェクトも、POU単位で前記第二の記憶領域に保持され、上記プログラム実行部は、デバッグ時に、任意のPOUに関してのみ非最適化機械語オブジェクトに切り替えて実行する。これは、例えば、プログラミング装置側においてユーザが指定したPOUに関してのみ、その識別番号を含む上記図9のデバッグ情報がPLC側に送られることで、PLC側ではこのPOUに関してのみ、非最適化機械語オブジェクトに切り替えて実行する。 Alternatively, the upper optimized machine language object is held in the first storage area in POU units, the non-optimized machine language object is also held in the second storage area in POU units, and the program execution unit is At the time of debugging, only the arbitrary POU is switched to the non-optimized machine language object and executed. This is because, for example, the debug information of FIG. 9 including the identification number is sent to the PLC side only for the POU specified by the user on the programming device side, and the non-optimized machine language only for this POU on the PLC side. Switch to the object and execute it.
以上説明したように、実施例2のプログラマブルコントローラシステムでは、プログラミング装置(開発支援装置;ローダ)において、2つのコンパイラによって通常の機械語オブジェクトと最適化機械語オブジェクトの両方を生成すると共に、その際にこれら2つのコンパイラで図形要素の展開順番を一致させることで、デバッグ時に逆コンパイル等を行なうことなく且つシステム動作を不安定にすることなく、ソースコードレベルデバッグを行えることになる。 As described above, in the programmable controller system of the second embodiment, in the programming device (development support device; loader), both the normal machine language object and the optimized machine language object are generated by the two compilers. In addition, by making these two compilers match the development order of the graphic elements, it is possible to perform source code level debugging without decompilation or the like during debugging and without destabilizing the system operation.
11 ユーザインタフェース部
12 コンパイラ
13 最適化機械語オブジェクト
14 通信部
15 非最適化機械語オブジェクト
21 通信部
22 最適化機械語オブジェクト
23 非最適化機械語オブジェクト
24 アドレステーブル
25 オブジェクト展開部
26 デバッグ制御部
27 プログラム実行部
31 コンパイル開始ボタン
32 デバッグ開始ボタン
33 終了ボタン
34 デバッグ終了ボタン
41 識別番号
42 種別
43 機械語オブジェクト(機械語オブジェクト本体)
51 識別番号
52 ブレーク位置
55 データパケット
55a,55b,55c,55d 機械語オブジェクト
60 開発支援装置(ローダ)
61 インタフェース機能部
62 コンパイラ
62a コンパイラ(通常)
62b コンパイラ(最適化)
63 通信機能部
64 画面(ディスプレイ)
65 入力装置
66 ソースコード
67 最適化機械語オブジェクト
68 デバッグ可能機械語オブジェクト
69 展開順番対応表
70 変数アドレス対応表
71 ソースコード識別番号対応表
80 PLC
81 プログラム実行管理機能部
82 アドレステーブル
83 通信機能部
84 最適化機械語オブジェクト
85 デバッグ可能機械語オブジェクト
91 図形ID
92 実行順番
95,96 図形要素
100 プログラミング装置
101 中央演算処理装置(CPU)
102 入力装置
103 表示器
104 内部メモリ
105 記憶装置
106 入出力インタフェース(I/O)
107 共通バス
200 プログラマブルコントローラ(PLC)
210 CPUモジュール
211 CPU
212 システムプログラムメモリ(FLASH)
213 ユーザプログラムメモリ(RAM)
214 PLC固有バスインタフェース
215 ユーザデータメモリ(RAM)
216 システムワークメモリ(RAM)
217 ドライバ/レシーバ
218 バス
222 入出力モジュール
300 制御機器
400 信号線
DESCRIPTION OF SYMBOLS 11 User interface part 12 Compiler 13 Optimization machine language object 14 Communication part 15 Non-optimization machine language object 21 Communication part 22 Optimization machine language object 23 Non-optimization machine language object 24 Address table 25 Object expansion part 26 Debug control part 27 Program execution unit 31 Compile start button 32 Debug start button 33 End button 34 Debug end button 41 Identification number 42 Type 43 Machine language object (machine language object body)
51 Identification number 52 Break position 55 Data packet 55a, 55b, 55c, 55d Machine language object 60 Development support device (loader)
61 Interface Function Unit 62 Compiler 62a Compiler (Normal)
62b Compiler (optimization)
63 Communication function section 64 Screen (display)
65 Input device 66 Source code 67 Optimized machine language object 68 Debuggable machine language object 69 Expansion order correspondence table 70 Variable address correspondence table 71 Source code identification number correspondence table 80 PLC
81 Program Execution Management Function Unit 82 Address Table 83 Communication Function Unit 84 Optimization Machine Language Object 85 Debuggable Machine Language Object 91 Graphic ID
92 Execution order 95, 96 Graphic element 100 Programming device 101 Central processing unit (CPU)
102 Input Device 103 Display 104 Internal Memory 105 Storage Device 106 Input / Output Interface (I / O)
107 Common bus 200 Programmable controller (PLC)
210 CPU module 211 CPU
212 System program memory (FLASH)
213 User program memory (RAM)
214 PLC specific bus interface 215 User data memory (RAM)
216 System work memory (RAM)
217 Driver / receiver 218 Bus 222 Input / output module 300 Control device 400 Signal line
Claims (11)
前記プログラミング装置は、
任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素の展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも前記各図形要素の展開順序を記憶手段に記憶する第一のコンパイラ手段と、
前記ソースコードを、前記記憶手段に記憶された前記各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成する第二のコンパイラ手段と、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトとを、前記プログラマブルコントローラにダウンロードするダウンロード手段とを有し、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトであることを特徴とするPLCシステム。 A PLC system having a programming device and a programmable controller,
The programming device is:
The source code of an arbitrary graphic language program is compiled in accordance with the expansion order while determining the expansion order of the graphic elements constituting the source code to generate a first machine language object, and at least each of the graphic elements First compiler means for storing the expansion order in the storage means;
Second compiler means for generating a second machine language object by referring to the expansion order of the graphic elements stored in the storage means and compiling the source code according to the expansion order;
Download means for downloading the first machine language object and the second machine language object to the programmable controller ;
Either the first machine language object or the second machine language object is a non-optimized machine language object that is a machine language object that can be debugged and generated by a normal compilation process, and the other is an optimal A PLC system, which is an optimized machine language object, which is an optimized machine language object generated by an integrated compilation process .
通常時は前記最適化機械語オブジェクトを実行し、デバッグ時には前記非最適化機械語オブジェクトに切り替えて実行するプログラム実行手段を有することを特徴とする請求項1記載のPLCシステム。 The programmable controller is
PLC system according to claim 1, wherein the normal running the optimization machine language objects, at the time of debugging have a program execution means for executing switching to the non-optimized machine language object.
前記第二のコンパイラ手段は、前記第二の機械語オブジェクト生成の際に、前記ソースコードから一旦中間言語を生成した後に該中間言語から前記第二の機械語オブジェクトを生成するものであって、該中間言語生成の際に前記記憶手段に記憶された前記各図形要素の展開順序を参照して該中間言語の生成を行うことを特徴とする請求項1または2に記載のPLCシステム。 The first compiler means generates the first machine language object from the intermediate language after the intermediate language is once generated from the source code when the first machine language object is generated. When the intermediate language is generated, the graphic elements are determined in order of expansion and stored in the storage means,
The second compiler means generates the second machine language object from the intermediate language after the intermediate language is once generated from the source code when the second machine language object is generated. 3. The PLC system according to claim 1, wherein the intermediate language is generated with reference to the expansion order of the graphic elements stored in the storage means when the intermediate language is generated.
前記第二のコンパイラ手段は、前記コンパイルの際に更に、該記憶されたメモリアドレス情報を参照することで、前記各変数に前記第一のコンパイラ手段と同じメモリアドレスを割当てることを特徴とする請求項1〜3の何れかに記載のPLCシステム。 The first compiler means further stores, in the storage means, information on a memory address assigned to each variable of the source code during the compilation,
The second compiler means further assigns the same memory address as that of the first compiler means to each variable by referring to the stored memory address information during the compilation. Item 4. The PLC system according to any one of Items 1 to 3 .
前記最適化機械語オブジェクトを保持する第一の記憶領域と、
前記非最適化機械語オブジェクトを保持する第二の記憶領域と、
前記最適化機械語オブジェクトの格納アドレスまたは前記非最適化機械語オブジェクトの格納アドレスを登録するアドレステーブルと、
該アドレステーブルに登録されている格納アドレスに応じて、前記最適化機械語オブジェクトと前記非最適化機械語オブジェクトの何れか一方を実行する前記プログラム実行手段と、
前記アドレステーブルに前記最適化機械語オブジェクトの格納アドレスを登録することで、前記プログラム実行手段に前記最適化機械語オブジェクトを実行させる最適化機械語オブジェクト実行手段と、
前記プログラミング装置からのデバッグ指示に応じて前記アドレステーブルに前記非最適化機械語オブジェクトの格納アドレスを登録することで、前記プログラム実行手段に前記非最適化機械語オブジェクトを実行させるデバッグ制御手段と、
を更に有することを特徴とする請求項1〜4の何れかに記載のPLCシステム。 The programmable controller is
A first storage area for holding the optimized machine language object;
A second storage area for holding the non-optimized machine language object;
An address table for registering a storage address of the optimized machine language object or a storage address of the non-optimized machine language object;
The program execution means for executing one of the optimized machine language object and the non-optimized machine language object according to a storage address registered in the address table;
Optimized machine language object execution means for causing the program execution means to execute the optimized machine language object by registering a storage address of the optimized machine language object in the address table;
Debugging control means for causing the program execution means to execute the non-optimized machine language object by registering a storage address of the non-optimized machine language object in the address table in accordance with a debug instruction from the programming device;
PLC system according to any one of claims 1 to 4, further comprising a.
前記プログラミング装置から前記最適化機械語オブジェクト、前記非最適化機械語オブジェクトがダウンロードされると、受信した最適化機械語オブジェクトは前記第一の記憶領域内に格納すると共に該格納アドレスを前記アドレステーブルに登録し、受信した非最適化機械語オブジェクトは前記第二の記憶領域内に格納するオブジェクト転送手段を更に有することを特徴とする請求項5記載のPLCシステム。 The programmable controller is
When the optimized machine language object and the non-optimized machine language object are downloaded from the programming device, the received optimized machine language object is stored in the first storage area and the storage address is stored in the address table. 6. The PLC system according to claim 5 , further comprising object transfer means for storing the non-optimized machine language object registered and received in the second storage area.
前記プログラマブルコントローラにおいて、
前記デバッグ制御手段は、前記デバッグ指示と共に前記ブレーク位置情報を受信すると、前記非最適化機械語オブジェクトにおいて、該ブレーク位置情報に応じた所定位置に、機械語オブジェクトの実行を停止するためのブレーク命令を挿入し、
前記プログラム実行手段は、前記非最適化機械語オブジェクトの実行中には、前記ブレーク命令の実行に伴い、該非最適化機械語オブジェクトの実行を停止すると共に該停止状態を前記プログラミング装置へ送信することを特徴とする請求項5または6記載のPLCシステム。 The programming device transmits the debug instruction to the programmable controller, and accordingly, also transmits break position information indicating a stop position of execution of the non-optimized machine language object set arbitrarily to the programmable controller. A debug instruction means for performing
In the programmable controller,
When the debug control means receives the break position information together with the debug instruction, in the non-optimized machine language object, a break instruction for stopping execution of the machine language object at a predetermined position according to the break position information Insert
The program execution means stops execution of the non-optimized machine language object and transmits the stop state to the programming device along with execution of the break instruction during execution of the non-optimized machine language object. The PLC system according to claim 5 or 6, wherein
前記非最適化機械語オブジェクトも、POU単位で前記第二の記憶領域に保持され、
前記プログラム実行手段は、前記デバッグ時に、任意のPOUに関してのみ前記非最適化機械語オブジェクトに切り替えて実行することを特徴とする請求項5〜7の何れかに記載のPLCシステム。 The optimized machine language object is held in the first storage area in POU units,
The non-optimized machine language object is also held in the second storage area in POU units,
The PLC system according to any one of claims 5 to 7 , wherein the program execution means switches to the non-optimized machine language object only for an arbitrary POU at the time of debugging.
任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素を展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも前記各図形要素の展開順序を記憶手段に記憶する第一のコンパイラ手段と、
前記ソースコードを、前記記憶手段に記憶された前記各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成する第二のコンパイラ手段と、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトとを、前記プログラマブルコントローラにダウンロードするダウンロード手段とを有し、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトであることを特徴とするPLCシステムのプログラミング装置。 A programming device in a PLC system having a programming device and a programmable controller, comprising:
The source code of an arbitrary graphic language program is compiled in accordance with the expansion order while determining the expansion order of each graphic element constituting the source code, and a first machine language object is generated. First compiler means for storing the expansion order in the storage means;
Second compiler means for generating a second machine language object by referring to the expansion order of the graphic elements stored in the storage means and compiling the source code according to the expansion order;
Download means for downloading the first machine language object and the second machine language object to the programmable controller ;
Either the first machine language object or the second machine language object is a non-optimized machine language object that is a machine language object that can be debugged and generated by a normal compilation process, and the other is an optimal A programming device for a PLC system, which is an optimized machine language object that is an optimized machine language object generated by an integrated compilation process .
任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素を展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも前記各図形要素の展開順序を記憶手段に記憶する第一のコンパイラ手段と、
前記ソースコードを、前記記憶手段に記憶された前記各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成する第二のコンパイラ手段と、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトであり、該非最適化機械語オブジェクトと該最適化機械語オブジェクトとを、前記プログラマブルコントローラにダウンロードするダウンロード手段、
として機能させるためのプログラム。 A computer of said programming device in a PLC system having a programming device and a programmable controller,
The source code of an arbitrary graphic language program is compiled in accordance with the expansion order while determining the expansion order of each graphic element constituting the source code, and a first machine language object is generated. First compiler means for storing the expansion order in the storage means;
Second compiler means for generating a second machine language object by referring to the expansion order of the graphic elements stored in the storage means and compiling the source code according to the expansion order;
Either the first machine language object or the second machine language object is a non-optimized machine language object that is a machine language object that can be debugged and generated by a normal compilation process, and the other is an optimal An optimization machine language object that is an optimized machine language object generated by the compile processing, and download means for downloading the non-optimized machine language object and the optimized machine language object to the programmable controller;
Program to function as.
任意の図形言語プログラムのソースコードを、該ソースコードを構成する各図形要素を展開順序を決定しつつ該展開順序に従ってコンパイルして第一の機械語オブジェクトを生成すると共に、少なくとも前記各図形要素の展開順序を記憶手段に記憶し、
前記ソースコードを、前記記憶手段に記憶された前記各図形要素の展開順序を参照して、該展開順序に従ってコンパイルして第二の機械語オブジェクトを生成し、
前記第一の機械語オブジェクトと前記第二の機械語オブジェクトの何れか一方は、通常のコンパイル処理によって生成される、デバッグ可能な機械語オブジェクトである非最適化機械語オブジェクトであり、他方は最適化コンパイル処理によって生成される、最適化された機械語オブジェクトである最適化機械語オブジェクトであることを特徴とするデバッグ方法。
A debugging method in the programming device of a PLC system having a programming device and a programmable controller,
The source code of an arbitrary graphic language program is compiled in accordance with the expansion order while determining the expansion order of each graphic element constituting the source code, and a first machine language object is generated. Store the deployment order in the storage means,
The source code is compiled according to the expansion order with reference to the expansion order of the graphic elements stored in the storage means to generate a second machine language object,
Either the first machine language object or the second machine language object is a non-optimized machine language object that is a machine language object that can be debugged and generated by a normal compilation process, and the other is an optimal A debugging method characterized by being an optimized machine language object that is an optimized machine language object generated by an integrated compilation process .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011223458A JP5849592B2 (en) | 2011-10-07 | 2011-10-07 | Programmable controller system, programming device thereof, programmable controller, program, and debugging method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011223458A JP5849592B2 (en) | 2011-10-07 | 2011-10-07 | Programmable controller system, programming device thereof, programmable controller, program, and debugging method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013084112A JP2013084112A (en) | 2013-05-09 |
JP5849592B2 true JP5849592B2 (en) | 2016-01-27 |
Family
ID=48529247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011223458A Active JP5849592B2 (en) | 2011-10-07 | 2011-10-07 | Programmable controller system, programming device thereof, programmable controller, program, and debugging method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5849592B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015170382A1 (en) | 2014-05-08 | 2015-11-12 | 三菱電機株式会社 | Engineering tool, program editing device, and program editing system |
KR101743836B1 (en) * | 2015-10-22 | 2017-06-07 | 엘에스산전 주식회사 | debugging method of programmable logic controller which uses general purpose microprocessor |
CN111026402B (en) * | 2019-12-09 | 2023-05-12 | 贵阳永青仪电科技有限公司 | Coding-type PLC code execution efficiency optimization method |
CN112835323B (en) * | 2020-12-31 | 2022-05-17 | 深圳市雷赛控制技术有限公司 | Programmable logic control language compiling method and device |
JPWO2024069730A1 (en) * | 2022-09-27 | 2024-04-04 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000242480A (en) * | 1999-02-18 | 2000-09-08 | Hitachi Ltd | Automatic control program generator |
JP4802775B2 (en) * | 2006-03-09 | 2011-10-26 | 富士電機株式会社 | Controller support device and programmable controller |
JP2008204023A (en) * | 2007-02-19 | 2008-09-04 | Fuji Electric Fa Components & Systems Co Ltd | Programmable controller system and programmable controller debugging method |
JP5800135B2 (en) * | 2011-07-15 | 2015-10-28 | 富士電機株式会社 | Programmable controller |
-
2011
- 2011-10-07 JP JP2011223458A patent/JP5849592B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013084112A (en) | 2013-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5039428B2 (en) | Programmable controller and PLC system | |
JP5849592B2 (en) | Programmable controller system, programming device thereof, programmable controller, program, and debugging method | |
JP2009146229A (en) | Programmable controller system | |
JP2008293138A (en) | Software development support program, software development support method | |
JP2018045544A (en) | Program processing apparatus and program | |
JP6866663B2 (en) | Programmable controller system, programmable controller, support device, HCI device, redundant programmable controller system | |
JP5636783B2 (en) | Programmable controller and method for debugging programmable controller | |
US12072682B2 (en) | Support device and storage medium | |
JP2009157533A (en) | Programmable controller system | |
JP5800135B2 (en) | Programmable controller | |
JP2015215865A (en) | Programmable controller system, its support device, programmable controller | |
JP2016224557A (en) | Program creation support device, program, and determination method | |
JP6541902B1 (en) | Program management system, programming support apparatus, program management method, and programming support program | |
JP4319082B2 (en) | Programming system | |
JP5425317B2 (en) | Motion SFC program parts creation device | |
JP6119452B2 (en) | Programmable controller system, its support device, programmable controller, program | |
JP2016224559A (en) | Program creation support device, control method and program | |
JP5589670B2 (en) | How to debug | |
JP4760607B2 (en) | Programmable controller | |
JP4842541B2 (en) | Display device for control, screen data generation device, and program and recording medium thereof | |
JP6455096B2 (en) | Control system, its support device, programmable control device | |
JP5978775B2 (en) | PROGRAMMABLE CONTROLLER, ITS SUPPORT DEVICE, PROGRAM, PROGRAM TRANSFER METHOD | |
JP4877257B2 (en) | Programmable controller, programmable controller support apparatus, and programmable controller system | |
CN112204480A (en) | Information processing device and display program | |
JP7631921B2 (en) | Development support device, development support method, and development support program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140912 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150617 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150623 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150810 |
|
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: 20151104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151117 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5849592 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 |