JPH0651973A - Error correction method for sequence program - Google Patents

Error correction method for sequence program

Info

Publication number
JPH0651973A
JPH0651973A JP4201544A JP20154492A JPH0651973A JP H0651973 A JPH0651973 A JP H0651973A JP 4201544 A JP4201544 A JP 4201544A JP 20154492 A JP20154492 A JP 20154492A JP H0651973 A JPH0651973 A JP H0651973A
Authority
JP
Japan
Prior art keywords
program
error
sequence
sequence program
instruction
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.)
Pending
Application number
JP4201544A
Other languages
Japanese (ja)
Inventor
Toshio Arai
俊夫 新居
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 JP4201544A priority Critical patent/JPH0651973A/en
Publication of JPH0651973A publication Critical patent/JPH0651973A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily perform the correction of a sequence program by preserving a program instruction in which an error occurs separately from the sequence program, and correcting it after the sequence program is generated and completed. CONSTITUTION:When the sequence program in sequence memory 12 is corrected, all the contents of program memory 12 are transferred to an editor buffer 13. Also, the contents of the buffer 13 are stored in the program memory 12 at a stage where all the results of programming are completed. When it is decided that the error exists in discrimination, a program instruction of error presence is preserved and stored separately from the sequence program, and a the program instruction preserved and stored when the sequence program is generated or edit is completed is displayed, and a displayed program instruction is set as a correction target. Therefore, since an operator can input the sequence instruction without being conscious of the error, which enables the program to be inputted even by a person who is unfamiliar to a sequence circuit.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プログラマブルコント
ローラ用のシーケンスプログラムをプログラミング装置
において、作成、編集したときに、そのシーケンスプロ
グラムエラーを修正するためのシーケンスプログラムの
エラー修正方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequence program error correction method for correcting a sequence program error when a sequence program for a programmable controller is created and edited in a programming device.

【0002】[0002]

【従来の技術】図7は、プログラマブルコントローラと
プログラミング装置との関係を示したものである。プロ
グラミング装置はプログラマブルコントローラと伝送ラ
インを経由して接続され、プログラマブルコントローラ
の実行するシーケンスプログラムを作成すると共にプロ
グラマブルコントローラにおいて実行されているシーケ
ンスプログラムの動作状態の監視等を行う。図8は、プ
ログラミングを行っている時のプログラミング装置の表
示画面を示したものである。ユーザは、この表示画面上
でシーケンスプログラムを構成するシーケンス回路の接
点、コイル等の追加、挿入、削除等を繰り返して、プロ
グラミングを行っていく。より具体的には、ユーザはキ
ーボードからプログラム修正に関わる命令を入力する
と、プログラミング装置は、この命令に基づきプログラ
ムの修正を行い、その修正結果を表示する。
2. Description of the Related Art FIG. 7 shows the relationship between a programmable controller and a programming device. The programming device is connected to the programmable controller via a transmission line, creates a sequence program executed by the programmable controller, and monitors the operating state of the sequence program executed in the programmable controller. FIG. 8 shows a display screen of the programming device during programming. The user repeatedly performs programming by repeatedly adding, inserting, deleting, etc. contacts, coils, etc. of the sequence circuit constituting the sequence program on this display screen. More specifically, when the user inputs a command relating to the program modification from the keyboard, the programming device modifies the program based on this command and displays the modification result.

【0003】図9はプログラム修正に関わるプログラム
情報の流れを示したものである。
FIG. 9 shows the flow of program information relating to program modification.

【0004】ユーザがプログラミング装置内のプログラ
ム・メモリの任意の箇所を指定し、プログラムの読出し
の指示を行うと、プログラミング装置はプログラム・メ
モリのプログラム指定内容をいったんオブジェクト・バ
ッファに読出し、オブジェクト・バッファ上で図形イメ
ージのファイルに変換する(これを逆コンパイルと云
う)。この後、プログラミング装置は図形イメージファ
イルを利用して画面上にプログラム内容を表示する。
When the user designates an arbitrary portion of the program memory in the programming device and gives an instruction to read the program, the programming device once reads the program designated contents of the program memory into the object buffer, and then the object buffer. Convert to a graphic image file above (this is called decompilation). Thereafter, the programming device uses the graphic image file to display the program contents on the screen.

