JP5387705B2 - Programmable controller programming device - Google Patents

Programmable controller programming device Download PDF

Info

Publication number
JP5387705B2
JP5387705B2 JP2012027536A JP2012027536A JP5387705B2 JP 5387705 B2 JP5387705 B2 JP 5387705B2 JP 2012027536 A JP2012027536 A JP 2012027536A JP 2012027536 A JP2012027536 A JP 2012027536A JP 5387705 B2 JP5387705 B2 JP 5387705B2
Authority
JP
Japan
Prior art keywords
array
instruction
operand
sequence program
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012027536A
Other languages
Japanese (ja)
Other versions
JP2012099151A (en
Inventor
英樹 小暮
幸治 福島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2012027536A priority Critical patent/JP5387705B2/en
Publication of JP2012099151A publication Critical patent/JP2012099151A/en
Application granted granted Critical
Publication of JP5387705B2 publication Critical patent/JP5387705B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Description

本発明は、シーケンスプログラムをマシンコード形式に変換するとともに、作成したマシンコードを、シーケンスプログラムに逆変換する技術に関する。   The present invention relates to a technique for converting a sequence program into a machine code format and reversely converting the created machine code into a sequence program.

プログラマブルコントローラは、例えば、シーケンシャルに動作する機械システムに対し、その手順を指示するコントローラである。指示内容は、プログラマブルコントローラにマシンコード形式で格納されるシーケンスプログラムに記述されている。   The programmable controller is a controller that instructs a procedure to a mechanical system that operates sequentially, for example. The instruction content is described in a sequence program stored in the machine code format in the programmable controller.

従来、プログラマブルコントローラに書き込むシーケンスプログラムを作成する場合に、そのシーケンスプログラム中の配列および構造体のオペランドを実アドレスで表現していたため、配列および構造体の定義・宣言情報は、プログラマブルコントローラには格納していなかった。   Conventionally, when creating a sequence program to be written to a programmable controller, the array and structure operands in the sequence program are represented by real addresses, so the definition and declaration information of the array and structure is stored in the programmable controller. I did not.

このような場合に、バージョンアップ等で、そのシーケンスプログラムに修正を加えるために、そのシーケンスプログラムをマシンコード形式からユーザによる作成・変更時に用いられる形式に(逆)変換した場合、その配列および構造体の定義・宣言情報が失われてしまっていた。すなわち、(逆)変換が不十分にしかできなかった。   In such a case, when the sequence program is converted from the machine code format to the format used when creating or changing by the user in order to make corrections to the sequence program due to version upgrade, etc. Body definition / declaration information has been lost. That is, (inverse) conversion could only be performed insufficiently.

その結果、プログラマブルコントローラに格納されているシーケンスプログラムに対応する、ユーザによる作成・変更時に用いられる形式のコードを捜してきて、そのコードに変更を加えた方が、一層、容易に修正が行える場合が一般的であった。   As a result, it is possible to make corrections more easily by searching for the code of the format used at the time of creation and modification by the user corresponding to the sequence program stored in the programmable controller and making changes to the code. Was common.

しかし、対応するユーザによる作成・変更時に用いられる形式のコードが常に見つかるとも限らず、プログラマブルコントローラからマシンコード形式のシーケンスプログラムを読み込み、それを直に修正してメンテナンスを行いたいというニーズも多い。   However, it is not always possible to find a code in a format used when a corresponding user creates or changes it, and there are many needs to read a sequence program in a machine code format from a programmable controller and modify it directly for maintenance.

なお、プログラマブルコントローラに対するプログラミング技術としては、この他に特許文献1に示される技術がある。
この特許文献1では、将来の拡張を考えてあるパラメータを予約の形で宣言しても、シーケンスプログラム上で、そのパラメータが参照されていないことから、シーケンスプログラムを表示形式に変換した画面上では、そのパラメータの宣言情報がなくなり、思考作業の結果の一部が失われ、作業効率が低下する場合が考慮されている。そのような事態を回避するために、特許文献1では、シーケンスプログラムの作成時に定義・宣言した全パラメータを、そのシーケンスプログラムでの使用の有無に関係なく、そのシーケンスプログラムをマシン語形式から表示形式に変換するときに復元している。
特開2004−341824号公報 「プログラマブルコントローラのプログラミング装置」
In addition, as a programming technique for the programmable controller, there is a technique disclosed in Patent Document 1.
In Patent Document 1, even if a parameter that is considered for future expansion is declared in the form of a reservation, the parameter is not referred to on the sequence program. The case where the declaration information of the parameter is lost, a part of the result of the thinking work is lost, and the work efficiency is lowered is considered. In order to avoid such a situation, in Patent Document 1, all parameters defined and declared at the time of creation of a sequence program are displayed in a display format from a machine language format regardless of whether the sequence program is used or not. Restore when converting to.
JP, 2004-341824, A "Programming device of a programmable controller"

本発明の課題は、シーケンスプログラムに配列または構造体の定義・宣言情報が含まれているシーケンスプログラムをマシンコード形式からユーザによる作成・変更時に用いられる形式に変換する場合に、その配列または構造体の定義・宣言情報を復元することを可能としたプログラマブルコントローラのプログラミング装置、および、プログラマブルコントローラを提供することである。   An object of the present invention is to convert a sequence program in which the definition / declaration information of an array or structure is included in the sequence program from a machine code format to a format used at the time of creation / modification by a user. It is an object to provide a programmable controller programming apparatus and a programmable controller that can restore the definition / declaration information.

本発明のプログラマブルコントローラのプログラミング装置は、シーケンスプログラム内にある配列または構造体の少なくとも一方の定義情報及び宣言情報をマシンコード形式に変換する変換部と、プログラマブルコントローラからシーケンスプログラムを読み出す際に前記マシンコード形式の配列または構造体の少なくとも一方の定義情報及び宣言情報を逆変換してユーザによる作成・変更時に用いられる形式にする逆変換部、を有し、前記変換部は、シーケンスプログラム中で使用された配列または構造体のオペランドを配列または構造体のオペランドであることを示す、デバイスアドレスの項目にメモリ種別以外の値(ID)を付加したマシンコード形式に変換してプログラマブルコントローラに格納し、前記逆変換部は、プログラマブルコントローラからシーケンスプログラムを読み出してきた際に、マシンコード形式に変換した配列または構造体のオペランドであることを示す、マシンコードに付加した前記メモリ種別以外の値(ID)を基に、配列または構造体の定義・宣言情報を参照し、逆変換して表示することを特徴とするプログラマブルコントローラのプログラミング装置である。 The programming device for a programmable controller according to the present invention includes a conversion unit that converts definition information and declaration information of at least one of an array or a structure in a sequence program into a machine code format, and the machine that reads the sequence program from the programmable controller. have a inverse transform unit, to the type used at the time of creation or change by a user with inverse converting at least one of definition information and declaration information sequence or structure of the coding format, the conversion unit, used in the sequence program The array or structure operand is converted to a machine code format in which a value (ID) other than the memory type is added to the device address item indicating that it is an array or structure operand, and stored in the programmable controller. The inverse converter is a programmer When the sequence program is read from the controller, the array or the array is converted based on a value (ID) other than the memory type added to the machine code, which indicates an operand of the array or structure converted into the machine code format. A programmable controller programming device characterized by referring to structure definition / declaration information and performing reverse conversion to display the structure definition / declaration information .

本発明によれば、シーケンスプログラムに配列または構造体の定義・宣言情報が含まれているシーケンスプログラムをマシンコード形式からユーザによる作成・変更時に用いられる形式に変換する場合に、その配列または構造体の定義・宣言情報を復元することができるので、シーケンスプログラムの修正の作業効率を向上させることができる。   According to the present invention, when a sequence program in which definition / declaration information of an array or structure is included in the sequence program is converted from a machine code format to a format used at the time of creation / change by the user, the array or structure Since the definition / declaration information can be restored, the work efficiency of the sequence program modification can be improved.

本発明の一実施形態のプログラミング装置の概要構成を示す図である。It is a figure which shows schematic structure of the programming apparatus of one Embodiment of this invention. 図1のシーケンスプログラム作成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sequence program creation apparatus of FIG. 図1のシーケンスプログラム参照・変更装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sequence program reference / change apparatus of FIG. 図1のシーケンスプログラム作成装置を介してユーザが定義した配列の定義情報の一例を示す図である。It is a figure which shows an example of the definition information of the arrangement | sequence which the user defined via the sequence program creation apparatus of FIG. 図1のシーケンスプログラム作成装置を介してユーザが定義した構造体の定義情報の一例を示す図である。It is a figure which shows an example of the definition information of the structure defined by the user via the sequence program creation apparatus of FIG. 図1のシーケンスプログラム作成装置を介してユーザが宣言した、図4Aおよび図4Bの配列・構造体に対応する配列・構造体の宣言情報を示す図である。FIG. 4 is a diagram showing array / structure declaration information corresponding to the arrays / structures of FIGS. 4A and 4B declared by the user via the sequence program creation device of FIG. 1. プログラミング装置の内部メモリにマシンコード形式で格納される配列および構造体の定義情報、宣言情報の一例を示す図である。It is a figure which shows an example of the definition information and declaration information of an array and a structure which are stored in the internal memory of a programming device in a machine code format. 図5等のマシンコード形式の配列の定義情報から表示形式に復元された配列の定義情報のデータ構造を示す図である。FIG. 6 is a diagram illustrating a data structure of array definition information restored from a machine code format array definition information such as FIG. 5 to a display format; 図5等のマシンコード形式の構造体の定義情報から表示形式に復元された構造体の定義情報のデータ構造を示す図である。It is a figure which shows the data structure of the definition information of the structure restored | reconstructed from the definition information of the structure of the machine code format of FIG. 図5等のマシンコード形式の配列または構造体の宣言情報から表示形式に復元された配列または構造体の宣言情報のデータ構造を示す図である。It is a figure which shows the data structure of the declaration information of the array or structure restored to the display format from the declaration information of the array or structure in the machine code format of FIG. 表示形式のシーケンスプログラム(ラダー図)の一例を示す図である。It is a figure which shows an example of the sequence program (ladder figure) of a display format. ラダー図上の配列オペランドの一例を示す図である。It is a figure which shows an example of the array operand on a ladder diagram. ラダー図上の構造体オペランドの一例を示す図である。It is a figure which shows an example of the structure operand on a ladder diagram. 配列または構造体の要素であるオペランドに対応する1行以上のマシンコードの開始行の1つ前の行と終了行の1つ後の行に、その配列または構造体のオペランドの開始または終了を示す擬似命令が挿入された状態を示す図である。The start or end of the operand of the array or structure is indicated in the line immediately before the start line and the line after the end line of the machine code corresponding to the operand that is an element of the array or structure. It is a figure which shows the state by which the pseudo instruction to show is inserted. MOV命令に配列または構造体のオペランドが使用された場合に、そのMOV命令に対応する1行以上のマシンコードを示す図である。When an array or structure operand is used in an MOV instruction, it is a diagram illustrating one or more lines of machine code corresponding to the MOV instruction. 本実施形態において、図2のシーケンスプログラム記憶部上で、表示形式で作成されたシーケンスプログラムのデータ構造を示す図である。In this embodiment, it is a figure which shows the data structure of the sequence program produced by the display format on the sequence program memory | storage part of FIG. デバイスアドレスの項目に追加された値(ID)を示す図である。It is a figure which shows the value (ID) added to the item of the device address. 配列または構造体の要素であるオペランドに対応するオペランド情報のデータ構造を示す図である。It is a figure which shows the data structure of the operand information corresponding to the operand which is an element of an array or a structure. 表示形式のシーケンスプログラムの作成、および、その表示形式のシーケンスプログラムをマシンコード形式に変換して、プログラマブルコントローラに出力する処理のフローチャートである。It is a flowchart of the process which creates the sequence program of a display format, converts the sequence program of the display format into a machine code format, and outputs it to a programmable controller. 図14のステップS105の処理をより詳細に示したフローチャートである。It is the flowchart which showed the process of step S105 of FIG. 14 in detail. プログラマブルコントローラから読み出されたマシンコード形式のシーケンスプログラムを、表示形式のシーケンスプログラムに逆変換して、表示部上に出力する処理のフローチャートである。It is a flowchart of the process which reverse-converts the sequence program of the machine code format read from the programmable controller into the sequence program of a display format, and outputs it on a display part. 図16のステップS303の処理をより詳細に示したフローチャートである。It is the flowchart which showed the process of step S303 of FIG. 16 in detail. 本実施形態のハードウェア環境を示す図である。It is a figure which shows the hardware environment of this embodiment.

以下、本発明の実施の形態を、図面を参照しながら詳細に説明する。
図1は、本発明の一実施形態のプログラミング装置の概要構成を示す図である。
図1のプログラミング装置10は、プログラマブルコントローラに格納するシーケンスプログラムを作成することができるユーザインターフェイスとしてのシーケンスプログラム作成装置11、プログラマブルコントローラに格納されているシーケンスプログラムを参照・変更することができるユーザインターフェイスとしてのシーケンスプログラム参照・変更装置12、を備える。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram showing a schematic configuration of a programming device according to an embodiment of the present invention.
1 is a sequence program creation device 11 as a user interface capable of creating a sequence program stored in the programmable controller, and a user interface capable of referring to and changing the sequence program stored in the programmable controller. As a sequence program reference / change device 12.

シーケンスプログラム作成装置11は、シーケンスプログラムをユーザによる作成・変更時に使用される表示形式(例えば、ラダー図)から、プログラマブルコントローラへの格納時に使用されるマシンコード形式に変換する機能を備える。シーケンスプログラム参照・変更装置12は、シーケンスプログラムをマシンコード形式から表示形式に逆変換する機能を備える。   The sequence program creation device 11 has a function of converting a sequence program from a display format (for example, a ladder diagram) used when created / changed by a user to a machine code format used when stored in a programmable controller. The sequence program reference / change device 12 has a function of inversely converting a sequence program from a machine code format to a display format.

なお、より正確には、表示形式のシーケンスプログラムは、まず、アセンブラコード形式に変換されて、そのアセンブラコード形式からマシンコード形式に変換されるというべきだが、本実施形態では、アセンブラコード形式とマシンコード形式を区別せず、単に、マシンコード形式と呼んでいる。   More precisely, the sequence program in the display format should be first converted to the assembler code format and then converted from the assembler code format to the machine code format. However, in this embodiment, the assembler code format and the machine It does not distinguish the code format and is simply called the machine code format.

また、本実施形態では、表示形式のシーケンスプログラムにおいて、配列や構造体が命令のオペランドとして使用される場合を想定している。
例えば、複数台のベルトコンベアを持つ装置をプログラマブルコントローラがシーケンシャルに動作させる場合の、それぞれのベルトコンベアのカウンタ値のようなデータ長が同一である複数のデータは、配列に格納される。
In the present embodiment, it is assumed that an array or a structure is used as an operand of an instruction in a display format sequence program.
For example, when a programmable controller operates a device having a plurality of belt conveyors sequentially, a plurality of data having the same data length, such as a counter value of each belt conveyor, is stored in an array.

また、例えば、1台のベルトコンベアの属性は、運転状態フラグ(データ形=ビット)、カウンタ値(データ形=ダブルワード(D))、異常フラグ(データ形=ビット)、・・・等のように表すことができるが、このようなデータ構造は、構造体に対応付けることができる。   Further, for example, the attributes of one belt conveyor are an operation state flag (data type = bit), a counter value (data type = double word (D)), an abnormality flag (data type = bit), and so on. Such a data structure can be associated with a structure.

オペランドに配列や構造体の要素を用いるようにすることで、コードの記述が簡略化し、メンテナンス(バージョンアップ時の行う作業等)が容易に行えるという利点がある。
図2は、図1のシーケンスプログラム作成装置の構成を示すブロック図である。
By using an element of an array or a structure as an operand, there is an advantage that the description of the code is simplified and maintenance (work to be performed at the time of version upgrade) can be easily performed.
FIG. 2 is a block diagram showing the configuration of the sequence program creation device of FIG.

図2に示すように、シーケンスプログラム作成装置11は、シーケンスプログラム記憶部21、配列・構造体記憶部22、定義・宣言情報変換部24、配列・構造体オペランド命令変換部26、他命令変換部27、出力部28を備える。   As shown in FIG. 2, the sequence program creation device 11 includes a sequence program storage unit 21, an array / structure storage unit 22, a definition / declaration information conversion unit 24, an array / structure operand instruction conversion unit 26, and another instruction conversion unit. 27 and an output unit 28.

配列・構造体記憶部22は、ユーザがシーケンスプログラム作成装置11を介して入力した表示形式における配列または構造体の定義情報および宣言情報を記憶する。
シーケンスプログラム記憶部21は、ユーザがシーケンスプログラム作成装置11を介して入力した表示形式におけるシーケンスプログラムのコードを記憶する。
The array / structure storage unit 22 stores array or structure definition information and declaration information in a display format input by the user via the sequence program creation device 11.
The sequence program storage unit 21 stores a sequence program code in a display format input by the user via the sequence program creation device 11.

定義・宣言情報変換部24は、ユーザに使用されるシーケンスプログラムの配列・構造体の定義・宣言情報を、プログラマブルコントローラへの格納時に使用されるマシンコード形式における、擬似命令(実行に影響しないマシンコード)に変換するとともに、その開始位置および終了位置にその開始・終了を示す擬似命令を挿入する。なお、擬似命令とは、実行に影響しないマシンコードのことであり、例えば、図面中では、「PSEUDO」から始まる行がその擬似命令に相当する。   The definition / declaration information conversion unit 24 is a pseudo-instruction (a machine that does not affect execution) in the machine code format used when storing the definition / declaration information of an array / structure of a sequence program used by a user in a programmable controller. And pseudo instructions indicating the start / end are inserted at the start and end positions. A pseudo instruction is a machine code that does not affect execution. For example, in the drawing, a line starting with “PSEUDO” corresponds to the pseudo instruction.

配列・構造体オペランド命令変換部26は、表示形式で記述されたシーケンスプログラム中の配列または構造体の要素をオペランドとして使用する命令を1行以上のマシンコードに変換するとともに、その配列または構造体の要素であるオペランドに対して、マシンコード形式の対応する1行以上のマシンコードの開始位置および終了位置にその開始・終了を示す擬似命令を挿入する。   The array / structure operand instruction conversion unit 26 converts an instruction that uses an element of an array or structure in a sequence program described in a display format as an operand into one or more lines of machine code, and the array or structure Are inserted at the start and end positions of machine code corresponding to one or more lines in the machine code format.

他命令変換部27は、表示形式で記述されたシーケンスプログラム中の配列または構造体の要素をオペランドとして使用しない命令を1行以上のマシンコードに変換する。
出力部28は、マシンコード形式に変換されたシーケンスプログラムをプログラマブルコントローラに出力する(例えば、プログラマブルコントローラのメモリに書き込む)。
The other instruction conversion unit 27 converts an instruction that does not use an array or structure element in a sequence program described in a display format as an operand into one or more lines of machine code.
The output unit 28 outputs the sequence program converted into the machine code format to the programmable controller (for example, writes it in the memory of the programmable controller).

図3は、図1のシーケンスプログラム参照・変更装置の構成を示すブロック図である。
図3に示すように、シーケンスプログラム参照・変更装置12は、シーケンスプログラム取得部31、シーケンスプログラム記憶部32、定義・宣言情報開始終了位置検出部33、定義・宣言情報復元部34、配列・構造体オペランド開始終了位置検出部35、配列・構造体オペランド復元部36、変換部37、出力部38を備える。
FIG. 3 is a block diagram showing the configuration of the sequence program reference / change apparatus of FIG.
As shown in FIG. 3, the sequence program reference / change device 12 includes a sequence program acquisition unit 31, a sequence program storage unit 32, a definition / declaration information start / end position detection unit 33, a definition / declaration information restoration unit 34, an array / structure. A body operand start / end position detection unit 35, an array / structure operand restoration unit 36, a conversion unit 37, and an output unit 38.

シーケンスプログラム取得部31は、マシンコード形式で記述されたシーケンスプログラムをプログラマブルコントローラから取得して、シーケンスプログラム記憶部32に書き込む。   The sequence program acquisition unit 31 acquires a sequence program described in the machine code format from the programmable controller and writes it in the sequence program storage unit 32.

定義・宣言情報開始終了位置検出部33は、シーケンスプログラム記憶部32に格納されるシーケンスプログラムの配列・構造体の定義・宣言情報に対して、その開始位置及び終了位置を検出する。   The definition / declaration information start / end position detection unit 33 detects the start position and the end position of the sequence / array definition / declaration information of the sequence program stored in the sequence program storage unit 32.

定義・宣言情報復元部34は、検出された開始位置とその開始位置に対応する終了位置の間の定義・宣言情報を表示形式に復元する。
配列・構造体オペランド開始終了位置検出部35は、シーケンスプログラム記憶部32に格納されるシーケンスプログラムの配列または構造体の要素であるオペランドに対して、対応する1行以上のコードの開始位置及び終了位置を検出する。
The definition / declaration information restoration unit 34 restores the definition / declaration information between the detected start position and the end position corresponding to the start position to a display format.
The array / structure operand start / end position detection unit 35 starts and ends the code of one or more lines corresponding to an operand which is an element of an array or structure of the sequence program stored in the sequence program storage unit 32. Detect position.

配列・構造体オペランド復元部36は、その開始位置と終了位置の間の配列または構造体のオペランドに対応する1行以上のコードを基に、そのオペランドの配列・構造体を復元する。   The array / structure operand restoration unit 36 restores the array / structure of the operand based on one or more lines of code corresponding to the operand of the array or structure between the start position and the end position.

変換部37は、シーケンスプログラム記憶部32にマシンコード形式で格納されるソースを変換して(表示形式の)シーケンスプログラムにする。
出力部38は、表示形式に変換されたシーケンスプログラムを表示装置(図3では不図示)上に出力する。
The conversion unit 37 converts the source stored in the machine code format in the sequence program storage unit 32 into a sequence program (in display format).
The output unit 38 outputs the sequence program converted into the display format on a display device (not shown in FIG. 3).

図4Aは、図1のシーケンスプログラム作成装置を介してユーザが定義した配列の定義情報の一例、図4Bは、図1のシーケンスプログラム作成装置を介してユーザが定義した構造体の定義情報の一例、図4Cは、図1のシーケンスプログラム作成装置を介してユーザが宣言した、図4Aおよび図4Bの配列・構造体の各定義情報に対応する配列・構造体の宣言情報を示す図である。   4A is an example of array definition information defined by the user via the sequence program creation device of FIG. 1, and FIG. 4B is an example of structure definition information defined by the user via the sequence program creation device of FIG. 4C is a diagram showing array / structure declaration information corresponding to the array / structure definition information of FIGS. 4A and 4B, which is declared by the user via the sequence program creation device of FIG.

図4Aの例では、ARY_0という名前の配列がビット形式のデータを16個持ち、ARY_1という名前の配列がワード形式のデータを5個持つことが定義されている。
図4Bの例では、STR_0という名前の構造体がビット形式のメンバ1個と、ワード形式のメンバ1個を持ち、STR_1という名前の構造体がビット形式のメンバ2個と、ワード形式のメンバ2個を持つことが定義されている。
In the example of FIG. 4A, it is defined that the array named ARY — 0 has 16 bit-format data, and the array named ARY — 1 has five word-format data.
In the example of FIG. 4B, the structure named STR_0 has one bit-format member and one word-format member, and the structure named STR_1 includes two bit-format members and word-format member 2. It is defined to have pieces.

図4Cでは、図4Aの配列ARY_0、配列ARY_1の先頭アドレスがそれぞれ「M00100」、「WM00200」であること、図4Bの構造体STR_0の先頭アドレスが「WM00300」であることが示されている。   4C shows that the start addresses of the arrays ARY_0 and ARY_1 in FIG. 4A are “M00100” and “WM00200”, respectively, and the start address of the structure STR_0 in FIG. 4B is “WM00300”.

メモリには、電源が落ちた場合でも内容が保持される不揮発性メモリ(種別「M」で表記)と、電源が落ちた場合には内容が保持されない揮発性メモリ(種別「L」で表記)と、システムプログラムが保持されるメモリであることを示す種別「SM」、等の種別がある。   The memory includes a non-volatile memory (indicated by type “M”) that retains contents even when the power is turned off, and a volatile memory (indicated by type “L”) that does not retain contents when the power is turned off. And a type “SM” indicating that the memory is a system program storage memory.

例えば、図4Cにおいて、「WM00200」は、データ長が(16ビットの)ワード(「W」)であり、電源が落ちても内容が保持される種別「M」のメモリの200番目を示している。なお、「M00100」のようにデータ長に対する指定がない場合、データ長は1ビットであると解釈される。   For example, in FIG. 4C, “WM00200” is a word (“W”) having a data length of (16 bits), and indicates the 200th memory of the type “M” whose contents are retained even when the power is turned off. Yes. When there is no designation for the data length such as “M00100”, the data length is interpreted as 1 bit.

図5は、プログラミング装置の内部メモリにマシンコード形式で格納される配列および構造体の定義情報、宣言情報の一例を示す図である。
図5のマシンコードの各行は、すべて、擬似命令であることを示す文字列「PSEUDO」で始まっている。そして、配列および構造体の定義情報、宣言情報に対応する部分については、「LAB」+「定義情報」または「LAB」+「宣言情報」の形式を有している。
FIG. 5 is a diagram showing an example of array and structure definition information and declaration information stored in the machine code format in the internal memory of the programming device.
Each line of the machine code in FIG. 5 starts with the character string “PSEUDO” indicating that it is a pseudo instruction. The portions corresponding to the definition information and declaration information of arrays and structures have a format of “LAB” + “definition information” or “LAB” + “declaration information”.

図5に示すように、表示形式からマシンコードの擬似命令に配列の定義情報を変換すると、上記「定義情報」部分には、配列名(ARY_)以降に示される番号である配列番号、その配列の要素数、要素のデータタイプを示す要素情報が変換結果として出力される。変換結果の先頭行の1つ前の行には、「FC」+「配列の定義情報の開始を識別する値(図では「9」)」の形式を有する擬似命令が挿入され、変換結果の末尾の行の1つ後の行には、「FC」+「配列の定義情報の終了を識別する値(図では「32777」)」の形式を有する擬似命令が挿入される。   As shown in FIG. 5, when array definition information is converted from a display format to a machine code pseudo-instruction, the “definition information” portion includes an array number, which is a number shown after the array name (ARY_), and the array Element information indicating the number of elements and the data type of the element is output as a conversion result. A pseudo instruction having the format “FC” + “value that identifies the start of array definition information (“ 9 ”” in the figure) ”is inserted in the line immediately before the first line of the conversion result. A pseudo-instruction having a format of “FC” + “value for identifying the end of array definition information (“ 32777 ”in the drawing”) ”is inserted in a line immediately after the last line.

また、表示形式からマシンコードの擬似命令に構造体の定義情報を変換すると、上記「定義情報」部分には、構造体名(STR_)以降に示される番号である構造体番号、その構造体が含むメンバの数だけの、それぞれのメンバのデータタイプ(要素情報)が変換結果として出力される。変換結果の先頭行の1つ前の行には、「FC」+「構造体の定義情報の開始を識別する値(図では「10」)」の形式を有する擬似命令が挿入され、変換結果の末尾の行の1つ後の行には、「FC」+「構造体の定義情報の終了を識別する値(図では「32778」)」の形式を有する擬似命令が挿入される。   When structure definition information is converted from a display format to a machine code pseudo-instruction, the "definition information" part contains the structure number, which is the number shown after the structure name (STR_), and the structure. The data type (element information) of each member as many as the number of members included is output as the conversion result. A pseudo instruction having the format “FC” + “value for identifying the start of structure definition information (“ 10 ”in the figure”) ”is inserted in the line immediately before the first line of the conversion result. A pseudo-instruction having a format of “FC” + “value for identifying the end of structure definition information (“ 32778 ”in the drawing”) ”is inserted in a line immediately after the last line of“. ”

また、表示形式からマシンコードの擬似命令に配列および構造体の宣言情報を変換すると、その「宣言情報」部分には、デバイスアドレス情報を識別するアドレスタイプ、CPU番号、アドレス(上位側)、アドレス(下位側)の各項目、および、配列または構造体の番号が変換結果として出力される。変換結果の先頭行の1つ前の行には、「FC」+「配列または構造体の宣言情報の開始を識別する値(図では「11」)」の形式を有する擬似命令が挿入され、変換結果の末尾の行の1つ後の行には、「FC」+「配列または構造体の宣言情報の終了を識別する値(図では「32779」)」の形式を有する擬似命令が挿入される。   Also, when array and structure declaration information is converted from the display format to machine code pseudo-instructions, the “declaration information” portion includes an address type for identifying device address information, a CPU number, an address (upper side), an address Each item on the (lower side) and the number of the array or structure are output as the conversion result. A pseudo instruction having a format of “FC” + “value for identifying the start of declaration information of an array or structure (“ 11 ”in the figure”) ”is inserted in the line immediately before the first line of the conversion result, A pseudo instruction having the format “FC” + “value identifying the end of array or structure declaration information (“ 32779 ”in the figure)” is inserted in the line immediately following the last line of the conversion result. The

図6Aは、図5等のマシンコード形式の配列の定義情報から表示形式に復元された配列の定義情報のデータ構造を示す図であり、図6Bは、図5等のマシンコード形式の構造体の定義情報から表示形式に復元された構造体の定義情報のデータ構造を示す図であり、図6Cは、図5等のマシンコード形式の配列または構造体の宣言情報から表示形式に復元された配列または構造体の宣言情報のデータ構造を示す図である。図6Cにおいて、番号が配列番号であるか構造体番号であるかは、上位側ビットの値により判断する。   6A is a diagram showing a data structure of array definition information restored from the machine code format array definition information of FIG. 5 to a display format, and FIG. 6B is a machine code format structure of FIG. FIG. 6C is a diagram showing the data structure of the structure definition information restored from the definition information of FIG. 5 to the display format, and FIG. 6C is restored to the display format from the machine code format array or structure declaration information of FIG. It is a figure which shows the data structure of the declaration information of an array or a structure. In FIG. 6C, whether the number is an array number or a structure number is determined by the value of the higher-order bit.

図7は、表示形式のシーケンスプログラム(ラダー図)の一例を示す図である。
図7では、回路1は、接点M0、M1、M2、コイルM3が母線間に接続されて構成される。この場合、接点M0、接点M1、接点M2、コイルM3がそれぞれ1命令に相当する。また、回路2は、MOV命令と、そのMOV命令に先行する接点M4が母線間に接続されて構成される。この場合、接点M4、MOV命令がそれぞれ1命令に相当する。
FIG. 7 is a diagram showing an example of a display format sequence program (ladder diagram).
In FIG. 7, the circuit 1 is configured by connecting contacts M0, M1, M2, and a coil M3 between buses. In this case, each of the contact M0, the contact M1, the contact M2, and the coil M3 corresponds to one command. The circuit 2 is configured by connecting a MOV command and a contact M4 preceding the MOV command between buses. In this case, each of the contact M4 and the MOV command corresponds to one command.

図8Aは、ラダー図上の配列オペランドの一例を示す図である。
図8Aでは、接点や、MOV命令のオペランドに、配列の要素が使用されている。
配列オペランドは、“デバイスアドレス情報[要素番号]”で表記される。例えば、M00100[5]は、メモリ種別Mのメモリの100番目のアドレスに先頭が格納される、それぞれのデータ長が1ビットの配列の5番目の要素を示している。また、WM00200[3]は、メモリ種別Mのメモリの200番目のアドレスに先頭が格納される、それぞれのデータ長が16ビット=1ワードの配列の3番目の要素を示している。
FIG. 8A is a diagram illustrating an example of an array operand on a ladder diagram.
In FIG. 8A, elements of the array are used for the contacts and the operand of the MOV instruction.
The array operand is represented by “device address information [element number]”. For example, M00100 [5] indicates the fifth element of the array in which the head is stored at the 100th address of the memory of the memory type M and each data length is 1 bit. WM00200 [3] indicates the third element of the array in which the head is stored at the 200th address of the memory of the memory type M and each data length is 16 bits = 1 word.

図8Bは、ラダー図上の構造体オペランドの一例を示す図である。
図8Bでは、接点や、MOV命令のオペランドに、構造体の要素が使用されている。
構造体オペランドは、例えば、“デバイスアドレス情報.データ長Rインデックス”で表記される。例えば、WM00300.R1は、メモリ種別Mのメモリの300番目に先頭が格納される構造体でRインデックスの1番目に定義された、データ長が(16ビットの)ワードのデータメンバを示している。
FIG. 8B is a diagram illustrating an example of a structure operand on the ladder diagram.
In FIG. 8B, structural elements are used as contacts and operands of the MOV instruction.
The structure operand is represented by, for example, “device address information. Data length R index”. For example, WM00300. R1 is a structure in which the head is stored in the 300th memory of the memory type M, and indicates a data member having a data length (16 bits) defined as the first of the R index.

図9は、配列または構造体の要素であるオペランドに対応する1行以上のマシンコードの開始行の1つ前の行と終了行の1つ後の行に、その配列または構造体のオペランドの開始または終了を示す擬似命令(「FC」+「配列または構造体のオペランドの開始または終了を識別する情報」の形式を有する)が挿入された状態を示す図である。   FIG. 9 shows that one or more lines of machine code corresponding to an operand that is an element of an array or structure are displayed on the line immediately before the start line and after the end line of the operand of the array or structure. It is a figure which shows the state in which the pseudo instruction (it has the format of "FC" + "the information which identifies the start or the end of the operand of an array or a structure") which shows a start or an end is inserted.

図10は、MOV命令に配列または構造体のオペランドが使用された場合に、そのMOV命令に対応する1行以上のマシンコードを示す図である。
図10において、例えば、「WM0000 := WM0100[1]」は、「MOV WM0000 WM0100[1]」に対応する。
FIG. 10 is a diagram showing one or more lines of machine code corresponding to an MOV instruction when an array or structure operand is used in the MOV instruction.
In FIG. 10, for example, “WM0000: = WM0100 [1]” corresponds to “MOV WM0000 WM0100 [1]”.

図10の1段目および2段目は、1次元配列の要素がMOV命令の第2オペランドに使用されている場合のMOV命令、および、対応するマシンコード(アセンブラコード)を示している。   The first row and the second row in FIG. 10 show the MOV instruction and the corresponding machine code (assembler code) when an element of the one-dimensional array is used as the second operand of the MOV instruction.

また、3段目および4段目は、構造体のデータメンバがMOV命令の第2オペランドに使用されている場合のMOV命令、および、対応するマシンコード(アセンブラコード)を示している。   The third and fourth stages show the MOV instruction and the corresponding machine code (assembler code) when the data member of the structure is used as the second operand of the MOV instruction.

また、5段目および6段目は、構造体のメンバである1次元配列の要素がMOV命令の第2オペランドに使用されている場合のMOV命令、および、対応するマシンコード(アセンブラコード)を示している。   The 5th and 6th stages show the MOV instruction and the corresponding machine code (assembler code) when the element of the one-dimensional array that is a member of the structure is used as the second operand of the MOV instruction. Show.

図10のアセンブラコードにおいて、それぞれの命令にオペランドとして表れる「#」は定数、「M」は保持メモリ、「AX」はAXレジスタ、「WI」は符号付き16ビット整数(1ワード=16ビット)、「DU」は符号なし32ビット整数(ダブルワード=32ビット)、「XB」は1ビット、を意味する。   In the assembler code of FIG. 10, “#” appearing as an operand in each instruction is a constant, “M” is a holding memory, “AX” is an AX register, “WI” is a signed 16-bit integer (1 word = 16 bits) , “DU” means an unsigned 32-bit integer (double word = 32 bits), and “XB” means 1 bit.

なお、図10のMOV命令にオペランドとして使用されている配列および構造体の定義・宣言情報を以下に示す。
(定義情報)
TYPE
ARY_01: ARRAY[1..50] OF INT

STR_01: STRUCT
E1: BOOL
E2: BOOL
E3: INT;
E4: ARY_01
END_STRUCT
END_TYPE
(宣言情報)
WM0100 ARY_01
WM0300 STR_01
続いて、図10の各アセンブラコードについて説明する。
The definition and declaration information of arrays and structures used as operands in the MOV instruction in FIG. 10 are shown below.
(Definition information)
TYPE
ARY_01: ARRAY [1..50] OF INT

STR_01: STRUCT
E1: BOOL
E2: BOOL
E3: INT;
E4: ARY_01
END_STRUCT
END_TYPE
(Declaration information)
WM0100 ARY_01
WM0300 STR_01
Next, each assembler code in FIG. 10 will be described.

まず、図10の1段目のアセンブラコードでは、PLD命令において、ACC(アキュミュレータ)の内容をデータスタックにプッシュした後、オペランドが指定するアドレスからデータを読み出しACCに格納している。また、SUB命令において、オペランドが指定するアドレスからデータを読み出し、ACCから読み出したデータを減算しその結果をACCに格納している。また、LEAAX命令において、オペランドが指定するアドレスのメモリ位置アドレスをAXレジスタに格納している。また、AXADDP命令において、AXレジスタの内容と、ACCの内容を加算してその結果をAXレジスタに格納し、データスタックをポップしている。また、LD命令において、AXレジスタの内容に“0”を加えたメモリ位置アドレスからデータを読み出し、ACCに格納している。また、ST命令において、ACCにあるデータをオペランドが指定するアドレスに格納している。   First, in the first-stage assembler code in FIG. 10, in the PLD instruction, the contents of ACC (accumulator) are pushed onto the data stack, and then data is read from the address specified by the operand and stored in ACC. In the SUB instruction, data is read from the address specified by the operand, the data read from ACC is subtracted, and the result is stored in ACC. In the LEAAX instruction, the memory position address of the address specified by the operand is stored in the AX register. In the AXADDP instruction, the contents of the AX register and the contents of the ACC are added and the result is stored in the AX register, and the data stack is popped. In the LD instruction, data is read from the memory location address obtained by adding “0” to the contents of the AX register and stored in the ACC. In the ST instruction, data in ACC is stored at the address specified by the operand.

ここで、PLD命令、SUB命令、LEAAX命令、AXADDP命令、LD命令が配列オペランド“WM0100[1]”に対応するアセンブラコードであるので、それらの命令のうちの先頭の命令(PLD命令)の1つ前の行に、配列オペランド開始擬似命令が挿入されるとともに、それらの命令のうちの末尾の命令(LD命令)の1つ後の行に、配列オペランド終了擬似命令が挿入される。   Here, since the PLD instruction, the SUB instruction, the LEAAX instruction, the AXADDP instruction, and the LD instruction are assembler codes corresponding to the array operand “WM0100 [1]”, one of the first instructions (PLD instructions) of these instructions is used. The array operand start pseudo-instruction is inserted in the previous line, and the array operand end pseudo-instruction is inserted in the line immediately after the last instruction (LD instruction) of those instructions.

なお、配列オペランド開始擬似命令は、例えば、“「FC」+「この行がオペランドに使用される配列要素に関する情報の開始位置であることを示す情報」+「配列要素の復元時に使用されるパターンを識別する情報」”のような形式を有し、配列オペランド終了擬似命令は、例えば、“「FC」+「この行がオペランドに使用される配列要素に関する情報の終了位置であることを示す情報」”のような形式を有する。   The array operand start pseudo-instruction is, for example, ““ FC ”+“ information indicating that this line is the start position of information related to the array element used for the operand ”+“ pattern used when restoring the array element ” The information indicating that the array operand end pseudo-instruction is, for example, ““ FC ”+“ the end position of the information related to the array element used for the operand ” "".

例えば、この1段目のアセンブラコードでは、PLD命令の各オペランド“#”、“WI”、“001”から配列の要素番号“[1]”を取得し、LEAAX命令の各オペランド“M”、“DU”、“100”から配列の先頭アドレス“WM0100”を取得するのが、配列要素の復元時に使用されるパターンである。   For example, in this first assembler code, the array element number “[1]” is obtained from each operand “#”, “WI”, “001” of the PLD instruction, and each operand “M”, “M”, The pattern used for restoring the array elements is to acquire the array start address “WM0100” from “DU” and “100”.

図10の2段目のアセンブラコードは、1段目と同様であるので説明を省略する。
この2段目のアセンブラコードでは、PLD命令、SUB命令、LEAAX命令、AXADDP命令、LD命令が配列オペランド“WM0100[WM0001]”に対応するアセンブラコードであるので、それらの命令のうちの先頭の命令(PLD命令)の1つ前の行に、配列オペランド開始擬似命令が挿入されるとともに、それらの命令のうちの末尾の命令(LD命令)の1つ後の行に、配列オペランド終了擬似命令が挿入される。
The second assembler code in FIG. 10 is the same as the first tier, so the description is omitted.
In this second assembler code, the PLD instruction, SUB instruction, LEAAX instruction, AXADDP instruction, and LD instruction are assembler codes corresponding to the array operand “WM0100 [WM0001]”. The array operand start pseudo-instruction is inserted in the line immediately before (PLD instruction), and the array operand end pseudo-instruction is in the line after the last instruction (LD instruction) of those instructions. Inserted.

例えば、この2段目のアセンブラコードでは、PLD命令の各オペランド“M”、“WI”、“001”から配列の要素番号“[WM0001]”を取得し、LEAAX命令の各オペランド“M”、“DU”、“100”から配列の先頭アドレス“WM0100”を取得するのが、配列要素の復元時に使用されるパターンである。   For example, in the second assembler code, the element number “[WM0001]” of the array is obtained from each operand “M”, “WI”, “001” of the PLD instruction, and each operand “M”, “M”, The pattern used for restoring the array elements is to acquire the array start address “WM0100” from “DU” and “100”.

図10の3段目のアセンブラコードでは、LEAAX命令において、オペランドが指定するアドレスのメモリ位置アドレスをAXレジスタに格納している。また、LD命令において、AXレジスタの内容に当該命令の第3オペランド“51.0”で示される相対アドレスを加えたメモリ位置アドレスからデータを読み出し、ACCに格納している。また、ST命令において、ACCにあるデータをオペランドが指定するアドレスに格納している。   In the third assembler code in FIG. 10, in the LEAAX instruction, the memory position address of the address specified by the operand is stored in the AX register. In the LD instruction, data is read from the memory location address obtained by adding the relative address indicated by the third operand “51.0” of the instruction to the contents of the AX register and stored in the ACC. In the ST instruction, data in ACC is stored at the address specified by the operand.

ここで、LEAAX命令、LD命令が構造体オペランド“WM0300.R1”に対応するアセンブラコードであるので、それらの命令のうちの先頭の命令(LEAAX命令)の1つ前の行に、構造体オペランド開始擬似命令が挿入されるとともに、それらの命令のうちの末尾の命令(LD命令)の1つ後の行に、構造体オペランド終了擬似命令が挿入される。   Here, since the LEAAX instruction and the LD instruction are assembler codes corresponding to the structure operand “WM0300.R1”, the structure operand appears in the line preceding the first instruction (LEAAX instruction) of those instructions. A start pseudo-instruction is inserted, and a structure operand end pseudo-instruction is inserted in a line immediately after the last instruction (LD instruction) of those instructions.

例えば、この3段目のアセンブラコードでは、LEAAX命令の各オペランド“M”、“XB”、“300”から構造体の先頭アドレス“WM0300”を取得し、その先頭アドレスで図6Cの構造体の宣言情報を参照し、構造体番号を取得する。また、LD命令の第3オペランド“51.0”からその構造体内でのメンバの相対アドレスを取得し、その相対アドレスおよび取得済みの構造体番号で図6Bの構造体の定義情報を参照し、相対アドレスに合ったメンバを特定するのが、構造体のメンバの復元時に使用されるパターンである。   For example, in the third assembler code, the start address “WM0300” of the structure is obtained from each operand “M”, “XB”, “300” of the LEAAX instruction, and the structure of FIG. Get the structure number by referring to the declaration information. Also, the relative address of the member in the structure is obtained from the third operand “51.0” of the LD instruction, and the relative address is obtained by referring to the structure definition information in FIG. 6B with the relative address and the obtained structure number. The pattern that is used when restoring the members of the structure is used to identify the members that meet the requirements.

図10の4段目のアセンブラコードは3段目と同様であるので説明を省略する。
図10の5段目のアセンブラコードでは、PLD命令において、ACC(アキュミュレータ)の内容をデータスタックにプッシュした後、オペランドが指定するアドレスからデータを読み出しACCに格納している。また、SUB命令において、オペランドが指定するアドレスからデータを読み出し、ACCから読み出したデータを減算しその結果をACCに格納している。また、LEAAX命令において、オペランドが指定するアドレスのメモリ位置アドレスをAXレジスタに格納している。また、AXADDP命令において、AXレジスタの内容と、ACCの内容を加算してその結果をAXレジスタに格納し、データスタックをポップしている。また、LD命令において、AXレジスタの内容に当該命令の第3オペランド“1”で示される相対アドレスを加えたメモリ位置アドレスからデータを読み出し、ACCに格納している。また、ST命令において、ACCにあるデータをオペランドが指定するアドレスに格納している。
The assembler code at the fourth level in FIG. 10 is the same as that at the third level, and a description thereof will be omitted.
In the fifth assembler code in FIG. 10, in the PLD instruction, the contents of ACC (accumulator) are pushed onto the data stack, and then data is read from the address specified by the operand and stored in ACC. In the SUB instruction, data is read from the address specified by the operand, the data read from ACC is subtracted, and the result is stored in ACC. In the LEAAX instruction, the memory position address of the address specified by the operand is stored in the AX register. In the AXADDP instruction, the contents of the AX register and the contents of the ACC are added and the result is stored in the AX register, and the data stack is popped. In the LD instruction, data is read from the memory location address obtained by adding the relative address indicated by the third operand “1” of the instruction to the contents of the AX register and stored in the ACC. In the ST instruction, data in ACC is stored at the address specified by the operand.

ここで、PLD命令、SUB命令、LEAAX命令、AXADDP命令、LD命令が構造体オペランド“WM0300.WR4[1]”に対応するアセンブラコードであるので、それらの命令のうちの先頭の命令(PLD命令)の1つ前の行に、構造体オペランド開始擬似命令が挿入されるとともに、それらの命令のうちの末尾の命令(LD命令)の1つ後の行に、構造体オペランド終了擬似命令が挿入される。   Here, since the PLD instruction, SUB instruction, LEAAX instruction, AXADDP instruction, and LD instruction are assembler codes corresponding to the structure operand “WM0300.WR4 [1]”, the first instruction among them (PLD instruction ) The structure operand start pseudo-instruction is inserted in the line immediately before), and the structure operand end pseudo-instruction is inserted in the line after the last instruction (LD instruction) of those instructions. Is done.

