JP3413860B2 - Debug method - Google Patents

Debug method

Info

Publication number
JP3413860B2
JP3413860B2 JP00057093A JP57093A JP3413860B2 JP 3413860 B2 JP3413860 B2 JP 3413860B2 JP 00057093 A JP00057093 A JP 00057093A JP 57093 A JP57093 A JP 57093A JP 3413860 B2 JP3413860 B2 JP 3413860B2
Authority
JP
Japan
Prior art keywords
transition
program
execution instruction
relay
sfc
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 - Fee Related
Application number
JP00057093A
Other languages
Japanese (ja)
Other versions
JPH06202718A (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 JP00057093A priority Critical patent/JP3413860B2/en
Publication of JPH06202718A publication Critical patent/JPH06202718A/en
Application granted granted Critical
Publication of JP3413860B2 publication Critical patent/JP3413860B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【産業上の利用分野】本発明は、シーケンシャル・ファ
ンクション・チャート(SFC:SequencialFunction C
hart )でプログラミングされたプログラムのデバッグ
方式に関する。
BACKGROUND OF THE INVENTION The present invention relates to a sequential function chart (SFC).
hart) about the debugging method of the program programmed by.

【従来の技術】プログラム・コントローラ(以後、PC
と表現する)は、マイクロコンピュータを内蔵すること
により、制御手順のプログラムを容易に変えられるよう
にしたシーケンサであり、現在では、産業用ロボットな
ど、各種自動化機器の作業手順を決める心臓部品として
盛んに使用されるようになっている。従来のこのPCの
プログラミング言語は、図(b)に示すような複数の
キーを備えたキーボードを用いて入力を行う同図(a)
に示すようなラダー図が主流であったが、このラダー図
入力では、制御の順序が表現できないことや、PCによ
り実際に実行されるプログラムを解読することが困難で
あった。このため、それらの弱点を補う新たなプログラ
ミング言語としてSFC(シーケンシャル・ファンクシ
ョン・チャート)が提案され、このSFCが、今後のP
Cのプログラミング言語の主流になるものと予想されて
いる。図に、SFCの一構成例を示す。SFCでは、
一制御単位をステップと定義する。このプロセスは、同
図(a),(b)に示すように、各工程の動作処理の段
階を示す任意の個数のステップ(S00,S01,S0
2,S03,S04),(S10,S11,S12,S
13,S14)と、上記各ステップ実行後に続いて実行
されるステップを決定するための移行条件を示すトラン
ジション(TR00,TR01,TR02,TR0
3),(TR10,TR11,TR12,TR13)と
から構成される。SFCにおいては、各プロセスの最初
のステップ(S00,S10)は、イニシャルステップ
と呼ばれ、このイニシャルステップ以降の各ステップ
(S01,S02,S03)の後には、最後のステップ
(S04)を除いて、必ずトランジション(TR00,
TR01,TR02,TR03)が配置される。同図
(a),(b)に示すSFCは単一移行型のものである
が、SFCはその他に図(a),(b)にそれぞれ示
す選択分岐移行型や、並列分岐移行型もある。尚、上記
及び図において、各ステップを単に矩形で表して
いるが、実際のプログラミング時においては、各ステッ
プを表す矩形内には対応するシーケンス回路を示すラダ
ー図を入力する。
2. Description of the Related Art Program controller (hereinafter PC
Is a sequencer in which the control procedure program can be easily changed by incorporating a microcomputer. Currently, it is widely used as a heart part that determines the work procedure of various automation equipment such as industrial robots. Is being used for. Conventional programming language for this PC, the drawing performing input using a keyboard having a plurality of keys as shown in FIG. 7 (b) (a)
Although the ladder diagram as shown in FIG. 2 is the mainstream, it is difficult to express the control sequence with this ladder diagram input, and it is difficult to decipher the program actually executed by the PC. For this reason, SFC (Sequential Function Chart) has been proposed as a new programming language for compensating for those weak points, and this SFC is the future P
It is expected to become the mainstream C programming language. FIG. 8 shows a configuration example of the SFC. In SFC,
One control unit is defined as a step. This process is performed by an arbitrary number of steps (S00, S01, S0) indicating the stage of the operation process of each process, as shown in FIGS.
2, S03, S04), (S10, S11, S12, S
13, S14) and transitions (TR00, TR01, TR02, TR0) indicating transition conditions for determining the step to be executed subsequently after the execution of each of the above steps.
3) and (TR10, TR11, TR12, TR13). In SFC, the first step (S00, S10) of each process is called an initial step, and after each step (S01, S02, S03) after this initial step, except the last step (S04). , Be sure to make a transition (TR00,
(TR01, TR02, TR03) are arranged. FIG (a), but SFC shown in (b) is of the single transition type, SFC Other FIG 9 (a), (b) in or selected branch migration type respectively, also parallel branches transitional is there. Although each step is simply represented by a rectangle in FIGS. 8 and 9 , the ladder diagram showing the corresponding sequence circuit is input in the rectangle representing each step during actual programming.

【発明が解決しようとする課題】ところで、従来、主流
であったラダー図入力によるプログラミングにおいて
は、プログラミング装置にラダー図を入力すると、その
ラダー図が装置内で自動的にシーケンス制御命令語で記
述されたニーモニック形式のアプリケーションプログラ
ムに変換され、このアプリケーションプログラムのリス
トはプリンタを介して出力できるようになっている。従
来、このアプリケーションプログラムのデバッグは、デ
バッグ機能を備えたプログラミング装置を用いて行って
いた。すなわち、上記プログラミング装置からターゲッ
トPCへ上記アプリケーションプログラムをロードさ
せ、このターゲットPCをシミュレーションボックスま
たは実際の開発システムの入出力機器に接続する。そし
てプログラミング装置からの操作により、上記アプリケ
ーションプログラムをある範囲内で部分的に実行させた
り、あるいは一命令づつ実行させるトレース操作などを
行ってプログラムミスを発見するようにしていた。しか
しながら、SFCで作成したアプリケーションプログラ
ムの場合、上述したようなラダー図入力により作成した
アプリケーションプログラムのような方法で、デバッグ
を行うことはできなかった。このため、デバッグに要す
る時間が長くなり、アプリケーションプログラムの開発
効率が悪かった。本発明はSFCで作成したプログラム
のデバッグを、簡単な構成で効率良く行えるようにする
ことを目的とする。
In programming by ladder diagram input, which has been the mainstream in the past, when a ladder diagram is input to a programming device, the ladder diagram is automatically described in the device by sequence control command words. The converted application program is converted into a mnemonic format, and the list of this application program can be output through the printer. Conventionally, debugging of this application program has been performed using a programming device having a debug function. That is, the application program is loaded from the programming device to the target PC, and the target PC is connected to the simulation box or the input / output device of the actual development system. Then, by the operation from the programming device, the above-mentioned application program is partially executed within a certain range, or a trace operation for executing it one instruction at a time is performed to find a program error. However, in the case of the application program created by SFC, it was not possible to perform debugging by the method like the application program created by the ladder diagram input as described above. For this reason, the time required for debugging becomes long and the development efficiency of the application program is poor. It is an object of the present invention to efficiently debug a program created by SFC with a simple structure.

【課題を解決するための手段】図1は、第1の発明の原
理ブロック図である。この第1の発明は、少なくとも一
つのトランジションと少なくとも一つのステップを含む
シーケンシャル・ファンクション・チャートにより記述
されるプロセスを複数有するプログラムをデバッグする
デバッグ方式であって、前記プロセスの各トランジショ
ンのプログラム及び各ステップのプログラムを格納する
記憶手段6と、前記プロセスをステップ実行するか否か
を指示する情報であるステップ実行指示情報を格納する
ステップ実行指示情報格納手段7と、前記プロセスの各
トランジションのオン/オフ状態を記憶するフラグであ
るトランジションリレーを格納するトランジションリレ
ー格納手段8と、前記ステップ実行指示情報によりステ
ップ実行の指示がなされている場合にはトランジション
のプログラムを実行せずに該トランジションに対応する
トランジションリレーを参照し、対応するトランジショ
ンリレーがオンとなっているステップへの移行を行い、
オンとなっているステップのプログラムのみを実行する
制御手段9と、を備えたことを特徴とする。 図2は、第
2の発明の原理ブロック図である。 この第2の発明は、
少なくとも一つのトランジションと少なくとも一つのス
テップを含むシーケンシャル・ファンクション・チャー
トにより記述されるプロセスを複数有するプログラムを
デバッグするデバッグ方式であって、前記複数のプロセ
スの中からデバッグ対象となるプロセスを指定する実行
プロセス指定手段11と、シーケンシャル・ファンクシ
ョン・チャートの各トランジションのプログラム及び各
ステップのプログラムを格納する記憶手段14と、前記
プロセスをステップ実行するか否かを指示する情報であ
るステップ実行指示情報を格納するステップ実行指示情
報格納手段12と、前記プロセスの各トランジションの
オン/オフ状態を記憶するフラグであるトランジション
リレーを格納するトランジションリレー格納手段13
と、前記プロセス指定手段11によって指定されたプロ
セスを実行する際、前記ステップ実行指示情報によりス
テップ 実行の指示がなされている場合トランジションの
プログラムを実行せずに該トランジションに対応するト
ランジションリレーを参照し、対応するトランジション
リレーがオンとなっているステップへの移行を行い、オ
ンとなっているステップのプログラムのみを実行する制
御手段15と、を備えることを特徴とする。
FIG. 1 is a block diagram showing the principle of the first invention. At least one of the first invention is
Includes one transition and at least one step
Described by sequential function chart
A program with multiple processes
A debug method, where each transition of the process is
Store the program for each step and the program for each step
Storage means 6 and whether to execute the process step by step
Storing step execution instruction information, which is information that instructs
Step execution instruction information storage means 7 and each of the above processes
This is a flag that stores the on / off state of the transition.
Transition relay that stores the transition relay
-The storage means 8 and the step execution instruction information
Transitions if there is an instruction to execute
Support the transition without executing the program
Refer to the transition relay and select the corresponding transition.
Switch to the step where the relay is on,
Execute only the program of the step that is on
The control means 9 is provided. Figure 2
It is a principle block diagram of invention of 2. This second invention is
At least one transition and at least one transition
Sequential function char including steps
A program with multiple processes described by
A debugging method for debugging, wherein the plurality of processes
Execution that specifies the process to be debugged from the
Process designation means 11 and sequential funk
Program of each transition of each chart
A storage means 14 for storing a step program, and
Information that indicates whether to step through the process
Step execution instruction information that stores the step execution instruction information
Information storage means 12 and each transition of the process
A transition that is a flag that stores the on / off state
Transition relay storage means 13 for storing relays
And the process designated by the process designation means 11.
When executing a process, the step execution instruction information
If the instruction to execute the step is given, the transition
The program that supports the transition without executing the program
Refer to the transition relay and the corresponding transition
Move to the step where the relay is on, and
Control to execute only the program of the step
The control means 15 is provided.

【作用】SFCにより記述されたプログラム(SFCプ
ログラム)は、1つのプロセスに対応しており、このプ
ロセスは、各工程毎の制御の動作状態を表すステップ
と、あるステップから次のステップへの移行条件(遷移
条件)を示すトランジョンとから構成されている(前記
及び図参照)。このSFCプログラムは、プログ
ラミング装置を介して入力され、プログラミング装置
は、各プロセスを、トランジションのプログラムとステ
ップのプログラムとに個々に分離させて、その内容をP
Cのプログラムメモリに転送・格納する(図参照)。
PCにおいては、1つのプログラムは、通常、複数のプ
ロセスから構成される。前記第1の発明においては、制
御手段9はステップ実行指示情報によりステップ実行の
指示がなされている場合にはトランジションのプログラ
ムを実行せずに該トランジションに対応するトランジシ
ョンリレーを参照し、対応するトランジションリレーが
オンとなっているステップへ移行し、オンとなっている
ステップのプログラムのみを実行する。 したがって、S
FCプログラムの開発者は、ステップ実行指示情報を設
定することにより任意のトランジションの実行を阻止す
ることができ、該トランジションに対応するトランジシ
ョンリレーを設定することにより、デバッグ対象プロセ
スを自己が意図するステップ・シーケンスで実行できる
と共に、自己がデバッグしたいステップのみを選択的に
実行させながらデバッグできる。 さらに、前記第2の発
明においては、制御手段15は、プロセス指定手段11
によって指定されたプロセスを実行する際、前記ステッ
プ実行指示情報によりステップ実行の指示がなされてい
る場合トランジションのプログラムを実行せずに該トラ
ンジションに対応するトランジションリレーを参照し、
対応するトランジ ションリレーがオンとなっているステ
ップへ移行し、オンとなっているステップのプログラム
のみを実行する。 実行プロセス指定手段11によりデバ
ッグ対象となるプロセスを指定し、ステップ移行条件手
段12により上記デバッグ対象プロセスのステップの移
行条件を設定すると、プロセス実行手段13は上記デバ
ッグ対象プロセスのみを選択的に実行させると共に、そ
のデバッグ対象プロセスを上記設定されたステップ移行
の条件にしたがったステップ・シーケンスで実行させ
る。 したがって、SFCプログラムの開発者は、複数の
プロセスから構成されるプログラムをデバッグする際、
デバッグしたいプロセスのみを選択的に実行でき、かつ
そのプロセスを構成するステップの中から、デバッグし
たいステップのみを自分の意図するステップ・シーケン
スで実行させながらデバッグすることができる。
A program written in SFC (SFC program) corresponds to one process, and this process includes a step showing the operating state of control for each process and a transition from one step to the next step. And a transition showing a condition (transition condition) (see FIGS. 8 and 9 ). This SFC program is input through the programming device, and the programming device separates each process into a transition program and a step program, and the contents thereof are set to P
It is transferred and stored in the program memory of C (see FIG. 4 ).
In PC, one program is usually composed of a plurality of processes. In the first invention, the control is
The control means 9 executes the step execution according to the step execution instruction information.
Transition program if instructed
The transition that corresponds to the transition without executing
The corresponding transition relay is
Moved to the step that is on and is on
Execute only the program of the step. Therefore, S
The FC program developer sets the step execution instruction information.
To prevent execution of any transition
The transition corresponding to the transition.
You can set the target relay to
Can be executed in the sequence of steps that it intends
Also, selectively select only the steps that you want to debug
You can debug while running. In addition, the second
In the clear, the control means 15 is the process designation means 11
When executing the process specified by
The step execution instruction is given by the execution instruction information.
If the transition program is executed without executing the transition program,
Refer to the transition relay corresponding to the transition,
Stearyl the corresponding Transition relay is turned on
Program of the step that has been turned on and turned on
Only run. The execution process designation means 11
Specify the process to be targeted and perform the step transition condition procedure.
The step 12 shifts the steps of the debug target process.
When the line condition is set, the process execution means 13 causes the device
Only the target process is executed.
Move the debug target process to the step set above
In a step sequence according to the conditions
It Therefore, SFC program developers
When debugging a program consisting of processes,
You can selectively execute only the process you want to debug, and
Debug from the steps that make up the process
Only the steps you want to do
You can debug it while running it on your computer.

【実施例】以下、本発明の実施例を図面を参照しながら
説明する。図は、本発明の一実施例のデバッグ方式に
よりSFCプログラムのデバッグを行うシステムの構成
図である。同図において、プログラミング装置21は、
SFC記述によりアプリケーションプログラムの作成を
行う装置であり、SFC入力用のキーボード21−1
と、このキーボード21−1から入力されるSFCを表
示する表示部21−2を備えている。そして、さらに、
この装置21は、SFC記述を後述する所定形式のSF
Cプログラムに翻訳する機能とそのSFCプログラムを
プログラマブル・コントローラ(以下、PCと記述す
る)22のプログラムメモリに転送する機能を備えてい
る。また、シミュレーション・ボックス23は、実際の
稼働システムにおいてPC22に接続される入出力機器
の動作を模擬的に実現させるための装置であり、実際の
入力器からの入力信号をPC22に入力させるための複
数のスナップスイッチ23−1,及びPC22に対する
入出力信号の状態を表示する複数の表示部(ランプボッ
クス)23−2を備えている。上記プログラミング装置
21において、キーボード21−1からのキー入力によ
り作成したSFC(前記図及び図参照)は、図
示すような形式のプロセスに変換されて、PC22のプ
ログラムメモリにロードされる。複数のSFCで表現さ
れる1つのアプリケーションプログラムは、プロセス単
位(1つのSFCに対応)に分割されて格納される。各
プロセス(プロセスA,プロセスB,・・・)は、プロ
セスの開始を宣言するプロセス開始命令101から始ま
って、プロセスの終了を宣言するプロセス終了命令10
4で終了するようになっている。そして、このプロセス
開始命令101とプロセス終了命令104の間には、S
FCの各ステップにおける次のステップへの移行条件を
示すトランジション部(TR00,TR01,・・・)
のプログラム102と、各ステップ(S00,S01,
・・・)のプログラムの集合体であるステップ部のプロ
グラム103が配置される。また、本実施例において
は、図に示すように、PC22内のデータメモリ22
0内に、アプリケーションプログラムをデバッグするた
めの情報であるプロセス指定実行指示情報及びステップ
実行指示情報を、それぞれ格納するプロセス指定実行指
示情報格納領域221及びステップ実行指示情報格納領
域222が割り付けられる。上記プロセス指定実行指示
情報は、アプリケーションプログラムを構成している複
数のプロセスの中からデバッグ時に実行すべきデバッグ
対象の1つのプロセスを直接指定するものであり、本実
施例においてはこの情報において実行プロセスの指定が
無い場合には、アプリケーションプログラムを構成する
全プロセスを所定の順番で実行させる。また、ステップ
実行指示情報は、デバッグ時においてアプリケーション
プログラムを実行する際に、トランジション部のプログ
ラムを実行すべきか否か(ステップ実行を行うか否か)
を指示する情報であり、本実施例においてはステップ実
行の指示が有った場合には、トランジション部のプログ
ラムは実行せずに、直ちに当該ステップ部のプログラム
の実行に移行する。そして、この場合には、上記当該ス
テップ部のプログラムは、オペレータがプログラミング
装置21を介して設定した該当するトランジションリレ
ーのオン/オフ状態に従ってステップの移行を行う。ト
ランジションリレーは、プロセスの各トランジションに
1対1に対応して設けられたフラグであり、対応するト
ランジションのプログラムの実行結果を記憶する。この
トランジションリレーは、オンまたはオフの2値の状態
をとり、このトランジションリレーがオンのときには、
当該SFCにおいて次に続くステップへの移行が行なわ
、オフのときにはその次に続くステップへの移行は行
なわれない。これらのトランジションリレーを格納する
領域(トランジションリレー格納領域)223も、PC
22のデータメモリ220内に確保される。尚、このデ
ータメモリ220は、PC22のプログラムメモリにロ
ードされて実行されるアプリケーションプログラム並び
にプログラミング装置20からアクセス可能となってい
る。次に、上記構成の実施例の動作を説明する。複数の
SFC記述により得られた前記図に示す構成のアプリ
ケーションプログラムの実行では、まず、プロセスAの
トランジション部のプログラム102が実行され、その
実行結果がデータメモリ220内のトランジションリレ
ー格納領域223に設定される。続いて、プロセスAの
ステップ部のプログラム103が実行されるが、この実
行においては、上記トランジションリレー格納領域22
3内の対応するトランジションリレーのオン/ オフ状態
によりステップへの移行が行なわれるかどうかが決ま
り、この結果オン(ON)となっているステップのプロ
グラムのみが実行される。本実施例では、プログラム開
発者は、アプリケーションプログラムを構成する複数の
プロセスの内、ある特定のプロセスのみを単独でデバッ
グすることができる。この場合には、プログラミング装
置21から、キーボード21−1のキー入力を行ってデ
バッグしようとする1つのプロセスを指定し、この指定
プロセスを示す情報をPC22のデータメモリ220内
のプロセス指定実行指示情報格納領域221にロードす
る。また、上記指定プロセスにおいて、特定のステップ
のプログラムのみを実行させることも可能である。この
場合にも、プログラミング装置21からキーボード21
−1のキー入力を行って、上記指定プロセスを構成する
複数のステップの中からデバッグ対象とするステップを
選択する。この選択は、データメモリ220内のデバッ
グ対象となるステップに移行するためのトランジション
リレーをオン(ON)に設定することにより行う。次
に、図のフローチャートを参照しながら、PC22内
のマイクロプロセッサにより行われるSFCプログラム
の実行処理を説明する。プログラミング装置21のキー
ボード21−1から、PC22のプログラムメモリ10
0に格納されているSFCプログラムの実行指示の入力
を行うと、まず、データメモリ220のプロセス指定実
行指示情報格納領域221からプロセス指定実行指示情
報を読み出し、プロセス指定の実行指示が有るか否か判
別する(S11)。そして、その指示が有れば(S1
1,Yes)、プログラムメモリ100内の上記指示情
報により指定されているプロセスの格納領域の先頭アド
レスへジャンプする(S12)。続いて、データメモリ
220のステップ実行指示情報格納領域222からステ
ップ実行指示情報を読み出し、ステップ実行の指示がな
されているか否か判別する(S13)。そして、ステッ
プ実行の指示がなされていれば(S13,Yes)、デ
ータメモリ220内のトランジションリレー格納領域2
23から各ステップの移行を決定するトランジションリ
レーを読み出し、対応するトランジションリレーがオン
(ON)となることで移行が行なわれ、オン( ON)と
なっているステップのプログラムのみをプログラムメモ
リ100のステップ部のプログラム格納領域103から
読み出して実行する(S15)。そして、上記指定プロ
セスの実行が終了すると、上記ステップS11の処理と
同様にして、プロセス指定実行の指示が有るか否か判別
し(S16)、プロセス指定実行の指示が有れば(S1
6,Yes)、直ちに処理を終了する。このように、プ
ログラム開発者は、プログラミング装置21のキーボー
ド21−1でのキー操作により、PC22のデータメモ
リ220内の領域221,222へそれぞれ、デバッグ
を所望するプロセスの実行指示とステップ実行指示の各
情報を設定し、さらにデータメモリ220内のトランジ
ションリレー格納領域223へ所望するステップのプロ
グラムのみが実行されるように各トランジションリレー
のオン/オフ(ON/OFF)を設定することにより、
SFC記述により得られるアプリケーションプログラム
について、ある特定のプロセスのみをステップ単位でデ
バッグできる。この場合、各ステップのプログラムの動
作の確認は、シミュレーションボックス23上の表示装
置23−2で確認できる。一方、上記ステップS13
で、ステップ実行の指示が無ければ(S13,No)、
プログラムメモリ100の領域102からトランジショ
ン部のプログラムを読み出して実行する(S14)。そ
して、次に、上記トランジション部のプログラム実行に
より得られた、トランジションリレーのステイタス(オ
ン/オフ状態)をデータメモリ220の領域223から
読み出し、対応するトランジションリレーがオンとなっ
ているステップのみ移行が行なわれ、オンとなっている
ステップのプログラムのみを実行する(S15)。この
ように、ステップ実行の指示を行わない場合には、シミ
ュレーションボックス23のスナップスイッチ23−1
の操作によりPC22に対して入力信号を与える。そし
て、実行プロセスの指定のみを行い、ステップ実行の指
示は行わないことにより、あるプロセスのみを個別にデ
バッグすることができる。また、上記ステップS11で
プロセス指定実行の指示が無ければ(S11,No)、
次に上記ステップS13に移りステップ実行指示の有無
を判別し、その判別結果に基づいて、上記ステップS1
3→S15→S16または上記ステップS13→S14
→S15→S16の処理を、SFCプログラムの最初の
プロセスAに対して行う。そして、上記ステップS16
でプロセス指定実行指示が無いと判別した後(S16,
No)、SFCプログラムの全プロセスについて、上記
ステップS13〜S15の処理(当該処理)が終了した
か否かを判別する(S17)。そして、まだ、全プロセ
スについて上記当該処理が終了していなければ、再び上
記ステップS13に戻り、次のプロセスBについて、上
記ステップS13〜S15の処理を行う。このような処
理は、上記ステップS17で、SFCプログラムの全プ
ロセスについて上記ステップS13〜S15の処理が終
了したと判別されるまで繰り返す。そして、SFCプロ
グラムの全プロセスについて、上記当該処理が終了した
と判別すると(S17,Yes)、処理を終了する。こ
のように、プロセス指定実行が指示されない場合には、
SFCプログラムの全プロセスについて上記ステップS
13〜S16の処理が、実行順に行われる。この場合、
ステップ実行指示を行うことにより、シミュレーション
ボックス23のスナップスイッチ23−1のキー操作に
よりトランジションリレーの値を設定して、各プロセス
について、所望するステップのプログラムのみを実行さ
せることも可能であり、また、ステップ実行指示を行わ
ないで、実際にトランジション部のプログラムを実行さ
せ、その実行結果により対応するトランジションリレー
がオンに設定されたステップへの移行を行い、オンとな
っているステップのプログラムのみを実行させることも
できる。したがって、プロセス指定実行の指示を行わな
い場合には、ステップ実行の指示を使い分けることによ
り、例えば、デバッグの初期段階では前者のようにステ
ップ実行指示を行なって、一方デバッグの後期段階では
後者のようにステップ実行指示を行なわないで、SFC
プログラムを実行させることにより、デバッグを効率良
く行うこともできる。このように、本実施例では、プロ
グラミング装置21により、PC22のデータメモリ2
20のトランジションリレー格納領域223、プロセス
指定実行指示情報格納領域221、及びステップ実行指
示情報格納領域222に、それぞれの当該情報を設定す
るだけで、アプリケーションプログラムを、プロセス単
位でデバッグすることができると共に、各プロセスを所
望するステップ・シーケンスで実行させながらデバッグ
することもできる。また、プロセス指定実行とステップ
実行指示を共に行わない場合には、SFCプログラムを
実際の稼働時と同様に実行させることができる。尚、上
記実施例では、デバッグ対象となるプロセス1個のみ指
定するようにしているが、複数のプロセスを指定できる
ようにしてもよい。さらに、上記実施例では、シミュレ
ーションボックス23によりPCへの信号入力及びPC
の出力信号の表示を行うようにしているが、シミュレー
ションボックス23の代わりにシステムを実際に稼働さ
せる際に使用する入出力機器をPC21に接続するよう
にしてもよい。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 3 is a block diagram of a system for debugging an SFC program by the debugging method according to the embodiment of the present invention. In the figure, the programming device 21 is
A device that creates an application program by SFC description, and is a keyboard 21-1 for SFC input.
And a display unit 21-2 for displaying the SFC input from the keyboard 21-1. And further,
This device 21 uses an SF of a predetermined format whose SFC description will be described later.
It has a function of translating into a C program and a function of transferring the SFC program to a program memory of a programmable controller (hereinafter referred to as PC) 22. The simulation box 23 is a device for simulating the operation of the input / output device connected to the PC 22 in the actual operating system, and is used for inputting the input signal from the actual input device to the PC 22. It is provided with a plurality of snap switches 23-1 and a plurality of display units (lamp boxes) 23-2 for displaying the states of input / output signals for the PC 22. In the programming device 21, the SFC created by key input from the keyboard 21-1 (see FIGS. 8 and 9 ) is converted into a process of the format shown in FIG. 4 and loaded into the program memory of the PC 22. It One application program represented by a plurality of SFCs is divided and stored in process units (corresponding to one SFC). Each process (process A, process B, ...) Begins with a process start instruction 101 that declares the start of a process, and ends the process 10 that declares the end of the process.
It ends in 4. Then, between the process start instruction 101 and the process end instruction 104, S
Transition section (TR00, TR01, ...) showing the transition condition to the next step in each step of FC
Program 102 and each step (S00, S01,
The program 103 of the step section, which is a collection of programs of (...), is arranged. Further, in the present embodiment, as shown in FIG. 5 , the data memory 22 in the PC 22 is
A process specification execution instruction information storage area 221 and a step execution instruction information storage area 222 for storing process specification execution instruction information and step execution instruction information, which are information for debugging an application program, are allocated in 0. The process specification execution instruction information directly specifies one process to be debugged to be executed at the time of debugging from among a plurality of processes constituting the application program, and in this embodiment, the execution process is specified in this information. If is not specified, all processes constituting the application program are executed in a predetermined order. In addition, the step execution instruction information indicates whether to execute the program of the transition part when executing the application program during debugging (whether to execute the step execution).
If there is a step execution instruction in this embodiment, the program of the transition section is not executed, and the program of the step section is immediately executed. Then, in this case, the program of the step section performs the step transition according to the ON / OFF state of the corresponding transition relay set by the operator via the programming device 21. The transition relay is a flag provided in a one-to-one correspondence with each transition of the process, and stores the execution result of the program of the corresponding transition. This transition relay takes a binary state of on or off, and when this transition relay is on,
Transition to the next step is performed in the SFC
If it is turned off , the transition to the next step is not performed.
I can't be damned. The area for storing these transition relays (transition relay storage area) 223 is also a PC
Reserved in the data memory 220 of 22. The data memory 220 can be accessed from the application device and the programming device 20 which are loaded into the program memory of the PC 22 and executed. Next, the operation of the embodiment having the above configuration will be described. In the execution of the application program having the configuration shown in FIG. 4 obtained by a plurality of SFC descriptions, first, the program 102 of the transition part of the process A is executed, and the execution result is stored in the transition relay storage area 223 in the data memory 220. Is set. Then, the program 103 of the step part of the process A is executed. In this execution, the transition relay storage area 22
ON / OFF status of corresponding transition relay in 3
Determines whether a transition to a step will be made.
As a result, only the program of the step that is on (ON) is executed. In the present embodiment, the program developer can independently debug only a specific process among a plurality of processes constituting the application program. In this case, one process to be debugged is designated from the programming device 21 by performing a key input on the keyboard 21-1, and information indicating this designated process is used as process designation execution instruction information in the data memory 220 of the PC 22. It is loaded into the storage area 221. It is also possible to execute only the program of a specific step in the above-mentioned designation process. Also in this case, the keyboard 21 from the programming device 21
The key input of -1 is performed, and the step to be debugged is selected from the plurality of steps constituting the designated process. This selection is made by setting a transition relay for turning on a step to be debugged in the data memory 220 to ON. Next, with reference to the flowchart of FIG. 6, illustrating the execution of the SFC program to be performed by the microprocessor in PC 22. From the keyboard 21-1 of the programming device 21 to the program memory 10 of the PC 22
When the execution instruction of the SFC program stored in 0 is input, first, the process designation execution instruction information is read from the process designation execution instruction information storage area 221 of the data memory 220 to determine whether or not there is a process designation execution instruction. It is determined (S11). If there is such an instruction (S1
1, Yes), and jump to the start address of the storage area of the process designated by the instruction information in the program memory 100 (S12). Then, the step execution instruction information is read from the step execution instruction information storage area 222 of the data memory 220, and it is determined whether or not the step execution instruction is given (S13). If the step execution instruction has been issued (S13, Yes), the transition relay storage area 2 in the data memory 220
Out read transitions relay to determine the transition of each step from 23, corresponding transitions relay is performed transition by an on (ON), and on (ON)
Only the program of the step which is set is read from the program storage area 103 of the step section of the program memory 100 and executed (S15). Then, when the execution of the designated process is completed, it is determined whether or not there is an instruction to execute the designated process in the same manner as the processing of step S11 (S16), and if there is an instruction to execute the designated process (S1).
6, Yes), the processing is immediately terminated. In this way, the program developer operates the keyboard 21-1 of the programming device 21 to input the execution instruction of the process desired to be debugged and the step execution instruction to the areas 221 and 222 in the data memory 220 of the PC 22, respectively. By setting each information and further setting ON / OFF of each transition relay so that only the program of the desired step is executed in the transition relay storage area 223 in the data memory 220,
With respect to the application program obtained by the SFC description, only a specific process can be debugged in steps. In this case, the operation of the program at each step can be confirmed on the display device 23-2 on the simulation box 23. On the other hand, the above step S13
If there is no step execution instruction (S13, No),
The program of the transition section is read from the area 102 of the program memory 100 and executed (S14). Then, next, the status (ON / OFF state) of the transition relay obtained by executing the program of the transition unit is read from the area 223 of the data memory 220, and only the step in which the corresponding transition relay is ON is shifted. Done and turned on
Only the step program is executed (S15). In this way, when the step execution instruction is not given, the snap switch 23-1 of the simulation box 23
The input signal is given to the PC 22 by the operation of. Then, by designating only the execution process and not instructing step execution, only a certain process can be individually debugged. If there is no instruction to execute the process designation in step S11 (S11, No),
Next, the process proceeds to step S13, and it is determined whether or not there is a step execution instruction, and based on the determination result, step S1
3 → S15 → S16 or the above steps S13 → S14
→ S15 → S16 is performed on the first process A of the SFC program. Then, the above step S16
After it is determined that there is no process specification execution instruction in (S16,
No), it is determined whether or not the processes (corresponding processes) of steps S13 to S15 have been completed for all processes of the SFC program (S17). And if the said process is not yet completed about all the processes, it will return to the said step S13 again, and will perform the process of the said step S13-S15 about the next process B. Such processing is repeated until it is determined in step S17 that the processing of steps S13 to S15 has been completed for all processes of the SFC program. Then, when it is determined that the process is completed for all processes of the SFC program (S17, Yes), the process is completed. In this way, when process specified execution is not instructed,
Step S above for all SFC program processes
The processing of 13 to S16 is performed in the order of execution. in this case,
By issuing a step execution instruction, it is possible to set the value of the transition relay by key operation of the snap switch 23-1 of the simulation box 23 and execute only the program of the desired step for each process. , Without executing the step execution instruction, the program of the transition part is actually executed, and the transition result turns to the step in which the corresponding transition relay is set to ON, and the transition relay is turned ON.
It is also possible to execute only the program of the specified step . Therefore, the case of no indication of process specifying execution, by selectively using the instruction steps executed, for example, in debug initial stage of performing step execution instruction to the former, whereas as the latter debug later stages of without performing the step execution instruction in, SFC
Debugging can be performed efficiently by executing the program. As described above, in this embodiment, the programming device 21 allows the data memory 2 of the PC 22 to be operated.
The application program can be debugged on a process-by-process basis simply by setting the respective information in the transition relay storage area 223, the process specification execution instruction information storage area 221, and the step execution instruction information storage area 222 of 20. It is also possible to debug while executing each process in a desired step sequence. When neither the process designation execution nor the step execution instruction is performed, the SFC program can be executed as in the actual operation. Although only one process to be debugged is designated in the above embodiment, a plurality of processes may be designated. Furthermore, in the above embodiment, the simulation box 23 is used to input signals to the PC and
Although the output signal is displayed, the input / output device used when the system is actually operated may be connected to the PC 21 instead of the simulation box 23.

【発明の効果】請求項1記載の発明によれば、デバッグ
対象のプロセスを所望するステップ・シーケンスで実行
できる。したがって、ステップ単位でのデバッグを効率
良く行えるようになる。 また、請求2項記載の発明によ
れば、所望するプロセスのみを所望するステップ・シー
ケンスで実行できる。したがって、プロセス単位及びス
テップ単位でのデバッグを行うことが可能となり、この
結果として、デバッグを非常に効率良く行うことが可能
になる。また、上記第1及び2の発明は、いずれも、P
C(プログラマブルコントローラ)のデータメモリに所
定の情報を設定し、PCがその所定の情報を参照してプ
ログラムを実行するだけで実現できるので、特別の装置
は必要としない。このため、上記デバッグを、簡単な構
成により安価に実現できる。
According to the invention described in claim 1, debugging
Perform the desired process in the desired sequence of steps
it can. Therefore, debugging in steps is efficient.
You will be able to do well. According to the invention of claim 2,
Then, you can get the desired step sequence only for the desired process.
You can do it with a can. Therefore, the process unit and
It becomes possible to debug in steps.
As a result, debugging can be done very efficiently
become. Further, in both the first and second inventions, P
No special device is required because it can be realized by setting predetermined information in the data memory of C (programmable controller) and causing the PC to execute the program by referring to the predetermined information. Therefore, the above debugging can be realized at a low cost with a simple configuration.

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

【図1】本発明の原理ブロック図(その1)である。FIG. 1 is a block diagram (1) of the principle of the present invention.

【図2】本発明の原理ブロック図(その2)である。FIG. 2 is a block diagram (No. 2) of the principle of the present invention.

【図3】本発明の一実施例のデバッグ方式によりSFC
プログラムのデバッグを行うシステムの構成図である。
FIG. 3 is a diagram illustrating an SFC according to a debug method according to an embodiment of the present invention .
It is a block diagram of the system which debugs a program.

【図4】SFCにより記述したプログラムのPCのプロ
グラムメモリ内での配置構成を示す図である。
[Fig. 4] PC professional of the program described by SFC
It is a figure which shows the arrangement structure in a gram memory.

【図5】PCのデータメモリ内でのデバッグ用の情報の
配置構成を示す図である。
FIG. 5 shows information for debugging in the data memory of PC
It is a figure which shows arrangement | positioning structure.

【図6】PCにより行われるSFCプログラムの実行処
理を説明するフローチャートである。
FIG. 6 Execution process of SFC program executed by PC
It is a flow chart explaining a reason.

【図7】従来のPC用のプログラムの作成方法を説明す
る図である。
FIG. 7 illustrates a conventional method for creating a program for a PC .
It is a figure that shows.

【図8】SFCによるプログラミング方法を説明する図
である。
FIG. 8 is a diagram explaining a programming method by SFC.
Is.

【図9】SFCの他の形式を示す図である。 FIG. 9 is a diagram showing another format of SFC.

【符号の説明】6,14 記憶手段 11 実行プロセス指定手段 7、12 ステップ実行指示情報格納手段 8、13 トランジションリレー格納手段 9,15 制御手段[Explanation of reference numerals] 6,14 storage means 11 execution process designation means 7, 12 step execution instruction information storage means 8, 13 transition relay storage means 9, 15 control means

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 少なくとも一つのトランジションと少な
くとも一つのステップを含むシーケンシャル・ファンク
ション・チャートにより記述されるプロセスを複数有す
るプログラムをデバッグするデバッグ方式であって、 前記プロセスの各トランジションのプログラム及び各ス
テップのプログラムを格納する記憶手段と、 前記プロセスをステップ実行するか否かを指示する情報
であるステップ実行指示情報を格納するステップ実行指
示情報格納手段と、 前記プロセスの各トランジションのオン/オフ状態を記
憶するフラグであるトランジションリレーを格納するト
ランジションリレー格納手段と、 前記ステップ実行指示情報によりステップ実行の指示が
なされている場合にはトランジションのプログラムを実
行せずに該トランジションに対応するトランジションリ
レーを参照し、対応するトランジションリレーがオンと
なっているステップへの移行を行い、オンとなっている
ステップのプログラムのみを実行する制御手段と、 を備えたことを特徴とするデバッグ方式。
1. At least one transition and at least one transition
Sequential funk with at least one step
Have multiple processes described by an option chart
A debugging method for debugging a program that program and conceal each transition of the process
Storage means for storing the step program and information for instructing whether or not to execute the process stepwise
Step execution instruction that stores step execution instruction information
Indicator information storage means and the on / off state of each transition of the process
To store the transition relay, which is a flag to remember
An instruction for step execution is provided by the transition relay storage means and the step execution instruction information.
If so, run the transition program.
Transition transition corresponding to the transition without performing
The corresponding transition relay is turned on.
Has been turned on and has been turned on
A debugging method comprising: a control means for executing only the step program .
【請求項2】 少なくとも一つのトランジションと少な
くとも一つのステップを含むシーケンシャル・ファンク
ション・チャートにより記述されるプロセスを複数有す
るプログラムをデバッグするデバッグ方式であって、 前記複数のプロセスの中からデバッグ対象となるプロセ
スを指定する実行プロセス指定手段と、 前記プロセスの各トランジションのプログラム及び各ス
テップのプログラムを格納する記憶手段と、 前記プロセスをステップ実行するか否かを指示する情報
であるステップ実行指示情報を格納するステップ実行指
示情報格納手段と、 前記プロセスの各トランジションのオン/オフ状態を記
憶するフラグであるトランジションリレーを格納するト
ランジションリレー格納手段と、 前記プロセス指定手段によって指定されたプロセスを実
行する際、前記ステップ実行指示情報によりステップ実
行の指示がなされている場合トランジションのプログラ
ムを実行せずに該トランジションに対応するトランジシ
ョンリレーを参照し、対応するトランジションリレーが
オンとなっているステップへの移行を行い、オンとなっ
ているステップのプログラムのみを実行する制御手段
と、 を備えることを特徴とするデバッグ方式。
2. At least one transition and few
Sequential funk with at least one step
Have multiple processes described by an option chart
A debugging method for debugging a program that, processes to be debugged among the plurality of processes
Execution process designating means for designating each program, each transition program of the process and each process
Storage means for storing the step program and information for instructing whether or not to execute the process stepwise
Step execution instruction that stores step execution instruction information
Indicator information storage means and the on / off state of each transition of the process
To store the transition relay, which is a flag to remember
The transition relay storage means and the process designated by the process designation means are implemented.
When executing, the step execution instruction information
Transition program if line instructions are given
The transition that corresponds to the transition without executing
The corresponding transition relay is
Go to the step that is on and turn it on
Means for executing only the program of the step
And a debugging method comprising:
JP00057093A 1993-01-06 1993-01-06 Debug method Expired - Fee Related JP3413860B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00057093A JP3413860B2 (en) 1993-01-06 1993-01-06 Debug method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00057093A JP3413860B2 (en) 1993-01-06 1993-01-06 Debug method

Publications (2)

Publication Number Publication Date
JPH06202718A JPH06202718A (en) 1994-07-22
JP3413860B2 true JP3413860B2 (en) 2003-06-09

Family

ID=11477374

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00057093A Expired - Fee Related JP3413860B2 (en) 1993-01-06 1993-01-06 Debug method

Country Status (1)

Country Link
JP (1) JP3413860B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3679844B2 (en) * 1995-11-09 2005-08-03 ファナック株式会社 Sequence program execution device

Also Published As

Publication number Publication date
JPH06202718A (en) 1994-07-22

Similar Documents

Publication Publication Date Title
GB2140942A (en) Sequence control method and apparatus
GB2197506A (en) Providing and handling break points in a software monitor
US5600807A (en) Programmable controller capable of updating a user program during operation by switching between user program memories
JP3413860B2 (en) Debug method
JP2526686B2 (en) Method of modifying program contents in control program of programmable controller
JPH06242819A (en) Signal state control system for programmable controller
JPS59114602A (en) Programmable controller
JPS62162105A (en) Flow chart type programmable controller
KR100423742B1 (en) Exclusive control system by sequential function chart
GB2175112A (en) Sequence control method and apparatus
JP2658578B2 (en) Programmable controller
JP2581214B2 (en) Logic simulator
JPH0472244B2 (en)
JP2708983B2 (en) Program display device
JPS6348698A (en) Memory storage control device
JPH07253876A (en) Program generating device
JPS62162107A (en) Program changing method for programmable controller
KR900005548B1 (en) Programmble controller
JPH0353321A (en) Information processor
JPS63228301A (en) Programmable controller
JPH0830453A (en) Programmable controller
JPH0362104A (en) Inspection instrument
JPH11134218A (en) Display screen debugging device for program type display device
JPS6238746B2 (en)
JPH05297913A (en) Programmable controller

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030304

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees