[go: up one dir, main page]

JP4876537B2 - Programmable controller programming device - Google Patents

Programmable controller programming device Download PDF

Info

Publication number
JP4876537B2
JP4876537B2 JP2005321722A JP2005321722A JP4876537B2 JP 4876537 B2 JP4876537 B2 JP 4876537B2 JP 2005321722 A JP2005321722 A JP 2005321722A JP 2005321722 A JP2005321722 A JP 2005321722A JP 4876537 B2 JP4876537 B2 JP 4876537B2
Authority
JP
Japan
Prior art keywords
machine language
instruction
program
pseudo
language
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
JP2005321722A
Other languages
Japanese (ja)
Other versions
JP2007128378A (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 JP2005321722A priority Critical patent/JP4876537B2/en
Publication of JP2007128378A publication Critical patent/JP2007128378A/en
Application granted granted Critical
Publication of JP4876537B2 publication Critical patent/JP4876537B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Programmable Controllers (AREA)

Description

この発明は、例えばIEC規格1131−3に定められているテキスト記述形式のプログラミング言語であるストラクチャード・テキスト言語(以下・ST言語とも略記する)で記述されたのち、マシンコードに変換されてプログラマブルコントローラ(PLCとも略記する)に格納されたシーケンスプログラムを、再び元のST言語のプログラムに復元する機能を持つプログラマブルコントローラのプログラミング装置に関する。   The present invention is described in, for example, a structured text language (hereinafter also abbreviated as ST language), which is a text description format programming language defined in IEC standard 1131-3, and then converted into a machine code to be a programmable controller. The present invention relates to a programming device for a programmable controller having a function of restoring a sequence program stored in (abbreviated as PLC) to an original ST language program.

プログラマブルコントローラ(PLC)はシーケンスプログラムを演算実行してPLCに接続される制御対象機器の自動シーケンス制御を行う装置として知られている。そしてこのシーケンスプログラムは通常、ユーザによりプログラミング装置上で編集されたのち、マシンコードに変換されてPLCに格納される。なおここで編集とはプログラムの作成、変更、デバッグ等のプログラムの作成に関わる全ての作業を意味するものとする。
このシーケンスプログラムを作るためのプログラミング言語としては、従来、ラダー図を用いるラダー言語が使用されて来たが、ラダー言語はリレー回路等の専門知識を必要とするため、最近は、こうした専門知識を持たない通常のソフトウェア技術者でも容易にシーケンスプログラムを作ることができる、上述のようなテキスト記述形式(換言すれば図面を用いない形式)のST言語が用いられるようになった。
A programmable controller (PLC) is known as a device that performs an automatic sequence control of a control target device connected to a PLC by calculating and executing a sequence program. The sequence program is usually edited on the programming device by the user, converted into a machine code, and stored in the PLC. Here, editing means all work related to program creation, such as program creation, modification, and debugging.
Conventionally, a ladder language using a ladder diagram has been used as a programming language for creating this sequence program. However, since the ladder language requires specialized knowledge such as a relay circuit, these specialized knowledge has recently been reduced. The ST language of the text description format as described above (in other words, a format that does not use a drawing), which can be easily created by a normal software engineer who does not have, has come to be used.

ところで、このようなST言語で記述されたテキスト記述形式のプログラム(テキストプログラムともいう)としてのシーケンスプログラムをPLCのマシンコードに変換すると、現状ではプログラムの流れを切り換えるために、必要に応じてテキストプログラム内に使用されるプログラム制御用の英単語(後述の制御用語)等は無視し、テキストプログラム内の実行文や条件式等のシーケンス制御に必須となる部分のみをマシン語命令に変換するため、元のST言語で記述されたプログラムに復元することができない。
このため、PLCのマシンコードを後刻、再び編集する場合に備えて、PLCの記憶装置にマシンコードに変換したプログラムとは別にST言語で記述された元のプログラムを格納するか、ST言語で記述された元のプログラムをPLCとは別のパソコンなどの記憶装置に格納し、PLC内のプログラムとリンクした形で管理している。
By the way, when a sequence program as a text description format program (also referred to as a text program) written in the ST language is converted into a PLC machine code, text is changed as necessary to switch the program flow at present. To ignore program control English words (control terms to be described later) used in the program, and to convert only the parts in the text program that are essential for sequence control, such as executable statements and conditional expressions, into machine language instructions The program written in the original ST language cannot be restored.
Therefore, in preparation for editing the PLC machine code later, the original program written in the ST language is stored in the PLC storage device separately from the program converted into the machine code or written in the ST language. The original program is stored in a storage device such as a personal computer other than the PLC, and managed in a form linked to the program in the PLC.

なお、ラダー言語で作成されるPLCのシーケンスプログラムは、一般に流れ図を参照し、リレー動作に対応するビット処理を行う基本命令と、より複雑な演算や制御を行わせるための機能命令などからなるラダー言語を用いて、ラダー図として図面化(プログラミング)され、表示されるが、特許文献1には、機能命令に対応するマクロプログラムを解析して処理する必要がなく、しかも表示は従来と同様に行えるPLCを得るために、機能命令と機械語を対応させるテーブルを有し、機能命令を当該命令ステップに特定される機械語に変換してシーケンスプログラムとして記憶し、その機械語に付随して、対応する復元情報を記憶しておき、シーケンス処理の実行はマクロプログラムを用いない特定の機械語で、シーケンスプログラムの表示は復元情報から復元したラダー言語により行うように構成したPLCが開示されている。
特開平5−274011号公報
A PLC sequence program created in a ladder language generally refers to a flow chart, and includes a ladder instruction composed of basic instructions for performing bit processing corresponding to a relay operation and functional instructions for causing more complicated calculation and control. Although it is drawn (programmed) and displayed as a ladder diagram using a language, Patent Document 1 does not need to analyze and process a macro program corresponding to a function instruction, and the display is the same as in the past. In order to obtain a PLC that can be used, it has a table that correlates function instructions and machine language, converts the function instructions into machine language specified in the instruction step, stores it as a sequence program, and accompanies the machine language, The corresponding restoration information is stored, and execution of the sequence process is a specific machine language that does not use a macro program. Shows the PLC configured to perform a ladder language restored from the restoration information is disclosed.
JP-A-5-274011

しかしながら、PLC内にマシンコードに変換したプログラムとは別にST言語で記述された元のプログラムを格納する前述の方法では、PLC内にマシンコードのプログラムとST言語で記述された元のプログラムとの両方を格納するため、2 倍の容量の記憶装置が必要となりPLCがコストアップとなってしまう。
また前述したPLCとは別の記憶装置にST言語で記述された元のプログラムを格納する方法では、別の記憶装置を参照することが煩わしく、直接、PLC内のプログラムを読み出してこれを編集したくても、ST言語で記述されたプログラムを元にマシンコードに変換したPLC内のプログラムは前述の理由で元のST言語の形には復元されないため、プログラムの編集が困難である。
このため、遠隔地のPLCのプログラムを変更する際には、直接、PLC内のプログラムを変更するのではなく、別の記憶装置に保存したST言語で記述された元のプログラムを持参し、そのプログラムを編集しマシンコードに変換してPLCに転送(書き込み)を行う必要があった。
However, in the above-described method of storing the original program written in the ST language separately from the program converted into the machine code in the PLC, the machine code program and the original program written in the ST language are stored in the PLC. Since both are stored, a storage device having twice the capacity is required, and the cost of the PLC increases.
Further, in the method of storing the original program written in the ST language in a storage device different from the PLC described above, it is troublesome to refer to another storage device, and the program in the PLC is directly read out and edited. However, the program in the PLC converted into the machine code based on the program written in the ST language is not restored to the original ST language form for the above-mentioned reason, so that the editing of the program is difficult.
For this reason, when changing a PLC program at a remote location, instead of directly changing the program in the PLC, bring the original program written in the ST language stored in another storage device. It was necessary to edit the program, convert it to machine code, and transfer (write) it to the PLC.

本発明はこのような問題を解消し、ST言語で記述されたのちマシンコードに変換されてPLCに格納されたシーケンスプログラムを、再び容易に元のST言語のプログラムに復元する機能を持つプログラマブルコントローラのプログラミング装置を提供することを課題とする。   The present invention solves such a problem, and a programmable controller having a function of easily restoring a sequence program written in the ST language, converted into a machine code and stored in the PLC into the original ST language program again. It is an object of the present invention to provide a programming device.

前記の課題を解決するために請求項1のプログラマブルコントローラのプログラミング装置は、
文字または(および)記号をそれぞれ複数個連ねた列(以下連続文字列という)からなり、それぞれ、このシーケンスプログラムを実行するプロセッサの機能の仕様に予め定められたマシン語命令(以下真性マシン語命令という)の1または複数個に置き換え可能な各種の条件式(22など)や実行文(24、25など)と、同じく前記連続文字列からなり、前記真性マシン語命令への置き換えができない各種の制御用語(IFの21、THENの23、END IFの26など)とを組合わせ、このプログラミング言語固有の文法に従い記述されたテキスト記述型プログラミング言語のシーケンスプログラムとしてのソースプログラムにおける、前記の各連続文字列を順次読み込んで解析したうえ、この各連続文字列をそれぞれ該当するマシン語命令(マシンコード111〜117など)に変換し、前記ソースプログラムに対応するマシン語形態のオブジエクトプログラムを生成してプログラマブルコントローラに格納する言語順変換手段(保存処理4およびダウンロード処理8を実行する図外のプロセッサなど)と、
プログラマブルコントローラから読み出したテキスト記述型プログラミング言語のソースプログラムを元とするマシン語形態の前記オブジエクトプログラムを構成する各マシン語命令を順次解析して、前記オブジエクトプログラムを元のテキスト記述型プログラミング言語のソースプログラムに復元する言語逆変換手段(アップロード処理9および表示処理5を実行する図外のプロセッサなど)と、を備え
前記言語順変換手段が、前記制御用語に該当しない各連続文字列を、このそれぞれに対する前記の置き換えが可能な1または複数個の真性マシン語命令に変換し、また前記制御用語に該当する各連続文字列を、このそれぞれに1対1に対応し前記真性マシン語命令には含まれず、プログラマブルコントローラのシーケンスプログラムの実行に影響しないマシン語命令(以下疑似マシン語命令という)に変換する手段を備え、
前記言語逆変換手段が少なくとも、解析対象の当該のマシン語命令が前記疑似マシン語命令であるか否かを判定する疑似マシン語命令判定手段と、
この疑似マシン語命令判定手段によって疑似マシン語命令でないと判定された当該の前記真性マシン語命令に対しては、さらに組となる真性マシン語命令を持つものであるか否かを判定し、組の真性マシン語命令を持たないと判定した真性マシン語命令を対応する1行分のテキスト記述型プログラミング言語の条件式または実行文に復元し、組の真性マシン語命令を持つと判定した場合は、当該の真性マシン語命令から組の最終位の真性マシン語命令までの真性マシン語命令を一括して、対応するテキスト記述型プログラミング言語の1行分の条件式または実行文に復元する第1の判定復元手段と、
前記疑似マシン語命令判定手段によって疑似マシン語命令と判定された当該の疑似マシン語命令に対しては、さらに対となる疑似マシン語命令を持つものであるか否かを判定し、対の疑似マシン語命令を持たないと判定した疑似マシン語命令を対応する1行分のテキスト記述型プログラミング言語の前記制御用語に復元し、対の疑似マシン語命令を持つと判定した場合は、当該の疑似マシン語命令から対の最終位の疑似マシン語命令までの各疑似および真性のマシン語命令のうち、疑似マシン語命令をそれぞれ対応するテキスト記述型プログラミング言語の前記制御用語に復元すると共に、真性マシン語命令をその個別または組となる複数個を一括した真性マシン語命令ごとに前記第1の判定復元手段を介しそれぞれ対応するテキスト記述型プログラミング言語の条件式または実行文に復元して、当該の疑似マシン語命令から対の最終位の疑似マシン語命令までの全マシン語命令を、該条件式または実行文の復元行を同一行に含むようなテキスト記述型プログラミング言語の制御命令文内の1行分の復元文とする第2の判定復元手段と、
前記第1の判定復元手段によって復元されたテキスト記述型プログラミング言語の条件式または実行文が前記第2の判定復元手段によって復元されたテキスト記述型プログラミング言語の制御命令文内の1行分の復元文、または同じく復元された単独で1行をなす前記制御用語に従属するものであるか否かを判定し、従属する条件式または実行文にはインデントを付加するインデント付加手段と、を備えるように構成する。
In order to solve the above-described problem, a programming device for a programmable controller according to claim 1 comprises:
A machine language instruction (hereinafter referred to as an intrinsic machine language instruction) which is composed of a sequence of a plurality of characters or (and) symbols (hereinafter referred to as a continuous character string) and which is predetermined in the specification of the function of the processor executing this sequence program. And various conditional expressions (22 etc.) and executable statements (24, 25, etc.) that can be replaced with one or more of the above, and various continuous expressions that cannot be replaced with the intrinsic machine language instruction. Control terms (IF 21, THEN 23, END IF 26, etc.) in combination with the source program as a sequence program of a text description programming language described in accordance with the grammar specific to the programming language. Language order conversion means (save) for converting continuous character strings into corresponding machine language instructions (machine codes 111 to 117, etc.), generating an object program in a machine language form corresponding to the source program, and storing it in a programmable controller A processor (not shown) for executing the process 4 and the download process 8);
Each machine language instruction constituting the object program in the machine language form based on the text description programming language source program read from the programmable controller is sequentially analyzed, and the object program is converted into the original text description programming language. includes language inverse transformation means for restoring the source program (such as an unillustrated processor executing the upload process 9 and the display processing 5), the
The language order conversion means converts each continuous character string that does not correspond to the control term into one or a plurality of intrinsic machine language instructions that can be replaced with each of the consecutive character strings, and each serial sequence that corresponds to the control term. There is provided a means for converting a character string into a machine language instruction (hereinafter referred to as a pseudo machine language instruction) that corresponds to each of the character strings, is not included in the intrinsic machine language instruction, and does not affect the execution of the sequence program of the programmable controller. ,
The language inverse conversion means at least a pseudo machine language instruction determination means for determining whether or not the machine language instruction to be analyzed is the pseudo machine language instruction;
It is determined whether or not the true machine language instruction that is determined not to be a pseudo machine language instruction by the pseudo machine language instruction determination means has a true machine language instruction that forms a set. If the true machine language instruction determined to have no true machine language instruction is restored to the corresponding one-line text description programming language conditional expression or executable statement, and it is determined that it has a pair of intrinsic machine language instructions First, true machine language instructions from the true machine language instruction to the last true machine language instruction of the set are restored to a conditional expression or executable statement for one line of the corresponding text description type programming language. Determination restoration means,
The pseudo machine language instruction determined as the pseudo machine language instruction by the pseudo machine language instruction determination means determines whether or not the pseudo machine language instruction has a pair of pseudo machine language instructions. The pseudo machine language instruction determined not to have a machine language instruction is restored to the corresponding control term of the corresponding one-line text description programming language, and if it is determined to have a pair of pseudo machine language instructions, Among each pseudo and intrinsic machine language instruction from the machine language instruction to the pseudo machine language instruction at the end of the pair, the pseudo machine language instruction is restored to the control term of the corresponding text description programming language, and the intrinsic machine A text description type corresponding to each intrinsic machine word instruction in which a plurality of word instructions are individually or in pairs are associated with each other via the first judgment restoring means. Restore to a conditional expression or executable statement in the logging language, and all machine language instructions from the corresponding pseudo machine language instruction to the pseudo machine language instruction at the end of the pair are stored on the same line. A second determination / restoration means which is a restoration sentence for one line in a control instruction sentence of a text description type programming language including:
Restoration of one line in the control statement of the text description type programming language in which the conditional expression or executable statement of the text description type programming language restored by the first judgment restoration unit is restored by the second judgment restoration unit Indent addition means for determining whether or not the sentence is dependent on the control term that is also a single line that has been restored or that is restored, and that adds an indent to the subordinate conditional expression or executable statement. Configure.