【0005】プログラム・メモリの内容は、図8に示さ
れているような図形形態で格納されているのではなく、
プログラマブルコントローラがプログラムを実行できる
ようなマシン命令コード形態で格納されている。これら
命令コード群は計算機の分野でいうオブジェクト・ファ
イルに対応する。また、前述の図形イメージ・ファイル
は、計算機分野でいうソース・ファイルに対応する。プ
ログラマブルコントローラのプログラミングは、従来よ
りインタプリタ方式が特徴となっているために、プログ
ラム・メモリに格納のオブジェクト・プログラムに対応
するソース・ファイルを持つことはめったにない。一般
には、プログラミング時のプログラムの作成、編集のた
めの中間ファイル、より具体的には文字コード、制御コ
ードで構成されたファイルとして、一時的に限定された
範囲のソース・ファイルを持つことが多い。
The contents of the program memory are not stored in graphical form as shown in FIG.
It is stored in machine instruction code form such that the programmable controller can execute the program. These instruction code groups correspond to object files in the field of computers. The above-mentioned graphic image file corresponds to the source file in the computer field. Since the programmable controller has conventionally been characterized by an interpreter system, it is rare to have a source file corresponding to an object program stored in a program memory. Generally, as an intermediate file for creating and editing a program at the time of programming, more specifically, as a file composed of a character code and a control code, it often has a temporary limited range of source files. .

【0006】プログラムの格納時には、上述と逆の過程
でプログラムメモリに作成、編集後のプログラム情報が
転送される。より具体的にはユーザにより格納が指示さ
れるとプログラミング装置はオブジェクト・バッファ上
の画面イメージ・ファイルの内容をオブジェクト・コー
ド(マシン命令コード)に変換する(これをコンパイル
という)。プログラミング装置は変換されたオブジェク
ト・コードをプログラム・メモリの元の内容と置き換え
ることによって格納を行う。
When the program is stored, the program information after being created and edited is transferred to the program memory in the reverse procedure of the above. More specifically, when storage is instructed by the user, the programming device converts the contents of the screen image file on the object buffer into object code (machine instruction code) (this is called compilation). The programming device stores by replacing the converted object code with the original contents of program memory.

【0007】以上、説明したように、プログラミングを
行う時、ユーザはプログラム・メモリに対する「読出
し」,「格納」の指示操作を繰り返し行う。コンパイル
時点で、プログラム内容の文法チェックが行われ、画面
イメージ・ファイルに不完全な内容(プログラミング上
のプログラム命令のエラー)があると、エラー警告が行
われる。また、ユーザがエラー箇所を修正してからでな
いと次回のプログラム内容の「読出し」を行うことはで
きないようにプログラミング装置が構成されていた。
As described above, at the time of programming, the user repeatedly performs "read" and "store" instruction operations with respect to the program memory. At the time of compilation, a grammatical check of the program contents is performed, and if the screen image file has incomplete contents (program command error in programming), an error warning is issued. Further, the programming device is configured so that the user cannot correct the error location before the next "reading" of the program content can be performed.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、一般的
に、プログラム編集時に、入力されたシーケンス命令の
エラーの有無を調べ、エラーが解消されてからでないと
次回の編集処理に移行できないシーケンスプログラムの
エラー修正方法には次の欠点があった。
However, in general, when a program is edited, the presence or absence of an error in the input sequence command is checked, and the error of the sequence program cannot be entered until the error is eliminated before proceeding to the next editing process. The correction method had the following drawbacks.

【0009】(1)シーケンスプログラムを構成するシ
ーケンス回路の構成部品に識別名を与える場合、シーケ
ンス回路全体または前後関係を考慮しないと識別名を決
定することができないことが多いのに対して、プログラ
ミング装置でプログラム入力を行うときには識別名を含
む詳細プログラムまでプログラム設計しておかなくては
ならない。
(1) When an identification name is given to a component of a sequence circuit that constitutes a sequence program, the identification name cannot be determined unless the entire sequence circuit or the context is taken into consideration. When a program is input on the device, a detailed program including an identification name must be designed.

【0010】(2)プログラムエラーが解消しないと次
回のプログラム編集処理が進展しないので、プログラミ
ング処理についての初心者がプログラムを編集する場
合、編集処理に時間がかかる。
(2) If the program error is not resolved, the next program editing process will not progress. Therefore, when a beginner in the programming process edits the program, the editing process takes time.

【0011】なお、シーケンスプログラム全体を作成し
た後一括してプログラムエラーを検出することも行われ
ているが、この方法には次のような欠点がある。
Although it has been practiced to detect a program error collectively after creating the entire sequence program, this method has the following drawbacks.

【0012】(1)オブジェクトまたはソースのプログ
ラムをチェックの対象とすると、プログラミング装置が
エラーの検出を行っている間は、操作者は待ちの状態と
なり、一見、エラー検出処理に時間がかかっているよう
な印象を操作者に与える。
(1) When an object or source program is to be checked, the operator is in a waiting state while the programming device is detecting an error, and at first glance, the error detection process takes time. Gives the operator the impression of

【0013】(2)プログラム作成者以外の者が、シー
ケンスプログラムを取扱う場合、そのシーケンスプログ
ラムがエラーの混在している作成途中のプログラムか、
エラー解消(デバッグ処理)後のプログラムかの判別が
つきにくい。
(2) When a person other than the program creator handles the sequence program, the sequence program is a program in the process of creation in which errors are mixed, or
It is difficult to determine whether the program is after error resolution (debug processing).