例えば、この5段目のアセンブラコードでは、PLD命令の各オペランド“#”、“WI”、“001”から構造体のメンバである1次元配列の要素番号“[1]”を取得し、LEAAX命令の各オペランド“M”、“DU”、“300”から配列の先頭アドレス“WM0300”を取得し、その先頭アドレスで図6Cの構造体の宣言情報を参照し、構造体番号を取得する。また、LD命令の第3オペランド“1”からその構造体内でのメンバの相対アドレスを取得し、その相対アドレスおよび取得済みの構造体番号で図6Bの構造体の定義情報を参照し、相対アドレスに合ったメンバを特定するのが、構造体のメンバの復元時に使用されるパターンである。   For example, in this fifth assembler code, the element number “[1]” of the one-dimensional array that is a member of the structure is obtained from each operand “#”, “WI”, “001” of the PLD instruction, and LEAAX The start address “WM0300” of the array is obtained from each operand “M”, “DU”, “300” of the instruction, and the structure number is obtained by referring to the declaration information of the structure in FIG. 6C at the start address. Also, the relative address of the member in the structure is acquired from the third operand “1” of the LD instruction, and the relative address is referenced by referring to the structure definition information in FIG. 6B with the relative address and the acquired structure number. The pattern that is used when restoring the members of the structure is used to identify the members that meet the requirements.