また請求項のプログラマブルコントローラのプログラミング装置は、請求項1に記載のプログラマブルコントローラのプログラミング装置において、前記テキスト記述型プログラミング言語をストラクチャード・テキスト言語とする。
本発明の作用はプログラマブルコントローラ(PLC)のプログラミング装置に以下の機能を設けることにより、テキスト記述形式のプログラミング言語であるST言語で記述されマシンコードに変換されてPLCに格納されたシーケンスプログラムを、PLCから元のST言語のテキストプログラムに復元できるようにするものである。
即ち、ST言語で記述されたテキストプログラムとしてのシーケンスプログラムを連続文字列単位に順次読み出し、制御用語か否かの判定を行い、制御用語であれば制御用語を示す中間コードに変換し、制御用語ではない条件式や実行文であれば、このシーケンスプログラムを実行するプロセッサの機能の仕様に予め定められたマシン語命令(真性マシン語命令)からなりこの条件式や実行文を置き換え得る命令に対応する中間コードにそれぞれ変換する。
A programmable controller programming device according to claim 2 is the programmable controller programming device according to claim 1 , wherein the text description programming language is a structured text language.
The operation of the present invention is to provide a programmable controller (PLC) programming device with the following functions to convert a sequence program described in the ST language, which is a text description format programming language, converted into machine code and stored in the PLC, This makes it possible to restore the original ST language text program from the PLC.
That is, a sequence program as a text program written in the ST language is sequentially read out in units of continuous character strings, and it is determined whether or not it is a control term. If it is a control term, it is converted into an intermediate code indicating the control term. If it is not a conditional expression or executable statement, it corresponds to an instruction that consists of a machine language instruction (intrinsic machine language instruction) predetermined in the specification of the function of the processor that executes this sequence program and that can replace this conditional expression or executable statement Respectively converted to intermediate code.

そしてPLCにシーケンスプログラムを格納する際、制御用語をPLCによるシーケンスプログラムの実行に影響しない疑似命令として制御用語を示す中間コードを真性マシン語命令には含まれぬ疑似マシン語命令に、その他の中間コードは対応する真性マシン語命令にそれぞれ変換する。
他方、PLCからマシンコードのシーケンスプログラムを読み出す際は、一旦、疑似または真性のマシン語命令を、それぞれ対応する中間コードへ変換する処理を経たうえ、疑似マシン語命令は該当する制御用語に、真性マシン語命令は該当する条件式や実行文にそれぞれ変換することで、ST言語で記述されたテキストプログラムに復元する。
When storing the sequence program in the PLC, the intermediate code indicating the control term as a pseudo-instruction that does not affect the execution of the sequence program by the PLC is included in the pseudo-machine language instruction not included in the intrinsic machine language instruction, and other intermediate Each code is converted into a corresponding intrinsic machine language instruction.
On the other hand, when reading a machine code sequence program from the PLC, the pseudo machine language instruction is converted into the corresponding intermediate code after the pseudo or genuine machine language instruction is converted to the corresponding intermediate code. The machine language instructions are restored to text programs described in the ST language by converting them into corresponding conditional expressions and executable statements, respectively.

