JP2017130068A - Programmable controller system, development support device thereof and target device - Google Patents

Programmable controller system, development support device thereof and target device Download PDF

Info

Publication number
JP2017130068A
JP2017130068A JP2016009301A JP2016009301A JP2017130068A JP 2017130068 A JP2017130068 A JP 2017130068A JP 2016009301 A JP2016009301 A JP 2016009301A JP 2016009301 A JP2016009301 A JP 2016009301A JP 2017130068 A JP2017130068 A JP 2017130068A
Authority
JP
Japan
Prior art keywords
instruction
specific
program
machine language
target device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016009301A
Other languages
Japanese (ja)
Other versions
JP6812637B2 (en
Inventor
吉原 大助
Daisuke Yoshihara
大助 吉原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2016009301A priority Critical patent/JP6812637B2/en
Publication of JP2017130068A publication Critical patent/JP2017130068A/en
Application granted granted Critical
Publication of JP6812637B2 publication Critical patent/JP6812637B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To inspect presence/absence of double writing from different programs.SOLUTION: A development support device 10 detects a specific command in a program following to processing for compiling a program (source code 21) and converting the program into a machine word object 24, then registers information indicating the specific command in a monitoring object code table 25. A target device 30 determines whether or not a command which is executed currently is the specific command during execution of the machine word object 24, based on the monitoring object code table 25, then acquires and records storage data of a specific register (AX register) at a specific command execution timing.SELECTED DRAWING: Figure 1

Description

本発明は、プログラマブルコントローラのプログラムのデバッグに関する。   The present invention relates to debugging a program of a programmable controller.

プログラマブルロジックコントローラ(PLC)のプログラムは、任意の制御対象の制御用プログラム等である。このプログラムのソースコード(ソースプログラム)を開発支援装置上でユーザが任意に作成する。作成されたソースコードは、開発支援装置のコンパイラによってコンパイルされて、PLCにおける実行形式(機械語オブジェクト)に変換される。これに伴って、ソースコード中の各変数に対して、PLCの任意のメモリ領域が割り当てられる。   The program of the programmable logic controller (PLC) is an arbitrary control target control program or the like. The user arbitrarily creates a source code (source program) of this program on the development support apparatus. The generated source code is compiled by the compiler of the development support apparatus and converted into an execution format (machine language object) in the PLC. Along with this, an arbitrary memory area of the PLC is assigned to each variable in the source code.

プログラマブルロジックコントローラ(PLC)のエンジニアリングでは、入出力機器や上位の監視画面と連携するために、上記変数のメモリアドレス割り付けをユーザが手動で実施している場合がある。変数のメモリ割付は、コンパイラが自動で割り付ける場合が多いが、何らかの事情により、人間が所望のメモリアドレスを手動で割り付ける場合もある。この手動メモリ割付に関して、例えば、配列A[i](iは変数/インデックス)のようにiが取り得る値に応じた複数の要素を持った配列Aに関して、メモリアドレスを割り当てる場合に、要素数に応じたアドレス範囲を指定する場合などがある。尚、この様な配列Aも、変数の一種であると見做せる。   In engineering a programmable logic controller (PLC), the user may manually perform memory address allocation of the above variables in order to link with input / output devices and a higher-level monitoring screen. In many cases, the compiler automatically allocates memory for variables. However, for some reason, a human may manually allocate a desired memory address. With regard to this manual memory allocation, for example, when a memory address is assigned to an array A having a plurality of elements corresponding to values that i can take, such as an array A [i] (i is a variable / index), the number of elements In some cases, an address range corresponding to the address is specified. Such an array A can also be regarded as a kind of variable.

尚、上記配列A[i](iは変数/インデックス)によって、“アクセスするメモリアドレスが動作中に(そのときの変数iの値に応じて)随時決定/変更される”ことになる場合がある。   Note that, depending on the array A [i] (i is a variable / index), the memory address to be accessed may be determined / changed at any time during operation (depending on the value of the variable i at that time). is there.

複数のプログラムに関して、それぞれ、上記アドレス範囲の割当てが行われることもあり、この複数のアドレス範囲同士が一部重複するように割り当てられる場合もある。これは、誤って重複してしまう場合もあれば、意図的に重複させる場合もある。意図的に重複させる場合、そのユーザは、重複があってもシステムの動作に問題が生じないと判断している場合もある。   The address ranges may be assigned to a plurality of programs, respectively, and the plurality of address ranges may be assigned so as to partially overlap each other. This may be accidentally duplicated or may be intentionally duplicated. In the case of intentional duplication, the user may determine that there is no problem in system operation even if there is duplication.

上記ユーザの手動によるメモリ割付けが行われる場合、ユーザがメモリ割付けを誤ると、プログラムをPLCで実行中に、異なるプログラムから同じメモリ領域に対して重複してアクセス(書き込み等)する事態が生じ得ることになり、これよりシステムの動作が不安定になるという問題が生じる。   When the above-described manual memory allocation by the user is performed, if the user mistakes the memory allocation, a situation may occur in which the same memory area is repeatedly accessed (written or the like) from different programs while the program is being executed by the PLC. As a result, there arises a problem that the operation of the system becomes unstable.

上記問題に対する対策として、一般的に、ユーザが作成したプログラム(ソースコード)を静的に解析して、上記「異なるプログラムから同じメモリに対して重複してアクセスする(書き込む等)という異常」の有無を検査する、静的解析が行われている。しかしながら、この静的解析では、例えば配列、ポインタなどに係わる“アクセスするメモリアドレスが動作中に随時決定/変更される”処理が含まれる場合には、検査できない、等という課題がある。   As a countermeasure against the above problem, generally, a program (source code) created by a user is statically analyzed, and the above “abnormality of accessing (writing to, etc.) the same memory redundantly from different programs” Static analysis is performed to check for presence. However, in this static analysis, there is a problem that the inspection cannot be performed, for example, when processing including “a memory address to be accessed is determined / changed at any time during operation” related to an array, a pointer, and the like is included.

静的解析関連の従来技術として、例えば特許文献1が知られているが、特許文献1には動的に検査することについては記載が無い。また、上記配列A[i]等に係わる上記手動による上記アドレス範囲の指定に関して、複数のアドレス範囲が相互に重複しているか否かについては、静的解析で検出することは可能である。しかしながら、実際の動作において、アドレス範囲内の全アドレスにアクセスするとは限らない。従って、複数のアドレス範囲が相互に重複している場合であっても、異なるプログラムから同じメモリ領域に対して重複してアクセスする事態(二重書き込みなど)が生じるか否かは、分からない。これは、実際にプログラムを動作させなければ分からないことである。   As a conventional technique related to static analysis, for example, Patent Document 1 is known. However, Patent Document 1 does not describe dynamic inspection. In addition, regarding the manual specification of the address range relating to the array A [i] or the like, whether or not a plurality of address ranges overlap each other can be detected by static analysis. However, in an actual operation, not all addresses within the address range are accessed. Therefore, even when a plurality of address ranges overlap each other, it is not known whether or not a situation (duplicate writing or the like) occurs in which the same memory area is accessed from different programs. This is something that cannot be understood unless the program is actually run.

動的に異常を検出する従来技術として、例えば特許文献2に記載の“コントローラでプログラムを実行させ、異常を検出してトレースデータを記録する”技術が知られている。
しかしながら、特許文献2の技術では、上述した“アクセスするメモリアドレスが動作中に随時決定/変更される”場合に係わる二重書き込みは、検出できない。
As a conventional technique for dynamically detecting an abnormality, for example, a technique described in Patent Document 2 “a program is executed by a controller, an abnormality is detected and trace data is recorded” is known.
However, the technique disclosed in Patent Document 2 cannot detect double writing related to the above-described case where “the memory address to be accessed is determined / changed at any time during operation”.

また、例えば、特許文献3の従来技術が知られている。
特許文献3には、ソースコードを、まず、フロントエンドコンパイラによって中間コードに変換し、この中間コードをバックエンドコンパイラによって機械語オブジェクトに変換する従来技術が、開示されている。
For example, the prior art of Patent Document 3 is known.
Patent Document 3 discloses a conventional technique in which a source code is first converted into an intermediate code by a front end compiler, and this intermediate code is converted into a machine language object by a back end compiler.

特許文献1の発明では、フロントエンドコンパイラはソースコードと中間コードの対応情報である第1の対応表を、バックエンドコンパイラは中間コードと機械語オブジェクトの対応情報である第2の対応表を作成する。   In the invention of Patent Document 1, the front-end compiler creates a first correspondence table that is correspondence information between source code and intermediate code, and the back-end compiler creates a second correspondence table that is correspondence information between intermediate code and machine language object. To do.

特開2004−171064号公報JP 2004-171064 A 特開平9−325900号公報JP-A-9-325900 特開2007−188366号公報JP 2007-188366 A

上述したように、従来では、PLCのプログラムにおいて、例えば配列、ポインタなどに係わる“アクセスするメモリアドレスが動作中に随時決定/変更される”処理に関しては、上記「異なるプログラムから同じメモリに対して重複してアクセスする(書き込む等)という異常」の有無を検査することは、出来なかった。   As described above, in the conventional PLC program, for example, with respect to the process of “the memory address to be accessed is determined / changed at any time during operation” related to, for example, an array and a pointer, It was not possible to check for the presence of “abnormality such as redundant access (writing, etc.)”.

本発明の課題は、コントローラのプログラムに“アクセスするメモリアドレスが動作中に随時決定/変更される”処理が含まれる場合でも、異なるプログラムからの重複アクセスの有無を検査できるプログラマブルコントローラシステム、その開発支援装置と、ターゲット装置等を、提供することである。   An object of the present invention is to develop a programmable controller system capable of inspecting whether or not there is a duplicate access from different programs even when the controller program includes a process in which the memory address to be accessed is determined / changed at any time during operation. It is to provide a support device and a target device.

本発明のプログラマブルコントローラシステムは、1以上のプログラムのソースコードを機械語オブジェクトに変換するコンパイル処理を行う開発支援装置と、ターゲット装置を有するプログラマブルコントローラシステムであって、下記の構成を有する。   A programmable controller system of the present invention is a programmable controller system having a development support apparatus that performs a compile process for converting a source code of one or more programs into a machine language object, and a target apparatus, and has the following configuration.

前記開発支援装置は、下記の各手段を有する。
・前記各プログラムのコンパイル処理の際に、特定の命令を検出する特定命令検出手段;
・該検出した特定命令に係わる情報である特定情報を生成する特定情報生成手段;
・該特定情報を前記ターゲット装置に転送する転送手段。
The development support apparatus has the following means.
Specific instruction detection means for detecting a specific instruction during the compilation process of each program;
Specific information generating means for generating specific information that is information related to the detected specific command;
Transfer means for transferring the specific information to the target device.

前記ターゲット装置は、前記機械語オブジェクトの各プログラムの実行に伴って、前記特定情報に基づいて、前記特定命令の実行時のアクセス先のメモリアドレスを、実行したプログラムに対応付けて記録する実アクセス先記録手段を有する。   The target device records the memory address of the access destination at the time of execution of the specific instruction in association with the executed program based on the specific information as each program of the machine language object is executed. Pre-recording means is provided.

本発明のプログラマブルコントローラシステム、その開発支援装置と、ターゲット装置等によれば、コントローラのプログラムに“アクセスするメモリアドレスが動作中に随時決定/変更される”処理が含まれる場合でも、異なるプログラムからの重複アクセスの有無を検査できる。   According to the programmable controller system of the present invention, the development support device thereof, the target device, and the like, even if the controller program includes a process in which “the memory address to be accessed is determined / changed at any time during operation”, Can check for duplicate accesses.

本例のプログラマブルコントローラシステムの構成図である。It is a block diagram of the programmable controller system of this example. 開発支援装置上に表示されるプログラム記述用の画面例を示す図である。It is a figure which shows the example of a screen for the program description displayed on a development assistance apparatus. ユーザが記述したソースコードをコンパイルして生成した中間言語(中間コード)の一例である。It is an example of an intermediate language (intermediate code) generated by compiling a source code written by a user. 図3の中間コードへのコンパイルに係わるメモリ割り付け例である。FIG. 4 is an example of memory allocation related to compilation into the intermediate code of FIG. 3. FIG. (a)、(b)は、監視対象コード表の生成過程の具体例を示す図である。(A), (b) is a figure which shows the specific example of the production | generation process of the monitoring object code table. “書き込みアドレス記録表(雛形)”23の具体例である。This is a specific example of “write address record table (model)” 23. (a)、(b)は、書き込みアドレス記録表42の具体例である。(A) and (b) are specific examples of the write address record table 42. ターゲット装置のプログラム実行管理機能を示す図である。It is a figure which shows the program execution management function of a target apparatus.

以下、図面を参照して、本発明の実施の形態について説明する。
図1は、本例のプログラマブルコントローラシステムの構成図である。
尚、本説明では、プログラマブルコントローラを、単にコントローラと記す場合やPLC等と記す場合もあるものとする。尚、ここでは、制御装置(コントローラ)の一例としてPLCを示すが、この例に限らず、例えばDCS(分散制御システム;Distributed Control System)等であってもよい。本システムは、PLC、DCS等の制御装置のプログラムを、管理するものである。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration diagram of the programmable controller system of this example.
In this description, the programmable controller may be simply referred to as a controller, or may be referred to as a PLC or the like. In addition, although PLC is shown here as an example of a control apparatus (controller), not only this example but DCS (Distributed Control System) etc. may be sufficient, for example. This system manages programs of control devices such as PLC and DCS.

図1に示す例のプログラマブルコントローラシステムは、開発支援装置10、“シミュレータ又はPLC”30等を有する。開発支援装置10は、“シミュレータ又はPLC”30におけるPLCのプログラム(制御用プログラム等)を生成して、これをPLCに転送する。PLCがこのプログラムを実行することで、運用(何らかの制御対象の制御実行)が行われることになる。   The programmable controller system of the example shown in FIG. 1 includes a development support apparatus 10, a “simulator or PLC” 30, and the like. The development support apparatus 10 generates a PLC program (control program or the like) in the “simulator or PLC” 30 and transfers it to the PLC. When the PLC executes this program, the operation (control execution of some control target) is performed.

但し、本手法は、運用前に行う上記プログラムのチェックに係わるものであり、このチェック処理は、PLCで行ってもよいし、PLCの機能・動作を模擬するコンピュータ装置であるシミュレータで行ってもよい。これより、上記の通り、“シミュレータ又はPLC”としている。そして、本手法のチェック処理では、コントローラのプログラムに“アクセスするメモリアドレスが動作中に随時決定/変更される”処理が含まれる場合でも、異なるプログラムからの重複アクセスの有無を検出することが可能となる。   However, this method is related to the check of the above-mentioned program performed before the operation, and this check processing may be performed by the PLC or a simulator which is a computer device that simulates the function / operation of the PLC. Good. Thus, as described above, the “simulator or PLC” is used. And in the check process of this method, it is possible to detect the presence or absence of duplicate access from different programs even when the controller program includes a process in which the memory address to be accessed is determined / changed at any time during operation. It becomes.

尚、“シミュレータ又はPLC”30を、ターゲット装置30と呼ぶ場合もあるものとする。換言すれば、ターゲット装置30は、シミュレータ又はPLCであると言える。また、“シミュレータ又はPLC”30のなかで特にPLCを指したい場合には、PLC30と記す場合があるものとする。同様に、“シミュレータ又はPLC”30のなかで特にシミュレータを指したい場合には、シミュレータ30と記す場合があるものとする。   Note that the “simulator or PLC” 30 may be referred to as a target device 30. In other words, it can be said that the target device 30 is a simulator or a PLC. Further, in the “simulator or PLC” 30, when it is particularly desired to indicate a PLC, it may be referred to as a PLC 30. Similarly, in the “simulator or PLC” 30, when it is particularly desired to indicate a simulator, it may be referred to as a simulator 30.

また、上記のことから、PLC(プログラマブルコントローラ)の代わりに、上記DCSにおけるコントローラを用いても構わないのであり、両者を特に区別せずにまとめて制御装置と呼んでもよいものとする。つまり、プログラマブルコントローラは、制御装置の一例である。また、これより、ターゲット装置30は、“シミュレータ又は制御装置”であると言うこともできる。   From the above, instead of the PLC (programmable controller), a controller in the DCS may be used, and both may be collectively referred to as a control device without being particularly distinguished. That is, the programmable controller is an example of a control device. From this, it can also be said that the target device 30 is a “simulator or control device”.

開発支援装置(ローダ)10は、まず、任意のPLC用プログラムのソースコード21をユーザに作成させるインタフェース機能部11(エディタ機能も含む)を有する。このインタフェース機能部11は、よく知られた既存の機能であり、ここでは特に説明しない。   The development support apparatus (loader) 10 includes an interface function unit 11 (including an editor function) that allows a user to create a source code 21 of an arbitrary PLC program. The interface function unit 11 is a well-known existing function, and is not particularly described here.

尚、上記PLC用プログラムは、PLC30で実行させることで任意の制御対象の制御を行わせる制御プログラム等である。これは、複数のプログラム(POU等)が作成されて、各プログラムが各々の定周期で繰り返し実行される場合が多い。繰り返し実行されるので、あるプログラムが任意のメモリ領域に何度も繰り返しアクセスすることは、問題とはならない(むしろ、当然の動作である)。しかしながら、別のプログラムがこのメモリ領域にアクセスすると、問題と成り得る。この為、この様な重複アクセス(二重書き込みなど)は、上記チェック処理で検出しなければならない。重複アクセスが検出されたら、例えばプログラム(ソースコード)の修正などが行われることになる。   The PLC program is a control program or the like that causes the PLC 30 to execute control of an arbitrary control target. In many cases, a plurality of programs (POU, etc.) are created and each program is repeatedly executed at each fixed period. Since the program is repeatedly executed, it does not matter that a certain program repeatedly accesses an arbitrary memory area (rather, it is a natural operation). However, it can be a problem if another program accesses this memory area. For this reason, such a duplicate access (such as double writing) must be detected by the above check process. When duplicate access is detected, for example, a program (source code) is corrected.

開発支援装置(ローダ)10は、また、上記ユーザが作成したソースコード21を、ターゲット装置30上で動作する機械語オブジェクト24に変換するコンパイラ機能部(フロントエンドコンパイラ12、バックエンドコンパイラ13)を有する。これは、ソースコード21を、中間言語22(中間コード)に変換してから、機械語オブジェクト24に変換するものである。中間コードについては、例えば上記特許文献3等に記載の既存のものであり、ここでは特に説明しない。   The development support apparatus (loader) 10 also includes compiler function units (a front-end compiler 12 and a back-end compiler 13) that convert the source code 21 created by the user into a machine language object 24 that operates on the target apparatus 30. Have. In this method, the source code 21 is converted into an intermediate language 22 (intermediate code) and then converted into a machine language object 24. The intermediate code is an existing code described in, for example, Patent Document 3 described above, and is not particularly described here.

まず、フロントエンドコンパイラ12が、上記ソースコード21を解析して中間言語22に変換する。続いて、バックエンドコンパイラ13が、この中間言語22をターゲット装置30上で動作する機械語オブジェクト24に変換する。この様な中間言語22、機械語オブジェクト24への変換機能自体は、よく知られた既存機能であるので、ここでは特に説明しない。   First, the front end compiler 12 analyzes the source code 21 and converts it into an intermediate language 22. Subsequently, the back-end compiler 13 converts the intermediate language 22 into a machine language object 24 that operates on the target device 30. Such a conversion function itself into the intermediate language 22 and the machine language object 24 is a well-known existing function and will not be particularly described here.

上記のように、開発支援装置10は、ユーザが任意の制御プログラムのソースコード21を作成するのを支援する支援機能や、このソースコード21をコンパイルしてPLC30で実行可能な形式(機械語オブジェクト24)に変換する機能などを有する。   As described above, the development support device 10 supports the user in creating the source code 21 of an arbitrary control program, or a format (machine language object) that can be executed by the PLC 30 by compiling the source code 21. 24) and the like.