【0014】このように従来のシーケンスプログラムの
エラー検出後の修正方法には一長一短があり、プログラ
ム作成に際し、より効果的なエラー修正方法が望まれて
いる。
As described above, the conventional method of correcting a sequence program after detecting an error has advantages and disadvantages, and a more effective error correcting method is desired when creating a program.

【0015】そこで、本発明の目的は、上述の点に鑑み
て、プログラム修正の容易なシーケンスプログラムのエ
ラー修正方法を提供することにある。
Therefore, in view of the above points, an object of the present invention is to provide an error correcting method for a sequence program, in which the program can be easily corrected.

【0016】[0016]

【課題を解決するための手段】このような目的を達成す
るために、第1の発明は、シーケンスプログラムの作成
または編集の対象となるプログラム命令の入力毎に、該
プログラム命令のエラーの有無の判別を行うシーケンス
プログラムのエラー修正方法において、前記判別におい
て、エラー有りが得られた場合は、前記エラー有りのプ
ログラム命令を前記シーケンスプログラムとは別個に保
存記憶しておき、前記シーケンスプログラムの作成また
は編集の終了時点で保存記憶された前記プログラム命令
を表示し、当該表示されたプログラム命令を修正対象と
することを特徴とする。
In order to achieve such an object, a first aspect of the present invention is to detect the presence or absence of an error in a program command for each input of a program command for creating or editing a sequence program. In the error correction method of a sequence program for making a determination, when an error is obtained in the determination, the program command having the error is stored and stored separately from the sequence program, and the sequence program is created or It is characterized in that the program instructions stored and stored at the end of editing are displayed, and the displayed program instructions are targeted for correction.

【0017】第2の発明は、第1の発明に加えて、前記
判別において、エラー有りが得られた場合は、さらに、
当該エラー有りのプログラム命令の前記シーケンスプロ
グラム上の記載予定位置に、当該エラー有りを示す第1
情報および前記エラー有りのプログラム命令の記憶位置
を示す第2情報を記載しておくことを特徴とする。
In addition to the first aspect of the present invention, the second aspect of the present invention further comprises:
The first position indicating that there is an error at the scheduled position in the sequence program where the program command with the error is described.
It is characterized in that information and second information indicating a storage position of the program instruction with the error are described.

【0018】第3の発明は、第1の発明に加えて、前記
判別において、エラー有りが得られた場合は、当該エラ
ー有りのプログラム命令が修正されるまでは、前記シー
ケンスプログラムを格納するメモリから当該シーケンス
プログラムを外部に転送することを禁止するように制御
することを特徴とする。
In addition to the first aspect of the present invention, in the third aspect of the present invention, when an error is obtained in the determination, a memory for storing the sequence program until the program instruction with the error is corrected. Is controlled so as to prohibit the transfer of the sequence program to the outside.

【0019】[0019]

【作用】第1の発明は、エラーの生じたプログラム命令
は、シーケンスプログラムとは別個に保存され、シーケ
ンスプログラムの作成/終了時点で修正する。第2の発
明は、シーケンスプログラム上のエラープログラム命令
の記載予定位置に第1情報および第2情報を記載してお
くので、エラープログラムの表示および修正に関わるエ
ラープログラム命令の読出し、置換処理が容易となる。
第3の発明は未完成のシーケンスプログラムが外部出力
されないので、プログラマブルコントローラが誤動作す
ることはない。
According to the first aspect of the invention, the program instruction in which an error has occurred is stored separately from the sequence program, and is corrected when the sequence program is created / finished. In the second invention, since the first information and the second information are described at the planned position of the error program instruction on the sequence program, it is easy to read and replace the error program instruction relating to the display and correction of the error program. Becomes
In the third invention, since the unfinished sequence program is not output to the outside, the programmable controller does not malfunction.

【0020】[0020]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0021】本発明を適用したプログラミング装置の回
路構成を図2に示す。
A circuit configuration of a programming device to which the present invention is applied is shown in FIG.

【0022】図2において、中央演算処理装置(CP
U)10はシステム・メモリ11に格納された各種プロ
グラムに従ってプログラム作成,編集処理、プログラマ
ブルコントローラのモニタ処理、装置全体の制御処理を
実行する。
In FIG. 2, the central processing unit (CP
U) 10 executes program creation / editing processing, programmable controller monitoring processing, and overall apparatus control processing according to various programs stored in the system memory 11.

【0023】本実施例ではプログラム・メモリ12はエ
ラーのない作成済みのシーケンスプログラムを格納す
る。プログラム・メモリ12上のシーケンスプログラム
がプログラマブルコントローラに転送される。エディタ
・バッファ13は編集(作成を含む)対象のシーケンス
プログラムをマシン命令コードの形態で格納する。
In this embodiment, the program memory 12 stores a prepared sequence program having no error. The sequence program on the program memory 12 is transferred to the programmable controller. The editor buffer 13 stores a sequence program to be edited (including creation) in the form of a machine instruction code.