テキスト記述形式のプログラミング言語であるST言語で記述されたテキストプログラムとしてのシーケンスプログラムは各種の実行文や制御文からなり、制御文は制御用語、条件式、実行文等で構成される。これらの各連続文字列のうち、条件式や実行文はこのシーケンスプログラムを実行するプロセッサの機能の仕様に予め定められたマシン語命令(真性マシン語命令)に置き換えることができるが、制御用語は真性マシン語命令には置き換えることができない。
そこで本発明によれば、上記制御用語を、PLCによるシーケンスプログラムの実行には影響しない疑似命令として扱い、これに真性マシン語命令には含まれぬ疑似マシン語命令を当てはめ、制御用語以外の条件式や実行文にはこのそれぞれを置き換える真性マシン語命令を当てはめてできるマシン語形態のプログラムをPLCに格納するようにしたので、
PLC内に格納されているマシンコードのシーケンスプログラム(オブジェクトプログラム)から作成時と同じST言語で記述されたテキストプログラムのシーケンスプログラム(ソースプログラム)を復元することができ、従来のようにPLC内に格納したオブジェクトプログラムとは別に、このプログラムの元になるST言語のソースプログラムを別途管理する必要がなく、使用者の負担が軽減される。
A sequence program as a text program described in the ST language, which is a text description format programming language, includes various execution statements and control statements, and the control statements include control terms, conditional expressions, execution statements, and the like. Of these continuous character strings, conditional expressions and executable statements can be replaced with machine language instructions (intrinsic machine language instructions) predetermined in the specification of the function of the processor that executes this sequence program. It cannot be replaced with an intrinsic machine language instruction.
Therefore, according to the present invention, the control term is treated as a pseudo-instruction that does not affect the execution of the sequence program by the PLC, and a pseudo-machine language instruction that is not included in the true machine language instruction is applied to the control term. Since the machine language form program that can be applied to the intrinsic machine language instruction to replace each of these in the expression and executable statement is stored in the PLC,
A text program sequence program (source program) written in the same ST language as that at the time of creation can be restored from a machine code sequence program (object program) stored in the PLC. In addition to the stored object program, it is not necessary to separately manage the ST language source program that is the source of this program, reducing the burden on the user.

また、PLC内のマシン語形態のプログラムから元のST言語のソースプログラムが復元できるため、PLCに特別な記憶装置を持つ必要がなくなり、PLCのコストダウンを図ることができる。   Also, since the original ST language source program can be restored from the machine language program in the PLC, it is not necessary to have a special storage device in the PLC, and the cost of the PLC can be reduced.

図1は本発明の一実施例としてのシステム要部の機能の基本構成を示す。図1において、1はプログラミング装置、10はプログラミング装置1に接続された状態のプログラマブルコントローラ(PLC)である。
次にプログラミング装置1において2はプログラムの編集画面で、21〜26の個別の連続文字列は前述したテキスト記述形式のST言語のシーケンスプログラム(テキストプログラムとも略記する)の一部の後述する制御文を持つプログラムブロックの一例についての、ST言語の文法に基づく記述状態を示している。
また、6はプログラミング装置1のプログラムメモリで、このプログラムメモリ6内の61〜67は編集画面2上の各連続文字列21〜26をこのプログラミング装置に固有の中間コードに変換したものである。
FIG. 1 shows a basic configuration of functions of a system main part as an embodiment of the present invention. In FIG. 1, 1 is a programming device, and 10 is a programmable controller (PLC) connected to the programming device 1.
Next, in the programming device 1, reference numeral 2 denotes a program editing screen, and individual continuous character strings 21 to 26 are control statements to be described later, which are part of the ST language sequence program (also abbreviated as a text program) in the above-described text description format. The description state based on the grammar of the ST language is shown for an example of a program block having.
Reference numeral 6 denotes a program memory of the programming device 1, and reference numerals 61 to 67 in the program memory 6 are obtained by converting the continuous character strings 21 to 26 on the editing screen 2 into intermediate codes unique to the programming device.

次に、PLC10において11はそのプログラムメモリであり、このプログラムメモリ11内の111〜117はそれぞれプログラミング装置1のプログラムメモリ6内の各中間コード61〜67をそれぞれ変換して作られた疑似命令または真の命令のマシンコードである。
後でも述べるが、ここで真の命令とはPLC10のシーケンスプログラムの実行に関わりを持つ命令であり、疑似命令とはこのシーケンスプログラムの実行に関わりを持たない命令である。そして、真の命令のマシンコードはPLC10に格納されたシーケンスプログラムを実行するプロセッサの機能の仕様に予め定められている各種のマシン語命令(便宜上、真性マシン語命令とも呼ぶ)の1つまたは組をなす複数個からなるマシンコードで、本例では112の条件(比較)命令、113の条件ジャンプ命令、115の実行文#1の各命令、116の実行文#2の各命令のそれぞれのマシンコードがこれに相当する。
Next, in the PLC 10, reference numeral 11 denotes a program memory, and 111 to 117 in the program memory 11 are pseudo instructions or instructions generated by converting the intermediate codes 61 to 67 in the program memory 6 of the programming device 1, respectively. The machine code of the true instruction.
As will be described later, the true instruction is an instruction related to the execution of the sequence program of the PLC 10, and the pseudo instruction is an instruction not related to the execution of the sequence program. The machine code of the true instruction is one or a set of various machine language instructions (also referred to as an intrinsic machine language instruction for convenience) predetermined in the specification of the function of the processor that executes the sequence program stored in the PLC 10. In this example, each of 112 conditional (comparison) instructions, 113 conditional jump instructions, 115 executable statement # 1 instructions, and 116 executable statement # 2 machines. The code corresponds to this.

また、疑似命令のマシンコードは真性マシン語命令のマシンコードには含まれず、これに似せて作られた各個別のマシンコードで、本例では111の「IF」、114の「THEN」、117の「END IF」のそれぞれを示す疑似命令のマシンコードがこれに相当する。
次に、4、5、8、9はプログラミング装置1が行う処理で、4は編集画面2上に記述されたテキストプログラムを中間コードのプログラムに変換してプログラムメモリ6に保存する処理、5はその逆にプログラムメモリ6内の中間コードのプログラムをテキストプログラムに変換して編集画面2上に元のフォーマット通りに表示する処理、8はプログラミング装置1のプログラムメモリ6内の中間コードのプログラムをマシンコードのプログラムに変換してPLC10のプログラムメモリ11に書き込むダウンロード処理、9はその逆にPLC10のプログラムメモリ11内のマシンコードのプログラムを中間コードのプログラムに変換しプログラミング装置1のプログラムメモリ6に書き込むアップロード処理である。
The machine code of the pseudo-instruction is not included in the machine code of the intrinsic machine language instruction, and is an individual machine code that is made similar to this. In this example, 111 “IF”, 114 “THEN”, 117 "END The machine code of the pseudo instruction indicating each of “IF” corresponds to this.
Next, 4, 5, 8, 9 are processes performed by the programming device 1, and 4 is a process of converting a text program described on the editing screen 2 into an intermediate code program and storing it in the program memory 6. On the contrary, the intermediate code program in the program memory 6 is converted into a text program and displayed on the editing screen 2 in the original format. 8 is the machine of the intermediate code program in the program memory 6 of the programming device 1 Download processing for converting the program into a code program and writing it into the program memory 11 of the PLC 10, 9 reversely converts the machine code program in the program memory 11 of the PLC 10 into an intermediate code program and writes it into the program memory 6 of the programming device 1. Upload process.

ここで、プログラミング装置1の編集画面2上に記述されているテキストプログラムを説明する。このテキストプログラムはST言語での制御文における条件分岐文に属するIF文と呼ばれる形式のプログラム命令の1例に相当するもので、本実施例では各個別の連続文字列21〜26は英単語「IF」21、条件式(換言すれば比較式)22、英単語「THEN」23、実行文#1の24、実行文#2の25、・・・、組合わせ英単語「END IF」26からなる。
なお、条件式の22や実行文#1の24および実行文#2の25をそれぞれ前後で挟む、「<」と「>」の記号は実際のテキストプログラムの記述に用いられるものではなく、この記号を含む区間に式や実行文が存在することを示すものである。このことは後述する図6に記述されているテキストプログラムについても同様である。
Here, the text program described on the editing screen 2 of the programming device 1 will be described. This text program corresponds to an example of a program instruction of a format called an IF statement belonging to a conditional branch statement in a control statement in the ST language. In this embodiment, each individual continuous character string 21 to 26 is an English word “ IF ”21, conditional expression (in other words, comparison expression) 22, English word“ THEN ”23, execution sentence # 1 24, execution sentence # 2 25,..., Combined English word“ END ” IF ”26.
It should be noted that the symbols “<” and “>” that sandwich conditional expression 22, executable statement # 1 24, and executable statement # 2 25 before and after are not used in the description of an actual text program. This indicates that an expression or an executable statement exists in the section including the symbol. The same applies to the text program described in FIG.

ここで、「IF」21、条件式22、「THEN」23の各連続文字列は同一行(便宜上、第1行とする)上に表示され、実行文#1の24と実行文#2の25とは、第1行の行頭からインデント(行の先頭の字下げ)を付加した形でそれぞれ第2行と第3行上に表示され、連続文字列「END IF」26はこのIF文の末尾の行上に字下げなしに表示されている。
このIF文のプログラム命令の内容は『若し条件式22の条件が満たされれば(換言すれば、条件式22の比較結果が真であれば)、実行文#1の24、実行文#2の25、・・・の処理を実行せよ。』というものであり、このプログラム命令をさらに後述する中間コード、あるいはマシンコードのレベルに分解して表現すれば、『条件式22の比較を実行せよ、この比較結果が真であれば次アドレスの英単語「THEN」23へ進み(従って本例では「THEN」23のアドレス以降の実行文#1の24、実行文#2の25、・・・の処理を実行し)、前記条件式22の比較結果が偽であれば、英単語「THEN」23以降に最初に現れる英単語または組合わせ英単語のアドレスへ飛べ(従って本例では組合わせ英単語「END IF」26のアドレスへ飛んでこのIF文を終了せよ)。』というものである。
Here, the consecutive character strings of “IF” 21, conditional expression 22, and “THEN” 23 are displayed on the same line (for convenience, the first line), and executable statement # 1 24 and executable statement # 2 25 is displayed on the second and third lines with indentation (indentation at the beginning of the line) from the beginning of the first line, respectively, and the continuous character string “END” “IF” 26 is displayed on the last line of the IF sentence without any indentation.
The content of the program instruction of this IF statement is “if the condition of conditional expression 22 is satisfied (in other words, if the comparison result of conditional expression 22 is true), then executable statement # 1 24, executable statement # 2 Execute the processes 25,. If this program instruction is further decomposed into an intermediate code or machine code level, which will be described later, and expressed, “comparison of conditional expression 22 is executed. Proceed to the English word “THEN” 23 (therefore, in this example, the processing of the execution statement # 1 24, the execution statement # 2 25,... After the address “THEN” 23 is executed), and the conditional expression 22 If the comparison result is false, jump to the address of the first English word or combination English word that appears after the English word “THEN” 23 (so in this example the combined English word “END” Jump to the address “IF” 26 and finish this IF statement). ].

