JPH0719170B2 - Method of debugging sequence program in programmable controller - Google Patents

Method of debugging sequence program in programmable controller

Info

Publication number
JPH0719170B2
JPH0719170B2 JP62270982A JP27098287A JPH0719170B2 JP H0719170 B2 JPH0719170 B2 JP H0719170B2 JP 62270982 A JP62270982 A JP 62270982A JP 27098287 A JP27098287 A JP 27098287A JP H0719170 B2 JPH0719170 B2 JP H0719170B2
Authority
JP
Japan
Prior art keywords
sequence program
input
programmable controller
execution
internal
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.)
Expired - Lifetime
Application number
JP62270982A
Other languages
Japanese (ja)
Other versions
JPH01112403A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP62270982A priority Critical patent/JPH0719170B2/en
Publication of JPH01112403A publication Critical patent/JPH01112403A/en
Publication of JPH0719170B2 publication Critical patent/JPH0719170B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Debugging And Monitoring (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、プログラマブルコントローラにおけるシー
ケンスプログラムのデバッグ方法に関するものである。
The present invention relates to a method for debugging a sequence program in a programmable controller.

〔従来の技術〕[Conventional technology]

第2図は例えば従来のプログラマブルコントローラにお
けるシーケンスプログラムのデバッグ方法が適用された
プログラマブルコントローラの制御系を示す構成図であ
り、図において、(1)はプログラマブルコントローラ
を動作させるたのシーケンスプログラム作成、入出力の
状態をモニタ、又プログラムに関係なく入出力を強制的
にON,OFFできる機能を有した周辺装置、(2)はシーケ
ンスプログラムに従って入出力を制御するCPU、(2a)
はCPU(2)の一部を構成する演算部、(3)はCPU
(2)からの入出力指令によって実際に制御対象をON,O
FFするI/Oユニット、(4)はI/Oユニット(3)に接続
される制御対象である。
FIG. 2 is a configuration diagram showing a control system of a programmable controller to which a conventional method for debugging a sequence program in a programmable controller is applied. In FIG. 2, (1) is a sequence program creation and input for operating the programmable controller. Peripheral device that has the function of monitoring the output status and forcibly turning the input and output on and off regardless of the program, (2) is the CPU that controls the input and output according to the sequence program, (2a)
Is a calculation unit that forms part of the CPU (2), and (3) is the CPU
The controlled object is actually turned on and off by the input / output command from (2).
An I / O unit that performs FF, (4) is a control target connected to the I / O unit (3).

次に動作について説明する。通常、最初にシーケンスプ
ログラムを作成した場合、プログラム中のバグを取るた
めにデバックを行う。このデバッグはI/Oユニット
(3)に制御対象(4)を接続して行う場合と接続しな
いで行う場合があるが、いきなり通常通りCPU(2)を
動作させても、プログラムのどの箇所が悪いのか判断が
できない。そこで、I/Oユニット(3)からの制御対象
の状態を検出する入力機器のオンオフ状態を示す信号、
例えば、入力信号を切っておき、CPU(2)を実行状態
にして周辺装置(1)からキー入力により模擬入力情
報、例えば、入力指令を与えてやることにより、順次出
力の状態を制御対象(4)の状態又はI/Oユニット
(3)の出力状態を示すLEDの状態などにより判断し、
プログラムをデバッグしていくという方法をとる。そし
てバグが発見された場合、プログラムを修正し、又最初
から順次入力指令を与えていくという上記方法をバグが
なくなるまでくり返す。
Next, the operation will be described. Normally, when you first create a sequence program, you debug it to remove bugs in the program. This debugging may be performed with or without connecting the control target (4) to the I / O unit (3), but even if the CPU (2) is suddenly operated normally, which part of the program is I can't judge if it's bad. Therefore, a signal from the I / O unit (3) indicating the on / off state of the input device that detects the state of the controlled object,
For example, the input signal is cut off, the CPU (2) is set to the execution state, and the simulated input information, for example, the input command is given by the key input from the peripheral device (1) to sequentially control the output state ( Judging by the state of 4) or the state of the LED that shows the output state of the I / O unit (3),
Take the method of debugging the program. When a bug is found, the program is modified and the above method of sequentially inputting commands from the beginning is repeated until the bug is eliminated.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従来のプログラマブルコントローラは以上の様に構成さ
れているので、プログラムのデバッグ時に一度プログラ
ムを修正する度に最初からデバッグの終了した箇所ま
で、入力指令を順に与えなおしてやらなければならず、
更に、制御対象(4)が大きくなり、シーケンスプログ
ラムの容量も大きくなってくると、この作業は大変に時
間がかかるという問題点があった。
Since the conventional programmable controller is configured as described above, it is necessary to re-input commands in order from the beginning to the end of debugging every time the program is modified when debugging the program.
Further, when the controlled object (4) becomes large and the capacity of the sequence program also becomes large, there is a problem that this work takes a very long time.

この発明は上記の様な問題点を解消するためになされた
もので、プログラムのデバッグ時に、プログラムを修正
した場合にも最初からキー入力を与えなおすというロス
をなくしデバッグ時間の短縮を図ることを目的とする。
The present invention has been made to solve the above problems, and when debugging a program, even if the program is modified, it is possible to eliminate the loss of re-keying from the beginning and shorten the debugging time. To aim.

また、この発明の別の目的は、上記目的に加えてキー入
力を与えなおしているときの入力指令の与えまちがいを
なくすことを目的とする。
Another object of the present invention is, in addition to the above object, to eliminate a mistake in giving an input command when a key input is given again.

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係るプログラマブルコントローラにおけるシ
ーケンスプログラムのデバッグ方法は、シーケンスプロ
グラムの実行を開始する第1段階と、 制御対象の状態を検出する入力機器のオンオフ状態を示
す模擬入力情報を操作者が周辺装置を介して入力する
と、模擬入力情報がプログラマブルコントローラのCPU
に入力され、内部の出力接点、内部接点、タイマーなど
の情報を有するステータス情報をこのステータス情報を
最新のものから所定数遡ったものまで記憶可能なステー
タス記憶メモリに記憶させる動作がバグが発見されない
場合に繰り返し実行される第2段階と、 第2段階でバグが発見されれば操作者がシーケンスプロ
グラムの実行を停止し、シーケンスプログラムの修正を
行うとともに、ステータス記憶メモリに記憶されている
所定数のステータス情報のうちのいずれかにもとづき内
部の出力接点、内部接点、タイマーなどが設定された
後、シーケンスプログラムの実行を再開し、第2段階に
戻る第3段階と、 を有するようにしたものである。
According to a method of debugging a sequence program in a programmable controller according to the present invention, an operator sets simulated input information indicating an on / off state of an input device for detecting a state of a controlled object to a peripheral device. When input via, simulated input information is the programmable controller CPU
No bugs are found in the operation of storing status information that has been input to the internal output contact, internal contact, timer, etc. in the status storage memory that can store this status information from the latest to a predetermined number of traces back. In this case, the second step is repeatedly executed, and if a bug is found in the second step, the operator stops the execution of the sequence program and corrects the sequence program, and a predetermined number stored in the status storage memory. After the internal output contact, internal contact, timer, etc. have been set based on any of the status information of 3), the execution of the sequence program is restarted and the 3rd step of returning to the 2nd step is provided. Is.