【0024】プログラム・メモリ12のシーケンスプロ
グラムを修正する場合、プログラム・メモリ12の内容
が全てエディタ・バッファ13に転送される。また、プ
ログラミングの結果が全て終了した段階でエディタ・バ
ッファ13の内容がプログラム・メモリ12に格納され
る。プログラミングの途中では、エディタ・バッファ1
3上の部分的なプログラムが逆コンパイル,コンパイル
の対象となる。オブジェクト・バッファ14はコンパイ
ル対象の部分プログラムを一時格納する。
When modifying the sequence program of the program memory 12, the entire contents of the program memory 12 are transferred to the editor buffer 13. Further, the contents of the editor buffer 13 are stored in the program memory 12 when all the programming results are completed. In the middle of programming, editor buffer 1
Partial programs on 3 are subject to decompilation and compilation. The object buffer 14 temporarily stores a partial program to be compiled.

【0025】画面イメージファイル・メモリ15は表示
器16に表示する1画面分の部分シーケンスプログラム
(図形表記)を文字コードなどの中間言語の形態で記憶
する。表示器16は画面イメージファイル・メモリ15
に記憶されたシーケンスプログラムを一定周期毎に読出
しイメージパターンに変換して表示する。エラー・ファ
イルメモリ17はエラーの生じている部分シーケンスプ
ログラムを中間言語の形態で記憶する。インタフェース
(I/O)18はCPU10とプログラマブルコントロ
ーラとの間で授受する情報信号の転送を行う。キーボー
ド19はプログラミングに用いるプログラム命令やCP
U10に対する動作指示を入力する。
The screen image file memory 15 stores a partial screen program (graphic notation) for one screen displayed on the display 16 in the form of an intermediate language such as a character code. The display 16 is a screen image file memory 15
The sequence program stored in is read out at regular intervals and converted into an image pattern for display. The error file memory 17 stores the partial sequence program in which an error has occurred in the form of an intermediate language. The interface (I / O) 18 transfers information signals exchanged between the CPU 10 and the programmable controller. The keyboard 19 is a program command or CP used for programming.
Input an operation instruction to U10.

【0026】このような構成におけるシーケンスプログ
ラムの修正動作を次に説明する。一例としてシーケンス
プログラムメモリ12に格納されているシーケンスプロ
グラムを修正する場合について説明する。
The correction operation of the sequence program in such a configuration will be described below. As an example, a case where the sequence program stored in the sequence program memory 12 is modified will be described.

【0027】操作者はキーボード19から転送命令を入
力し、シーケンスプログラムメモリ12上のシーケンス
プログラムをエディタ・バッファ13に転送するように
CPU10に指示する。この結果、エディタ・バッファ
13上に編集対象のシーケンスプログラムがロードされ
る。ユーザは図3に示すようなエディタ・バッファ13
上の部分シーケンスプログラムcの位置を指定すると、
CPU10は、指定されたシーケンスプログラムをオブ
ジェクト・バッファ14に転送する。CPU10はこの
オブジェクト・バッファ14のプログラム情報を逆コン
パイルして図4に示すような回路をシーケンス回路図の
形態で表示させる。この時点で図4の追加修正回路AA
は画面表示に含まれていない。
The operator inputs a transfer command from the keyboard 19 and instructs the CPU 10 to transfer the sequence program on the sequence program memory 12 to the editor buffer 13. As a result, the sequence program to be edited is loaded on the editor buffer 13. The user can use the editor buffer 13 as shown in FIG.
If you specify the position of the upper partial sequence program c,
The CPU 10 transfers the designated sequence program to the object buffer 14. The CPU 10 decompiles the program information in the object buffer 14 and displays the circuit shown in FIG. 4 in the form of a sequence circuit diagram. At this point, the additional correction circuit AA of FIG.
Is not included in the screen display.

【0028】操作者はキーボード19を用いて表示画面
上で修正位置をカーソル指定し、図4の場合は接点命令
の挿入を指示する。CPU10は入力のプログラム命令
を画面イメージファイル・メモリ15に挿入すると共に
オブジェクト・バッファ14に一時記憶する。この結
果、画面イメージファイル上に挿入のプログラム命令は
他のプログラム命令と共に表示器16によりイメージ化
され、図4の回路AAのように可視表示される。
The operator uses the keyboard 19 to specify the cursor on the correction position on the display screen, and in the case of FIG. 4, instructs the insertion of a contact command. The CPU 10 inserts the input program command into the screen image file memory 15 and temporarily stores it in the object buffer 14. As a result, the program command inserted on the screen image file is imaged by the display 16 together with other program commands, and is visually displayed as in the circuit AA in FIG.