なお制御文とは、後で詳述するが、アドレス順に並ぶプログラム上の必要な位置(アドレス)に設けられ、その時点の条件等に応じて以後のプログラムの流れ(実行順序)を制御する命令文をいう。
ところで編集画面2上のテキストプログラムのうち、条件式22、実行文#1の24、実行文#2の25等は、このそれぞれの命令機能を、このシーケンスプログラムを実行するPLC10のプロセッサの機能の仕様に予め定められている各種のマシン語命令としての前記の真性マシン語命令のうちのいずれか所定の1つまたは複数個の組み合わせに置き換えることができ、PLC10にはこの真性マシン語命令への置き換えによってできるマシンコードに変換されて格納される。
従って編集画面2上のテキストプログラムのようなシーケンスプログラムについてのPLC10に格納されたマシンコードから元の表示通りのテキストプログラムを復元しようとするとき、条件式22、実行文#1の24、実行文#2の25は、そのテキスト表示と上記の真性マシン語命令への置き換えに基づくマシンコードとの対応関係を設定できるので問題はない。
As will be described in detail later, the control statement is a command that is provided at a necessary position (address) in the program arranged in the order of addresses and controls the subsequent program flow (execution order) according to the conditions at that time. Say a sentence.
By the way, among the text programs on the editing screen 2, the conditional expression 22, the executable statement # 1 24, the executable statement # 2 25, etc. have their respective instruction functions as functions of the processor of the PLC 10 that executes this sequence program. Any one or a combination of the above-described intrinsic machine language instructions as various machine language instructions predetermined in the specification can be replaced by the PLC 10. It is converted into machine code created by replacement and stored.
Therefore, when trying to restore a text program as originally displayed from the machine code stored in the PLC 10 for a sequence program such as a text program on the editing screen 2, conditional expression 22, executable statement # 1, 24, executable statement No. 25 of # 2 has no problem because the correspondence relationship between the text display and the machine code based on the replacement with the genuine machine language instruction can be set.

しかし、英単語の連続文字列(便宜上、制御用語と呼ぶ)の「IF」21、「THEN」23、「END IF」26には、置き換え可能な真性マシン語命令は存在しない。そこで本発明では、この各制御用語21、23、26をPLC10のシーケンスプログラムの実行に関わりを持たない疑似命令とし、このそれぞれに前述した疑似マシン語命令のマシンコードを対応させてPLC10に格納し、テキストプログラムの復元時に利用するようにする。
ところで、プログラミング装置1のプログラムメモリ6内の1行ずつ順に並んだ各中間コード61〜67については、61、64、67はそれぞれ編集画面2上の制御用語としての「IF」21、「THEN」23、「END IF」26に対応する中間コード、62は編集画面2上の条件式22から生成される条件(比較)命令の中間コード、63は編集画面2上には存在しないが、この制御文がIF文であることによって、条件式22を置き換えた中間コード62の次に置かれ、条件式22の比較結果の真偽に応じて以降の分岐先を指定する役割を持つ条件ジャンプ命令の中間コード、65と66は編集画面2上の実行文#1の24と実行文#2の25を、それぞれ置き換える1つまたは組となる複数個からなる真性マシン語命令に対応する中間コードである。
However, “IF” 21, “THEN” 23, “END” of a continuous character string of English words (referred to as control terms for convenience) In “IF” 26, there is no replaceable intrinsic machine language instruction. Therefore, in the present invention, each of the control terms 21, 23, and 26 is set as a pseudo instruction that is not related to the execution of the sequence program of the PLC 10, and the machine code of the pseudo machine language instruction described above is stored in the PLC 10 in association with each of the control terms. Use it when restoring text programs.
By the way, for each of the intermediate codes 61 to 67 arranged in a line in the program memory 6 of the programming device 1, 61, 64 and 67 are “IF” 21 and “THEN” as control terms on the editing screen 2, respectively. 23, “END Intermediate code corresponding to “IF” 26, 62 is an intermediate code of a condition (comparison) instruction generated from conditional expression 22 on edit screen 2, and 63 does not exist on edit screen 2, but this control statement is an IF statement Therefore, an intermediate code of a conditional jump instruction which is placed next to the intermediate code 62 replacing the conditional expression 22 and has a role of designating a subsequent branch destination in accordance with the truth of the comparison result of the conditional expression 22, 65 And 66 are intermediate codes corresponding to one or a plurality of intrinsic machine language instructions that replace the executable statement # 1 24 and the executable statement # 2 25 on the edit screen 2, respectively.

また、PLC10のプログラムメモリ11内の1行ずつ順に並んだ各マシンコード111〜117は、それぞれプログラミング装置1のプログラムメモリ6内の各中間コード61〜67に対応するものであり、前述のように、このうち111、114、117はそれぞれ制御用語「IF」、「THEN」、「END IF」を示す疑似マシン語命令のマシンコード、その他のマシンコード112、113、115、116は真性マシン語命令のマシンコードである。
PLC10へシーケンスプログラムを保存するには、先ず、プログラミング装置1の編集画面2で作成されたST言語で記述されたテキストプログラムを保存処理4において読み込み、中間コードに変換してプログラミング装置1のプログラムメモリ6に格納する。
次にダウンロード処理8において、プログラミング装置のプログラムメモリ6に格納されている各中間コードを読み込む。そして読み込んだ中間コードが制御用語を示す中間コードか否かの判定を行い、制御用語を示す中間コードでなければ該当する真性マシン語命令のマシンコードに変換し、他方、制御用語を示す中間コードであれば疑似マシン語命令のマシンコードに変換し、この疑似マシン語命令のマシンコードも全シーケンスプログラムの一部として、PLC10のプログラムメモリ11に転送し格納する。
The machine codes 111 to 117 arranged in order in the program memory 11 of the PLC 10 correspond to the intermediate codes 61 to 67 in the program memory 6 of the programming device 1, respectively. Of these, 111, 114, 117 are control terms “IF”, “THEN”, “END”, respectively. The machine code of the pseudo machine language instruction indicating “IF” and the other machine codes 112, 113, 115, and 116 are machine codes of the intrinsic machine language instruction.
In order to save the sequence program to the PLC 10, first, a text program described in the ST language created on the editing screen 2 of the programming device 1 is read in the saving process 4, converted into an intermediate code, and converted into a program memory of the programming device 1. 6 is stored.
Next, in the download process 8, each intermediate code stored in the program memory 6 of the programming device is read. Then, it is determined whether or not the read intermediate code is an intermediate code indicating a control term, and if it is not an intermediate code indicating a control term, it is converted into a machine code of a corresponding intrinsic machine language instruction, and on the other hand, an intermediate code indicating a control term If so, it is converted to a machine code of a pseudo machine language instruction, and the machine code of this pseudo machine language instruction is also transferred to and stored in the program memory 11 of the PLC 10 as part of the entire sequence program.

PLC10からのプログラムの読み出しは、アップロード処理9において、PLC10のプログラムメモリ11からマシンコードのプログラムを読み出す。そして読み出したマシンコードのプログラムが疑似命令か否かの判定を行い、疑似命令でなく真の命令であれば対応する命令の中間コードに変換し、他方、疑似命令であれば制御用語を示す中間コードに変換してプログラミング装置1のプログラムメモリ6に格納する。次に表示処理5において、プログラミング装置1のプログラムメモリ6に格納されている各中間コードを読み込み、テキストプログラムへの変換を行い、編集画面2に表示する。
図2は、図1の保存処理4の手順を示すフローチャートで、S1〜S8はそのステップ番号である。図2を説明すると、ステップS1でプログラミング装置1の編集画面2から1行分のテキストプログラムを読み込む。そしてステップS2でこの読み込んだテキストプログラムを解析し、連続文字列単位に分割して取り出す。
Reading the program from the PLC 10 reads the machine code program from the program memory 11 of the PLC 10 in the upload process 9. Then, it is determined whether or not the read machine code program is a pseudo-instruction, and if it is not a pseudo-instruction, it is converted to an intermediate code of the corresponding instruction if it is a true instruction, whereas if it is a pseudo-instruction, an intermediate indicating a control term It is converted into a code and stored in the program memory 6 of the programming device 1. Next, in the display process 5, each intermediate code stored in the program memory 6 of the programming device 1 is read, converted into a text program, and displayed on the editing screen 2.
FIG. 2 is a flowchart showing the procedure of the storage process 4 in FIG. 1, and S1 to S8 are step numbers. Referring to FIG. 2, a text program for one line is read from the editing screen 2 of the programming device 1 in step S1. Then, in step S2, the read text program is analyzed, and divided into consecutive character strings and extracted.