また、従来より、コンパイラ機能部は、上記コンパイル処理に伴って、ソースコード21に記述される各変数に対して任意のメモリアドレスを割り当てている。このメモリアドレスは、ターゲット装置30(特にPLC30)に備えられる不図示のメモリの任意のアドレスである。   Conventionally, the compiler function unit assigns an arbitrary memory address to each variable described in the source code 21 in accordance with the above compilation process. This memory address is an arbitrary address of a memory (not shown) provided in the target device 30 (particularly the PLC 30).

ここで、本例のコンパイラ機能部(特にバックエンドコンパイラ13)は、上記機械語オブジェクト24の生成処理に伴って、後述する特定の命令を検出して、これに基づいて一例としては図示の監視対象コード表25を生成する処理等も実行する。尚、更に図示の“書き込みアドレス記録表(雛形)”23も生成してもよいが、これは生成しなくても構わない。   Here, the compiler function unit (especially the back-end compiler 13) of this example detects a specific instruction (to be described later) along with the generation process of the machine language object 24, and based on this, the monitoring shown in FIG. The process etc. which produce | generate the object code table 25 are also performed. Further, the “write address record table (model)” 23 shown in the figure may also be generated, but this need not be generated.

この監視対象コード表25の生成等については、後に詳しく説明するが、概略的には、コンパイル処理の際に、プログラム中に存在する特定の命令(監視対象命令)を検出して、この監視対象命令を示す情報を、監視対象コード表25に登録するものである。本例では後述するように、監視対象命令は例えば“(特定の)レジスタ経由で(データを)書き込む命令”(“間接アドレス指定により書き込む命令”等とも言える)などであり、一例としては、検出した監視対象命令を示す情報として監視対象命令の命令番号を登録するが、この例に限らない。   The generation of the monitoring target code table 25 and the like will be described in detail later. Generally, a specific instruction (monitoring target instruction) existing in the program is detected during the compiling process, and this monitoring target is detected. Information indicating an instruction is registered in the monitoring target code table 25. In this example, as will be described later, the monitoring target instruction is, for example, “an instruction to write (data) via a (specific) register” (also referred to as “an instruction to write by indirect addressing”). Although the instruction number of the monitoring target instruction is registered as information indicating the monitored instruction, the present invention is not limited to this example.

尚、上記のことから、本例のコンパイラ機能部(特に、バックエンドコンパイラ13)は、後述する不図示の特定命令検出機能部(不図示)、特定情報生成機能部(不図示)、転送機能部(不図示)等も備えるものと見做してもよい。但し、これは一例であり、これら不図示の機能部は、コンパイラ機能部とは別に備えられるものであっても構わない。   From the above, the compiler function unit (especially the back-end compiler 13) of this example has a specific instruction detection function unit (not shown), a specific information generation function unit (not shown), and a transfer function, which will be described later. A part (not shown) or the like may also be considered. However, this is only an example, and these functional units (not shown) may be provided separately from the compiler functional units.

また、開発支援装置(ローダ)10は、通信機能部14を有する。通信機能部14によって、不図示の通信線などを介して、例えばターゲット装置30との通信を行うことができる。これより、例えば、コンパイラ機能部(特に、バックエンドコンパイラ13)は、上記コンパイル処理によって生成された機械語オブジェクト24や監視対象コード表25等を、通信機能部12を介して、ターゲット装置30にダウンロードする。尚、更に“書き込みアドレス記録表(雛形)”23もターゲット装置30にダウンロードしてもよいが、この例に限らない(ダウンロードしなくてもよい)。   Further, the development support apparatus (loader) 10 includes a communication function unit 14. For example, communication with the target device 30 can be performed by the communication function unit 14 via a communication line (not illustrated) or the like. Accordingly, for example, the compiler function unit (particularly, the back-end compiler 13) transfers the machine language object 24, the monitoring target code table 25, and the like generated by the above compilation process to the target device 30 via the communication function unit 12. to download. Further, the “write address record table (model)” 23 may also be downloaded to the target device 30, but is not limited to this example (it may not be downloaded).

ターゲット装置30は、その通信機能部31によって開発支援装置(ローダ)10と通信することができ、以って上記ダウンロードされる機械語オブジェクト24等を受信する。そして、受信した機械語オブジェクト24や監視対象コード表25等を図示の機械語オブジェクト41や監視対象コード表43として記憶する。これは、自装置内の不図示のメモリ等の所定の記憶領域に記憶する。   The target device 30 can communicate with the development support device (loader) 10 through the communication function unit 31, and thus receives the downloaded machine language object 24 and the like. Then, the received machine language object 24, the monitoring target code table 25, and the like are stored as the illustrated machine language object 41 and the monitoring target code table 43. This is stored in a predetermined storage area such as a memory (not shown) in the own apparatus.

尚、上記のことから実質的に、機械語オブジェクト24=機械語オブジェクト41と見做してよいし、監視対象コード表25=監視対象コード表43と見做してよいので、符号について特に区別せずに記す場合もあるものとする。つまり、例えば、機械語オブジェクト24と記した場合に、それが機械語オブジェクト24を意味するものであっても機械語オブジェクト41を意味するものであってもよいものとする。これは、監視対象コード表についても同様である。   From the above, the machine language object 24 may be regarded as the machine language object 41, and the monitoring target code table 25 may be regarded as the monitoring target code table 43. In some cases, it may be written without. That is, for example, when the machine language object 24 is described, it may mean the machine language object 24 or the machine language object 41. The same applies to the monitoring target code table.

ターゲット装置30は、プログラム実行管理機能部32を有しており、ターゲット装置30がPLCである場合には、運用中にはプログラム実行管理機能部32が機械語オブジェクト41を実行することで、不図示の制御対象機器の制御が行われることになる。   The target device 30 has a program execution management function unit 32. When the target device 30 is a PLC, the program execution management function unit 32 executes the machine language object 41 during operation, and thus, The illustrated control target device is controlled.