【0029】CPU10は次に、図5の制御手順を起動
し、オブジェクト・バッファ14上のプログラム情報を
コンパイルする(ステップS1)。このコンパイルにあ
たり、従来と同様、CPU10はコンパイル対象のプロ
グラム命令についての文法解析によりプログラムエラー
の有無を判定する(ステップS2)。図4の回路AAの
ように回路識別名が入力されていない場合はエラー判定
が得られるので、CPU10はコンパイル処理を中止
し、CPU10の実行手順はステップS4に移行する。
ここで、CPU10は、エディタ・バッファ13上の、
本来、追加された回路のプログラム命令を挿入する位置
にエラー情報を登録し、エラーの生じたコンパイル対象
のプログラム命令(中間言語形態)を次ステップでエラ
ーファイル・メモリ17に累積記憶する(ステップS
5)。
Next, the CPU 10 activates the control procedure shown in FIG. 5 and compiles the program information in the object buffer 14 (step S1). In this compilation, as in the conventional case, the CPU 10 determines the presence or absence of a program error by grammatical analysis of the program instruction to be compiled (step S2). When the circuit identification name is not input as in the circuit AA in FIG. 4, an error determination is obtained, so the CPU 10 stops the compilation process, and the execution procedure of the CPU 10 proceeds to step S4.
Here, the CPU 10 stores in the editor buffer 13
Originally, the error information is registered at the position where the program instruction of the added circuit is inserted, and the program instruction (intermediate language form) in which the error has occurred is cumulatively stored in the error file memory 17 in the next step (step S
5).

【0030】エディタ・バッファ13は1ステップ命令
=3バイトで構成されており、第1バイト目が命令部、
第2,第3バイト目は識別名を表わすアドレス部に割当
てられている。そこで、本実施例は第1バイト目の命令
部に本発明の第1情報としてのFF(16進数)を用い
た擬似プログラム命令をエディタ・バッファ13上のシ
ーケンスプログラム中に挿入する。このことによりこの
挿入位置にエラー回路が存在することを表わす。また、
この擬似命令の第2,第3バイト目には、エラーと判定
された中間言語形態のプログラム命令のエラーファイル
・メモリ17上の格納アドレス(本発明の第2情報、ポ
インタと称す)をCPU10により記載する。
The editor buffer 13 is composed of 1 step instruction = 3 bytes, the first byte is the instruction part,
The second and third bytes are assigned to the address part representing the identification name. Therefore, in this embodiment, a pseudo program instruction using FF (hexadecimal number) as the first information of the present invention is inserted into the sequence program on the editor buffer 13 in the instruction portion of the first byte. This indicates that an error circuit exists at this insertion position. Also,
At the second and third bytes of this pseudo instruction, the storage address (second information of the present invention, referred to as a pointer) on the error file memory 17 of the intermediate language program instruction determined to be an error is stored by the CPU 10. Enter.

【0031】一方、ステップS2でエラー無しの判定結
果が得られた場合、CPU10はコンパイル後のプログ
ラム命令(マシンコード形態)をエディタ・バッファ1
3に挿入する(ステップS3)。
On the other hand, when the result of determination that there is no error is obtained in step S2, the CPU 10 sends the compiled program instruction (machine code form) to the editor buffer 1.
3 (step S3).

【0032】上述の手順では、プログラム命令の挿入
を、編集の一例として説明しているが、その他、削除、
置換、移動等に関連してエラーの生じたエディタ・バッ
ファ13上のプログラム記載停止位置にエラー発生を表
わす擬似命令をCPU10により挿入することは言うま
でもない。
In the above procedure, the insertion of the program instruction is explained as an example of editing, but in addition, deletion of
It goes without saying that the CPU 10 inserts a pseudo-instruction indicating an error occurrence at the program description stop position on the editor buffer 13 where an error has occurred in relation to replacement, movement or the like.

【0033】このようにして、編集のために入力された
プログラム命令にエラーがあると、エラーファイル・メ
モリ17にそのエラー命令が格納され、エディタ・バッ
ファ13上のシーケンスプログラム中のエラー命令の編
集予定位置にはエラー命令の存在およびエラーファイル
・メモリ17上のエラー命令の格納位置を示す擬似命令
が挿入される。
In this way, when there is an error in the program command input for editing, the error command is stored in the error file memory 17, and the error command in the sequence program in the editor buffer 13 is edited. A pseudo instruction indicating the existence of the error instruction and the storage location of the error instruction on the error file memory 17 is inserted at the expected position.