図10の6段目のアセンブラコードは5段目と同様であるので説明を省略する。
図11は、本実施形態において、図2のシーケンスプログラム記憶部上で、表示形式で作成されたシーケンスプログラムのデータ構造を示す図である。
The sixth assembler code in FIG. 10 is the same as that in the fifth tier, so the description is omitted.
FIG. 11 is a diagram showing a data structure of a sequence program created in a display format on the sequence program storage unit of FIG. 2 in the present embodiment.

図11において、回路1、回路2、・・・、回路nや、それぞれの回路内の命令1、命令2、・・・、命令nは、例えば、図7に示すラダー図上のものに対応している。
ニーモニック情報は、命令コードと、その命令が持つオペランド数と、そのオペランド数に続く、そのオペランド数だけのオペランド情報から構成される。
In FIG. 11, circuit 1, circuit 2,..., Circuit n, and instruction 1, instruction 2,..., Instruction n in each circuit correspond to, for example, those on the ladder diagram shown in FIG. doing.
The mnemonic information includes an instruction code, the number of operands that the instruction has, and operand information for the number of operands following the number of operands.

それぞれのオペランド情報は、メモリ種別を示すデバイスタイプ、CPU番号/局番、データ形(ビット、1ワード(16ビット)、ダブルワード(32ビット))、予備、および、そのデータの格納先のアドレス、から構成される。   Each operand information includes a device type indicating a memory type, a CPU number / station number, a data type (bit, 1 word (16 bits), double word (32 bits)), a spare, and an address for storing the data, Consists of