但し、本手法は、運用開始前に係わるものであり、PLC30におけるプログラム実行管理機能部32は、通常モードでは上記の通り機械語オブジェクト41を実行することで不図示の制御対象機器の制御を行うが、特定のモード(チェックモードと呼ぶものとする)の場合には、プログラム実行管理機能部32は、以下に説明するようにプログラム異常等を検出するためのチェック処理を実行する。尚、例えばユーザが、通常モード、チェックモードの何れかのモードを指定できる。また、尚、シミュレータ30の場合には、通常モードはなく、常にチェックモードで動作するものとしてもよい。   However, this method is related to the start of operation, and the program execution management function unit 32 in the PLC 30 controls the control target device (not shown) by executing the machine language object 41 as described above in the normal mode. However, in the case of a specific mode (referred to as a check mode), the program execution management function unit 32 executes a check process for detecting a program abnormality or the like as described below. For example, the user can designate either the normal mode or the check mode. Further, in the case of the simulator 30, there is no normal mode, and the simulator 30 may always operate in the check mode.

本例では、プログラム実行管理機能部32は、チェックモードにおいては、上記チェック処理を行うものとする。このチェック処理について、詳しくは後述するが、概略的には、機械語オブジェクト41を実行しつつ、上記監視対象コード表43を用いることで、書き込みアドレス記録表42を生成するものである。これは、例えば、機械語オブジェクト41の実行中に、随時、現在実行する命令が監視対象命令であるか否かを判定して、監視対象命令の実行時にアクセスするメモリアドレスを、書き込みアドレス記録表42に記録する。監視対象命令は、監視対象コード表43を参照することで判断できる。複数の各プログラムの各機械語オブジェクト41について、それぞれ上記チェック処理を行うことで、書き込みアドレス記録表42が生成(完成)される。   In this example, it is assumed that the program execution management function unit 32 performs the above check process in the check mode. Although this check process will be described in detail later, generally, the write address record table 42 is generated by using the monitoring target code table 43 while executing the machine language object 41. For example, during the execution of the machine language object 41, it is determined at any time whether or not the currently executed instruction is a monitoring target instruction, and the memory address to be accessed when the monitoring target instruction is executed is indicated in the write address recording table. 42. The monitoring target instruction can be determined by referring to the monitoring target code table 43. The write address record table 42 is generated (completed) by performing the above check processing for each machine language object 41 of each of the plurality of programs.

尚、書き込みアドレス記録表42は、上記“書き込みアドレス記録表(雛形)”23に基づいて生成してもよいが、この例に限らない。
プログラム実行管理機能部32は、更に、上記生成した書き込みアドレス記録表42に基づいて、異なるプログラムからの重複アクセス(二重書き込み等)があるか否かを判別してもよい。これは、特に、配列、ポインタなどに係わる“アクセスするメモリアドレスが動作中に随時決定/変更される”処理に関して、重複アクセスの有無を判別可能となる。但し、この例に限らず、この様な判別を行わずに、単に、上記生成した書き込みアドレス記録表42を、ディスプレイに表示して、異常があるか否かをユーザに判断させるようにしてもよい。
The write address record table 42 may be generated based on the “write address record table (model)” 23, but is not limited to this example.
The program execution management function unit 32 may further determine whether or not there is a duplicate access (such as double writing) from different programs based on the generated write address record table 42. In particular, it is possible to determine whether or not there is a duplicate access in relation to the process of “the memory address to be accessed is determined / changed at any time during operation” related to the array, pointer, and the like. However, the present invention is not limited to this example, and instead of making such a determination, the generated write address record table 42 is simply displayed on the display so that the user can determine whether there is an abnormality. Good.

尚、開発支援装置10は、例えばパソコン等の汎用のコンピュータ上で実現されるものであり、ハードウェア的にはパソコン等の一般的な構成を有している。つまり、特に図示しないが、例えばCPU、ハードディスクやメモリ等の記憶装置等を有しており、更に図示の画面(ディスプレイ)15、入力装置16(キーボード、マウス等)を備えている。   The development support apparatus 10 is realized on a general-purpose computer such as a personal computer, and has a general configuration such as a personal computer in terms of hardware. That is, although not shown in particular, it has, for example, a CPU, a storage device such as a hard disk or a memory, and further includes a screen (display) 15 and an input device 16 (keyboard, mouse, etc.) shown in the drawing.

上記記憶装置には予め所定のアプリケーションプログラムが記憶されている。上記CPUが、このアプリケーションプログラムを実行することで、上記インタフェース機能部11、コンパイラ機能部(フロントエンドコンパイラ12、バックエンドコンパイラ13)、通信機能部14等の各種機能部や後述する不図示の各種処理機能部が実現される。   A predetermined application program is stored in the storage device in advance. When the CPU executes the application program, various function units such as the interface function unit 11, compiler function units (front-end compiler 12 and back-end compiler 13), communication function unit 14, and various types (not shown) to be described later. A processing function unit is realized.

また、上記コンパイラ機能部は、ここでは上記フロントエンドコンパイラ12、バックエンドコンパイラ13の2つに分けて示しているが、中間言語22(中間コード22)を経て機械語オブジェクト24に変換する1つのコンパイラであってもよい。この場合、中間コード22を出力する(そして一時的に保持する)ことは、必要ない。   The compiler function unit is divided into two parts, the front-end compiler 12 and the back-end compiler 13 here. However, the compiler function unit is converted into a machine language object 24 via the intermediate language 22 (intermediate code 22). It may be a compiler. In this case, it is not necessary to output (and temporarily hold) the intermediate code 22.

また、特に図示しないが、上記コンパイラ機能部は、上記コンパイル処理に伴って、中間コード22の各命令(中間言語命令と呼ぶものとする)と、機械語オブジェクトの各命令(機械語命令と呼ぶものとする)とを対応付けた中間−機械対応付けテーブル(不図示)を、生成してもよい。   Further, although not particularly illustrated, the compiler function unit includes each instruction of the intermediate code 22 (referred to as an intermediate language instruction) and each instruction of a machine language object (referred to as a machine language instruction) in accordance with the compilation process. An intermediate-machine correspondence table (not shown) that associates the data may be generated.

これは、例えば、各中間言語命令毎に、それぞれ、その中間言語命令に、当該中間言語命令を変換して成る機械語命令群を対応付けた中間−機械対応付けテーブル(不図示)を生成する。対応付け方法としては、各命令のプログラム上の位置を示す情報(命令番号など)を用いるものとする。例えば、後述する図3に示す中間言語22の具体例における5行目の中間言語命令が、不図示の機械語オブジェクトにおける15行〜17行目の機械語命令群に変換されたとした場合、‘5’と‘15〜17’とが、対応付けられることになる。   For example, for each intermediate language instruction, an intermediate-machine association table (not shown) in which a machine language instruction group formed by converting the intermediate language instruction is associated with the intermediate language instruction is generated. . As an association method, information (instruction number or the like) indicating the position of each instruction on the program is used. For example, when the intermediate language instruction on the fifth line in the specific example of the intermediate language 22 shown in FIG. 3 to be described later is converted into the machine language instruction group on the 15th line to the 17th line in a machine language object (not shown), “5” and “15 to 17” are associated with each other.

尚、ここでは、例えば後述する図3における各行(1行分)を、1つの中間言語命令と見做すものとする。これは、機械語オブジェクト(機械語命令群)についても同様であり、不図示の機械語命令群の各行を、それぞれ、1つの機械語命令と見做すものとする。また、通常、1つの中間言語命令は、複数の機械語命令(すなわち機械語命令群)に変換される場合が多い。   Here, for example, each line (one line) in FIG. 3 described later is regarded as one intermediate language instruction. The same applies to a machine language object (machine language instruction group), and each line of a machine language instruction group (not shown) is regarded as one machine language instruction. In general, one intermediate language instruction is often converted into a plurality of machine language instructions (that is, a machine language instruction group).

また、“シミュレータ又はPLC”30も、特に図示しないCPU/MPU等の演算プロセッサやメモリ等を有しており、メモリには予め所定のアプリケーションプログラムが記憶されている。演算プロセッサが、このアプリケーションプログラムを実行することで、通信機能部31やプログラム実行管理機能部32等の各種機能部や後述する不図示の各種処理機能部が実現される。   The “simulator or PLC” 30 also includes an arithmetic processor such as a CPU / MPU (not shown), a memory, and the like, and a predetermined application program is stored in the memory in advance. When the arithmetic processor executes the application program, various functional units such as the communication functional unit 31 and the program execution management functional unit 32 and various processing functional units (not shown) described later are realized.

ユーザは、開発支援装置10上で任意のプログラムのソースコード21を記述する。
図2に、プログラム記述例を示す。
図2は、開発支援装置10上に表示されるプログラム記述用の画面例を示す。
The user describes the source code 21 of an arbitrary program on the development support apparatus 10.
FIG. 2 shows a program description example.
FIG. 2 shows an example of a program description screen displayed on the development support apparatus 10.

図示の例では、INT型であって5つの要素をもった配列変数が宣言されており、更に配列A[i](i=0,1,2,3,4)に所定の数値‘10’を代入するプログラムが示されている。尚、A[i]におけるiは、変数であり、配列に付けられたインデックス等と呼ばれる。上記のように、iは、0,1,2,3,4の何れかの値を取り得る変数となる。   In the example shown in the figure, an array variable of the INT type and having five elements is declared, and a predetermined numerical value “10” is further added to the array A [i] (i = 0, 1, 2, 3, 4). A program for substituting is shown. Note that i in A [i] is a variable and is called an index or the like attached to the array. As described above, i is a variable that can take any of 0, 1, 2, 3, and 4.

そして、プログラム実行中にそのときの変数iの値によってアクセスするメモリアドレスが決定/変更されるので、従来技術ではアクセスするメモリ位置が特定できない。
尚、上記のように従来より、変数のメモリアドレス割り付けをユーザが手動で実施している場合があり、ここでも特に図示しないが、上記配列A[i]に対してユーザが例えば「6154〜6158」のアドレス範囲を指定しているものとする。コンパイラ機能部は、この様な指定に応じて、例えば図3に示す中間言語を生成する。また、特に図示しないが、変数iの値の決定/変更に係わる処理も、プログラム中に記述されているものとする。
Since the memory address to be accessed is determined / changed according to the value of the variable i at that time during program execution, the memory location to be accessed cannot be specified by the conventional technique.
As described above, there is a case where the user manually assigns the memory address of the variable as described above. Here, although not particularly illustrated, the user selects, for example, “6154 to 6158” for the array A [i]. ”Address range is specified. The compiler function unit generates, for example, the intermediate language shown in FIG. 3 in accordance with such designation. Although not specifically shown, it is assumed that processing related to determination / change of the value of the variable i is also described in the program.

図3は、フロントエンドコンパイラ12が、上記ユーザが記述したソースコード21をコンパイルして生成した中間言語(中間コード)の一例である。
図4は、図3の中間コードへのコンパイルに係わるメモリ割り付け例である。
FIG. 3 shows an example of an intermediate language (intermediate code) generated by the front-end compiler 12 by compiling the source code 21 described by the user.
FIG. 4 is an example of memory allocation related to compilation into the intermediate code of FIG.

尚、上記中間言語生成やメモリ割付の仕組みは、一般的なコンパイラで実現している技術であり、よって詳細な説明は行わないものとする。
以下、図3の各中間言語命令について簡単に説明する。
Note that the above intermediate language generation and memory allocation mechanism is a technology realized by a general compiler, and therefore will not be described in detail.
Hereinafter, each intermediate language instruction of FIG. 3 will be briefly described.

尚、ここでは、変数iに対してメモリアドレス6159が割り当てられたものとする。また、上記アドレス範囲「6154〜6158」の指定により、配列Aの先頭アドレスとしてメモリアドレス6154が割り当てられるものとする。また、尚、図3に示す各中間言語命令の左側に示す1,2,3、4,5は、各中間言語命令のプログラム先頭からの順番を示す番号(命令番号と呼ぶ)である。
・「LD 10」は、定数‘10’をアキュムレータに読み込む。
・「PLD M,WI,6159」は、アキュムレータの値(=10)をスタックに積み、メモリアドレス6159の格納データの値(変数iの値)を、アキュムレータに読み込む。
Here, it is assumed that the memory address 6159 is assigned to the variable i. Further, it is assumed that the memory address 6154 is assigned as the head address of the array A by the designation of the address range “6154 to 6158”. In addition, 1, 2, 3, 4, and 5 shown on the left side of each intermediate language instruction shown in FIG. 3 are numbers (referred to as instruction numbers) indicating the order of each intermediate language instruction from the beginning of the program.
“LD 10” reads constant “10” into the accumulator.
“PLD M, WI, 6159” loads the accumulator value (= 10) on the stack and reads the stored data value (value of variable i) at memory address 6159 into the accumulator.