次のステップS3では取り出した当該の連続文字列が制御用語であるか否かを判定する。ここで制御用語と判定した場合はステップS4に進み、当該の連続文字列をその制御用語を意味する中間コードに変換し、次のステップS6でこの変換した中間コードをプログラムメモリ6に格納する。
こうして図1の例ではプログラミング装置1の編集画面2上の各制御用語の「IF」21、「THEN」23、「END IF」26は、プログラミング装置1のプログラムメモリ6に示されるように、それぞれ「IF」、「THEN」、「END IF」を意味する中間コード61、64、67に変換される。
また、前記ステップS3で当該の連続文字列を制御用語以外と判定した場合は、ステップS5に進み、例えば当該の連続文字列が条件式22であれば、当該の連続文字列を、条件式(比較式)22を実行すべき旨の条件(比較)命令の中間コード62と、条件式22の比較結果の真偽に応じて分岐先(本例では制御用語「THEN」23または「END IF」26)を指定する旨の条件ジャンプ命令の中間コード63とに変換し、また当該の連続文字列が実行文#1の24、あるいは実行文#2の25であれば、当該の連続文字列を、それぞれの実行文を表す1つまたは組の複数個の各命令からなる中間コード65、あるいは66に変換して、ステップS6でこの変換した中間コードをプログラミング装置1のプログラムメモリ6に図示のように格納する。
In the next step S3, it is determined whether or not the extracted continuous character string is a control term. If the control term is determined here, the process proceeds to step S4, where the continuous character string is converted into an intermediate code meaning the control term, and the converted intermediate code is stored in the program memory 6 in the next step S6.
Thus, in the example of FIG. 1, “IF” 21, “THEN” 23, “END” of each control term on the editing screen 2 of the programming device 1. As shown in the program memory 6 of the programming device 1, “IF” 26 is “IF”, “THEN”, “END”, respectively. It is converted into intermediate codes 61, 64 and 67 meaning "IF".
If it is determined in step S3 that the continuous character string is not a control term, the process proceeds to step S5. For example, if the continuous character string is the conditional expression 22, the continuous character string is converted into the conditional expression ( Depending on the intermediate code 62 of the condition (comparison) instruction to execute the comparison expression 22 and the true / false of the comparison result of the conditional expression 22 (in this example, the control terms “THEN” 23 or “END”) If the continuous character string is 24 of the executable statement # 1 or 25 of the executable statement # 2, the continuous character is converted to the intermediate code 63 of the conditional jump instruction to specify “IF” 26). The sequence is converted into an intermediate code 65 or 66 composed of one or a plurality of instructions representing each executable statement, and the converted intermediate code is shown in the program memory 6 of the programming device 1 in step S6. Store like this.

次にステップS7では読み込んだ1行分のテキストプログラムを全て変換し終わったか否かを判定し、1行分のテキストプログラムを変換し終わるまでステップS2に戻り、以降のステップS2〜S7の処理を繰り返す。
1行分のテキストプログラムを変換し終わったら、次のステップS8で編集画面2上の全てのテキストプログラムを変換し終わったか否かを判定し、変換し終わっていなければステップS1に戻り、以降のステップS1〜S8の処理を繰り返す。
図4は、図1のダウンロード処理8の手順を示すフローチャートで、S21〜S23はそのステップ番号である。図4を説明すると、先ずステップS21ではプログラミング装置1のプログラムメモリ6から読み出した中間コードが制御用語を示す中間コードであるか否かの判定を行い、例えば61、64、67のような制御用語を示す中間コードであればステップS22に進み、それぞれ当該の制御用語に対応した疑似命令のマシンコード、本例では111、114、117に変換する。
Next, in step S7, it is determined whether or not all of the read text program for one line has been converted. The process returns to step S2 until the conversion of the text program for one line is completed, and the processes in subsequent steps S2 to S7 are performed. repeat.
When the text program for one line has been converted, it is determined in the next step S8 whether or not all the text programs on the editing screen 2 have been converted. If the conversion has not been completed, the process returns to step S1. The processes in steps S1 to S8 are repeated.
FIG. 4 is a flowchart showing the procedure of the download process 8 in FIG. 1, and S21 to S23 are step numbers. Referring to FIG. 4, first, in step S21, it is determined whether or not the intermediate code read from the program memory 6 of the programming device 1 is an intermediate code indicating a control term. For example, control terms such as 61, 64, and 67 are determined. If it is an intermediate code indicating “”, the process proceeds to step S 22, where it is converted into a pseudo-instruction machine code corresponding to the control term, 111, 114, 117 in this example.

他方、前記ステップS21でプログラムメモリ6から読み出した中間コードが制御用語を示す中間コードでなければステップS23に進み、本例では各当該の中間コード62、63、65、66をそれぞれ既知のマシン語変換処理を用いて真性マシン語命令のマシンコード112、113、115、116に変換する。
図5は、図1のアップロード処理9の手順を示すフローチャートで、ステップS31〜S33はそのステップ番号である。図5を説明すると、先ずステップS31ではPLC10のプログラムメモリ11から読み出したプログラムのマシンコードが疑似命令のマシンコードであるか否かの判定を行い、疑似命令の場合はステップS32に進みそれぞれの疑似命令のマシンコードとしての本例では111、114、117をそれぞれ制御用語の中間コード61、64、67に変換する。
On the other hand, if the intermediate code read from the program memory 6 in step S21 is not an intermediate code indicating a control term, the process proceeds to step S23. In this example, each of the intermediate codes 62, 63, 65, and 66 is replaced with a known machine language. It converts into machine code 112, 113, 115, 116 of an intrinsic machine language instruction using a conversion process.
FIG. 5 is a flowchart showing the procedure of the upload process 9 in FIG. 1, and steps S31 to S33 are step numbers. Referring to FIG. 5, first, in step S31, it is determined whether or not the machine code of the program read from the program memory 11 of the PLC 10 is a pseudo-instruction machine code. In this example as the machine code of the instruction, 111, 114, and 117 are converted into intermediate codes 61, 64, and 67 of control terms, respectively.

他方、前記ステップS31において、PLC10のプログラムメモリ11から読み出したプログラムのマシンコードが疑似命令のマシンコードでない場合はステップS33に進み、本例では各命令のマシンコードである112、113、115、116を既知の各命令変換処理を用いてそれぞれ命令の中間コード62、63、65、66に変換する。
図3は、図1の表示処理5の手順を示すフローチャートで、S11〜S15はそのステップ番号である。なお、この表示処理5は図1の編集画面2上のテキストプログラムの1行分ずつに対応する処理を示している。
図3を説明すると、先ずステップS11でプログラミング装置1のプログラムメモリ6から読み出した(テキストプログラムの行頭に関わる)中間コードが制御用語を示す中間コードか否かを判定する。
On the other hand, if the machine code of the program read from the program memory 11 of the PLC 10 is not a pseudo-instruction machine code in step S31, the process proceeds to step S33. In this example, the machine code of each instruction is 112, 113, 115, 116. Are converted into the intermediate codes 62, 63, 65, 66 of the instructions using the respective known instruction conversion processes.
FIG. 3 is a flowchart showing the procedure of the display process 5 in FIG. 1, and S11 to S15 are step numbers. The display processing 5 shows processing corresponding to one line of the text program on the editing screen 2 in FIG.
Referring to FIG. 3, first, in step S11, it is determined whether or not the intermediate code read from the program memory 6 of the programming device 1 (related to the beginning of the line of the text program) is an intermediate code indicating a control term.

ここで、制御用語を示す中間コードと判定すればステップS11aに進んで当該の制御用語の中間コードが、例えば対の制御用語「THEN」23を持つ制御用語「IF」21の中間コード61のように、テキストプログラム上で1行で表示される対の制御用語を持つものであるか否かを判定する。なお、行頭となる制御用語の種類によっては図6で後述するように対の制御用語を複数個持つものがある。
ここで、対の制御用語を持つものと判定すればステップS11bに進んで対となる制御用語のうち末尾となる制御用語までの全ての中間コード、本例では61、62、63、64を読み出し、次のステップS11cでそれぞれの中間コードを該当するテキストプログラムに、従って本例では中間コード61を制御用語21に、組となる中間コード62および63を条件式22に、また中間コード64を制御用語23に変換して、変換した制御用語「IF」21、条件式22、制御用語「THEN」23を1行分のテキストプログラムとする。そして、この場合は次のステップS14を単に通過し、次のステップS15でこの1行分のテキストプログラムを編集画面2上に表示する。
Here, if it is determined as an intermediate code indicating a control term, the process proceeds to step S11a, and the intermediate code of the control term is, for example, the intermediate code 61 of the control term “IF” 21 having a pair of control terms “THEN” 23. Then, it is determined whether or not the control program has a pair of control terms displayed in one line on the text program. Depending on the type of control term at the beginning of the line, there are those having a plurality of pairs of control terms as will be described later with reference to FIG.
If it is determined that the control terms have a pair, the process proceeds to step S11b, and all intermediate codes up to the control term at the end of the control terms to be paired are read out in this example, 61, 62, 63, 64. In the next step S11c, each intermediate code is controlled as a corresponding text program. Therefore, in this example, the intermediate code 61 is controlled by the control term 21, the paired intermediate codes 62 and 63 are controlled by the conditional expression 22, and the intermediate code 64 is controlled. By converting to the term 23, the converted control term “IF” 21, the conditional expression 22, and the control term “THEN” 23 are set as a text program for one line. In this case, the next step S14 is simply passed, and the text program for one line is displayed on the editing screen 2 in the next step S15.

他方、前記ステップS11aで、当該の制御用語の中間コードが、例えば制御用語「END IF」を示す中間コード67のように、対の制御用語を持たないものと判定すればステップS12に進み、その制御用語の中間コードのみを、本例では制御用語「END IF」26のようなテキストプログラムに変換したのち、ステップS14を単に通過し、ステップS15でこのテキストプログラムを編集画面2上に独立した1行に表示する。
また、前記ステップS11でテキストプログラムの行頭に関わる当該の中間コードを、実行文#1または実行文#2にそれぞれ対応する1つまたは組となる複数個からなる各命令の中間コード65または66のような、制御用語以外の中間コードと判定すれば、ステップS13に進んで該当する1行の実行文、本例では実行文#1の24または実行文#2の25のテキストプログラムに変換する。
On the other hand, in step S11a, the intermediate code of the control term is, for example, the control term "END" If it is determined that there is no pair of control terms such as the intermediate code 67 indicating “IF”, the process proceeds to step S12, and only the intermediate code of the control term is selected as the control term “END” in this example. After conversion to a text program such as “IF” 26, the process simply passes through step S14, and the text program is displayed on the editing screen 2 in an independent line in step S15.
Further, in step S11, the intermediate code 65 or 66 of each instruction consisting of a plurality of instructions corresponding to the executable statement # 1 or the executable statement # 2 is used as the intermediate code relating to the head of the text program. If it is determined that the intermediate code is other than the control term, the process proceeds to step S13 and is converted into a corresponding one line of executable statement, in this example, executable statement # 1 24 or executable statement # 2 25 text program.

次にステップS14では変換したテキストプログラムの行が、インデントの必要な行であるか否かを判定し、必要な行であれば変換したテキストプログラムの先頭にインデントを付加し、インデントの不要な行であればインデントを付加せず、次のステップS15で変換された1行分のテキストプログラムを編集画面2上に表示する。
本例ではテキストプログラムの実行文#1の24および実行文#2の25は、テキストプログラムの制御用語「IF」21〜「THEN」23の行に続く実行文、つまり条件分岐の制御文内の対の制御用語を含む1行分のテキストプログラムに従属する実行文であるためインデントが付加される。
なお、後述の図6に示すように、制御用語には例えば「ELSE」や「REPEAT」のように単独で1行をなして従属する実行文を持つものもあり、このような制御用語に続く実行文にもインデントが付加される。しかし、当該の実行文が制御文とは独立の実行文であればインデントは付加されない。
Next, in step S14, it is determined whether or not the line of the converted text program is a line that needs indentation. If it is a line that is necessary, an indent is added to the head of the converted text program, and a line that does not require indentation. If so, the indent is not added, and the text program for one line converted in the next step S15 is displayed on the editing screen 2.
In this example, text statement executable statement # 1 24 and executable statement # 2 25 are executable statements following lines of text program control terms “IF” 21 to “THEN” 23, ie, conditional branch control statements. An indent is added because it is an executable statement subordinate to the text program for one line including the pair of control terms.
In addition, as shown in FIG. 6 to be described later, some control terms have execution statements that are dependent on one line, such as “ELSE” and “REPEAT”, and follow such control terms. Indentation is also added to executable statements. However, if the execution statement is an execution statement independent of the control statement, no indentation is added.

以上の実施例ではST言語の制御文における条件分岐文の一例についての処理方法を説明したが、次にST言語における制御文の種類と機能を説明する。なお制御文とは、アドレス順に並ぶプログラム上の必要な位置(アドレス)に設けられ、その時点の条件等に応じ以後のプログラムの流れ(実行順序)を制御する命令文をいう。
即ち、一般にプログラムはアドレス順に実行される「順次構造」となっている。しかし、ある処理を繰り返したり、条件によって異なる処理をさせたり、あるいは当該の処理を終了させたりしたい場合があり、このような場合には以降の実行プログラムを別に指定したり、プログラムの実行アドレスの起点を切り替えたり、アドレス更新を停止したりして、プログラムの流れを変える必要がある。このプログラムの流れを切り替える役目を果たすのが制御文である。
In the above embodiment, the processing method for an example of a conditional branch statement in a control statement in ST language has been described. Next, the types and functions of control statements in ST language will be described. The control statement is a command statement that is provided at a necessary position (address) in the program arranged in the order of addresses and controls the subsequent program flow (execution order) according to the conditions at that time.
That is, the program generally has a “sequential structure” that is executed in the order of addresses. However, there are times when you want to repeat a certain process, perform a different process depending on the condition, or end the process. In such a case, specify a separate execution program or specify the execution address of the program. It is necessary to change the flow of the program by switching the starting point or stopping the address update. The control statement plays the role of switching the program flow.

図6はこのST言語における制御文の種類とテキストプログラムでの記述例を対応させてまとめて示したものである。同図に示すようにST言語での制御文は大別して1)条件分岐文と、2)反復文の2つに区分される。
そして、1)条件分岐文はさらに、
1−1)IF文、
1−2)CASE文
の2種類に区分され、また、2)反復文はさらに、
2−1)FOR文、
2−2)WHILE文、
2−3)REPEAT文、
2−4)EXIT文、
2−5)RETURN文
の5種類に区分される。
FIG. 6 collectively shows the types of control statements in the ST language in correspondence with the description examples in the text program. As shown in the figure, control statements in the ST language are roughly divided into two categories: 1) conditional branch statements and 2) iteration statements.
And 1) the conditional branch statement
1-1) IF statement,
1-2) CASE statements are divided into two types, and 2) repetitive statements
2-1) FOR statement,
2-2) WHILE statement,
2-3) REPEAT statement,
2-4) EXIT statement,
2-5) The RETURN statement is divided into five types.