従来は、図11に示すようなデータ構造で、表示形式で作成されたシーケンスプログラムを管理していたため、配列・構造体と単なる変数とを区別することができず、配列や構造体をオペランドに使用した場合、その配列や構造体のオペランドのアドレスは実アドレスに変換されて保持されていた。   Conventionally, since the sequence program created in the display format has been managed with the data structure as shown in FIG. 11, it is impossible to distinguish the array / structure from the simple variable, and the array / structure is used as the operand. When used, the address of the operand of the array or structure was converted to a real address and held.

一方、配列や構造体であることを示すフラグ情報の項目を追加して、配列・構造体と、通常の変数とを区別することは可能であるが、図11のデータ構造の変更になり、データの互換性が損なわれる。   On the other hand, it is possible to distinguish an array / structure from a normal variable by adding an item of flag information indicating an array or a structure, but the data structure in FIG. Data compatibility is lost.

そこで、本実施形態では、デバイスアドレス(= デバイスタイプ)の項目に、デバイスアドレス(メモリ種別)として意味がある値以外の値を設けることで、従来のシステムとの互換性を保ちつつ、配列・構造体と、通常の変数とを区別することを可能としている。   Therefore, in this embodiment, by providing a value other than a meaningful value as a device address (memory type) in the device address (= device type) item, the array / This makes it possible to distinguish between structures and ordinary variables.