尚、不図示の他の処理によって、メモリアドレス6159の格納データ(変数iの値)が更新される処理が行われているものとする。上記具体例の場合、アキュムレータに読み込まれる値は、0,1,2,3,4のうちの何れかということになるはずである。
・「LEAAX M,DU,6154」は、AXレジスタにメモリアドレス6154(配列Aの先頭アドレス)を設定する。
・「AXADDP DU」は、AXレジスタの値にアキュムレータの値を足した値(6154+i)を、AXレジスタに格納し、スタックに積んである値(=10)をアキュムレータに取り込む。
・「ST AX」は、AXレジスタに格納されているデータによって示されるアドレス‘6154+i’に、アキュムレータの値(=10)を書き込む。つまり、この時のAXレジスタの格納データが、書き込み対象(アクセス先)のメモリアドレスになる。例えば、i=2の場合には、AXレジスタが示しているアドレスは、6154+2=6156番地となる。
It is assumed that the process of updating the stored data (value of variable i) at the memory address 6159 is performed by another process (not shown). In the case of the above specific example, the value read into the accumulator should be one of 0, 1, 2, 3, and 4.
“LEAAX M, DU, 6154” sets the memory address 6154 (first address of array A) in the AX register.
“AXADDP DU” stores the value (6154 + i) obtained by adding the value of the accumulator to the value of the AX register in the AX register, and takes the value (= 10) accumulated in the stack into the accumulator.
“ST AX” writes the accumulator value (= 10) to address “6154 + i” indicated by the data stored in the AX register. That is, the data stored in the AX register at this time becomes the memory address of the write target (access destination). For example, when i = 2, the address indicated by the AX register is 6154 + 2 = 6156.

このように「ST AX」命令実行の際のAXレジスタの値が、アクセス先メモリアドレスを示すので、本手法では、プログラム実行中に、随時、現在実行する命令が特定の命令(「ST AX」命令など)であるか否かをチェックして、特定の命令(「ST AX」命令など)である場合には、そのときのAXレジスタの値(=6156)を記録する。   As described above, since the value of the AX register at the time of executing the “ST AX” instruction indicates the access destination memory address, in this method, the instruction to be executed at any time during the program execution is a specific instruction (“ST AX” If it is a specific instruction (such as “ST AX” instruction), the value of the AX register (= 6156) at that time is recorded.

この記録方法は、様々であってよく、単にそのときのAXレジスタの値(=6156)を、書き込みアドレス記録表42に追加格納(蓄積)するものであってもよいが、本例では後述する図6〜図7のような方法を示す。つまり、予め作成してある上記“書き込みアドレス記録表(雛形)”23に対して、該当箇所にチェックを入れる方法である。これについては、後に、図6、図7を参照して説明する。   This recording method may be various, and the value (= 6156) of the AX register at that time may be additionally stored (accumulated) in the write address recording table 42, but will be described later in this example. The method as shown in FIGS. In other words, this is a method in which a check is made at a corresponding portion of the “write address record table (model)” 23 created in advance. This will be described later with reference to FIGS.

尚、上記のことから、上記「ST AX」命令は、“(特定の)レジスタ経由で(データを)書き込む命令”(間接アドレス指定命令)の一例であると言うこともできる。特定のレジスタは、上記一例ではAXレジスタであるが、この例に限らない。上記の通り、AXレジスタにはアクセス先のアドレスが格納されているので、上記「ST AX」命令は、AXレジスタからアクセス先のアドレスを取得することでアクセス先にデータを書き込む命令であり、これは“AXレジスタ経由で(データを)書き込む命令”と言うことができる。   From the above, it can be said that the “ST AX” instruction is an example of “an instruction to write (data) via a (specific) register” (indirect addressing instruction). The specific register is the AX register in the above example, but is not limited to this example. As described above, since the access destination address is stored in the AX register, the “ST AX” instruction is an instruction to write data to the access destination by obtaining the access destination address from the AX register. Can be said to be “an instruction to write (data) via the AX register”.

上記「ST AX」命令等のような“特定のレジスタ経由で(データを)書き込む命令”は、例えば上記図3のような処理に係わる命令群に含まれる。図3のような処理とは、配列A[i]に係わり変数iの値によってアクセス先が決まる処理であり、これは“アクセスするメモリアドレスが動作中に随時決定/変更される処理”や“アクセス先が可変の処理”の一例である等と言うこともできる。上述したように、従来では、この様な処理に係わる複数プログラムからの二重書き込みは、検査できない。   The “instruction for writing (data) via a specific register” such as the “ST AX” instruction is included in the instruction group related to the processing as shown in FIG. 3, for example. The process as shown in FIG. 3 is a process related to the array A [i] and the access destination is determined by the value of the variable i. This is a "process in which the memory address to be accessed is determined / changed at any time during operation" or " It can also be said that the access destination is an example of “variable processing”. As described above, conventionally, double writing from a plurality of programs related to such processing cannot be inspected.

これに対して、本手法では、ターゲット装置30において、プログラム実行中に、現在実行する命令が、上記特定の命令(監視対象命令)であるか否か、すなわち例えば“特定のレジスタ経由で(データを)書き込む命令”であるか否かを判別でき、“特定のレジスタ経由で(データを)書き込む命令”である場合には、現在の“特定のレジスタ”(AXレジスタ等)の格納データ(その状況でのアクセス先アドレス)を、記録する。これを、複数のプログラムそれぞれについて実行することで、各プログラム毎の実際のアクセス先アドレス群が、記録されることになる。よって、この記録に基づいて、複数のプログラムで重複するアクセス先アドレスがあるか否かを判別できる。   On the other hand, in this method, whether or not the instruction currently executed during the program execution in the target device 30 is the specific instruction (monitoring target instruction), for example, “via a specific register (data )), And if it is a “command to write (data) via a specific register”, the data stored in the current “specific register” (AX register, etc.) Record the access address in the situation). By executing this for each of a plurality of programs, an actual access destination address group for each program is recorded. Therefore, based on this record, it can be determined whether or not there are overlapping access destination addresses in a plurality of programs.

尚、上記“現在実行する”とは、実行直前、実行中、実行直後の何れを意味するものであってもよい。
尚、上記のように「ST AX」命令は、上記特定の命令の一例であるが、「ST AX」命令を機械語に変換して成る機械語命令群(特に具体例は示さない)も、上記特定の命令の一例であるものとする。つまり、特定の命令とは、中間言語命令であるか機械語命令であるかは関係ない。上記一例では、「ST AX」命令も、「ST AX」命令に相当する機械語命令群(特に具体例は示さない)も、どちらも、特定の命令であると見做してよい。
The “currently executing” may mean any of immediately before execution, during execution, and immediately after execution.
As described above, the “ST AX” instruction is an example of the specific instruction. However, a machine language instruction group obtained by converting the “ST AX” instruction into a machine language (a specific example is not shown) It is assumed to be an example of the specific instruction. In other words, it does not matter whether the specific instruction is an intermediate language instruction or a machine language instruction. In the above example, both the “ST AX” instruction and the machine language instruction group corresponding to the “ST AX” instruction (specific example not shown) may be regarded as specific instructions.

ターゲット装置30において上記のように現在実行する命令が特定の命令であるか否かを判別できるようにする為に、開発支援装置10において、プログラム(ソースコード21)のコンパイルの際に、このプログラムの各命令の中から特定の命令を検出して、検出した特定命令に係わる情報である特定情報を生成して、この特定情報をターゲット装置30に渡す。この特定情報の一例が監視対象コード表であるが、この例に限らない。特定情報の他の例としては、後述する“プログラム中の所定の位置に付される所定の印”や、“プログラム中に挿入される所定の命令”等が挙げられるが、これらの例に限るものでもない。   In order to be able to determine whether or not the instruction currently executed in the target device 30 is a specific instruction as described above, this program is compiled when the program (source code 21) is compiled in the development support device 10. A specific instruction is detected from among these instructions, specific information that is information related to the detected specific instruction is generated, and this specific information is passed to the target device 30. An example of this specific information is a monitoring target code table, but is not limited to this example. Other examples of the specific information include “predetermined marks attached to predetermined positions in the program” and “predetermined instructions inserted into the program”, which will be described later, but are not limited to these examples. Not a thing.

上記図3に示す中間コードの場合、その生成に伴うコンパイラによるメモリ割付けは、例えば図4に示すものとなる。図3の例では、配列Aの先頭アドレスが上記の通り‘6154’であり、要素は0〜4であるので、配列Aに対しては図4に示すようにアドレス‘6154’、6155’、6156’、6157’、6158’が、割り当てられる。また、ここでは変数iに対しては上記の通りアドレス‘6159’が割り当てられている。   In the case of the intermediate code shown in FIG. 3, the memory allocation by the compiler accompanying the generation is as shown in FIG. 4, for example. In the example of FIG. 3, the start address of the array A is “6154” as described above, and the elements are 0 to 4. Therefore, for the array A, as shown in FIG. 4, the addresses “6154”, 6155 ”, 6156 ', 6157', 6158 'are assigned. Here, the address “6159” is assigned to the variable i as described above.

尚、後述する“書き込みアドレス記録表(雛形)”23の作成の際には、図4の配列Aへのメモリ割当結果(アドレス‘6154’、6155’、6156’、6157’、6158’)を用いればよい。   When creating a “write address record table (model)” 23 to be described later, the memory allocation results (addresses “6154”, 6155 ′, 6156 ′, 6157 ′, 6158 ′) to the array A in FIG. Use it.

図5は、監視対象コード表25の生成過程の具体例を示す図である。
図5(a)は、監視対象コード表25の初期状態を示す図であり、図5(b)はこの初期状態から上記図2、図3のプログラム例に応じてデータが格納された状態を示す。
FIG. 5 is a diagram illustrating a specific example of the process of generating the monitoring target code table 25.
FIG. 5 (a) is a diagram showing an initial state of the monitoring target code table 25. FIG. 5 (b) shows a state in which data is stored from this initial state according to the program examples of FIGS. Show.

監視対象コード表25には、開発支援装置10における任意のプログラムのコンパイル処理に伴って、監視対象命令のオフセット位置が登録される。
図5に示す例では、監視対象コード表25は、管理番号51、プログラム名52、監視命令オフセット位置53の各データ項目よりなる。
In the monitoring target code table 25, the offset position of the monitoring target instruction is registered along with the compilation processing of an arbitrary program in the development support apparatus 10.
In the example illustrated in FIG. 5, the monitoring target code table 25 includes data items of a management number 51, a program name 52, and a monitoring instruction offset position 53.

管理番号51は、内部で表を管理するための一意の番号である。プログラム名52には、コンパイル対象のプログラム名が登録される。
監視命令オフセット位置53には、監視対象命令のオフセット位置(命令番号など)が登録される。
The management number 51 is a unique number for managing the table internally. In the program name 52, the name of the program to be compiled is registered.
In the monitoring command offset position 53, the offset position (command number or the like) of the monitoring target command is registered.

ここで、監視対象命令の検出方法について説明する。まず、監視対象命令は、例えば“特定のレジスタ経由で書き込む命令”等である。“特定のレジスタ経由で書き込む命令”は、例えば、“アクセスするメモリアドレスが動作中に随時決定/変更される”処理に係わる命令群に含まれる。   Here, a method for detecting a monitoring target instruction will be described. First, the monitoring target instruction is, for example, “an instruction to write via a specific register”. “Instructions to be written via a specific register” are included in, for example, an instruction group related to processing in which “memory address to be accessed is determined / changed at any time during operation”.

“特定のレジスタ経由で書き込む命令”は、本例の場合、「ST AX」で始まる命令である。これより、中間言語22を検索して、「ST AX」で始まる命令を全て検出して、それらのオフセット位置を監視命令オフセット位置53に登録する。   In this example, the “instruction to write via a specific register” is an instruction starting with “ST AX”. As a result, the intermediate language 22 is searched to detect all the instructions starting with “ST AX”, and their offset positions are registered in the monitoring instruction offset position 53.

尚、上記“特定のレジスタ経由で書き込む命令”における“特定のレジスタ”は、上記一例では上記AXレジスタであるが、この例に限らない。“特定のレジスタ経由で書き込む命令”は、上記一例では、AXレジスタの格納データ(アドレス)が指すメモリ領域に、所定のデータ(上記具体例では‘10’)を書き込む命令である。   The “specific register” in the “command to write via the specific register” is the AX register in the above example, but is not limited to this example. In the above example, the “command to write via a specific register” is a command to write predetermined data (“10” in the above specific example) to the memory area indicated by the storage data (address) of the AX register.

図3の例の場合、5行目(命令番号=‘5’)の「ST AX,WI」命令のみが監視対象命令になるので、監視命令オフセット位置53には、図5(b)に示すように‘5’のみが格納される。   In the case of the example in FIG. 3, only the “ST AX, WI” instruction on the fifth line (instruction number = “5”) is the instruction to be monitored, so the monitoring instruction offset position 53 is shown in FIG. Thus, only “5” is stored.