[作用] この発明におけるプログラマブルコントローラにおける
シーケンスプログラムのデバッグ方法は、第1段階でシ
ーケンスプログラムの実行を開始され、第2段階で入力
機器のオンオフ状態を示す模擬入力情報を操作者が周辺
装置を介して入力すると、模擬入力情報がプログラマブ
ルコントローラのCPUに入力され、内部の出力接点、内
部接点、タイマーなどの情報を有するステータス情報を
このステータス情報を最新のものから所定数遡ったもの
まで記憶可能なステータス記憶メモリに記憶させる動作
がバグが発見されない場合に繰り返し実行され、第2段
階でバグが発見されれば操作者がシーケンスプログラム
の実行を停止し、シーケンスプログラムの修正を行うと
ともに、ステータス記憶メモリに記憶されている所定数
のステータス情報のうちのいずれかにもとづき内部の出
力接点、内部接点、タイマーなどが設定された後、シー
ケンスプログラムの実行を再開し、再び第2段階に戻
る。
[Operation] In the debugging method of the sequence program in the programmable controller according to the present invention, the execution of the sequence program is started in the first step, and the operator inputs simulated input information indicating the on / off state of the input device via the peripheral device in the second step. Input, the simulated input information is input to the CPU of the programmable controller, and status information including information on internal output contacts, internal contacts, timers, etc. can be stored from the latest status information up to a predetermined number of times. The operation to be stored in the status storage memory is repeatedly executed when no bug is found. If a bug is found in the second stage, the operator stops the execution of the sequence program, corrects the sequence program, and stores the status storage memory. A predetermined number of stators stored in After the internal output contacts, internal contacts, timers, etc., have been set based on any of the information, the execution of the sequence program is restarted and the process returns to the second stage.