図12は、デバイスアドレスの項目に追加された値(ID)を示す図である。
図12において、デバイスアドレスのID=“xatArray”は、そのオペランドが配列の要素であることを示すIDである。また、デバイスアドレスのID=“xatStruct”は、そのオペランドが構造体の要素であることを示すIDである。
FIG. 12 is a diagram illustrating a value (ID) added to the device address item.
In FIG. 12, the device address ID = “xatArray” is an ID indicating that the operand is an element of the array. The device address ID = “xatStruct” is an ID indicating that the operand is an element of the structure.

図13は、配列または構造体の要素であるオペランドに対応するオペランド情報のデータ構造を示す図である。
図13において、上述したように、デバイスタイプの項目には、配列または構造体を示す値(“xatArray”または“xatStruct”)が指定される。そして、デバイスアドレスの値がメモリ種別を示していたときのアドレスの項目には、その配列の各要素についての情報またはその構造体の各要素(データメンバ、配列メンバ、・・・等)についての情報の先頭位置を示すポインタ情報が格納される。
FIG. 13 is a diagram illustrating a data structure of operand information corresponding to an operand that is an element of an array or a structure.
In FIG. 13, as described above, a value indicating an array or a structure (“xatArray” or “xatStruct”) is specified in the device type item. The address item when the device address value indicates the memory type includes information on each element of the array or each element (data member, array member,...) Of the structure. Pointer information indicating the head position of information is stored.