但し、この例に限らず、例えば、監視対象命令としての中間言語命令に対応する機械語命令のオフセット位置を、上記中間−機械対応付けテーブルを参照して求めて、これを監視命令オフセット位置53に登録するようにしてもよい。上述した仮の具体例では、図3の5行目の中間言語命令に対応する機械語命令群のオフセット位置は‘15〜17行目’であるとしているので、例えばその先頭である‘15’が、図示のように監視命令オフセット位置53に登録されてもよい。   However, the present invention is not limited to this example. For example, an offset position of a machine language instruction corresponding to an intermediate language instruction as a monitoring target instruction is obtained with reference to the intermediate-machine association table, and this is obtained as a monitoring instruction offset position 53. You may make it register to. In the tentative concrete example described above, the offset position of the machine language instruction group corresponding to the intermediate language instruction on the fifth line in FIG. 3 is '15th to 17th lines'. May be registered at the monitoring command offset position 53 as shown.

図6は、“書き込みアドレス記録表(雛形)”23の具体例である。尚、図6は、書き込みアドレス記録表42の初期状態を示すものと見做すこともできるので、以下、これに基づいて説明する。   FIG. 6 is a specific example of the “write address record table (model)” 23. Note that FIG. 6 can be regarded as showing the initial state of the write address record table 42, and will be described below based on this.

書き込みアドレス記録表42(その雛形23)は、メモリアドレス61、プログラム名62の各データ項目より成る。
開発支援装置10は、メモリアドレス61の欄に、対象となるメモリアドレスを登録する。これは、上記具体例の場合、図4に示す配列Aへのメモリ割付け結果(配列Aに対応するアドレス)を、メモリアドレス61の欄に登録する。これより、図6に示すように、‘6154’、6155’、6156’、6157’、6158’が、メモリアドレス61の欄に登録される。
The write address record table 42 (the template 23) includes data items of a memory address 61 and a program name 62.
The development support apparatus 10 registers the target memory address in the memory address 61 field. In the case of the above specific example, the memory allocation result (address corresponding to the array A) shown in FIG. 4 is registered in the memory address 61 column. Thus, as shown in FIG. 6, '6154', 6155 ', 6156', 6157 ', and 6158' are registered in the memory address 61 column.

また、プログラム名62の欄に、ターゲット装置30で実行させるプログラムの名称等を登録する。つまり、コンパイルした各プログラムの名称等を登録する。名称は、プログラムのソースコード21中に記述されている。図示の例では、PG1,PG2の2つのプログラム名が登録される。これによって、例えば図6に示すような書き込みアドレス記録表42の初期状態(雛形23)が作成される。   In the column of program name 62, the name of the program to be executed by the target device 30 is registered. That is, the name of each compiled program is registered. The name is described in the source code 21 of the program. In the illustrated example, two program names PG1 and PG2 are registered. Thereby, for example, an initial state (model 23) of the write address recording table 42 as shown in FIG. 6 is created.

その後、この雛形23が、コンパイル結果である機械語オブジェクト24と共に、ターゲット装置30にダウンロードされ、ターゲット装置30において、書き込みアドレス記録表42(その初期状態)として記憶される。   Thereafter, this template 23 is downloaded to the target device 30 together with the machine language object 24 that is the compilation result, and is stored as a write address recording table 42 (its initial state) in the target device 30.

その後、ターゲット装置30において、上記チェック処理が実行されると、ダウンロードされた各プログラム(機械語オブジェクト)が実行される。PLC30で実行する場合、運用としての実行ではなく、チェックモードで実行するので、制御対象機器への指令出力等は行われない。   Thereafter, when the above check process is executed in the target device 30, each downloaded program (machine language object) is executed. When executed by the PLC 30, since it is executed in the check mode, not as an operation, no command output or the like to the control target device is performed.

そして、上記各プログラム実行中に特定の命令を実行する際に実際にアクセスするメモリアドレスを検出して、検出したメモリアドレスを書き込みアドレス記録表42に記録することを繰り返すことで、書き込みアドレス記録表42を完成させる。この記録処理は、本例の場合には、検出したメモリアドレスと一致するメモリアドレス61がある場合、該当箇所に図7に示すようにチェックを付ける。   Then, by repeatedly detecting the memory address actually accessed when executing a specific instruction during the execution of each program and recording the detected memory address in the write address record table 42, the write address record table 42 is completed. In this recording process, in the case of this example, when there is a memory address 61 that matches the detected memory address, a check is made at the corresponding location as shown in FIG.

図7(a)は、上記チェック処理中における書き込みアドレス記録表42の具体例であり、図7(b)は書き込みアドレス記録表42が完成した状態の具体例である。
図7(a)の例は、プログラムPG1を実行中に“特定の命令(監視対象命令)を実行する際に実際にアクセスするメモリアドレス”として‘6156’が検出され、これより図示のように該当箇所にチェックが付けられた状態を示している。尚、基本的には、検出されたメモリアドレス(ここでは‘6156’)を記録するものであり、当該記録する方法の一例が上記「該当箇所にチェックが付ける」ものであり、この例に限るものではない。
FIG. 7A is a specific example of the write address record table 42 during the check process, and FIG. 7B is a specific example of the state where the write address record table 42 is completed.
In the example of FIG. 7A, “6156” is detected as “memory address that is actually accessed when executing a specific instruction (monitoring target instruction)” during execution of the program PG1, and as shown in FIG. It shows a state where the corresponding part is checked. Basically, the detected memory address (here, “6156”) is recorded, and an example of the recording method is the above-mentioned “check corresponding part”, and is limited to this example. It is not a thing.

本例の場合、実行中のプログラムに対応する監視命令オフセット位置53に基づいて、現在実行する命令が上記監視対象命令であるか否かを判別する。上記の通り、監視命令オフセット位置53には、監視対象命令に相当する中間言語命令の位置(中間言語における命令番号など;中間言語命令番号と呼ぶ)が格納されてもよいし、監視対象命令に相当する機械語命令の位置(機械語における命令番号など;機械語命令番号と呼ぶ)が格納されてもよい。上記具体例の場合、中間言語命令番号は‘5’であり、機械語命令番号は‘15’であることになる。何れにしても、監視命令オフセット位置53には、特定の命令を示す情報の一例である、特定の命令の位置(監視対象命令の位置)の情報が格納されているものと言える。   In this example, based on the monitoring instruction offset position 53 corresponding to the program being executed, it is determined whether or not the currently executed instruction is the monitoring target instruction. As described above, the monitoring instruction offset position 53 may store the position of an intermediate language instruction corresponding to the monitoring target instruction (such as an instruction number in the intermediate language; referred to as an intermediate language instruction number). The position of the corresponding machine language instruction (instruction number in machine language, etc .; referred to as machine language instruction number) may be stored. In the case of the above specific example, the intermediate language instruction number is “5”, and the machine language instruction number is “15”. In any case, it can be said that the monitoring instruction offset position 53 stores information on the position of the specific instruction (position of the monitoring target instruction), which is an example of information indicating the specific instruction.

そして、現在実行する命令の位置が、監視対象命令の位置と一致する場合には、現在実行する命令は、監視対象命令であると判別する。ターゲット装置30におけるプログラム実行は、機械語オブジェクト(機械語命令群)を実行するものであるので、現在実行する命令の位置は、現在実行する命令の機械語命令番号等によって示されるものであり、これは例えば後述するプログラムカウンタ(PC)の現在値である。監視命令オフセット位置53に監視対象命令に対応する機械語命令番号が格納されている場合には、プログラムカウンタ(PC)の現在値が、監視命令オフセット位置53と一致するか否かを判定すればよい。一方、監視命令オフセット位置53に監視対象命令に対応する中間言語命令番号が格納されている場合には、まず、この中間言語命令番号を対応する機械語命令番号に変換する必要がある。この変換には例えば上記中間−機械対応付けテーブルを用いればよい。   If the position of the instruction that is currently executed matches the position of the monitoring target instruction, it is determined that the instruction that is currently executed is the monitoring target instruction. Since the program execution in the target device 30 is to execute a machine language object (machine language instruction group), the position of the currently executed instruction is indicated by the machine language instruction number of the currently executed instruction, etc. This is, for example, a current value of a program counter (PC) described later. When the machine instruction number corresponding to the monitoring target instruction is stored in the monitoring instruction offset position 53, it is determined whether or not the current value of the program counter (PC) matches the monitoring instruction offset position 53. Good. On the other hand, when the intermediate language instruction number corresponding to the monitoring target instruction is stored in the monitoring instruction offset position 53, it is necessary to first convert the intermediate language instruction number into the corresponding machine language instruction number. For this conversion, for example, the intermediate-machine association table may be used.

尚、上記具体例では、中間言語命令番号は‘5’、機械語命令番号は‘15’となり、これらの何れか一方がプログラムPG1に対応する監視命令オフセット位置53に格納されていることになる。   In the above specific example, the intermediate language instruction number is “5” and the machine language instruction number is “15”, and one of these is stored in the monitoring instruction offset position 53 corresponding to the program PG1. .

また、尚、上記判別に用いる監視命令オフセット位置53は、現在実行中のプログラムのプログラム名と同一のプログラム名52に対応する監視命令オフセット位置53である。   The monitoring instruction offset position 53 used for the determination is a monitoring instruction offset position 53 corresponding to the program name 52 that is the same as the program name of the currently executing program.

上記特定の命令(監視対象命令)は、上記一例では“特定のレジスタ経由で(データを)書き込む命令”である。また、特定の命令は、一例としては、“アクセスするメモリアドレスが処理中に随時決定/変更される処理”に係わる命令であるとも言える。   The specific instruction (monitoring target instruction) is “an instruction to write (write data) via a specific register” in the above example. Further, as an example, the specific instruction can be said to be an instruction related to “a process in which a memory address to be accessed is determined / changed at any time during the process”.

図8は、ターゲット装置30のプログラム実行管理機能を示す図である。
ユーザが記述したソースコード21は、開発支援装置10のコンパイル機能で、ターゲット装置30で動作する機械語オブジェクト24に変換され、この機械語オブジェクト24がターゲット装置30に転送されて機械語オブジェクト41として格納される。従って、「機械語オブジェクト24=機械語オブジェクト41」と見做してよい。
FIG. 8 is a diagram showing a program execution management function of the target device 30.
The source code 21 described by the user is converted into a machine language object 24 that operates on the target device 30 by the compile function of the development support device 10, and this machine language object 24 is transferred to the target device 30 to be used as a machine language object 41. Stored. Therefore, it may be regarded as “machine language object 24 = machine language object 41”.

ターゲット装置30のプログラム実行管理機能部32は、例えば上記チェックモードでは、各プログラムの機械語オブジェクト41(上記PG1やPG2等)を順次実行しつつ、上記監視対象命令を実行する際に実際にアクセスするメモリアドレスを検出して記録する処理を実行する。   For example, in the check mode, the program execution management function unit 32 of the target device 30 actually executes the monitor target instruction while sequentially executing the machine language object 41 (PG1, PG2, etc.) of each program. The memory address to be detected is detected and recorded.

尚、各プログラムの実行動作自体は、運用中におけるプログラム実行動作と同様であってよく、つまり既存の一般的な動作であってよく、特に詳細には説明しないが、図示のPG実行リストに従って、図示のプログラム用メモリに格納された各プログラム(機械語オブジェクト41;本例ではPG1,PG2)を、順次、実行する処理となる。   The execution operation of each program itself may be the same as the program execution operation during operation, that is, may be an existing general operation, and will not be described in detail, but according to the illustrated PG execution list. Each program (machine language object 41; PG1, PG2 in this example) stored in the illustrated program memory is sequentially executed.

ターゲット装置30のプログラム実行管理機能部32には、一般にプログラムカウンタ(PC)と呼ばれる、プログラムの実行位置を示すポインタがある。プログラム実行管理機能部32による機械語オブジェクト41実行の際には、随時、そのときにPCが示す位置のデータ(命令)を取り込み、取り込んだ命令を命令実行機能によって実行し、その後PCを次の命令の位置に移動する(例えばPCの値を+1インクリメントする)。命令の実行に応じてメモリに対して読み書きを実施する。   The program execution management function unit 32 of the target device 30 has a pointer that indicates a program execution position, generally called a program counter (PC). When the machine language object 41 is executed by the program execution management function unit 32, the data (instruction) at the position indicated by the PC is fetched at any time, and the fetched instruction is executed by the instruction execution function. Move to the position of the command (for example, increment the PC value by +1). Read and write to the memory according to the execution of the instruction.

以上が、一般的なプログラム実行動作であるが、本例のプログラム実行管理機能部32は、このプログラム実行動作に伴って、監視対象命令を実行する際に実際にアクセスするメモリアドレスを検出して「書き込みアドレス記録表」42に記録する処理を行う。   The above is a general program execution operation. In this example, the program execution management function unit 32 detects a memory address that is actually accessed when executing the instruction to be monitored. Processing for recording in the “write address record table” 42 is performed.