【0034】したがって従来のようにエラーの発生毎に
操作者の編集処理を中断することはなく、プログラムの
編集処理をスムースに続行することができる。プログラ
ム編集の終了を操作者がキーボード19からキー入力す
ると、CPU10は図6の制御手順を起動し、エディタ
・バッファ13上のシーケンスプログラムを検索し、エ
ラーの存在を示す擬似命令を検出する(ステップS10
0→S101→S102)。そしてCPU10は検出の
擬似命令の中のポインタの示すエラーファイル・メモリ
17上のアドレスからエラーのシーケンス命令を読出
し、画面イメージファイル・メモリ15に書き込むこと
によりエラーのシーケンス命令を表示器16に表示する
(ステップS103→S104)。
Therefore, unlike the conventional case, the editing process of the operator is not interrupted every time an error occurs, and the editing process of the program can be smoothly continued. When the operator makes a key input from the keyboard 19 to finish the program editing, the CPU 10 activates the control procedure of FIG. 6, searches the sequence program in the editor buffer 13, and detects a pseudo instruction indicating the presence of an error (step S10
0 → S101 → S102). Then, the CPU 10 reads the error sequence command from the address on the error file memory 17 indicated by the pointer in the detection pseudo command and writes it in the screen image file memory 15 to display the error sequence command on the display unit 16. (Steps S103 → S104).

【0035】CPU10はキーボード19からの編集命
令を受けると、画面イメージファイル・メモリ15上の
シーケンス命令(中間言語形態)をコンパイルする。コ
ンパイルに際し、エラーが生じていない場合は、CPU
10はエディタ・バッファ13上の擬似命令をコンパイ
ル後のシーケンス命令に置換する(ステップS105〜
S107)。このコンパイル時、エラーが発生した場合
はCPU10の実行手順はステップS106→S105
へ戻るので、シーケンス命令のエラーが解消されない限
り、実行手順はステップS105→S106のループ処
理を脱却することができない。したがって、図6の制御
手順はエラーの生じたシーケンス命令をエディタ・バッ
ファ13上のシーケンスプログラム上に混在させること
はできないプログラム構成となっている。
When the CPU 10 receives the edit command from the keyboard 19, it compiles the sequence command (intermediate language form) on the screen image file memory 15. If no error occurred during compilation, CPU
Reference numeral 10 replaces the pseudo instruction on the editor buffer 13 with the sequence instruction after compilation (steps S105 to S105).
S107). If an error occurs during this compilation, the execution procedure of the CPU 10 is step S106 → S105.
Therefore, the execution procedure cannot escape from the loop processing of steps S105 to S106 unless the error of the sequence instruction is resolved. Therefore, the control procedure of FIG. 6 has a program configuration in which the sequence instruction in which an error has occurred cannot be mixed in the sequence program in the editor buffer 13.

【0036】以後、CPU10はエディタ・バッファ1
3上のシーケンスプログラムから擬似命令を検出する毎
に、エラー命令の修正に関わるシステム処理を行う。検
索が終了した時点でエラー命令の修正も終了しているの
で、CPU10はエディタ・バッファ13のシーケンス
プログラムに関する出力命令、例えば、シーケンスプロ
グラムメモリ12への書き込み等を受け付けエディタ・
バッファ13からのシーケンスプログラムの出力処理を
実行する(ステップS100→S110→S111)。
Thereafter, the CPU 10 uses the editor buffer 1
Every time a pseudo-instruction is detected from the above sequence program 3, system processing relating to correction of an error instruction is performed. Since the correction of the error command is completed when the search is completed, the CPU 10 accepts an output command related to the sequence program in the editor buffer 13, for example, writing to the sequence program memory 12 or the like.
The output process of the sequence program from the buffer 13 is executed (steps S100 → S110 → S111).

【0037】以上、説明したように、本実施例では操作
者がプログラム編集を行う場合、エラーの発生したシー
ケンス命令は自動的に別ファイルに保存され、プログラ
ム編集終了時に表示される。また、エラーのシーケンス
命令が正しく修正されない限りエディタ・バッファ13
上のシーケンスプログラムを外部出力できないので、プ
ログラマブルコントローラ等にプログラムエラーの生じ
たシーケンスプログラムが転送されることはない。
As described above, in the present embodiment, when the operator edits the program, the sequence command in which the error has occurred is automatically saved in another file and displayed at the end of the program edit. Also, unless the error sequence instruction is corrected correctly, the editor buffer 13
Since the above sequence program cannot be externally output, the sequence program in which a program error has occurred is not transferred to the programmable controller or the like.

【0038】本実施例の他に次の例を実施することがで
きる。
In addition to this embodiment, the following example can be carried out.

【0039】1)本実施例はプログラム編集処理を例と
して取扱っているが新規プログラム作成も同様である。
この場合、新規プログラム作成開始時点でエディタ・バ
ッファ13上には白紙状態の編集対象のシーケンスプロ
グラムが存在すると見なす。
1) This embodiment deals with the program editing process as an example, but the same applies to the creation of a new program.
In this case, it is assumed that a blank blank edit target sequence program exists in the editor buffer 13 at the start of creating a new program.