次に図6を参照しつつ上記の種類別の制御文を説明する。
1−1)IF文:
IF文は基本的には『もし・・・の条件が成立すれば・・・を実行し、前記条件が成立しなければ・・・を実行せよ。』という趣旨の命令文であるが、制御用語の組合わせによって若干の変形が生ずる。
前述した図1の編集画面2上のテキストプログラムの記述例は、図6のIF文の記述例のうちa),b),g)の各行の記述を用いており、この中には「IF」,「THEN」,「END IF」の制御用語が含まれるのみである。しかしIF文の制御用語には、このほかc)行に示す「ELSEIF」や、e)行に示す「ELSE」が存在する。
この図6のa)行からg)行までの全行を纏めた命令の内容は『もし、条件式#1が成立したら実行文#1を実行し、また条件式#1が成立せず、条件式#2が成立したら実行文#2を実行し、また条件式#1も条件式#2も成立しなければ実行文#3を実行せよ。』というものである。
Next, referring to FIG. 6, the above-described control statements for each type will be described.
1-1) IF statement:
The IF statement basically executes “if the condition of... Is satisfied, and... If the condition is not satisfied. ”, But there are some variations depending on the combination of control terms.
The description example of the text program on the editing screen 2 in FIG. 1 uses the description of each line of a), b), and g) in the IF statement description example in FIG. "," THEN "," END " Only the control term “IF” is included. However, the control term of the IF statement includes “ELSEIF” shown in line c) and “ELSE” shown in line e).
The contents of the instruction that summarizes all the lines from line a) to line g) in FIG. 6 are “if conditional expression # 1 is satisfied, execute statement # 1 is executed, and conditional expression # 1 is not satisfied, Execute the executable statement # 2 when the conditional expression # 2 is satisfied, and execute the executable statement # 3 when neither the conditional expression # 1 nor the conditional expression # 2 is satisfied. ].

1−2)CASE文:
CASE文は基本的には単一の整数変数の値とか、或る式の結果としての整数値に対応して選択される実行文があれば該当する実行文を実行させ、対応選択される実行文がない場合には、別に定めた実行文を実行させる命令文である。この制御文には、対をなす「CASE」および「OF」の制御用語と、「ELSE」、「END CASE」の制御用語が用いられる。
この図6のCASE文の記述例の命令の内容は『「CASE」に続く「整数式」の値に一致する整数選択値の実行文があれば該当する実行文を実行し(つまり本例では整数式の値が整数選択値#1または整数選択値#2に一致すれば、実行文#1または実行文#2のうちの一致した側を実行し)、一致する整数選択値の実行文がなければ、「ELSE」の後に続く実行文#3を実行せよ。』というものである。
1-2) CASE statement:
A CASE statement basically executes a corresponding executable statement if there is an executable statement selected corresponding to the value of a single integer variable or an integer value as a result of an expression. When there is no statement, it is an imperative statement that causes a separately defined executable statement to be executed. This control statement includes a pair of control terms “CASE” and “OF”, “ELSE”, “END”. The control term “CASE” is used.
The content of the instruction in the description example of the CASE statement in FIG. 6 is “if there is an executable statement with an integer selection value that matches the value of the“ integer expression ”following“ CASE ”, the corresponding executable statement is executed (in this example, If the value of the integer expression matches the integer selection value # 1 or the integer selection value # 2, the matching statement of the execution statement # 1 or the execution statement # 2 is executed), and the execution statement of the matching integer selection value is If not, execute the executable statement # 3 following “ELSE”. ].

2−1)FOR文:
FOR文は反復変数の値を初期値から最終値まで、1回ごとに所定値ずつ増加(または減少)していく間、毎回、指定したいくつかの実行文を繰り返させる命令文である。図6では書き込みのスペース上、やむを得ず2行に分かれてしまっているが、この制御文には、実際には同一行内で対をなす「FOR」、「TO」、「BY」、「DO」の制御用語と、「END FOR」の制御用語が用いられる。
この図6のFOR文の記述例の命令の内容は『「初期化する反復変数」とした部分の式で初期値を与えた反復変数の値を、「最終値の式」で指定した最終値に達するまで、1回ごとに「増加式」で示されるプラス(またはマイナス)の差分づつ増加(または減少)させ、そのつど実行文#1を実行せよ。』というものである。
2-1) FOR statement:
The FOR statement is a command statement that repeats several designated executable statements each time while increasing (or decreasing) the value of the iteration variable by a predetermined value from the initial value to the final value. In FIG. 6, the space for writing is inevitably divided into two lines. However, in this control statement, “FOR”, “TO”, “BY”, and “DO” that are actually paired in the same line are included. Control terms and “END” The control term “FOR” is used.
The content of the instruction in the description example of the FOR statement in FIG. 6 is “the value of the iteration variable given the initial value in the part of the expression“ iteration variable to be initialized ”is the final value specified by the“ final value expression ”. Increase (or decrease) each time a positive (or negative) difference indicated by the “increase formula” until execution reaches #, and execute the executable statement # 1 each time. ].