上記プログラム実行に伴って「書き込みアドレス記録表」42にデータを記録する処理の流れを、以下に記載する。
PC(プログラムカウンタ)は、実行する機械語命令の位置(相対アドレス等)を示すので、各機械語命令を実行する際に、そのときのPCの値を、監視対象コード表43の監視命令オフセット位置53の値と比較して、一致した場合は、現在実行する機械語命令が上記特定の命令に相当すると判定する。但し、この処理は、監視命令オフセット位置53に、機械語命令のオフセット位置(上記具体例の場合、‘15’)が、登録される形態の場合の処理である。
A flow of processing for recording data in the “write address recording table” 42 in accordance with the execution of the program will be described below.
Since the PC (program counter) indicates the position (relative address, etc.) of the machine language instruction to be executed, when executing each machine language instruction, the PC value at that time is used as the monitoring instruction offset in the monitoring target code table 43. If they match with the value at the position 53, it is determined that the machine language instruction that is currently executed corresponds to the specific instruction. However, this process is a process in the case where the offset position of the machine language instruction ('15' in the above specific example) is registered in the monitoring instruction offset position 53.

監視命令オフセット位置53に、上記監視対象命令に相当する中間言語命令のオフセット位置(上記具体例の場合、‘5’)が登録される形態の場合には、上記中間−機械対応付けテーブルを参照することで、上記中間言語命令に対応する機械語命令のオフセット位置を、求める処理が必要となる。そして、上記PCの値が、この機械語命令のオフセット位置と一致する場合には、現在実行する命令が特定の命令に相当すると判定することになる。尚、勿論、この処理を実現する為に、予め、上記中間−機械対応付けテーブル(不図示)を、ターゲット装置30にダウンロードしておく必要がある。   In the case where the offset position ('5' in the above specific example) of the intermediate language instruction corresponding to the monitoring target instruction is registered in the monitoring instruction offset position 53, refer to the intermediate-machine association table. Thus, it is necessary to perform processing for obtaining the offset position of the machine language instruction corresponding to the intermediate language instruction. If the value of the PC matches the offset position of the machine language instruction, it is determined that the currently executed instruction corresponds to a specific instruction. Of course, in order to realize this process, the intermediate-machine association table (not shown) needs to be downloaded to the target device 30 in advance.

上記何れの形態であっても、監視対象コード表43の監視命令オフセット位置53を参照することで、そのとき実行する機械語命令が、特定の命令(監視対象命令)に係わるものであるか否かを判定できる点では、同じことである。   In any of the above forms, by referring to the monitoring instruction offset position 53 of the monitoring target code table 43, whether or not the machine language instruction executed at that time is related to a specific instruction (monitoring target instruction). This is the same in that it can be determined.

上述した本例の場合、特定の命令の実行時には、AXレジスタにはアクセス先のメモリアドレスが格納されているので、このときのAXレジスタの格納データを、実行しているプログラム(その名称等)に対応付けて、書き込みアドレス記録表42に記録する。この処理は、本例の場合には、上記図7で説明したように、書き込みアドレス記録表42のメモリアドレス61の欄を検索して、上記AXレジスタの格納データ(アクセス先メモリアドレス)と一致するアドレスがあるか否かを判定する。そして、ある場合には、該当個所に特定の印(チェック)をつける。該当箇所とは、書き込みアドレス記録表42において、プログラム名62が現在実行しているプログラムのプログラム名である列において、上記“一致するアドレス”に対応するセルである。   In the case of this example described above, when a specific instruction is executed, the memory address of the access destination is stored in the AX register. Therefore, the stored data in the AX register at this time is the program being executed (its name, etc.) Are recorded in the write address recording table 42 in association with In this example, in this example, as described with reference to FIG. 7, the column of the memory address 61 in the write address recording table 42 is searched to match the stored data (access destination memory address) of the AX register. It is determined whether there is an address to be used. In some cases, a specific mark (check) is added to the corresponding part. The relevant part is a cell corresponding to the “matching address” in the column in which the program name 62 is the program name of the program currently being executed in the write address recording table 42.

上述した具体例の場合、仮に上記プログラムPG1を実行中の場合、例えばiの値が2の場合、AXレジスタの値は、6156(=6154+2)なので、図7(a)に示すようにPG1の6156にチェックをつける。   In the case of the specific example described above, if the program PG1 is being executed, for example, if the value of i is 2, the value of the AX register is 6156 (= 6154 + 2), so as shown in FIG. Check 6156.

この動作をプログラムPG2の実行の際にも行い、書き込みアドレス記録表42の該当箇所にチェックをつけることで、「書き込みアドレス記録表」42は最終的には図7(b)に示す状態になったものとする。つまり、「書き込みアドレス記録表」42が完成したことになる。   This operation is also performed when the program PG2 is executed, and a check is made at a corresponding portion of the write address record table 42, so that the "write address record table" 42 finally becomes the state shown in FIG. Shall be. That is, the “write address record table” 42 is completed.

尚、本例では、複数のプログラムとしてプログラムPG1,PG2の2つを示すが、この例に限らず、3つ以上あってもよい。基本的には、全てのプログラムについて、その実行の際に上記の動作を行って、特定の命令がある場合にはその実行時の上記AXレジスタの現在値と一致するアドレスに対応して印(チェック)を付ける。   In this example, two programs PG1 and PG2 are shown as a plurality of programs. However, the present invention is not limited to this example, and there may be three or more programs. Basically, for all programs, the above operation is performed at the time of execution, and when there is a specific instruction, a mark (corresponding to the address matching the current value of the AX register at the time of execution) Check).

例えば図7(b)の完成した「書き込みアドレス記録表」42を用いて、異なるプログラムからの重複アクセス(二重書き込み等)があるアドレスを判別できる。これは、例えば、図7(b)の完成した「書き込みアドレス記録表」42を、ディスプレイに表示する。このディスプレイ表示は、ターゲット装置30で行ってもよいし、開発支援装置10で行ってもよい。   For example, by using the completed “write address record table” 42 in FIG. 7B, it is possible to determine an address where there is a duplicate access (such as double writing) from different programs. For example, the completed “write address recording table” 42 in FIG. 7B is displayed on the display. This display display may be performed by the target device 30 or the development support device 10.

ユーザは、このディスプレイ表示を参照することで、実際の動作において複数のプログラムから重複してアクセスされるアドレスを、判断することができる。どのプログラムとどのプログラムから重複してアクセスされるのかを判断することができる。例えば、図7(b)の例の場合には、アドレス‘6156’が、プログラムPG1とプログラムPG2とから重複してアクセスされるものであると判断することができる。   The user can determine addresses that are accessed redundantly from a plurality of programs in the actual operation by referring to the display. It is possible to determine which program and which program are accessed redundantly. For example, in the case of the example of FIG. 7B, it can be determined that the address “6156” is accessed redundantly from the programs PG1 and PG2.

また、重複アクセスされるアドレスがある場合に、更に、この重複アクセスが問題となるものであるか否かを、ユーザが判断するものであってもよい。
複数のプログラムから重複してアクセスされるアドレスがあっても、それがユーザが意図したものであれば特に問題はないが、ユーザが意図しないものであれば問題となる。この様な判断は、ユーザが行うしかないので、上記ディスプレイ表示を行って、ユーザに判断させる。
Further, when there is an address that is accessed twice, the user may further determine whether or not this duplicate access is a problem.
Even if there are addresses that are accessed redundantly from a plurality of programs, there are no particular problems if they are intended by the user, but if there are addresses that are not intended by the user, there will be a problem. Since such a determination can only be made by the user, the display on the display is performed to make the user determine.

この例に限らず、例えば、完成した「書き込みアドレス記録表」42に基づいて、複数のプログラムから重複してアクセスされるアドレスを抽出して、これをディスプレイ表示するようにしてもよい。これは、完成した書き込みアドレス記録表42を検索して、2つ以上のチェックが存在するメモリのアドレスを抽出する。これにより、二重書き込みされるアドレスを検出して表示することができる。   For example, based on the completed “write address record table” 42, an address accessed redundantly from a plurality of programs may be extracted and displayed on the display. This searches the completed write address record table 42 and extracts the address of the memory where two or more checks exist. As a result, it is possible to detect and display a double-written address.

尚、「監視対象コード表」により、監視対象命令の位置が特定できるので、この位置から対応するソースコードも表示することが可能であり、不具合の修正が容易に実施できる。   In addition, since the position of the monitoring target instruction can be specified by the “monitoring target code table”, the corresponding source code can be displayed from this position, and the defect can be easily corrected.

上述した一実施例の場合、ターゲット装置30において、プログラム実行に伴って、監視対象コード表25に対してPCの値と一致するアドレスの検索を実施しているが、テーブルの検索処理はオーバーヘッドがあり、プログラムの実行性能を劣化させる。   In the case of the above-described embodiment, the target device 30 searches the monitored code table 25 for an address that matches the PC value as the program is executed. However, the table search processing has an overhead. Yes, the execution performance of the program is degraded.

そこで、監視対象コード表25を用いない形態(変形例)を提案する。この変形例は、監視対象コード表25を生成する代わりに、以下に説明するような、“プログラム中の所定の位置に付される所定の印”や、“プログラム中に挿入される所定の命令”等の情報を、生成するものである。   In view of this, a mode (modification) that does not use the monitoring target code table 25 is proposed. In this modified example, instead of generating the monitoring target code table 25, “predetermined marks added to predetermined positions in the program” or “predetermined instructions inserted in the program” as described below. "Etc." is generated.

変形例では、例えば、開発支援装置10においてコンパイルの際に上記のように監視対象命令を検出すると、この監視対象命令を変換してなる機械語命令に対して、予め決められている所定の印等を付しておく。これによって、生成される機械語オブジェクト24において、特定の位置に上記所定の印が付された状態になっている。   In the modification, for example, when a monitoring target instruction is detected as described above during compilation in the development support apparatus 10, a predetermined mark determined in advance is applied to a machine language instruction obtained by converting the monitoring target instruction. Etc. As a result, the machine language object 24 to be generated is in a state where the predetermined mark is added to a specific position.

ターゲット装置30は、機械語オブジェクトの実行に伴ってその各機械語命令の実行時、上記所定の印が付されているか否かをチェックして、印が付されている場合には、そのときのAXレジスタの値を書き込みアドレス記録表42に記録する。   The target device 30 checks whether or not the predetermined mark is attached at the time of execution of each machine language instruction along with the execution of the machine language object. The value of the AX register is recorded in the write address recording table 42.

あるいは、上記所定の印を付す代わりに、所定の命令を挿入するようにしてもよい。つまり、開発支援装置10においてコンパイルの際に上記のように監視対象命令を検出すると、この監視対象命令を変換してなる機械語命令の前または後等に、予め決められている所定の命令を挿入しておく。   Alternatively, a predetermined instruction may be inserted in place of the predetermined mark. In other words, when the development support apparatus 10 detects the monitoring target instruction as described above at the time of compiling, a predetermined instruction determined in advance is set before or after the machine language instruction obtained by converting the monitoring target instruction. Insert it.

これより、ターゲット装置30において機械語オブジェクト実行すると、上記監視対象命令に相当する機械語命令を実行する際に(その直前/直後のタイミングで)、上記所定の命令が実行されることになる。所定の命令とは、上述した“そのときのAXレジスタの格納データを、「書き込みアドレス記録表」42に記録する”処理を行うものである。   Thus, when the machine language object is executed in the target device 30, the predetermined instruction is executed when the machine language instruction corresponding to the monitoring target instruction is executed (at the timing immediately before / after). The predetermined instruction is to perform the above-described process of “recording data stored in the AX register at that time in the“ write address recording table ”42”.

この様にすることで、テーブル検索による性能劣化を防止することも可能である。
尚、上記プログラムPG1、PG2は、それぞれが、例えばIEC61131−3の1個のPOU(Program Organization Unit)に相当すると考えてもよいが、この例に限らない。PLCでは、通常、複数のPOUが、それぞれ、自己に割り当てられた所定の周期で、定周期動作する。あるPOUを実行する際にアクセスするメモリ(アドレス)に、別のPOUを実行する際にもアクセスされる場合、問題が生じる場合がある。但し、必ず問題が生じるわけではないので、開発者が意図的に複数のPOUが同一アドレスにアクセスするようにプログラミングするケースも有り得る。
In this way, it is possible to prevent performance degradation due to table search.
Each of the programs PG1 and PG2 may be considered to correspond to, for example, one POU (Program Organization Unit) of IEC61131-3, but is not limited to this example. In the PLC, usually, a plurality of POUs operate at a fixed cycle with a predetermined cycle assigned to each POU. When a memory (address) accessed when executing a certain POU is also accessed when executing another POU, a problem may occur. However, since a problem does not always occur, there may be a case where the developer intentionally performs programming so that a plurality of POUs access the same address.