【0040】2)本実施例では、エラーを含むシーケン
スプログラムはエディタ・バッファ13上に格納せず、
また外部出力しないようにシステムを構成しているが、
作成途上のシーケンスプログラムをフロッピーディスク
等に一時記憶しておきたい場合は次の処理を行うとよ
い。
2) In this embodiment, a sequence program including an error is not stored in the editor buffer 13,
Also, the system is configured not to output externally,
When it is desired to temporarily store the sequence program in the process of being created on a floppy disk or the like, the following process may be performed.

【0041】すなわち、プログラム作成終了時に、フロ
ッピーディスクへ記憶するか否かを操作者がCPU10
に指示し、この指示があった場合はCPU10は図6の
制御手順を実行せず、エディタ・バッファ13上のシー
ケンスプログラムおよびエラーファイル・メモリ17の
エラー命令を1組のデータとしてフロッピーディスクに
格納する。フロッピーディスクからエディタ・バッファ
13へ上記データを転送する際にはCPU10により擬
似命令の有無を確認し、エラー命令をエラーファイル・
メモリ17に再登録する。このとき、エラー命令(回
路)を自動的に表示すると操作者は、これから編集しよ
うとするシーケンスプログラムにエラーが有ることが判
る。
That is, at the end of the program creation, the operator determines whether or not to store the program in the floppy disk.
If there is this instruction, the CPU 10 does not execute the control procedure of FIG. 6 and stores the sequence program on the editor buffer 13 and the error instruction of the error file memory 17 in the floppy disk as a set of data. To do. When transferring the above data from the floppy disk to the editor buffer 13, the CPU 10 confirms the presence or absence of pseudo instructions, and the error instruction
Re-register in the memory 17. At this time, if the error command (circuit) is automatically displayed, the operator knows that the sequence program to be edited has an error.

【0042】3)エラーのシーケンス命令を表示する場
合には、回路図形(逆コンパイル結果)だけでなく、エ
ラー内容を表示するとよい。
3) When displaying the error sequence instruction, it is preferable to display not only the circuit figure (decompilation result) but also the error content.

【0043】4)本実施例ではプログラムエラーの検出
時にはエラー検出の表示を行ってはいないが、警告目的
でエラーが発生した旨の表示を、たとえば点灯表示をエ
ラーの生じたプログラム命令に施すようにしてもよいこ
と勿論である。
4) In the present embodiment, no error detection is displayed when a program error is detected, but a display indicating that an error has occurred is provided for warning purposes, for example, a lighting display is given to a program command in which an error has occurred. Of course, you can do that.

【0044】[0044]

【発明の効果】以上、説明したように、本発明によれ
ば、操作者はエラーを気にすることなくシーケンス命令
を入力することができるので、たとえば、キーパンチャ
ーなどシーケンス回路の判らない者がシーケンスプログ
ラムの入力を行って最後に、シーケンスプログラムを理
解する者がエラーを修正するといったプログラム作成方
法を取ることもできる。また、エラーの生じたプログラ
ム命令が作成/編集対象のシーケンスプログラムと混在
することがないので、システム全体に対する安全性が保
たれる。
As described above, according to the present invention, the operator can input a sequence command without worrying about an error, so that, for example, a person who does not understand the sequence circuit such as a key puncher. It is also possible to adopt a program creating method in which a person who understands the sequence program corrects the error after inputting the sequence program. Further, since the program command in which the error has occurred does not coexist with the sequence program to be created / edited, the safety for the entire system is maintained.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明実施例のシーケンスプログラム関連デー
タの内容を示す説明図である。
FIG. 1 is an explanatory diagram showing the contents of sequence program related data according to an embodiment of the present invention.

【図2】本発明実施例の回路構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing a circuit configuration of an embodiment of the present invention.

【図3】シーケンスプログラムの編集順序を示す説明図
である。
FIG. 3 is an explanatory diagram showing an editing order of a sequence program.

【図4】シーケンスプログラム表示例を示す説明図であ
る。
FIG. 4 is an explanatory diagram showing a display example of a sequence program.

【図5】図2のCPU10が実行する制御手順を示すフ
ローチャートである。
5 is a flowchart showing a control procedure executed by the CPU 10 of FIG.

【図6】図2のCPU10が実行する制御手順を示すフ
ローチャートである。
FIG. 6 is a flowchart showing a control procedure executed by the CPU 10 of FIG.

【図7】従来システムの外観を示す斜視図である。FIG. 7 is a perspective view showing an appearance of a conventional system.

【図8】シーケンスプログラム表示例を示す説明図であ
る。
FIG. 8 is an explanatory diagram showing a display example of a sequence program.

