JP3018790B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP3018790B2
JP3018790B2 JP4297330A JP29733092A JP3018790B2 JP 3018790 B2 JP3018790 B2 JP 3018790B2 JP 4297330 A JP4297330 A JP 4297330A JP 29733092 A JP29733092 A JP 29733092A JP 3018790 B2 JP3018790 B2 JP 3018790B2
Authority
JP
Japan
Prior art keywords
sub
return
active
processing
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 - Lifetime
Application number
JP4297330A
Other languages
Japanese (ja)
Other versions
JPH06149322A (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 JP4297330A priority Critical patent/JP3018790B2/en
Publication of JPH06149322A publication Critical patent/JPH06149322A/en
Application granted granted Critical
Publication of JP3018790B2 publication Critical patent/JP3018790B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、SFC命令語体系を用
いるプログラマブルコントローラに関し、さらに詳しく
は、サブプロセスへの移行と復帰が容易に行えるプログ
ラマブルコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller using an SFC command language system, and more particularly, to a programmable controller that can easily enter and return to a subprocess.

【0002】[0002]

【従来の技術】従来より、現場においては、制御すべき
様々な情報例えばベルトコンベアの出口を通過した製品
が所定数量に達した等の物量的情報、或いは裁断機が稼
動中であるときに危険域に移動物を検出した等の論理的
情報等がある。それら様々な情報に応じて所定の出力制
御(シーケンス制御)を行うものとしてプログラマブル
コントローラ(以下、PCと称する)が広く用いられて
いる。
2. Description of the Related Art Conventionally, various kinds of information to be controlled at a site, for example, physical information such as the number of products passing through an outlet of a belt conveyor reaching a predetermined quantity, or dangerous when a cutting machine is in operation. There is logical information such as detection of a moving object in the area. Programmable controllers (hereinafter, referred to as PCs) are widely used to perform predetermined output control (sequence control) according to the various information.

【0003】このPCのプログラミング方法は、通常の
コンピュータプログラミングとは全く異なり、例えば図
9に示すように、一般に、PC化以前から現場で用いら
れていた接点41、42やコイル43等のシンボルマー
クによるリレー回路の展開接続図(ラダー図)が用いら
れる。
The method of programming the PC is completely different from ordinary computer programming. For example, as shown in FIG. 9, a symbol mark such as contacts 41 and 42 and a coil 43 used in the field before the PC was used. Connection diagram (ladder diagram) of the relay circuit is used.

【0004】さらに、近年、このPCのプログラム記述
方法として、PCの制御動作を分かり易く図形表示でき
るSFC(Sequential Function Chart)という国際規
格(IEC SC65A/WG6)の記述形式が用いられるように
なっている。図10(a) は、そのSFCのプログラム記
述の構成概念図である。同図に示すように、プログラム
は、ステップ(STEP)と呼ばれる記述部とトランジ
ション(TRANSITION)と呼ばれる記述部とが
リンク(LINK)によって接続され、交互にS20、
TN21、S21、TN22、・・・と配列される。上
記のステップS20、S21、・・・は、それぞれ一連
のシーケンス(制御プログラム)の中の一つの段階(工
程)を意味し活性と非活性と2つの状態を持つ。また、
トランジションTN21、TN22、・・・は、活性の
ステップから後続ステップへの分岐・合流を含む移行条
件を表す。PCはトランジションがオン(移行条件が成
立)であれば後続ステップを選択し、トランジションが
オフであれば後続ステップを非選択と判別する。そし
て、選択した後続ステップが非活性である場合に限り移
行を実行する。移行が行われると、移行先ステップが活
性化され、移行元ステップが非活性化される。これらの
ステップ及びトランジションはラダー図で記述され、そ
のラダー図はニーモニックに展開される。同図(b) はニ
ーモニック展開されたプログラム例を示している。
Further, in recent years, a description format of an international standard (IEC SC65A / WG6) called SFC (Sequential Function Chart), which can easily display the control operation of the PC, is used as a program description method of the PC. I have. FIG. 10A is a conceptual diagram of the structure of the SFC program description. As shown in the figure, in the program, a description section called a step (STEP) and a description section called a transition (TRANSITION) are connected by a link (LINK).
TN21, S21, TN22,... The above steps S20, S21,... Each mean one stage (process) in a series of sequences (control programs), and have two states, active and inactive. Also,
Transitions TN21, TN22,... Represent transition conditions including branching and merging from the active step to the subsequent step. If the transition is on (the transition condition is satisfied), the PC selects the subsequent step, and if the transition is off, the PC determines that the subsequent step is not selected. Then, the shift is executed only when the selected subsequent step is inactive. When the transfer is performed, the transfer destination step is activated and the transfer source step is deactivated. These steps and transitions are described in a ladder diagram, which is developed mnemonically. FIG. 4B shows an example of a program that has been mnemonically expanded.

【0005】図11は、上記のように記述されたプログ
ラムが機械語に翻訳されプログラム・メモリに格納され
た場合の配置を模式的に示したものである。同図は、初
めにトランジション部、次にライン部、そして最後にア
クション部のプログラムが順次格納されている。PC
は、先ず同図のトランジション部のプログラム(A),
(B)・・・を実行し、各トランジションのオン/オフ
情報を出力する。次にライン部のプログラムを実行し、
上記トランジションのオン/オフ情報に基づくステップ
移行指示情報(選択情報)のオン/オフを出力する。続
いて、アクション部のプログラム(C),(D),
(E)・・・を順次読み出し、上記ステップ移行指示情
報に基づいて実行又は非実行を判断して処理又は無処理
(NOP処理)をなしアクション部の終点に到る。そし
て、再び先頭に戻ってトランジション部の処理を開始す
るということを繰り返す。
FIG. 11 schematically shows an arrangement in a case where the program described above is translated into a machine language and stored in a program memory. In the figure, a program of a transition section, a line section, and finally an action section are sequentially stored. PC
First, the program (A),
(B)... To output on / off information of each transition. Next, execute the program in the line section,
It outputs on / off of step transition instruction information (selection information) based on the on / off information of the transition. Next, the action part programs (C), (D),
(E) are sequentially read out, execution or non-execution is determined based on the step shift instruction information, processing or no processing (NOP processing) is performed, and the action unit reaches the end point. Then, the process of returning to the beginning and starting the processing of the transition section is repeated.

【0006】一般に、上述の1巡の処理を1スキャンと
いい、この1スキャンが1個のプロセスを形成する。シ
ーケンス制御のどこからどこまでを1プロセスとして区
切るかはユーザが決定する。また、プロセスにはメイン
プロセスとサブプロセスとがあり、サブプロセスは通常
のプログラムにおけるサブルーチンと同様の機能を持っ
ている。SFCにおいては、同様な処理が繰り返し行わ
れる場合、その繰り返し行われる一連の工程の集まりを
サブプロセスとして記述し、1つのステップからそのサ
ブプロセスを呼び出すことにより、全体のプログラムの
簡略化を計っている。
Generally, the above-described one round of processing is called one scan, and one scan forms one process. The user determines which part of the sequence control is divided as one process. The process includes a main process and a sub process, and the sub process has the same function as a subroutine in a normal program. In the SFC, when a similar process is repeatedly performed, a set of the repetitive processes is described as a subprocess, and the subprocess is called from one step, thereby simplifying the entire program. I have.

【0007】図12に、上記サブプロセス呼び出しの概
念図を示す。同図では、工程の実行順序を点線及び矢印
で示している。すなわち同図において、メインプロセス
の2番目のステップからサブプロセス3を呼び出してお
り、そのサブプロセスの2番目のステップから、さらに
サブプロセス5を呼び出している。そして、サブプロセ
ス5の最終ステップからサブプロセス3の呼び出しステ
ップに復帰し、サブプロセス3の最終ステップからメイ
ンプロセスの呼び出しステップに復帰している。したが
って、メインプロセスの2番目のステップの処理は、サ
ブプロセス3及び5を行うことである。同図では、メイ
ンプロセスの4番目のステップも同様にサブプロセス3
を呼び出しおり、したがって、メインプロセスの4番目
のステップの処理もサブプロセス3及び5を行うことで
ある。
FIG. 12 is a conceptual diagram of the above sub-process call. In the figure, the execution order of the steps is indicated by a dotted line and an arrow. That is, in the figure, the sub-process 3 is called from the second step of the main process, and the sub-process 5 is further called from the second step of the sub-process. Then, the process returns to the calling step of the sub process 3 from the last step of the sub process 5, and returns to the calling step of the main process from the last step of the sub process 3. Therefore, the processing of the second step of the main process is to perform sub-processes 3 and 5. In the figure, the fourth step of the main process is similarly performed in the sub process 3
Therefore, the processing of the fourth step of the main process is also to perform the sub-processes 3 and 5.

【0008】[0008]

【発明が解決しようとする課題】ところで、上述した従
来のSFCのプログラム記述では、他のステップの活性
の有無を検知することが困難であるという理由から、サ
ブプロセスからの復帰時には、たとえ他のステップが活
性になっている場合でもそのステップを残したまま復帰
してしまう。例えば、図13に示すように、分岐ステッ
プS24に復帰を記述したサブプロセスを作成した場
合、これは図14に模式的に示すようにニーモニック展
開される。そしてステップS24の復帰(サブプロセス
リターン)命令を実行すると、それ以降のステップのア
クション処理が実行されないといった問題が発生する。
このような不都合を防止するため、従来のPCでは、例
えば、図15に示すような並列分岐中にサブプロセスか
らの復帰をプログラムすることを禁止し、さらに並列分
岐中以外では活性ステップが1つだけになるのように
し、また、さらにサブプロセスの復帰ステップ以外には
活性ステップが無いようにするために復帰ステップをサ
ブプロセスの一番最後に配置するようにするという制約
が設けられている。このため、プログラミングの自由度
が損なわれるという大きな問題があった。
However, in the above-described conventional SFC program description, it is difficult to detect the presence or absence of the activation of other steps. Even if a step is active, it returns with the step remaining. For example, as shown in FIG. 13, when a sub-process describing return to the branch step S24 is created, this is mnemonically expanded as schematically shown in FIG. When the return (sub-process return) instruction of step S24 is executed, a problem occurs that the action processing of the subsequent steps is not executed.
In order to prevent such an inconvenience, in the conventional PC, for example, it is prohibited to program the return from the subprocess during the parallel branch as shown in FIG. 15, and one active step is performed except during the parallel branch. In addition, there is a constraint that the return step is arranged at the end of the sub-process so that there is no active step other than the return step of the sub-process. For this reason, there was a major problem that the degree of freedom in programming was impaired.

【0009】例えば、シーケンス制御の現場では、図1
6に示す自動車の製造ラインのように、複数の異なる工
程である加工、塗装、組立1、組立2が同時に活性とな
っている場合がある。すなわち、それぞれに異なる複数
の製造工程の同時制御が必要である。このようなとき、
SFCのプログラム記述では、活性ステップが常に1ス
テップのみと制約されているために、図17に示す加
工、塗装、組立1及び組立2と順次記述したプロセスを
使用できないという問題があった。
For example, at the site of sequence control, FIG.
As in the automobile manufacturing line shown in FIG. 6, there are cases where a plurality of different processes, namely, processing, painting, assembling 1 and assembling 2 are active at the same time. That is, it is necessary to simultaneously control a plurality of different manufacturing processes. In such a case,
In the SFC program description, the active step is always restricted to only one step, so that there is a problem that the process described in FIG. 17 in which processing, painting, assembly 1 and assembly 2 are sequentially described cannot be used.

【0010】この発明は、上記の実情に鑑みてなされた
ものであり、何らの制約を受けることなくサブプロセス
からの復帰を記述できるプログラマブルコントローラを
提供することである。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a programmable controller capable of describing return from a subprocess without any restrictions.

【0011】[0011]

【課題を解決するための手段】本発明は、SFCで記載
されたメインプロセス及びサブプロセスにより動作する
プログラマブルコントローラに適用される。
The present invention is applied to a programmable controller that operates by a main process and a sub process described in SFC.

【0012】図1は、本発明のブロック図である。まず
活性化検知手段1は、サブプロセス内においてサブプロ
セス復帰ステップ以外で活性化しているステップの有無
を検知する。同手段は例えばカウンタ等からなる。
FIG. 1 is a block diagram of the present invention. First, the activation detecting means 1 detects the presence or absence of an activated step other than the sub-process return step in the sub-process. The means comprises, for example, a counter.

【0013】次に復帰記憶手段2は、サブプロセス復帰
ステップによる復帰命令を記憶する。同手段は例えばフ
ラグレジスタ等からなる。そしてサブプロセス開始命令
3は、上記サブプロセスの先頭に設けられ活性化検知手
段1及び復帰記憶手段2を初期化する。
Next, the return storage means 2 stores a return instruction in the sub-process return step. The means comprises, for example, a flag register. Then, the sub-process start instruction 3 initializes the activation detection means 1 and the return storage means 2 provided at the head of the sub-process.

【0014】さらにサブプロセス終了命令4は、上記サ
ブプロセスの後尾に設けられ活性化検知手段1の検知結
果と復帰記憶手段2の記憶結果とを検出する。
Further, a sub-process end instruction 4 is provided at the end of the sub-process to detect the detection result of the activation detection means 1 and the storage result of the return storage means 2.

【0015】[0015]

【作用】本発明では、サブプロセス開始命令3により初
期化された活性化検知手段1がサブプロセス内において
サブプロセス復帰ステップ以外で活性化しているステッ
プの有無を検知し、同じくサブプロセス開始命令3によ
り初期化された復帰記憶手段2がサブプロセス復帰ステ
ップの復帰命令を記憶する。そして、サブプロセス終了
命令4が、復帰記憶手段2の記憶結果と活性化検知手段
1の検出結果とを検出することにより、サブプロセスの
最終段階において、復帰命令が出力されていることとサ
ブプロセス内でサブプロセス復帰ステップ以外で活性化
しているステップの有無とが認識される。
According to the present invention, the activation detecting means 1 initialized by the sub-process start instruction 3 detects the presence or absence of an activated step in the sub-process other than the sub-process return step. The return storage means 2 initialized by (1) stores the return instruction of the sub-process return step. Then, the sub-process end instruction 4 detects the storage result of the return storage means 2 and the detection result of the activation detection means 1 to confirm that the return instruction is output at the final stage of the sub-process. It is recognized that there is an activated step other than the sub-process return step.

【0016】これにより、サブプロセス復帰ステップが
いずれの位置に記述されていても後続のアクションが実
行されると共に、サブプロセス復帰時にはサブプロセス
復帰ステップ以外で活性化しているステップの有無が認
識されて適切な処理に移行される。
[0016] Thus, no matter where the sub-process return step is described, the subsequent action is executed, and when the sub-process returns, it is recognized whether there is an activated step other than the sub-process return step. Move to appropriate processing.

【0017】[0017]

【実施例】以下、図面を参照しながら本発明の実施例に
ついて詳細に述べる。図2に示すように、本実施例にお
いては、SFCのサブプロセスをニーモニック展開する
際、サブプロセスの先頭にサブプロセス開始命令23、
サブプロセスの後尾にサブプロセス終了命令24を設け
る。また、サブプロセスを実行する処理に際しては、図
3に示すカウンタ21及びフラグSRET22を用い
る。カウンタ21はアクション部実行中にステップが活
性であることを認知する毎にインクリメントされて
「2」(QD 、Qc 、QB 、QA の出力が「001
0」)までカウントする。フラグSRET3はアクショ
ン部のサブプロセス復帰ステップが活性であるとき
“1”にセットされる。
Embodiments of the present invention will be described below in detail with reference to the drawings. As shown in FIG. 2, in the present embodiment, when the mnemonic expansion of the SFC sub-process is performed, the sub-process start instruction 23
A sub-process end instruction 24 is provided at the end of the sub-process. In the process of executing the sub-process, the counter 21 and the flag SRET 22 shown in FIG. 3 are used. Counter 21 is incremented each time recognizes that step is active during the action part execution "2" (Q D, Q c, Q B, the output of Q A is "001
0 "). The flag SRET3 is set to "1" when the sub-process return step of the action section is active.

【0018】次に、上記構成の本実施例の動作を、図4
〜図7に示すフローチャートを用いて説明する。なお、
これらの処理は、特には図示しないマイクロプロセッサ
により実行される。
Next, the operation of this embodiment having the above configuration will be described with reference to FIG.
This will be described with reference to flowcharts shown in FIGS. In addition,
These processes are executed by a microprocessor (not shown).

【0019】図4はサブプロセス開始命令の処理動作の
フローチャートである。同図において、サブプロセスの
開始では、まず、フラグSRETを「0」クリアする
(処理S41)。これにより、フラグSRETが初期化
される。
FIG. 4 is a flowchart of the processing operation of the sub-process start command. In the figure, at the start of the sub-process, first, the flag SRET is cleared to "0" (process S41). As a result, the flag SRET is initialized.

【0020】続いて、信号バーCLRを“L”レベルと
し(処理S42)、次に、その信号バーCLRを“H”
レベルとする(処理S43)。これにより、カウンタ2
1が「0」に初期化される。
Subsequently, the signal CLR is set to "L" level (step S42), and then the signal CLR is set to "H".
The level is set (process S43). Thereby, the counter 2
1 is initialized to "0".

【0021】この後、トランジション部を実行し、さら
にライン部を実行する。続いて、アクション部の実行に
おいては、図5のフローチャートに示す処理を実行す
る。すなわち、ステップリレー(ステップが活性か非活
性かを示すビットメモリ)毎にに、オンであるか否か判
別する(処理S51)。
Thereafter, the transition section is executed, and the line section is executed. Subsequently, in the execution of the action unit, the processing shown in the flowchart of FIG. 5 is executed. That is, for each step relay (bit memory indicating whether the step is active or inactive), it is determined whether or not the switch is on (step S51).

【0022】この判別でステップリレーがオンであれ
ば、信号CLKを“H”レベルとし(処理S52)、次
に、信号CLKを“L”レベルとする(処理S53)。
これにより、ステップリレーがオンであれば、すなわち
ステップが活性であれば、カウンタ21がカウントアッ
プされる。
If it is determined that the step relay is on, the signal CLK is set to the "H" level (step S52), and then the signal CLK is set to the "L" level (step S53).
Thus, if the step relay is on, that is, if the step is active, the counter 21 is counted up.

【0023】続いて、アクション部処理を行う(処理S
54)、ということを繰り返す。以上により、活性化し
ている2個以上のステップの検出がなされる。なお上記
処理S51で、ステップリレーがオフであれば、ただち
に処理54に進む。この場合はアクション部の無処理
(NOP処理)を実行する。
Subsequently, an action unit process is performed (process S
54). As described above, two or more activated steps are detected. In step S51, if the step relay is off, the process immediately proceeds to step S54. In this case, no processing (NOP processing) of the action section is executed.

【0024】次に、図6にサブプロセス復帰(リター
ン)処理のフローチャートを示す。同図において、サブ
プロセスリターン処理では、まず、ステップリレーがオ
ンか否か判別する(処理S61)。
FIG. 6 is a flowchart of a sub-process return (return) process. In the figure, in the sub-process return process, first, it is determined whether or not the step relay is on (process S61).

【0025】そして、オンであれば、サブプロセス復帰
が指示されていると判別し、フラグSRETを「1」に
セットする(処理62)。これにより、後述するサブプ
ロセス終了処理においてサブプロセス復帰が認識され
る。
If it is on, it is determined that sub-process return is instructed, and the flag SRET is set to "1" (step 62). As a result, the return of the sub-process is recognized in the sub-process end processing described later.

【0026】なお上記処理S61で、ステップリレーが
オフであれば、ただちに処理を終了する。これにより、
サブプロセス復帰が指示されない限りは、後述するサブ
プロセス終了処理においてサブプロセス復帰が認識され
ない。
In step S61, if the step relay is off, the process is immediately terminated. This allows
Unless a sub-process return is instructed, the sub-process return is not recognized in the sub-process end processing described later.

【0027】図7に、サブプロセス終了のフローチャー
トを示す。同図において、サブプロセス終了処理は、ま
ずフラグSRETを参照し、値が「1」か否か判別する
(処理71)。
FIG. 7 shows a flowchart for ending the sub-process. In the figure, the sub-process end process first determines whether the value is “1” by referring to the flag SRET (process 71).

【0028】この判別で、フラグSRETが「1」であ
ればサブプロセス復帰が指示されていると判別し、この
場合は続いてカウンタ21の値を参照し、サブプロセス
復帰においてサブプロセス復帰ステップの他に活性ステ
ップが存在しているか否か判別する(処理72)。
In this determination, if the flag SRET is "1", it is determined that the sub-process return has been instructed. In this case, the value of the counter 21 is subsequently referred to, and in the sub-process return, the sub-process return step is executed. It is determined whether there is another active step (step 72).

【0029】そして、カウンタ21の値が「1」であれ
ば、活性ステップはサブプロセス復帰ステップのみであ
ると判別してサブプロセス復帰(リターン)を行う(処
理73)。また、カウンタ21の値が「2」であれば、
サブプロセス復帰ステップ以外に少なくとも1個の活性
ステップが存在したと判別し、この場合はエラー処理を
行う(処理74)。なお、この処理では、予め2個以上
の活性ステップの存在が容認されている場合は、その場
合に対応する他の処理が行われる。
If the value of the counter 21 is "1", it is determined that the activation step is only the sub-process return step, and the sub-process is returned (returned) (step 73). If the value of the counter 21 is “2”,
It is determined that there is at least one active step other than the sub-process return step, and in this case, error processing is performed (step 74). In this process, if the presence of two or more active steps is permitted in advance, another process corresponding to that case is performed.

【0030】このように、処理がなされるので、例えば
図8に示すSFC記述の場合には、ステップS12で活
性が検出されて(ステップシンボルの左上隅の黒三角マ
ークが活性ステップであることを示す)、カウンタ21
が「1」となり、ステップS14でさらにカウンタ21
がインクリメントされて「2」となる。そして、ステッ
プS14はサブプロセス復帰処理であり、活性である
(ステップリレーがオンしている)のでフラグSRET
が「1」にセットされる。以上でアクション部の実行が
終了され、図に示すサブプロセス終了の処理が実行され
る。そして、この場合は、フラグSRET=1であり、
かつ、カウンタ21≠「1」であることから、サブプロ
セス復帰ステップ以外に活性ステップが存在することを
検知できる。したがって、必要に応じてエラー処理等を
行うことができる。
As described above, the processing is performed. For example, in the case of the SFC description shown in FIG. 8, the activity is detected in step S12 (the black triangle mark at the upper left corner of the step symbol indicates that the activity step is active). Shown), counter 21
Becomes “1”, and in step S14, the counter 21
Is incremented to “2”. Step S14 is a sub-process return process. Since the process is active (the step relay is on), the flag SRET is set.
Is set to “1”. As described above, the execution of the action unit is completed, and the process of terminating the sub process shown in the figure is executed. In this case, the flag SRET = 1, and
In addition, since the counter 21 ≠ “1”, it can be detected that there is an active step other than the sub-process return step. Therefore, error processing and the like can be performed as needed.

【0031】また、図13に示したSFC記述のよう
に、サブプロセス復帰ステップを最後尾に配置しない場
合でも(ニーモニック展開は図2を参照)、まず先頭の
サブプロセス開始処理でカウンタ21=「0」及びフラ
グSRET=「0」となり、アクション部処理ではアク
ション部途中のステップS24でカウンタ21=「1」
になると共にフラグSRET=「1」になる。以降のア
クション部を実行した後、最後尾のサブプロセス終了処
理において、サブプロセス復帰ステップであるステップ
S24のみが活性である場合には、SRET=「1」で
且つカウンタ21=「1」であるため、図7の処理S7
3が実行され、サブプロセスからメインプロセスに容易
に復帰できる。
Further, even if the sub-process return step is not located at the end as in the SFC description shown in FIG. 13 (see FIG. 2 for the mnemonic expansion), first, the counter 21 = “ 0 ”and the flag SRET =“ 0 ”, and in the action part process, the counter 21 is set to“ 1 ”in step S24 in the middle of the action part.
And the flag SRET becomes "1". After the subsequent action section is executed, in the last sub-process ending process, when only the sub-process return step S24 is active, SRET = “1” and the counter 21 = “1”. Therefore, the process S7 of FIG.
3 is executed, and it is possible to easily return from the sub process to the main process.

【0032】[0032]

【発明の効果】本発明によれば、SFC記述のサブプロ
セス復帰ステップを、サブプロセスの任意の位置に記述
しても、サブプロセス復帰が記憶されると共にサブプロ
セス復帰ステップ以降のアクションが必ず実行され、さ
らにサブプロセス復帰ステップ以外に活性しているステ
ップが検出されるので、何らの制約を受けることなくサ
ブプロセス復帰を記述することが容易に可能となる。
According to the present invention, even if the sub-process return step described in the SFC is described at an arbitrary position in the sub-process, the sub-process return is stored and the action after the sub-process return step is always executed. In addition, since an active step other than the sub-process return step is detected, it is possible to easily describe the return of the sub-process without any restrictions.

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

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

【図2】本実施例のニーモニック展開を説明する図であ
る。
FIG. 2 is a diagram illustrating mnemonic expansion according to the present embodiment.

【図3】(a)、(b) は本実施例の一部構成を説明する図で
ある。
FIGS. 3A and 3B are diagrams illustrating a partial configuration of the present embodiment.

【図4】本実施例のフローチャート(その1)である。FIG. 4 is a flowchart (part 1) of the embodiment.

【図5】本実施例のフローチャート(その2)である。FIG. 5 is a flowchart (part 2) of the present embodiment.

【図6】本実施例のフローチャート(その3)である。FIG. 6 is a flowchart (part 3) of the present embodiment.

【図7】本実施例のフローチャート(その4)である。FIG. 7 is a flowchart (part 4) of the present embodiment.

【図8】本実施例におけるSFC記述例を説明する図で
ある。
FIG. 8 is a diagram illustrating an example of an SFC description in the embodiment.

【図9】ラダー図の例を示す図である。FIG. 9 is a diagram showing an example of a ladder diagram.

【図10】(a) はSFC記述を説明する構成概念図、
(b) はニーモニック展開されたプログラムの例を示す図
である。
FIG. 10A is a conceptual diagram illustrating the configuration of an SFC description;
(b) is a diagram showing an example of a mnemonic-expanded program.

【図11】SFCプログラム配置を説明する模式図であ
る。
FIG. 11 is a schematic diagram illustrating an SFC program arrangement.

【図12】サブプロセス呼び出しの概念図である。FIG. 12 is a conceptual diagram of a sub-process call.

【図13】サブプロセス復帰記述の例を説明する図であ
る。
FIG. 13 is a diagram illustrating an example of a sub-process return description.

【図14】図13のSFC記述をニーモニック展開した
模式図である。
FIG. 14 is a schematic diagram in which the SFC description of FIG. 13 is mnemonically expanded.

【図15】並列分岐の例を示す図である。FIG. 15 is a diagram illustrating an example of a parallel branch.

【図16】自動車製造ラインを例を示す図である。FIG. 16 is a diagram showing an example of an automobile production line.

【図17】従来のSFCによる記述不可能な例を示す図
である。
FIG. 17 is a diagram showing an example in which description by the conventional SFC is impossible.

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

1 サブプロセス開始命令 2 検知手段 3 復帰記憶手段 4 サブプロセス終了命令 1 Sub-process start command 2 Detecting means 3 Return storage means 4 Sub-process end command

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 SFCで記載されたメインプロセス及び
サブプロセスにより動作するプログラマブルコントーロ
ーラにおいて、 前記サブプロセス内においてサブプロセス復帰ステップ
以外で活性化しているステップの有無を検知する活性化
検知手段(1)と、 前記サブプロセス復帰ステップによる復帰命令を記憶す
る復帰記憶手段(2)と、 前記サブプロセスの先頭に設けられ前記活性化検知手段
(1)及び前記復帰記憶手段(2)を初期化するサブプ
ロセス開始命令(3)と、 前記サブプロセスの後尾に設けられ前記活性化検知手段
(1)の検知結果と前記復帰記憶手段(2)の記憶結果
とを検出するサブプロセス終了命令(4)と、を有し、 該サブプロセス終了命令(4)において認識される活性
化検知手段(1)の検知結果と復帰記憶手段(2)の記
憶結果に基づいて所定の処理を行う ことを特徴とするプ
ログラマブルコントーローラ。
1. A programmable controller over roller which is operated by the main process and the sub process described in SF C, activation detection means for detecting the presence or absence of steps that are activated other than subprocess returns step in said sub-process (1) a return storage means (2) for storing a return instruction in the subprocess return step; and an activation detection means (1) and a return storage means (2) provided at the head of the subprocess. A sub-process start command (3) provided at the end of the sub-process, and a sub-process end command (3) for detecting a detection result of the activation detection means (1) and a storage result of the return storage means (2). 4 and) have activity recognized in the sub-process end command (4)
Of the detection result of the conversion detection means (1) and the return storage means (2)
A programmable controller, which performs a predetermined process based on a storage result .
JP4297330A 1992-11-06 1992-11-06 Programmable controller Expired - Lifetime JP3018790B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4297330A JP3018790B2 (en) 1992-11-06 1992-11-06 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4297330A JP3018790B2 (en) 1992-11-06 1992-11-06 Programmable controller