従来は、ユーザが作成したプログラム(ソースコード)に関して、特に、“アクセスするメモリアドレスが動作中に随時決定/変更される”処理が含まる場合、(更に、変数のメモリアドレス割り付けをユーザが手動で実施している場合)、ユーザが意図しない二重書き込みでシステムに障害が発生する可能性があったが、プログラム中のこの様な問題箇所を検出することは困難であった。この為、ユーザは、膨大なプログラムとメモリマップを確認しながら、不具合箇所を絞り込んでいた。   Conventionally, with respect to a program (source code) created by a user, particularly when a process of “the memory address to be accessed is determined / changed at any time during operation” is included (in addition, the user manually assigns a memory address of a variable In this case, there is a possibility that the system may fail due to double writing that is not intended by the user. However, it is difficult to detect such a problem portion in the program. For this reason, the user narrowed down the defective part while confirming a huge program and a memory map.

これに対して、本手法を用いることにより、ユーザが意図しない二重書き込みを事前に検出でき、システムの安定稼働や、意図しない二重書き込みが原因の不具合調査、対策のための時間が不要になり、ユーザのソフトウエア開発効率、品質が向上する効果がある。   In contrast, by using this method, unintended double writing can be detected in advance, and stable operation of the system, trouble investigation due to unintended double writing, and time for countermeasures are not required. Thus, the software development efficiency and quality of the user are improved.

本手法では、ユーザが作成したプログラム(ソースコード)を開発支援装置がコンパイルする際に、プログラム中から監視対象命令を検出して当該監視対象命令を示す情報を「監視対象コード表」に記録する。   In this method, when a development support apparatus compiles a program (source code) created by a user, a monitoring target instruction is detected from the program and information indicating the monitoring target instruction is recorded in the “monitoring target code table”. .

ターゲット装置(コントローラまたはシミュレータ)が上記プログラム(機械語)を実行する時、上記「監視対象コード表」に基づいて、現在実行する命令が上記監視対象命令であるか否かを判別できる。現在実行する命令が上記監視対象命令である場合、そのときの特定のレジスタの格納データを、「書き込みアドレス記録表」に記録する。この処理を、複数のプログラムについて実行する。そして、「書き込みアドレス記録表」の記録内容から、複数のプログラムから重複してアクセスされるアドレスを検出して、ユーザに通知する。   When the target device (controller or simulator) executes the program (machine language), it can be determined based on the “monitoring target code table” whether or not the currently executed instruction is the monitoring target instruction. When the instruction to be executed at present is the instruction to be monitored, the data stored in a specific register at that time is recorded in the “write address record table”. This process is executed for a plurality of programs. Then, an address accessed redundantly from a plurality of programs is detected from the recorded contents of the “write address record table” and notified to the user.

本発明によれば、動的にメモリアクセスする場合でも、異なるプログラムからの二重書き込みを検出することができる。これによる、ユーザの意図しないメモリの書き込みが検出可能となり、プログラムの品質向上を実現する。   According to the present invention, double writing from different programs can be detected even when the memory is dynamically accessed. As a result, it is possible to detect a memory write unintended by the user, thereby improving the quality of the program.

尚、特に図示しないが、開発支援装置(ローダ)10やターゲット装置30は、以下に説明する各種処理機能部を有するものと言うこともできる。
開発支援装置10は、プログラマブルコントローラ用の各プログラムのソースコードを、機械語オブジェクトに変換するコンパイル処理を装置である。
Although not particularly illustrated, it can also be said that the development support device (loader) 10 and the target device 30 have various processing function units described below.
The development support device 10 is a device that performs compile processing for converting the source code of each program for the programmable controller into a machine language object.

開発支援装置10は、上記各プログラムのコンパイル処理の際に、特定の命令を検出する特定命令検出機能部(不図示)、該検出した特定命令に係わる情報である特定情報を生成する特定情報生成機能部(不図示)、該特定情報をターゲット装置30に転送する転送機能部(不図示)等を有する。   The development support apparatus 10 includes a specific instruction detection function unit (not shown) that detects a specific instruction during the compilation process of each program, and generates specific information that is information related to the detected specific instruction. A function unit (not shown), a transfer function unit (not shown) for transferring the specific information to the target device 30, and the like are included.

ターゲット装置30は、上記各プログラムの機械語オブジェクトの実行中に、上記特定情報に基づいて、上記特定命令の実行時のアクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する実アクセス先記録機能部(不図示)を有する。   The target device 30 records the memory address of the access destination at the time of execution of the specific instruction in association with the program being executed based on the specific information during execution of the machine language object of each program. A pre-recording function unit (not shown) is included.

上記特定命令(特定の命令)や特定情報については、具体例について既に説明しており、ここでは簡単に説明するものとする。
すなわち、上記特定命令は、“(特定の)レジスタ経由で書き込む命令”であり、上記特定命令の実行時の該特定のレジスタの格納データが、上記特定命令の実行時のアクセス先のメモリアドレスとなる。これより、上記実アクセス先記録機能部(不図示)は、上記特定命令の実行時の該特定のレジスタの格納データを上記アクセス先のメモリアドレスとして取得する。特定のレジスタは、上記具体例ではAXレジスタであるが、この例に限らない。
Specific examples of the specific command (specific command) and specific information have already been described, and will be briefly described here.
That is, the specific instruction is “an instruction to write via a (specific) register”, and the data stored in the specific register at the time of execution of the specific instruction is the memory address of the access destination at the time of execution of the specific instruction. Become. Thus, the real access destination recording function unit (not shown) acquires the data stored in the specific register when the specific instruction is executed as the memory address of the access destination. The specific register is the AX register in the above specific example, but is not limited to this example.

例えば、上記特定情報は、一例としては、上記特定命令の上記プログラム上の位置を示す情報(例えば、命令番号など;上記中間言語命令番号であってよいし、上記機械語命令番号であってもよい)である。   For example, the specific information may be, for example, information indicating the position of the specific instruction on the program (for example, an instruction number or the like; the intermediate language instruction number, or the machine language instruction number). Good).

この例において、上記実アクセス先記録機能部(不図示)は、上記機械語オブジェクト実行中に、現在のプログラム実行位置が、上記特定情報が示す位置と一致する場合に、上記特定命令の実行時と見做して、上記アクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する。   In this example, the real access destination recording function unit (not shown) executes the specific instruction when the current program execution position matches the position indicated by the specific information during execution of the machine language object. Therefore, the memory address of the access destination is recorded in association with the program being executed.

この処理の一例が、上述したプログラムカウンタと監視命令オフセット位置53を用いた処理である。この例の場合、上記特定命令の上記プログラム上の位置を示す情報は、該特定命令の命令番号であり、上実アクセス先記録機能部(不図示)は、プログラムカウンタの値が上記特定命令の命令番号と一致するときに、上記特定命令の実行時と見做すことになる。   An example of this processing is processing using the above-described program counter and monitoring instruction offset position 53. In this example, the information indicating the position of the specific instruction on the program is the instruction number of the specific instruction, and the upper real access destination recording function unit (not shown) indicates that the value of the program counter is the value of the specific instruction. When the instruction number matches, it is considered that the specific instruction is executed.