このポインタ情報から、配列の各要素についての情報または構造体の各要素についての情報を取得することができ、配列または構造体の要素であるオペランドを表現することが可能となる。   From this pointer information, information about each element of the array or information about each element of the structure can be acquired, and an operand that is an element of the array or structure can be expressed.

図14は、表示形式のシーケンスプログラムの作成、および、その表示形式のシーケンスプログラムをマシンコード形式に変換して、プログラマブルコントローラに出力する処理のフローチャートである。このフローチャートは、図2のシーケンスプログラム作成装置によって実行される。   FIG. 14 is a flowchart of a process of creating a display format sequence program and converting the display format sequence program into a machine code format and outputting it to a programmable controller. This flowchart is executed by the sequence program creation device of FIG.

まず、ステップS101において、ユーザによって、表示形式のシーケンスプログラム上でその要素がオペランドとなりうる配列または構造体の定義情報・宣言情報が入力される。   First, in step S101, the user inputs definition information / declaration information of an array or structure whose elements can be operands on a display-format sequence program.

そして、続く、ステップS102において、ユーザによって、表示形式のシーケンスプログラムのコードが入力される。
ステップS103では、表示形式のシーケンスプログラムの作成が完了したかどうかが判定される。
In step S102, the sequence program code in the display format is input by the user.
In step S103, it is determined whether or not the creation of the display format sequence program has been completed.

ステップS103で、表示形式のシーケンスプログラムの作成が完了していないと判定された場合は、ステップS102に戻る。
一方、ステップS103で、表示形式のシーケンスプログラムの作成が完了したと判定された場合、ステップS104で、図2の定義・宣言情報変換部24によって、配列または構造体の定義・宣言情報がマシンコードの擬似命令(この命令は、「LAB」+「定義情報」または「LAB」+「宣言情報」の形式を有する)に変換されるとともに、その擬似命令の開始行の1つ前の行および終了行の1つ後の行にその開始・終了を示すマシンコードの擬似命令(この命令は、「FC」で始まる)が挿入される。なお、図5に変換結果の一例が示されている。
If it is determined in step S103 that the creation of the display format sequence program has not been completed, the process returns to step S102.
On the other hand, if it is determined in step S103 that creation of the display format sequence program has been completed, in step S104, the definition / declaration information conversion unit 24 in FIG. Pseudo instruction (this instruction has the form "LAB" + "definition information" or "LAB" + "declaration information"), and the line immediately before and the end of the pseudo instruction's start line A machine code pseudo-instruction (this instruction starts with “FC”) indicating the start / end of the line is inserted in the line immediately after the line. An example of the conversion result is shown in FIG.

そして、ステップS105で、図2の配列・構造体オペランド命令変換部26および他命令変換部27によって、表示形式のシーケンスプログラムがマシンコード形式に変換される。   In step S105, the sequence program in the display format is converted into the machine code format by the array / structure operand instruction conversion unit 26 and the other instruction conversion unit 27 in FIG.

ステップS106では、マシンコード形式に変換されたシーケンスプログラムが図2の出力部28によって、プログラマブルコントローラ内のROMに格納される。
図15は、図14のステップS105の処理をより詳細に示したフローチャートである。
In step S106, the sequence program converted into the machine code format is stored in the ROM in the programmable controller by the output unit 28 in FIG.
FIG. 15 is a flowchart showing the process of step S105 of FIG. 14 in more detail.

なお、図15のフローチャートは、ラダー図を構成する1つの回路について行われる処理を示している。実際には、ラダー図のすべての回路について図15の処理が実行される。   Note that the flowchart of FIG. 15 shows processing performed for one circuit constituting the ladder diagram. Actually, the processing of FIG. 15 is executed for all the circuits in the ladder diagram.

図15において、まず、ステップS201で、現在の回路の中の先頭の命令(ニーモニック情報)が取得される。このニーモニック情報は、図11に示すように、命令コードと、その命令が持つオペランド数と、そのオペランド数に続く、そのオペランド数だけのオペランド情報から構成されている。   In FIG. 15, first, in step S201, the first instruction (mnemonic information) in the current circuit is acquired. As shown in FIG. 11, the mnemonic information includes an instruction code, the number of operands of the instruction, and operand information for the number of operands following the number of operands.

続く、ステップS202では、そのニーモニック情報がオペランド情報を持つかどうか、すなわち、オペランド数の項目に1以上の値が設定されているかどうかが判定される。
ステップS202でニーモニック情報がオペランド情報を持たないと判定された場合、ステップS207において、図2の他命令変換部27によって、その命令コード等がマシンコード形式に変換される。
In step S202, it is determined whether or not the mnemonic information has operand information, that is, whether or not a value of 1 or more is set in the operand number item.
If it is determined in step S202 that the mnemonic information does not have operand information, the instruction code or the like is converted into a machine code format by the other instruction conversion unit 27 in FIG. 2 in step S207.

そして、ステップS206において、プログラムが終了したかどうか、すなわち、現在の回路において、後続の命令があるかどうかが判定される。
ステップS206において、後続の命令がないと判定された場合、一連の処理、この場合、1回路分の処理が終了する。一方、ステップS206において、後続の命令があると判定された場合、ステップS201に戻り、後続の命令を取得して、その後続の命令について同様の処理を繰り返す。
In step S206, it is determined whether or not the program is completed, that is, whether or not there is a subsequent instruction in the current circuit.
If it is determined in step S206 that there is no subsequent instruction, a series of processing, in this case, processing for one circuit is completed. On the other hand, if it is determined in step S206 that there is a subsequent instruction, the process returns to step S201, the subsequent instruction is acquired, and the same processing is repeated for the subsequent instruction.