2−2)WHILE文:
WHILE文はある特定のブール式が真である間、1つ以上の実行文を繰り返し実行させる命令文である。この制御文には、対をなす「WHILE」および「DO」の制御用語と、「END WHILE」の制御用語が用いられる。この図6のWHILE文の記述例の命令の内容は『制御用語「WHILE」に続くブール式が真である間、実行文#1および実行文#1に続く図外の実行文を含む1つ以上の実行文を繰り返し実行せよ。』というものである。
2−3)REPEAT文:
REPEAT文はある特定のブール式が真である間、1つ以上の実行文を繰り返し実行させる命令文である(但しWHILE文と異なり、実行文の後方にブール式が置かれる)。この制御文には、「REPEAT」、「UNTIL」、「END REPEAT」の制御用語が用いられる。この図6のREPEATの記述例の命令の内容は『制御用語「UNTIL」に続くブール式が真である間、実行文#1および実行文#1に続く図外の実行文を含む1つ以上の実行文を繰り返し実行せよ。』というものである。
2-2) WHILE statement:
A WHILE statement is an imperative statement that repeatedly executes one or more executable statements while a certain Boolean expression is true. This control statement includes a pair of control terms “WHILE” and “DO” and “END”. The control term “WHILE” is used. The content of the instruction in the description example of the WHILE statement in FIG. 6 is “one including an executable statement # 1 and an executable statement not shown following the executable statement # 1 while the Boolean expression following the control term“ WHILE ”is true. Repeat the above executable statement. ].
2-3) REPEAT statement:
The REPEAT statement is an imperative statement that repeatedly executes one or more executable statements while a specific Boolean equation is true (but, unlike a WHILE statement, a Boolean equation is placed behind the executable statement). This control statement includes “REPEAT”, “UNTIL”, “END” The control term “REPEAT” is used. The contents of the instruction in the description example of REPEAT in FIG. 6 are “one or more including executable statements # 1 and executable statements # 1 that follow the executable statement # 1 while the Boolean expression following the control term“ UNTIL ”is true. Repeat the executable statement. ].

2−4)EXIT文:
EXIT文は、反復文内の途中の必要な位置に制御用語「EXIT」として置かれ、プログラム実行がこの制御用語「EXIT」に達すると、当該の反復構文の残りのプログラムを実行せず、直ちに当該の反復構文の末尾に飛び、ここから実行を継続させる命令文である。
2−5)RETURN文:
RETURN文は、所定の機能を持ったプログラムの一団としてのファンクションまたはファンクション・ブロックの本体プログラム(つまり当該ファンクションまたはファンクション・ブロックのラベルに続く、処理の実体となるプログラム群)内の途中の必要な位置に制御用語「RETURN」として置かれ、プログラム実行がこの制御用語「RETURN」に達すると直ちに実行を終了して当該ファンクションまたはファンクション・ブロックの本体プログラムの先頭に戻り、ここから実行を継続させる命令文である。
2-4) EXIT statement:
The EXIT statement is placed as a control term “EXIT” in a required position in the iteration statement. When the program execution reaches the control term “EXIT”, the remaining program of the iteration syntax is not executed immediately. This is a statement that jumps to the end of the iteration syntax and continues execution from here.
2-5) RETURN statement:
The RETURN statement is a function or function block main body program as a group of programs having a predetermined function (that is, a program group that is a processing entity following the function or function block label). An instruction that is placed in the position as the control term “RETURN”, terminates execution as soon as program execution reaches this control term “RETURN”, returns to the beginning of the main program of the function or function block, and continues execution from here It is a sentence.

以上述べた各種の制御文はいずれも図2、さらに図4の処理によって、それぞれテキストプログラムから中間コードへの変換、さらに中間コードからマシンコードへの変換ができ、また図5、さらに図3の処理によって、それぞれマシンコードから中間コードへの変換、さらに中間コードからテキストプログラムへの変換が可能である。   Each of the various control statements described above can be converted from a text program to an intermediate code and further from an intermediate code to a machine code by the processing of FIG. 2 and FIG. By the processing, conversion from machine code to intermediate code and further conversion from intermediate code to text program are possible.

本発明の一実施例としてのシステム要部の機能の基本構成を示す図The figure which shows the basic composition of the function of the system principal part as one Example of this invention 本発明における保存処理の手順を示すフローチャートThe flowchart which shows the procedure of the preservation | save process in this invention 本発明における表示処理の手順を示すフローチャートThe flowchart which shows the procedure of the display process in this invention. 本発明におけるダウンロード処理の手順を示すフローチャートThe flowchart which shows the procedure of the download process in this invention 本発明におけるアップロード処理の手順を示すフローチャートThe flowchart which shows the procedure of the upload process in this invention ST言語における制御文の種類とテキストプログラムでの記述例を示す図Diagram showing types of control statements in ST language and description examples in text programs

符号の説明Explanation of symbols

1 プログラミング装置
2 編集画面
4 保存処理
5 表示処理
6 プログラミング装置のプログラムメモリ
8 ダウンロード処理
9 アップロード処理
10 プログラマブルコントローラ(PLC)
11 PLCのプログラムメモリ
21 IF(制御用語)
22 条件式
23 THEN(制御用語)
24 実行文#1
25 実行文#2
26 END IF(制御用語)
61 IFを示す中間コード(制御用語を示す中間コード)
62 条件(比較)命令の中間コード
63 条件ジャンプ命令の中間コード
64 THENを示す中間コード(制御用語を示す中間コード)
65 実行文#1の各命令の中間コード
66 実行文#2の各命令の中間コード
67 END IFを示す中間コード(制御用語を示す中間コード)
111 IFを示す疑似命令のマシンコード
112 条件(比較)命令のマシンコード
113 条件ジャンプ命令のマシンコード
114 THENを示す疑似命令のマシンコード
115 実行文#1の各命令のマシンコード
116 実行文#2の各命令のマシンコード
117 END IFを示す疑似命令のマシンコード
DESCRIPTION OF SYMBOLS 1 Programming apparatus 2 Edit screen 4 Storage process 5 Display process 6 Program memory of programming apparatus 8 Download process 9 Upload process 10 Programmable controller (PLC)
11 PLC program memory 21 IF (control terminology)
22 Conditional Expression 23 THEN (Control Term)
24 Executable statement # 1
25 Executable statement # 2
26 END IF (control term)
61 Intermediate code indicating IF (intermediate code indicating control terms)
62 Intermediate code of conditional (comparison) instruction 63 Intermediate code of conditional jump instruction 64 Intermediate code indicating THEN (intermediate code indicating control term)
65 Intermediate code of each instruction of executable statement # 1 66 Intermediate code of each instruction of executable statement # 2 67 END Intermediate code indicating IF (intermediate code indicating control terms)
111 Machine code of pseudo-instruction indicating IF 112 Machine code of conditional (comparison) instruction 113 Machine code of conditional jump instruction 114 Machine code of pseudo-instruction indicating THEN 115 Machine code of each instruction of executable statement # 116 Executable statement # 2 Machine code 117 END for each instruction Machine code of pseudo instruction indicating IF

Claims (2)