〔発明の実施例〕Example of Invention

以下、この発明の一実施例を図について説明する。第1
図において、従来例を示す第2図と同一の符号は同一部
分を示しているので説明は省略する。図において、(2
b)はCPU(2)内部の演算部(2a)とデータのやりとり
を行うステータス記憶メモリである。
An embodiment of the present invention will be described below with reference to the drawings. First
In the figure, the same reference numerals as those in FIG. 2 showing the conventional example indicate the same parts, and therefore the description thereof will be omitted. In the figure, (2
b) is a status storage memory for exchanging data with the operation unit (2a) inside the CPU (2).

次に動作について第3図により説明する。制御対象
(4)はI/Oユニット(3)に接続してもしなくてもよ
い。又、I/Oユニット(3)からの入力信号は切ってお
く。次にCPU(2)にシーケンスプログラムを書き込
み、このシーケンスプログラムを実行させる(ステップ
S01)。
Next, the operation will be described with reference to FIG. The controlled object (4) may or may not be connected to the I / O unit (3). Also, turn off the input signal from the I / O unit (3). Next, write the sequence program to the CPU (2) and execute this sequence program (step
S01).

操作者が周辺装置(1)よりCPU(2)に入力指令を順
次、キー入力により与えていく。この時、CPU(2)は
内部に設けられたステータス記憶メモリ(2b)に入力指
令が変わる度にステータス情報の全部、または、一部を
記憶していく(ステップS02)。なお、ステータス情報
は内部の出力接点、内部接点、タイマーなどの情報であ
る。入力指令が一つ与えられるごとに一ステップ進むと
すると、最後のステップから何ステップ前まで記憶する
かはメモリ容量を大きくすればするほど、多くのステッ
プを記憶できる。途中でシーケンスプログラムにバグを
発見した場合(ステップS03)は、入力指令を与えるこ
とをやめ、シーケンスプログラムの実行を停止させ、シ
ーケンスプログラムの修正を行う(ステップS04)。修
正が終ったら再度、シーケンスプロクラムの実行を行う
が、この時ステータスをインシャライズするか、ステー
タス記憶メモリ(2b)に記憶されているステータス情報
により示される状態から実行する(ステップS05)か
は、モード切換によって行う。モード切換の方法はここ
では問題ではない。なお、ステータス記憶メモリ(2b)
に記憶されているステータス情報により示される状態か
ら実行する場合は、このステータス情報にもとづき内部
の出力接点、内部接点、タイマーなどが設定された後シ
ーケンスプログラムの実行に入る。又、最終ステップよ
り前のステップから実行を開始したい場合は周辺装置
(1)より所定のキー入力を行うことで、ステータス記
憶メモリ(2b)に記憶されている範囲内のいずれか任意
のステップから開始することが可能である。なお、シー
ケンスプログラムの実行再開後は、ステップS02に戻
り、デバッグが終了するまでデバッグを継続することは
言うまでもない。制御対象(4)が接続されているとき
には、開始するステップに相当するように、あらかじめ
機械の動作をそこまで進めておけばよい。
The operator sequentially inputs input commands from the peripheral device (1) to the CPU (2) by key input. At this time, the CPU (2) stores all or part of the status information in the internal status storage memory (2b) each time the input command changes (step S02). The status information is information about the internal output contact, the internal contact, the timer, and the like. Assuming that one step is advanced each time one input command is given, the number of steps from the last step to be stored can be stored as the memory capacity is increased. If a bug is found in the sequence program on the way (step S03), the input command is stopped, the execution of the sequence program is stopped, and the sequence program is corrected (step S04). When the correction is completed, the sequence program is executed again. At this time, whether to initialize the status or to execute from the state indicated by the status information stored in the status storage memory (2b) (step S05) , Mode switching. The method of mode switching does not matter here. In addition, status storage memory (2b)
When executing from the state indicated by the status information stored in, the sequence program is started after the internal output contact, internal contact, timer, etc. are set based on this status information. Also, if you want to start execution from the step before the final step, you can enter a predetermined key from the peripheral device (1) to start from any step within the range stored in the status storage memory (2b). It is possible to start. Needless to say, after the execution of the sequence program is restarted, the process returns to step S02, and the debugging is continued until the debugging is completed. When the controlled object (4) is connected, the operation of the machine may be advanced in advance so as to correspond to the step to be started.