一方、ステップS202でニーモニック情報がオペランド情報を持つと判定された場合、ステップS203において、そのニーモニック情報が有する各オペランド情報のデバイスタイプの項目の値(ID)が検索され、そのニーモニック情報がオペランドに配列または構造体の要素を持つかどうかが判定される。デバイスタイプの項目の値=“xatArray”または“xatStruct”であるオペランド情報が検出された場合は、配列または構造体の要素をオペランドに持つ命令であると判定される。   On the other hand, if it is determined in step S202 that the mnemonic information has operand information, the value (ID) of the device type item of each operand information included in the mnemonic information is searched in step S203, and the mnemonic information is stored in the operand. It is determined whether it has an array or structure element. If operand information with device type item value = “xatArray” or “xatStruct” is detected, it is determined that the instruction has an element of an array or structure as an operand.

ステップS203において配列または構造体の要素をオペランドに持つ命令であると判定された場合、ステップS204において、図2の配列・構造体オペランド命令変換部26によって、その命令が表示形式からマシンコード形式へ変換されて、取得した命令に対応する1行以上のマシンコードが得られるとともに、その取得した命令に対応する1行以上のマシンコード中の、配列または構造体の要素であるオペランドに対応する1行以上のマシンコードの開始行の1つ前の行および終了行の1つ後の行にその開始・終了を示すマシンコードの擬似命令(この命令は、「FC」で始まる)が挿入される。そして、制御がステップS206に移る。   If it is determined in step S203 that the instruction has an element of an array or structure as an operand, the instruction is converted from the display format to the machine code format by the array / structure operand instruction conversion unit 26 in FIG. 2 in step S204. Converted to obtain one or more lines of machine code corresponding to the acquired instruction, and 1 corresponding to an operand which is an element of an array or structure in one or more lines of machine code corresponding to the acquired instruction Machine code pseudo-instructions (starting with "FC") indicating the start / end are inserted in the line preceding the start line and the line following the end line of machine code that is greater than or equal to the line. . Control then proceeds to step S206.

より具体的には、表示形式の各命令に対して、対応する1行以上のマシンコードのテンプレート(雛形)が2つ存在している。1つは、その命令が配列または構造体の要素をオペランドに含まない場合のものであり、もう1つは、その命令が配列または構造体の要素をオペランドに含む場合のものである。配列または構造体の要素をオペランドに含まない各命令に対して、その命令に対応するマシンコード(テンプレート)の何行目から何行目の間がその命令のオペランドに対応するかは既知である。配列または構造体の要素をオペランドに含む命令に対するテンプレートは、配列または構造体の要素をオペランドに含まない命令に対するテンプレートのオペランド対応部分の開始行の1つ前の行および終了行の1つ後の行にその開始・終了を示すマシンコードの擬似命令を挿入することで得られる。   More specifically, there are two corresponding machine code templates (templates) for one or more lines for each instruction in the display format. One is when the instruction does not contain an element of the array or structure in the operand, and the other is when the instruction contains an element of the array or structure in the operand. For each instruction that does not contain an element of an array or structure as an operand, it is known how many lines from what line in the machine code (template) corresponding to that instruction corresponds to the operand of that instruction. . A template for an instruction that includes an element of an array or structure as an operand is a line preceding the start line and one after the end line of the operand corresponding part of the template for an instruction that does not include an element of the array or structure. It is obtained by inserting a pseudo instruction of machine code indicating the start / end of the line.

なお、図10にステップS204の処理結果が数例示されている。
一方、ステップS203において配列または構造体の要素をオペランドに持つ命令でないと判定された場合、ステップS205において、図2の他命令変換部27によって、(配列または構造体の要素をオペランドに持たない)命令がマシンコード形式に変換される。そして、制御がステップS206に移る。
FIG. 10 illustrates several processing results of step S204.
On the other hand, if it is determined in step S203 that the instruction is not an instruction having an array or structure element as an operand, in step S205, the other instruction conversion unit 27 in FIG. 2 (does not have an array or structure element as an operand). Instructions are converted to machine code format. Control then proceeds to step S206.

図16は、プログラマブルコントローラから読み出されたマシンコード形式のシーケンスプログラムを、表示形式のシーケンスプログラムに逆変換して、表示部上に出力する処理のフローチャートである。このフローチャートは、図3のシーケンスプログラム参照・変更装置によって実行される。   FIG. 16 is a flowchart of processing for converting the sequence program in the machine code format read from the programmable controller into the display format sequence program and outputting it to the display unit. This flowchart is executed by the sequence program reference / change device of FIG.

まず、ステップS301において、図3のシーケンスプログラム取得部31によって、マシンコード形式で記述されたシーケンスプログラムがプログラマブルコントローラから取得され、シーケンスプログラム記憶部32に書き込まれる。   First, in step S <b> 301, the sequence program described in the machine code format is acquired from the programmable controller by the sequence program acquisition unit 31 of FIG. 3, and is written in the sequence program storage unit 32.

そして、続く、ステップS302において、定義・宣言情報開始終了位置検出部33によって、シーケンスプログラム記憶部32に格納されたマシンコード形式のシーケンスプログラムが検索される。そして、このマシンコード形式のシーケンスプログラム中から、「PSEUDO FC」で始まるマシンコードの擬似命令が検出されるとともに、定義・宣言情報復元部34によって、その開始位置とその開始位置に対応する終了位置の間にある配列または構造体の定義・宣言情報(この情報は、「PSEUDO LAB」で始まる)が表示形式に復元される。   In step S302, the definition / declaration information start / end position detection unit 33 searches the sequence program in the machine code format stored in the sequence program storage unit 32. Then, a machine code pseudo instruction starting with “PSEUDO FC” is detected from the sequence program in the machine code format, and the start position and the end position corresponding to the start position are detected by the definition / declaration information restoring unit 34. The definition / declaration information (this information starts with “PSEUDO LAB”) of the array or structure in between is restored to the display format.

ステップS303では、配列・構造体オペランド開始終了位置検出部35、配列・構造体オペランド復元部36、および、変換部37によって、マシンコード形式のシーケンスプログラムが表示形式に変換される。   In step S303, the sequence program in the machine code format is converted into a display format by the array / structure operand start / end position detection unit 35, the array / structure operand restoration unit 36, and the conversion unit 37.

ステップS304では、出力部38によって、表示形式に変換されたシーケンスプログラムと、その配列・構造体の定義・宣言情報が表示装置上に出力され表示される。
図17は、図16のステップS303の処理をより詳細に示したフローチャートである。
In step S304, the output unit 38 outputs the sequence program converted into the display format and the definition / declaration information of the array / structure on the display device.
FIG. 17 is a flowchart showing the process of step S303 of FIG. 16 in more detail.

図17において、まず、ステップS401で、図3のシーケンスプログラム記憶部32に格納されるシーケンスプログラムの各行が取得される。
続く、ステップS402では、配列・構造体オペランド開始終了位置検出部35によって、その取得した行が、マシンコードの擬似命令であって、「FC」+「配列または構造体の要素であるオペランドに関する情報の開始を識別する値」を含むかどうかが判定される。
In FIG. 17, first, in step S401, each row of the sequence program stored in the sequence program storage unit 32 of FIG. 3 is acquired.
In step S402, the array / structure operand start / end position detection unit 35 obtains information related to an operand in which the acquired line is a pseudo instruction of a machine code and is “FC” + “element of an array or structure”. It is determined whether or not it includes a value that identifies the start of “.

ステップS402において取得した行が「FC」+「配列または構造体の要素であるオペランドに関する情報の開始を示す情報」を含まないと判定された場合、ステップS407において、変換部37によって、そのマシンコード形式のシーケンスプログラムの命令等が表示形式に変換される。そして、制御がステップS406に移る。   If it is determined in step S402 that the acquired line does not include “FC” + “information indicating the start of information related to an operand that is an element of an array or structure”, in step S407, the conversion unit 37 uses the machine code. The instructions of the format sequence program are converted to the display format. Control then proceeds to step S406.

一方、ステップS402において取得した行が「FC」+「配列または構造体の要素であるオペランドに関する情報の開始を示す情報」を含むと判定された場合、ステップS403において、配列・構造体オペランド復元部36によって、シーケンスプログラム記憶部32に格納されるシーケンスプログラムの後続の各行が、「FC」+「配列または構造体の要素であるオペランドに関する情報の終了を示す情報」を含む行が検出されるまで取得される。   On the other hand, if it is determined that the line acquired in step S402 includes “FC” + “information indicating the start of information relating to an operand that is an element of an array or structure”, an array / structure operand restoration unit is determined in step S403. 36 until each subsequent line of the sequence program stored in the sequence program storage unit 32 includes a line including “FC” + “information indicating the end of information related to an operand that is an element of an array or structure”. To be acquired.

そして、ステップS403において、配列・構造体オペランド復元部36によって、「FC」+「配列または構造体の要素であるオペランドに関する情報の開始を示す情報」の行にさらに含まれる復元時に使用されるパターンを識別する情報を用いて、その開始と終了の擬似命令で挟まれたマシンコード(アセンブラコード)部分から配列の要素または構造体のメンバを復元するのに必要な情報が取得される。ステップS403で取得される情報は、図10で述べたように、配列の要素を復元する場合、その配列の先頭アドレス、その配列の要素番号(インデックス)またはそのインデックスの値が格納されるアドレスである。また、構造体のメンバを復元する場合、例えば、その構造体の先頭アドレス、その構造体のメンバの相対アドレスである。   In step S403, the array / structure operand restoring unit 36 uses the pattern “FC” + “information indicating the start of information related to the operands that are elements of the array or structure” to be used at the time of restoration. The information necessary for restoring the elements of the array or the members of the structure is acquired from the machine code (assembler code) portion sandwiched between the start and end pseudo-instructions. As described in FIG. 10, the information acquired in step S <b> 403 is an address at which the top address of the array, the element number (index) of the array, or the value of the index is stored when the array element is restored. is there. When restoring a member of a structure, for example, the start address of the structure and the relative address of the member of the structure.