尚、上記「特定情報が示す位置」は、特定情報が例えば上記中間言語命令番号である場合には、これを対応する機械語命令番号に変換したものとなる(その際、例えば上記中間−機械対応付けテーブル(不図示)を用いる)。   The “position indicated by the specific information” is, for example, when the specific information is the intermediate language instruction number, converted into a corresponding machine language instruction number (in this case, for example, the intermediate-machine (Association table (not shown) is used).

また、例えば、上記特定情報生成機能部(不図示)による上記特定情報の生成は、一例としては、上記機械語オブジェクト上の上記特定命令に、所定のマークを付すことである。この例の場合、上記転送機能部(不図示)による上記特定情報の転送は、該所定のマークが付された機械語オブジェクトを転送することを意味することになる。   Further, for example, the generation of the specific information by the specific information generation function unit (not shown) is, for example, adding a predetermined mark to the specific command on the machine language object. In the case of this example, the transfer of the specific information by the transfer function unit (not shown) means transfer of the machine language object with the predetermined mark.

そして、この例において、上記実アクセス先記録機能部(不図示)は、上記機械語オブジェクト実行中に該マークを検出すると、上記特定命令の実行時と見做して、上記アクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する。   In this example, when the actual access destination recording function unit (not shown) detects the mark during execution of the machine language object, the actual access destination recording function unit assumes that the specific instruction is being executed and assumes that the memory address of the access destination is Is recorded in association with the program being executed.

また、例えば、上記特定情報生成機能部(不図示)による上記特定情報の生成は、一例としては、上記記機械語オブジェクトにおける上記特定命令の前または後に、上記アクセス先のメモリアドレスを、実行したプログラムに対応付けて記録する処理を実現する所定の命令を、挿入するものである。この例の場合、上記転送機能部(不図示)による上記特定情報の転送は、該所定の命令が含まれる上記機械語オブジェクトを転送することを意味することになる。   In addition, for example, the generation of the specific information by the specific information generation function unit (not shown) is performed by executing the memory address of the access destination before or after the specific command in the machine language object as an example. A predetermined command for realizing a process of recording in association with a program is inserted. In the case of this example, the transfer of the specific information by the transfer function unit (not shown) means that the machine language object including the predetermined command is transferred.

そして、この例の場合、上記実アクセス先記録機能部(不図示)は、単にこの機械語オブジェクトを実行することで、上述した“特定命令の実行時のアクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する”処理を、実現させることになる。   In the case of this example, the actual access destination recording function unit (not shown) simply executes the machine language object, and the above-described “access destination memory address at the time of execution of the specific instruction is executed. The process of “recording in association with the program” is realized.

ターゲット装置30は、例えば、上記記録したメモリアドレスに基づいて、上記複数のプログラムで同一のメモリアドレスにアクセスするか否かをチェックするチェック機能部(不図示)を、更に有するものであっても構わない。   For example, the target device 30 may further include a check function unit (not shown) for checking whether or not the same memory address is accessed by the plurality of programs based on the recorded memory address. I do not care.

また、上記特定命令は、例えば、“アクセスするメモリアドレスがその都度決定/変更される処理”に係わる命令であるが、この例に限らない。
また、本説明において、“/”は、基本的には(数式等は除く)、“または”や“あるいは”を意味するものとする。これより、例えば、“または/及び”は、“または、あるいは、及び”を意味するものとなる。
The specific command is a command related to, for example, “a process in which a memory address to be accessed is determined / changed each time”, but is not limited to this example.
Further, in this description, “/” basically means “or” or “or” (excluding mathematical expressions and the like). Thus, for example, “or / and” means “or or and”.

10 開発支援装置(ローダ)
11 インタフェース機能部
12 フロントエンドコンパイラ
13 バックエンドコンパイラ
14 通信機能部
15 画面(ディスプレイ)
16 入力装置
21 ソースコード
22 中間言語
23 “書き込みアドレス記録表(雛形)”
24 機械語オブジェクト
25 監視対象コード表
30 ターゲット装置
31 通信機能部
32 プログラム実行管理機能部
41 機械語オブジェクト
42 書き込みアドレス記録表
43 監視対象コード表
51 管理番号
52 プログラム名
53 監視命令オフセット位置
61 メモリアドレス
62 プログラム名
10 Development support device (loader)
11 Interface Function Unit 12 Front End Compiler 13 Back End Compiler 14 Communication Function Unit 15 Screen (Display)
16 Input device 21 Source code 22 Intermediate language 23 “Write address record table (model)”
24 Machine language object 25 Monitoring target code table 30 Target device 31 Communication function unit 32 Program execution management function unit 41 Machine language object 42 Write address recording table 43 Monitoring target code table 51 Management number 52 Program name 53 Monitoring instruction offset position 61 Memory address 62 Program name

Claims (11)

1以上のプログラムのソースコードを機械語オブジェクトに変換するコンパイル処理を行う開発支援装置と、ターゲット装置を有するプログラマブルコントローラシステムであって、
前記開発支援装置は、
前記各プログラムの前記コンパイル処理の際に、特定の命令を検出する特定命令検出手段と、
該検出した特定命令に係わる情報である特定情報を生成する特定情報生成手段と、
該特定情報を前記ターゲット装置に転送する転送手段とを有し、
前記ターゲット装置は、前記各プログラムの機械語オブジェクトの実行中に、前記特定情報に基づいて、前記特定命令の実行時のアクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する実アクセス先記録手段を有することを特徴とするプログラマブルコントローラシステム。
A development support apparatus that performs a compile process for converting a source code of one or more programs into a machine language object, and a programmable controller system having a target apparatus,
The development support apparatus includes:
Specific instruction detection means for detecting a specific instruction during the compilation process of each program;
Specific information generating means for generating specific information that is information related to the detected specific command;
Transfer means for transferring the specific information to the target device,
The target device records the memory address of the access destination at the time of execution of the specific instruction in association with the program being executed based on the specific information during execution of the machine language object of each program A programmable controller system comprising pre-recording means.
前記特定命令は、特定のレジスタ経由で書き込む命令であり、
前記実アクセス先記録手段は、前記特定命令の実行時の該特定のレジスタの格納データを前記アクセス先のメモリアドレスとして取得することを特徴とする請求項1記載のプログラマブルコントローラシステム。
The specific instruction is an instruction to write via a specific register,
The programmable controller system according to claim 1, wherein the real access destination recording unit obtains data stored in the specific register when the specific instruction is executed as a memory address of the access destination.
前記特定情報は、前記特定命令の前記プログラム上の位置を示す情報であり、
前記実アクセス先記録手段は、前記機械語オブジェクト実行中に、現在のプログラム実行位置が、前記特定情報が示す位置と一致する場合に、前記特定命令の実行時と見做して、前記アクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録することを特徴とする請求項1または2記載のプログラマブルコントローラシステム。
The specific information is information indicating a position of the specific command on the program,
The real access destination recording means regards the access destination as the execution time of the specific instruction when the current program execution position matches the position indicated by the specific information during execution of the machine language object. 3. The programmable controller system according to claim 1, wherein the memory address is recorded in association with the program being executed.
前記特定情報生成手段による前記特定情報の生成は、前記機械語オブジェクト上の前記特定命令に、所定のマークを付すことであり、
前記転送手段による前記特定情報の転送は、該所定のマークが付された前記機械語オブジェクトを転送するものであり、
前記実アクセス先記録手段は、前記機械語オブジェクト実行中に該マークを検出すると、前記特定命令の実行時と見做して、前記アクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録することを特徴とする請求項1または2記載のプログラマブルコントローラシステム。
The generation of the specific information by the specific information generating means is to put a predetermined mark on the specific command on the machine language object,
The transfer of the specific information by the transfer means is to transfer the machine language object with the predetermined mark,
When the real access destination recording means detects the mark during execution of the machine language object, the real access destination recording means records the access destination memory address in association with the program being executed, assuming that the specific instruction is being executed. The programmable controller system according to claim 1 or 2, wherein
前記特定情報生成手段による前記特定情報の生成は、前記機械語オブジェクトにおける前記特定命令の前または後に、前記アクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する処理を実現する所定の命令を、挿入するものであり、
前記転送手段による前記特定情報の転送は、該所定の命令が含まれる前記機械語オブジェクトを転送するものであり、
前記実アクセス先記録手段は、該機械語オブジェクトを実行することで、前記特定命令の実行時のアクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録することを特徴とする請求項1または2記載のプログラマブルコントローラシステム。
The generation of the specific information by the specific information generation means is a predetermined implementation that realizes a process of recording the memory address of the access destination in association with the program being executed before or after the specific instruction in the machine language object. Is to insert an instruction,
The transfer of the specific information by the transfer means is to transfer the machine language object including the predetermined instruction,
2. The real access destination recording means records the memory address of the access destination at the time of execution of the specific instruction in association with the program being executed by executing the machine language object. Or the programmable controller system of 2.
前記特定命令の前記プログラム上の位置を示す情報は、該特定命令の機械語命令番号であり、
前記実アクセス先記録手段は、プログラムカウンタの値が前記特定命令の機械語命令番号と一致するときに、前記特定命令の実行時と見做すことを特徴とする請求項3記載のプログラマブルコントローラシステム。
Information indicating the position of the specific instruction on the program is a machine language instruction number of the specific instruction,
4. The programmable controller system according to claim 3, wherein when the value of the program counter matches the machine language instruction number of the specific instruction, the real access destination recording means considers that the specific instruction is being executed. .
前記ターゲット装置または前記開発支援装置は、前記記録したメモリアドレスに基づいて、複数のプログラムで同一のメモリアドレスにアクセスするか否かをチェックするチェック手段を更に有することを特徴とする請求項1または2記載のプログラマブルコントローラシステム。   The target device or the development support device further includes check means for checking whether or not the same memory address is accessed by a plurality of programs based on the recorded memory address. The programmable controller system according to 2. 前記特定命令は、“アクセスするメモリアドレスがその都度決定/変更される処理”に係わる命令であることを特徴とする請求項1または2記載のプログラマブルコントローラシステム。   The programmable controller system according to claim 1, wherein the specific instruction is an instruction related to “a process in which a memory address to be accessed is determined / changed each time”. 前記ターゲット装置は、制御装置または該制御装置のシミュレータであることを特徴とする請求項1または2記載のプログラマブルコントローラシステム。   The programmable controller system according to claim 1, wherein the target device is a control device or a simulator of the control device. 機械語オブジェクトを実行するターゲット装置に通信可能に構成され、1以上のプログラムのソースコードを前記機械語オブジェクトに変換するコンパイル処理を行う開発支援装置であって、
前記プログラムのコンパイル処理の際に、前記ターゲット装置における特定のレジスタ経由で書き込む命令である特定命令を検出する特定命令検出手段と、
該検出した特定命令に係わる情報である特定情報を生成する特定情報生成手段と、
該特定情報を前記機械語オブジェクトと共に前記ターゲット装置に転送して前記ターゲット装置の記憶手段に前記特定情報を記憶させる転送手段とを有することを特徴とする開発支援装置。
A development support device configured to be communicable with a target device that executes a machine language object and that performs a compile process for converting source code of one or more programs into the machine language object,
A specific instruction detecting means for detecting a specific instruction that is an instruction to be written via a specific register in the target device during the compilation process of the program;
Specific information generating means for generating specific information that is information related to the detected specific command;
A development support apparatus comprising: transfer means for transferring the specific information together with the machine language object to the target device and storing the specific information in a storage means of the target device.
1以上のプログラムのソースコードを機械語オブジェクトに変換するコンパイル処理を行う開発支援装置と通信可能なターゲット装置であって、
前記プログラムの機械語オブジェクトの実行中に、前記開発支援装置が前記コンパイル処理の際に生成した前記ターゲット装置における特定のレジスタ経由で書き込む特定の命令に係わる特定情報に基づいて、前記特定命令の実行時のアクセス先のメモリアドレスを、実行中のプログラムに対応付けて記録する実アクセス先記録手段を有することを特徴とするターゲット装置。

A target device capable of communicating with a development support device that performs a compilation process of converting source code of one or more programs into machine language objects,
During execution of the machine language object of the program, execution of the specific instruction based on specific information relating to a specific instruction written via the specific register in the target device generated by the development support apparatus during the compilation process A target device comprising: real access destination recording means for recording the memory address of the current access destination in association with the program being executed.

JP2016009301A 2016-01-20 2016-01-20 Programmable controller system, its development support device, target device Active JP6812637B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016009301A JP6812637B2 (en) 2016-01-20 2016-01-20 Programmable controller system, its development support device, target device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016009301A JP6812637B2 (en) 2016-01-20 2016-01-20 Programmable controller system, its development support device, target device

Publications (2)

Publication Number Publication Date
JP2017130068A true JP2017130068A (en) 2017-07-27
JP6812637B2 JP6812637B2 (en) 2021-01-13

Family

ID=59395721

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016009301A Active JP6812637B2 (en) 2016-01-20 2016-01-20 Programmable controller system, its development support device, target device

Country Status (1)

Country Link
JP (1) JP6812637B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111095196A (en) * 2018-03-07 2020-05-01 欧姆龙株式会社 Support device and support program

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03286303A (en) * 1990-04-02 1991-12-17 Hitachi Ltd Sequence control test system
JPH05158741A (en) * 1991-12-03 1993-06-25 Nippon Steel Corp Test verification method for computer program
JPH07334211A (en) * 1994-06-08 1995-12-22 Yaskawa Electric Corp Data tracing method for programmable controller
JPH08305609A (en) * 1995-04-28 1996-11-22 Oki Electric Ind Co Ltd Program test method and device
JPH096647A (en) * 1995-06-21 1997-01-10 Oki Electric Ind Co Ltd Reverse execution debugging system
JPH0962538A (en) * 1995-08-29 1997-03-07 Nec Corp Efficiency supporting device
JP2001005645A (en) * 1999-06-22 2001-01-12 Nec Corp Method and system for automatically checking address allocation
JP2002251207A (en) * 2001-02-21 2002-09-06 Mitsubishi Electric Corp Programmable controller, peripheral equipment, and debug method
US20060156156A1 (en) * 2005-01-13 2006-07-13 Elnozahy Elmootazbellah N Error detection in a data processing system
JP2006294011A (en) * 2005-03-15 2006-10-26 Omron Corp Control program development support apparatus
JP2008159004A (en) * 2006-12-26 2008-07-10 Okuma Corp Data trace device of programmable logic controller
JP2011216056A (en) * 2010-04-02 2011-10-27 Mitsubishi Electric Corp Programmable controller and peripheral device thereof

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03286303A (en) * 1990-04-02 1991-12-17 Hitachi Ltd Sequence control test system
JPH05158741A (en) * 1991-12-03 1993-06-25 Nippon Steel Corp Test verification method for computer program
JPH07334211A (en) * 1994-06-08 1995-12-22 Yaskawa Electric Corp Data tracing method for programmable controller
JPH08305609A (en) * 1995-04-28 1996-11-22 Oki Electric Ind Co Ltd Program test method and device
JPH096647A (en) * 1995-06-21 1997-01-10 Oki Electric Ind Co Ltd Reverse execution debugging system
JPH0962538A (en) * 1995-08-29 1997-03-07 Nec Corp Efficiency supporting device
JP2001005645A (en) * 1999-06-22 2001-01-12 Nec Corp Method and system for automatically checking address allocation
JP2002251207A (en) * 2001-02-21 2002-09-06 Mitsubishi Electric Corp Programmable controller, peripheral equipment, and debug method
US20060156156A1 (en) * 2005-01-13 2006-07-13 Elnozahy Elmootazbellah N Error detection in a data processing system
JP2006294011A (en) * 2005-03-15 2006-10-26 Omron Corp Control program development support apparatus
JP2008159004A (en) * 2006-12-26 2008-07-10 Okuma Corp Data trace device of programmable logic controller
JP2011216056A (en) * 2010-04-02 2011-10-27 Mitsubishi Electric Corp Programmable controller and peripheral device thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111095196A (en) * 2018-03-07 2020-05-01 欧姆龙株式会社 Support device and support program
EP3764219A4 (en) * 2018-03-07 2021-12-01 Omron Corporation Support device and support program
US11221828B2 (en) 2018-03-07 2022-01-11 Omron Corporation Support device and support program
CN111095196B (en) * 2018-03-07 2024-03-01 欧姆龙株式会社 Support device and recording medium

Also Published As

Publication number Publication date
JP6812637B2 (en) 2021-01-13

Similar Documents

Publication Publication Date Title
JP7220833B2 (en) Automatic generation of machine learning models for software tools that run on source code
CN101739339B (en) Program dynamic dependency relation-based software fault positioning method
US9898387B2 (en) Development tools for logging and analyzing software bugs
US20110307860A1 (en) Simulation-based interface testing automation system and method for robot software components
WO2012057170A1 (en) Method of converting source code and source code conversion program
Pereira et al. SPELLing out energy leaks: Aiding developers locate energy inefficient code
JP2006012193A (en) Relocatable instrumentation tag for testing and debugging of computer program
TWI566090B (en) Debugging firmware / software to produce tracking systems and methods, recording media and computer program products
CN113742119A (en) Call stack backtracking method and device of embedded system and computer equipment
CN105701006A (en) Method and system for variable tracking in program debugging
US8533683B2 (en) Stack walking enhancements using sensorpoints
CN111897727A (en) Software testing method and device, computer equipment and storage medium
CN102722438B (en) Kernel debugging method and equipment
US9658939B2 (en) Identifying a defect density
CN107272441B (en) Method for monitoring errors and data processing device for monitoring errors
US20080127118A1 (en) Method and system for dynamic patching of software
JPH03188535A (en) Assembly language programming error detecting process
US7409677B1 (en) Method and system for creation and use of embedded trace description
Lunnikivi et al. Transpiling python to rust for optimized performance
US7530060B1 (en) Methods and computer program product for optimizing binaries with coding style formalization
TWI402750B (en) Computer-readable medium having software program stored thereon and method for creating software program
JP6812637B2 (en) Programmable controller system, its development support device, target device
US8930765B2 (en) Systems and methods for feedback driven regression testing
US10579761B1 (en) Method and system for reconstructing a graph presentation of a previously executed verification test
JP2009099111A (en) Rule inspection program, rule inspection method, and rule inspection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191016

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191023

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191121

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20191121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200601

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20200908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201009

C60 Trial request (containing other claim documents, opposition documents)

Free format text: JAPANESE INTERMEDIATE CODE: C60

Effective date: 20201009

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20201019

C21 Notice of transfer of a case for reconsideration by examiners before appeal proceedings

Free format text: JAPANESE INTERMEDIATE CODE: C21

Effective date: 20201020

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201130

R150 Certificate of patent or registration of utility model

Ref document number: 6812637

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250