文字または(および)記号をそれぞれ複数個連ねた列(以下連続文字列という)からなり、それぞれ、このシーケンスプログラムを実行するプロセッサの機能の仕様に予め定められたマシン語命令(以下真性マシン語命令という)の1または複数個に置き換え可能な各種の条件式や実行文と、同じく前記連続文字列からなり、前記真性マシン語命令への置き換えができない各種の制御用語とを組合わせ、このプログラミング言語固有の文法に従い記述されたテキスト記述型プログラミング言語のシーケンスプログラムとしてのソースプログラムにおける、前記の各連続文字列を順次読み込んで解析したうえ、この各連続文字列をそれぞれ該当するマシン語命令に変換し、前記ソースプログラムに対応するマシン語形態のオブジエクトプログラムを生成してプログラマブルコントローラに格納する言語順変換手段と、
プログラマブルコントローラから読み出したテキスト記述型プログラミング言語のソースプログラムを元とするマシン語形態の前記オブジエクトプログラムを構成する各マシン語命令を順次解析して、前記オブジエクトプログラムを元のテキスト記述型プログラミング言語のソースプログラムに復元する言語逆変換手段と、を備え、
前記言語順変換手段が、前記制御用語に該当しない各連続文字列を、このそれぞれに対する前記の置き換えが可能な1または複数個の真性マシン語命令に変換し、また前記制御用語に該当する各連続文字列を、このそれぞれに1対1に対応し前記真性マシン語命令には含まれず、プログラマブルコントローラのシーケンスプログラムの実行に影響しないマシン語命令(以下疑似マシン語命令という)に変換する手段を備え、
前記言語逆変換手段が少なくとも、解析対象の当該のマシン語命令が前記疑似マシン語命令であるか否かを判定する疑似マシン語命令判定手段と、
この疑似マシン語命令判定手段によって疑似マシン語命令でないと判定された当該の前記真性マシン語命令に対しては、さらに組となる真性マシン語命令を持つものであるか否かを判定し、組の真性マシン語命令を持たないと判定した真性マシン語命令を対応する1行分のテキスト記述型プログラミング言語の条件式または実行文に復元し、組の真性マシン語命令を持つと判定した場合は、当該の真性マシン語命令から組の最終位の真性マシン語命令までの真性マシン語命令を一括して、対応するテキスト記述型プログラミング言語の1行分の条件式または実行文に復元する第1の判定復元手段と、
前記疑似マシン語命令判定手段によって疑似マシン語命令と判定された当該の疑似マシン語命令に対しては、さらに対となる疑似マシン語命令を持つものであるか否かを判定し、対の疑似マシン語命令を持たないと判定した疑似マシン語命令を対応する1行分のテキスト記述型プログラミング言語の前記制御用語に復元し、対の疑似マシン語命令を持つと判定した場合は、当該の疑似マシン語命令から対の最終位の疑似マシン語命令までの各疑似および真性のマシン語命令のうち、疑似マシン語命令をそれぞれ対応するテキスト記述型プログラミング言語の前記制御用語に復元すると共に、真性マシン語命令をその個別または組となる複数個を一括した真性マシン語命令ごとに前記第1の判定復元手段を介しそれぞれ対応するテキスト記述型プログラミング言語の条件式または実行文に復元して、当該の疑似マシン語命令から対の最終位の疑似マシン語命令までの全マシン語命令を、該条件式または実行文の復元行を同一行に含むようなテキスト記述型プログラミング言語の制御命令文内の1行分の復元文とする第2の判定復元手段と、
前記第1の判定復元手段によって復元されたテキスト記述型プログラミング言語の条件式または実行文が前記第2の判定復元手段によって復元されたテキスト記述型プログラミング言語の制御命令文内の1行分の復元文、または同じく復元された単独で1行をなす前記制御用語に従属するものであるか否かを判定し、従属する条件式または実行文にはインデントを付加するインデント付加手段と、を備えたプログラマブルコントローラのプログラミング装置。
A machine language instruction (hereinafter referred to as an intrinsic machine language instruction) which is composed of a sequence of a plurality of characters or (and) symbols (hereinafter referred to as a continuous character string) and which is predetermined in the specification of the function of the processor executing this sequence program. This programming language combines various conditional expressions and executable statements that can be replaced with one or more of the above and various control terms that consist of the continuous character strings and cannot be replaced with the intrinsic machine language instructions. In the source program as a sequence program of a text description programming language described according to a specific grammar, each of the above-mentioned continuous character strings is read and analyzed sequentially, and each of these continuous character strings is converted into a corresponding machine language instruction. Machine language object program corresponding to the source program And language forward transform means for storing in the programmable controller to generate,
Each machine language instruction constituting the object program in the machine language form based on the text description programming language source program read from the programmable controller is sequentially analyzed, and the object program is converted into the original text description programming language. comprising a language inverse transformation means for restoring the source program, and
The language order conversion means converts each continuous character string that does not correspond to the control term into one or a plurality of intrinsic machine language instructions that can be replaced with each of the consecutive character strings, and each serial sequence that corresponds to the control term. There is provided a means for converting a character string into a machine language instruction (hereinafter referred to as a pseudo machine language instruction) that corresponds to each of the character strings, is not included in the intrinsic machine language instruction, and does not affect the execution of the sequence program of the programmable controller. ,
The language inverse conversion means at least a pseudo machine language instruction determination means for determining whether or not the machine language instruction to be analyzed is the pseudo machine language instruction;
It is determined whether or not the true machine language instruction that is determined not to be a pseudo machine language instruction by the pseudo machine language instruction determination means has a true machine language instruction that forms a set. If the true machine language instruction determined to have no true machine language instruction is restored to the corresponding one-line text description programming language conditional expression or executable statement, and it is determined that it has a pair of intrinsic machine language instructions First, true machine language instructions from the true machine language instruction to the last true machine language instruction of the set are restored to a conditional expression or executable statement for one line of the corresponding text description type programming language. Determination restoration means,
The pseudo machine language instruction determined as the pseudo machine language instruction by the pseudo machine language instruction determination means determines whether or not the pseudo machine language instruction has a pair of pseudo machine language instructions. The pseudo machine language instruction determined not to have a machine language instruction is restored to the corresponding control term of the corresponding one-line text description programming language, and if it is determined to have a pair of pseudo machine language instructions, Among each pseudo and intrinsic machine language instruction from the machine language instruction to the pseudo machine language instruction at the end of the pair, the pseudo machine language instruction is restored to the control term of the corresponding text description programming language, and the intrinsic machine A text description type corresponding to each intrinsic machine word instruction in which a plurality of word instructions are individually or in pairs are associated with each other via the first judgment restoring means. Restore to a conditional expression or executable statement in the logging language, and all machine language instructions from the corresponding pseudo machine language instruction to the pseudo machine language instruction at the end of the pair are stored on the same line. A second determination / restoration means which is a restoration sentence for one line in a control instruction sentence of a text description type programming language including:
Restoration of one line in the control statement of the text description type programming language in which the conditional expression or executable statement of the text description type programming language restored by the first judgment restoration unit is restored by the second judgment restoration unit An indentation adding means for determining whether or not the statement is dependent on the control term that is a single line that has been restored or is restored, and that adds an indent to the subordinate conditional expression or executable statement Programmable controller programming device.
前記テキスト記述型プログラミング言語をストラクチャード・テキスト言語としたことを特徴とする請求項1に記載のプログラマブルコントローラのプログラミング装置。2. The programmable controller programming device according to claim 1, wherein the text description programming language is a structured text language.
JP2005321722A 2005-11-07 2005-11-07 Programmable controller programming device Active JP4876537B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005321722A JP4876537B2 (en) 2005-11-07 2005-11-07 Programmable controller programming device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005321722A JP4876537B2 (en) 2005-11-07 2005-11-07 Programmable controller programming device

Publications (2)

Publication Number Publication Date
JP2007128378A JP2007128378A (en) 2007-05-24
JP4876537B2 true JP4876537B2 (en) 2012-02-15

Family

ID=38150968

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005321722A Active JP4876537B2 (en) 2005-11-07 2005-11-07 Programmable controller programming device

Country Status (1)

Country Link
JP (1) JP4876537B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4737441B2 (en) * 2006-03-15 2011-08-03 オムロン株式会社 PLC system
JP4961928B2 (en) * 2006-09-26 2012-06-27 富士電機株式会社 Sequence program conversion device and programmable controller programming device
JP5086296B2 (en) * 2009-03-19 2012-11-28 株式会社日立産機システム Programmable controller control program creation method and programmable controller control program creation system
JP2016040665A (en) * 2014-08-12 2016-03-24 株式会社Ihi Sequence generation method
CN111104205A (en) * 2019-12-24 2020-05-05 浙江中控技术股份有限公司 ST language interpretation execution method and system
KR102533869B1 (en) * 2020-03-10 2023-05-17 엘에스일렉트릭(주) Method for preventing interference between plc program blocks
CN112631606B (en) * 2020-12-31 2024-07-09 中国农业银行股份有限公司 Script formatting method and device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6022373B2 (en) * 1979-08-24 1985-06-01 三菱電機株式会社 Program conversion mechanism for programmable control equipment
JPH01140236A (en) * 1987-11-26 1989-06-01 Nec Corp Inverse compile system for program
JPH02105932A (en) * 1988-10-14 1990-04-18 Hitachi Ltd Program formatted output method
JP2529653B2 (en) * 1989-11-30 1996-08-28 富士電機株式会社 Storage method for displaying program comments
JP2765423B2 (en) * 1992-01-23 1998-06-18 三菱電機株式会社 Programmable controller and control method thereof
JP3407614B2 (en) * 1997-09-18 2003-05-19 横河電機株式会社 Sequence controller
JP3819639B2 (en) * 1999-07-09 2006-09-13 株式会社東芝 Programming device
JP2002041111A (en) * 2000-07-26 2002-02-08 Matsushita Electric Works Ltd Programming supporting device
JP2003099106A (en) * 2001-09-21 2003-04-04 Fuji Electric Co Ltd Circuit comment data preservation method
JP2003162307A (en) * 2001-11-28 2003-06-06 Fuji Electric Co Ltd Language conversion support device and language conversion support method
JP2004341824A (en) * 2003-05-15 2004-12-02 Fuji Electric Fa Components & Systems Co Ltd Programming device for programmable controller

Also Published As

Publication number Publication date
JP2007128378A (en) 2007-05-24

Similar Documents

Publication Publication Date Title
JP2765423B2 (en) Programmable controller and control method thereof
US6243864B1 (en) Compiler for optimizing memory instruction sequences by marking instructions not having multiple memory address paths
JP4541418B2 (en) Programmable controller peripheral device, replacement method and program
JP5226328B2 (en) Code converter
JP2007272353A (en) Processor device and compound condition processing method
JP4876537B2 (en) Programmable controller programming device
JP4620035B2 (en) Program creation apparatus, program creation method, and program causing computer to execute the method
JP7067520B2 (en) Development support equipment, control methods for development support equipment, information processing programs, and recording media
JPH05100730A (en) Programming device for motion controller
JP7468209B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, AND PROGRAM
US20230375999A1 (en) Program creation assistance system and computer readable medium
JP2009134523A (en) Compiler device, compiler method, and program
JPH0863369A (en) Optimization information output system
JPH07334216A (en) Programming device
JPH11259308A (en) Programmable controller
JP2006018759A (en) Control apparatus and method
JP2862369B2 (en) Image display control device
JP2621631B2 (en) Programmable controller
JPH0713758A (en) Instruction decoding method
JP4551665B2 (en) Diagram language programming method
JP2010015435A (en) Control program generator, program for control program generator, model rewrite device, program for model rewrite device, object code generator, program for object code generator, model simulation device, and program for model simulation device
JPH03164935A (en) Arithmetic processor
JPH04323783A (en) Data flow graph evolving system
JPH05289712A (en) Language converter
JPH0651818A (en) Programmable controller

Legal Events

Date Code Title Description
A625 Written request for application examination (by other person)

Free format text: JAPANESE INTERMEDIATE CODE: A625

Effective date: 20080916

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080919

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20081215

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090219

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110422

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110819

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110906

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111012

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111114

R150 Certificate of patent or registration of utility model

Ref document number: 4876537

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141209

Year of fee payment: 3

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

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