構造体のメンバを復元する場合には、ステップS404の処理がさらに実行される。このステップS404では、例えば、配列・構造体オペランド復元部36によって、ステップS403で取得された構造体の先頭アドレスを用いて、図6Cの構造体の宣言情報が参照されて構造体番号が取得される。また、その構造体番号およびステップS403で取得された構造体のメンバの相対アドレスを用いて、図6Bの構造体の定義情報が参照されてその相対アドレスに合ったメンバが特定される。   When restoring the members of the structure, the process of step S404 is further executed. In this step S404, for example, the array / structure operand restoration unit 36 refers to the structure declaration information in FIG. 6C by using the start address of the structure acquired in step S403, and acquires the structure number. The Also, using the structure number and the relative address of the structure member acquired in step S403, the structure definition information in FIG. 6B is referenced to identify the member that matches the relative address.

ステップS405では、ステップS403およびステップS404の結果を踏まえて、配列・構造体オペランド復元部36によって、オペランドとして使用される配列の要素または構造体のメンバが表示形式に復元される。そして、制御がステップS406に移る。   In step S405, based on the results of steps S403 and S404, the array / structure operand restoring unit 36 restores the elements of the array or the members of the structure used as the operands to the display format. Control then proceeds to step S406.

図18は、本実施形態のハードウェア環境を示す図である。
図18において、プログラミング装置50は、そのプログラミング装置50を介して作成されるシーケンスプログラムの格納先のプログラマブルコントローラ65に接続されている。
FIG. 18 is a diagram illustrating a hardware environment according to the present embodiment.
In FIG. 18, the programming device 50 is connected to a programmable controller 65 that stores a sequence program created via the programming device 50.

図18において、プログラミング装置は、中央演算処理装置(CPU)51、ROM52、RAM(一次記憶)53、記憶装置55、入力装置58、表示装置61、入出力インターフェイス(I/O)62を備え、それらがバス63を介して接続されている。   In FIG. 18, the programming device includes a central processing unit (CPU) 51, a ROM 52, a RAM (primary storage) 53, a storage device 55, an input device 58, a display device 61, and an input / output interface (I / O) 62. They are connected via a bus 63.

図18において、CPU51は、コンピュータ全体を制御する。シーケンスプログラムを作成したり、参照・変更したりする処理を行うプログラムは、例えば、ROM52からRAM53に読み出されて、そのRAM53上で実行される。   In FIG. 18, a CPU 51 controls the entire computer. For example, a program for creating a sequence program and performing processing for referring to and changing the sequence program is read from the ROM 52 to the RAM 53 and executed on the RAM 53.

入力装置58を介して、ユーザは、配列または構造体の定義情報や宣言情報を入力したり、表示形式のシーケンスプログラムのコードを入力したりする。
この表示形式のシーケンスプログラムは、作成時や参照・変更時に、表示装置61上に表示される。
Through the input device 58, the user inputs definition information or declaration information of an array or structure, or inputs a sequence program code in a display format.
The sequence program in this display format is displayed on the display device 61 at the time of creation, reference or change.

記憶装置55は、例えば、作成された配列の定義情報、構造体の定義情報、配列および構造体の宣言情報を記憶する内部メモリ56と、表示形式またはマシンコード形式のシーケンスプログラムを記憶するユーザプログラムメモリ57を備える。   The storage device 55 includes, for example, an internal memory 56 that stores the definition information of the created array, structure definition information, array and structure declaration information, and a user program that stores a sequence program in a display format or a machine code format. A memory 57 is provided.

作成された表示形式のシーケンスプログラムは、マシンコードに変換されてマシンコード形式のシーケンスプログラムとなり、I/O62を介して、例えば、プログラマブルコントローラ65内のROMに書き込まれる。また、プログラマブルコントローラ65内のROMから読み出されたマシンコード形式のシーケンスプログラムは、表示形式のシーケンスプログラムに変換されて、例えば、表示装置61上に表示される。   The created display format sequence program is converted into a machine code to be a machine code format sequence program, and is written to, for example, a ROM in the programmable controller 65 via the I / O 62. The machine code format sequence program read from the ROM in the programmable controller 65 is converted into a display format sequence program and displayed on the display device 61, for example.

10 プログラマブルコントローラのプログラミング装置
11 シーケンスプログラム作成装置
12 シーケンスプログラム参照・変更装置
21、32 シーケンスプログラム記憶部
22 配列・構造体記憶部
24 定義・宣言情報変換部
26 配列・構造体オペランド変換部
27 他命令変換部
28、38 出力部
31 シーケンスプログラム取得部
33 定義・宣言情報開始終了位置検出部
34 定義・宣言情報復元部
35 配列・構造体オペランド開始終了位置検出部
36 配列・構造体オペランド復元部
37 変換部
DESCRIPTION OF SYMBOLS 10 Programming controller programming device 11 Sequence program creation device 12 Sequence program reference / change device 21, 32 Sequence program storage unit 22 Array / structure storage unit 24 Definition / declaration information conversion unit 26 Array / structure operand conversion unit 27 Other instructions Conversion unit 28, 38 Output unit 31 Sequence program acquisition unit 33 Definition / declaration information start / end position detection unit 34 Definition / declaration information restoration unit 35 Array / structure operand start / end position detection unit 36 Array / structure operand restoration unit 37 Conversion Part

Claims (1)

シーケンスプログラム内にある配列または構造体の少なくとも一方の定義情報及び宣言情報をマシンコード形式に変換する変換部と、
プログラマブルコントローラからシーケンスプログラムを読み出す際に前記マシンコード形式の配列または構造体の少なくとも一方の定義情報及び宣言情報を逆変換してユーザによる作成・変更時に用いられる形式にする逆変換部、を有し、
前記変換部は、シーケンスプログラム中で使用された配列または構造体のオペランドを配列または構造体のオペランドであることを示す、デバイスアドレスの項目にメモリ種別以外の値(ID)を付加したマシンコード形式に変換してプログラマブルコントローラに格納し、
前記逆変換部は、プログラマブルコントローラからシーケンスプログラムを読み出してきた際に、マシンコード形式に変換した配列または構造体のオペランドであることを示す、マシンコードに付加した前記メモリ種別以外の値(ID)を基に、配列または構造体の定義・宣言情報を参照し、逆変換して表示することを特徴とするプログラマブルコントローラのプログラミング装置。
A conversion unit that converts definition information and declaration information of at least one of an array or a structure in a sequence program into a machine code format;
Inverse transform unit to form used during creation or change by users at least one of definition information and declaration information sequence or structure of the machine code format by inverse transformation when reading a sequence program from the programmable controller, have a ,
The conversion unit is a machine code format in which an array or structure operand used in a sequence program is an array or structure operand and a value (ID) other than the memory type is added to the device address item. Stored in the programmable controller,
The inverse conversion unit is a value (ID) other than the memory type added to the machine code, which indicates an operand of an array or structure converted into a machine code format when the sequence program is read from the programmable controller. A programmable controller programming device characterized by referring to the definition / declaration information of an array or structure based on the above, and performing reverse conversion .
JP2012027536A 2012-02-10 2012-02-10 Programmable controller programming device Active JP5387705B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012027536A JP5387705B2 (en) 2012-02-10 2012-02-10 Programmable controller programming device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012027536A JP5387705B2 (en) 2012-02-10 2012-02-10 Programmable controller programming device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006261585A Division JP4961928B2 (en) 2006-09-26 2006-09-26 Sequence program conversion device and programmable controller programming device

Publications (2)

Publication Number Publication Date
JP2012099151A JP2012099151A (en) 2012-05-24
JP5387705B2 true JP5387705B2 (en) 2014-01-15

Family

ID=46390912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012027536A Active JP5387705B2 (en) 2012-02-10 2012-02-10 Programmable controller programming device

Country Status (1)

Country Link
JP (1) JP5387705B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003162307A (en) * 2001-11-28 2003-06-06 Fuji Electric Co Ltd System and method for language conversion support
JP2004341824A (en) * 2003-05-15 2004-12-02 Fuji Electric Fa Components & Systems Co Ltd Programming device of programmable controller

Also Published As

Publication number Publication date
JP2012099151A (en) 2012-05-24

Similar Documents

Publication Publication Date Title
CN107077396B (en) In-vehicle control device, program writing device, program generating device, and method
JP5226328B2 (en) Code converter
CN107632828B (en) Multi-dts file supporting method, compiling device and embedded equipment
CN105511911A (en) System firmware upgrade package generation method and device
JP2007293383A (en) Program development support device and method for operating same device
CN110825386A (en) Code compiling method and device and storage medium
JP4961928B2 (en) Sequence program conversion device and programmable controller programming device
WO2010137139A1 (en) Sequence program debugging device, debugging method, and program
JP5387705B2 (en) Programmable controller programming device
JP2011028648A (en) System and method for generating object code
JP2010102454A (en) Information processing apparatus and information processing program
JP4737441B2 (en) PLC system
JP4516046B2 (en) Programmable controller
KR101670916B1 (en) Method for storing function and system device using the same
JP2009048259A (en) Program conversion method and program for conversion
JP6175306B2 (en) Control program dividing apparatus, control program dividing method and recording medium therefor
JP2004341824A (en) Programming device of programmable controller
JP2010020416A (en) Data transfer method and data transfer unit
JP2008176520A (en) Tag conversion device
CN112379635B (en) PLC ladder diagram analysis method and device, electronic equipment and readable storage medium
US10572233B2 (en) Vectorization device, vectorization method, and recording medium on which vectorization program is stored
JP4569284B2 (en) Integrated circuit debugging method and debugging program
KR101599209B1 (en) System and method for outputting electronic documents with customized fonts in different platforms
JP5109808B2 (en) Additional executable information generating apparatus, information processing apparatus, and program
CN115757131A (en) Program code testing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120210

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130604

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130826

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130923

R150 Certificate of patent or registration of utility model

Ref document number: 5387705

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250