Publications (2)

Publication Number Publication Date
JPH06149322A JPH06149322A (en) 1994-05-27
JP3018790B2 true JP3018790B2 (en) 2000-03-13

Family

ID=17845123

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4297330A Expired - Lifetime JP3018790B2 (en) 1992-11-06 1992-11-06 Programmable controller

Country Status (1)

Country Link
JP (1) JP3018790B2 (en)

Also Published As

Publication number Publication date
JPH06149322A (en) 1994-05-27

Similar Documents

Publication Publication Date Title
US4736340A (en) Processor generating control programs for a programmable controller
JPH0561646B2 (en)
JP3018790B2 (en) Programmable controller
US5198737A (en) Programmable controller for industrial robots
JP3731423B2 (en) Method for creating reference pattern for failure diagnosis and failure diagnosis apparatus
JPH0871979A (en) Robot controller
JP3013619B2 (en) Programmable controller
JP3018732B2 (en) Programmable controller
KR0176554B1 (en) Automated Facility System Control Method Using Positioning Unit
JP2943434B2 (en) Programmable controller
JP3703502B2 (en) Voice input operation device
JPH10149215A (en) Device and method for monitoring abnormality of equipment
JP2921228B2 (en) Programmable controller
JP2970142B2 (en) Programmable controller
JP3309434B2 (en) PC programming device
WO1990007739A1 (en) Control method for robot
JPH08147261A (en) Test mode executing device
JP2971251B2 (en) SFC programming device
JP2581019B2 (en) How to debug sequence programs
JPH06149323A (en) Programmable controller
JP2553490B2 (en) Abnormality detection device for sequence control device
JPH08292804A (en) Process fault monitoring method by programmable controller
JPH08328617A (en) Machine controller
EP0386260A1 (en) Sequence program editing system
KR0155909B1 (en) Interference removing method and device for out control system of multi-robot

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080107

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090107

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100107

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110107

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110107

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20130107

Year of fee payment: 13

EXPY Cancellation because of completion of term