なお、上記実施例ではステータスの記憶場所がCPU
(2)内部になっているが、周辺装置(1)など、他の
要素に持たせても変わりがないことはいうまでもない。
In the above embodiment, the status storage location is the CPU
(2) Although it is internal, it goes without saying that it does not change even if it is provided to other elements such as the peripheral device (1).

〔発明の効果〕〔The invention's effect〕

以上のように、この発明によれば第1段階でシーケンス
プログラムの実行を開始され、第2段階で入力機器のオ
ンオフ状態を示す模擬入力情報を操作者が周辺装置を介
して入力すると、模擬入力情報がプログラマブルコント
ローラのCPUに入力され、内部の出力接点、内部接点、
タイマーなどの情報を有するステータス情報をこのステ
ータス情報を最新のものから所定数遡ったものまで記憶
可能なステータス記憶メモリに記憶させる動作がバグが
発見されない場合に繰り返し実行され、第2段階でバグ
が発見されれば操作者がシーケンスプログラムの実行を
停止し、シーケンスプログラムの修正を行うとともに、
ステータス記憶メモリに記憶されている所定数のステー
タス情報のうちのいずれかにもとづき内部の出力接点、
内部接点、タイマーなどが設定された後、シーケンスプ
ログラムの実行を再開し、再び第2段階に戻るようにし
たので、シーケンスプログラムを修正する度に同じ入力
指令を始めから入力するという手間が省けるとともに、
停止させたステップから所定数ステップ遡ったステップ
までのいずれかのステップからシケンスプログラムの実
行を再開でき、デバッグの効率を向上できる効果があ
る。
As described above, according to the present invention, when the execution of the sequence program is started in the first step and the operator inputs the simulated input information indicating the on / off state of the input device through the peripheral device, the simulated input is performed. Information is input to the CPU of the programmable controller, and internal output contact, internal contact,
The operation of storing the status information having information such as a timer in the status storage memory capable of storing the status information from the latest one to a predetermined number of traces is repeatedly executed when no bug is found. If found, the operator stops the execution of the sequence program, corrects the sequence program,
An internal output contact based on any of the predetermined number of status information stored in the status storage memory,
After setting the internal contacts, timer, etc., the execution of the sequence program is restarted and the process is returned to the second stage again, so that it is possible to save the trouble of inputting the same input command from the beginning each time the sequence program is modified. ,
Execution of the sequence program can be resumed from any step from the stopped step to the step that is traced back by a predetermined number of steps, and the efficiency of debugging can be improved.

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