【図9】従来の編集手順を示す説明図である。FIG. 9 is an explanatory diagram showing a conventional editing procedure.

【符号の説明】[Explanation of symbols]

10 CPU 12 プログラム・メモリ 13 エディタ・バッファ 17 エラーファイル・メモリ 10 CPU 12 Program memory 13 Editor buffer 17 Error file memory

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 シーケンスプログラムの作成または編集
の対象となるプログラム命令の入力毎に、該プログラム
命令のエラーの有無の判別を行うシーケンスプログラム
のエラー修正方法において、 前記判別において、エラー有りが得られた場合は、前記
エラー有りのプログラム命令を前記シーケンスプログラ
ムとは別個に保存記憶しておき、前記シーケンスプログ
ラムの作成または編集の終了時点で保存記憶された前記
プログラム命令を表示し、 当該表示されたプログラム命令を修正対象とすることを
特徴とするシーケンスプログラムのエラー修正方法。
1. An error correction method for a sequence program, which determines whether or not there is an error in the program instruction for each input of a program instruction that is a target for creating or editing a sequence program, wherein an error is obtained in the determination. If the error occurs, the program command with the error is stored and stored separately from the sequence program, and the stored and stored program command is displayed at the end of the creation or editing of the sequence program. A method for correcting an error in a sequence program, characterized in that a program instruction is a target for correction.
【請求項2】 前記判別において、エラー有りが得られ
た場合は、さらに、当該エラー有りのプログラム命令の
前記シーケンスプログラム上の記載予定位置に、当該エ
ラー有りを示す第1情報および前記エラー有りのプログ
ラム命令の記憶位置を示す第2情報を記載しておくこと
を特徴とする請求項1に記載のシーケンスプログラムの
エラー修正方法。
2. When an error is obtained in the determination, further, the first information indicating the error and the error are present at the scheduled position on the sequence program of the program command with the error. 2. The error correcting method for a sequence program according to claim 1, wherein the second information indicating the storage location of the program instruction is described.
【請求項3】 前記判別において、エラー有りが得られ
た場合は、当該エラー有りのプログラム命令が修正され
るまでは、前記シーケンスプログラムを格納するメモリ
から当該シーケンスプログラムを外部に転送することを
禁止するように制御することを特徴とする請求項1に記
載のシーケンスプログラムの修正方法。
3. When it is determined that there is an error in the determination, it is prohibited to transfer the sequence program from the memory storing the sequence program to the outside until the program command with the error is corrected. The method for correcting a sequence program according to claim 1, wherein the method is modified so that the sequence program is controlled.
JP4201544A 1992-07-28 1992-07-28 Error correction method for sequence program Pending JPH0651973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4201544A JPH0651973A (en) 1992-07-28 1992-07-28 Error correction method for sequence program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4201544A JPH0651973A (en) 1992-07-28 1992-07-28 Error correction method for sequence program

Publications (1)

Publication Number Publication Date
JPH0651973A true JPH0651973A (en) 1994-02-25

Family

ID=16442814

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4201544A Pending JPH0651973A (en) 1992-07-28 1992-07-28 Error correction method for sequence program

Country Status (1)

Country Link
JP (1) JPH0651973A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022084926A (en) * 2015-10-09 2022-06-07 フィッシャー-ローズマウント システムズ,インコーポレイテッド Dispersion type industrial performance monitoring and analyzing platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022084926A (en) * 2015-10-09 2022-06-07 フィッシャー-ローズマウント システムズ,インコーポレイテッド Dispersion type industrial performance monitoring and analyzing platform

Similar Documents

Publication Publication Date Title
JP3407809B2 (en) Automated test system for computer application software
EP0785510B1 (en) Program debugging system for debugging a program having a graphical user interface
JPH0651973A (en) Error correction method for sequence program
JP2003157104A (en) Programming device
JPS6175435A (en) Association system between syntax checker and text editor
JP2672968B2 (en) Source list output processing method for debugging
JPH09160611A (en) Programmable controller
JP2004021446A (en) Programmable controller system and programmable controller
JPH0887403A (en) Program development support device
JPH07253876A (en) Program generating device
JP3034527B2 (en) Editor device
JP2544822B2 (en) Information processing method and information processing apparatus
JPH05241813A (en) Automatic program addition correction system
JPH04148305A (en) Edited part confirming system
JPH11272500A (en) Debug method and debug device for the same and program storage medium
JPH0793146A (en) Program preparation supporting device
JPH06168110A (en) Program generating device
JPH08185315A (en) Security strengthened type program developing device
JPH0667925A (en) Programming device for programmable controller
JPH0659929A (en) Computer device
JP2000207243A (en) System and method of program development
JPS63228341A (en) Program syntax checking system
JPH0520001A (en) Device and method for user interface
JPS63292305A (en) Nc automatic programming device
JPH07253910A (en) Test execution assistance system for computer program