第1図はこの発明の一実施例によるプログラマブルコン
トローラにおけるシーケンスプログラムのデバッグ方法
が適用されたプログラマブルコントローラを示す制御系
の構成図、第2図は従来の制御系の構成図、第3図はこ
の発明の一実施例によるプログラマブルコントローラに
おけるシーケンスプログラムのデバッグ方法を示すフロ
ー図である。 図において、(2b)はステータス記憶メモリである。 なお、図中、同一符号は同一、又は相当部分を示す。
FIG. 1 is a block diagram of a control system showing a programmable controller to which a method for debugging a sequence program in a programmable controller according to an embodiment of the present invention is applied, FIG. 2 is a block diagram of a conventional control system, and FIG. It is a flow figure showing the debugging method of the sequence program in the programmable controller by one example of the invention. In the figure, (2b) is a status storage memory. In the drawings, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】シーケンスプログラムの実行を開始する第
1段階と、 制御対象の状態を検出する入力機器のオンオフ状態を示
す模擬入力情報を操作者が周辺装置を介して入力する
と、上記模擬入力情報がプログラマブルコントローラの
CPUに入力され、内部の出力接点、内部接点、タイマー
などの情報を有するステータス情報をこのステータス情
報を最新のものから所定数遡ったものまで記憶可能なス
テータス記憶メモリに記憶させる動作がバグが発見され
ない場合に繰り返し実行される第2段階と、 上記第2段階でバグが発見されれば操作者が上記シーケ
ンスプログラムの実行を停止し、シーケンスプログラム
の修正を行うとともに、上記ステータス記憶メモリに記
憶されている所定数の上記ステータス情報のうちのいず
れかにもとづき上記内部の出力接点、内部接点、タイマ
ーなどが設定された後、上記シーケンスプログラムの実
行を再開し、上記第2段階に戻る第3段階と、 を有することを特徴とするプログラマブルコントローラ
におけるシーケンスプログラムのデバッグ方法。
1. A first step of starting execution of a sequence program, and when the operator inputs simulated input information indicating an on / off state of an input device for detecting a state of a controlled object through a peripheral device, the simulated input information. Of the programmable controller
A bug was found in the operation of storing status information that has been input to the CPU and has information such as internal output contacts, internal contacts, timers, etc. If not, the operator stops the execution of the sequence program and corrects the sequence program if a bug is found in the second step, and it is stored in the status storage memory. After the internal output contact, the internal contact, the timer, etc. are set based on any one of the predetermined number of status information, the execution of the sequence program is restarted and the process returns to the second stage. And a sequence program device in a programmable controller characterized by having Grayed way.
JP62270982A 1987-10-27 1987-10-27 Method of debugging sequence program in programmable controller Expired - Lifetime JPH0719170B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62270982A JPH0719170B2 (en) 1987-10-27 1987-10-27 Method of debugging sequence program in programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62270982A JPH0719170B2 (en) 1987-10-27 1987-10-27 Method of debugging sequence program in programmable controller

Publications (2)

Publication Number Publication Date
JPH01112403A JPH01112403A (en) 1989-05-01
JPH0719170B2 true JPH0719170B2 (en) 1995-03-06

Family

ID=17493743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62270982A Expired - Lifetime JPH0719170B2 (en) 1987-10-27 1987-10-27 Method of debugging sequence program in programmable controller

Country Status (1)

Country Link
JP (1) JPH0719170B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56147205A (en) * 1980-04-15 1981-11-16 Mitsubishi Electric Corp Software automatic testing system of programmable controller
JPS57147763A (en) * 1981-03-07 1982-09-11 Fujitsu Ltd Evacuation restoring system of test program
JPS59208607A (en) * 1983-05-12 1984-11-27 Toshiba Corp Simple simulator for debugging
JP2754528B2 (en) * 1984-08-28 1998-05-20 沖電気工業株式会社 Debug mode switching processing method

Also Published As

Publication number Publication date
JPH01112403A (en) 1989-05-01

Similar Documents

Publication Publication Date Title
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
JPH0213321B2 (en)
JP2000066963A (en) Device for diagnosing memory for microcomputer
JPH0719170B2 (en) Method of debugging sequence program in programmable controller
JP4131078B2 (en) Robot controller
JP2581019B2 (en) How to debug sequence programs
JPS59114602A (en) Programmable controller
JPH11242509A (en) Programmable logic controller
JP3460747B2 (en) Numerical control unit
JP6823027B2 (en) Numerical control device
JPS60243747A (en) Reraising method of system program
JPS6211920A (en) Command recovery system
JPS6120900B2 (en)
JPH07152416A (en) Numerical controller having program restarting function
JPS58158747A (en) Programable controller
JPH06195210A (en) Program exchange system
JP2862151B2 (en) Programmable controller
JP3013619B2 (en) Programmable controller
JP3384141B2 (en) Programmable controller and programmable controller maintenance device
JPH05282175A (en) Program debugger
JPS61156339A (en) Trace processing system
JPS61235955A (en) Program debugging system
JPH04152435A (en) Maintenance diagnostic system
JPH0433005A (en) Fa controller
JPH11282513A (en) Servo system controller