JPH0764470A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0764470A
JPH0764470A JP21453793A JP21453793A JPH0764470A JP H0764470 A JPH0764470 A JP H0764470A JP 21453793 A JP21453793 A JP 21453793A JP 21453793 A JP21453793 A JP 21453793A JP H0764470 A JPH0764470 A JP H0764470A
Authority
JP
Japan
Prior art keywords
register
state
instruction
transition
read
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.)
Granted
Application number
JP21453793A
Other languages
Japanese (ja)
Other versions
JP3344020B2 (en
Inventor
Yutaka Yatsuda
豊 八ツ田
Takayuki Shimokawa
孝幸 下川
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 JP21453793A priority Critical patent/JP3344020B2/en
Publication of JPH0764470A publication Critical patent/JPH0764470A/en
Application granted granted Critical
Publication of JP3344020B2 publication Critical patent/JP3344020B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To provide a programmable controller (PC) which can operate at higher speed against branching/confluence and control a wider sequence. CONSTITUTION:In analysis by PC10 in selective branching or confluence, if a translating origin step is inactive, ARG16 is fixed to OFF through NRG17 and the failure of a translation condition is informed to the succeeding process, on the other hand, if it is active, the ARG16 is fixed to ON and the realization possibility of the translation condition is informed to the succeeding process. The ON/OFF data as for translation is received into the ARG16 when the translation condition can be realized. The address of the translating origin step is stored in SADD18, and at realization of the translation condition, a translating destination step is activated and simultaneously the translating origin step of the address is deactivated. In parallel branching or parallel confluence, two kinds of processes, namely, detection of the translation condition and activation or deactivation of the step, are performed in time series by the same command, and this alternative flag is set on RPT, and the address of the command to be repeated is stored in PCMEM19.

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 that realizes a wider range and faster processing of branch instructions and merge instructions based on SFC description.

【0002】[0002]

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

【0003】このPCのプログラミング方法は、通常の
コンピュータプログラミングとは全く異なり、一般に、
PC化以前から現場で用いられていた接点(リミットス
イッチ)やコイル(リレー)等のシンボルマークによる
リレー回路の展開接続図(ラダー図)が用いられる。こ
のラダー図で記述されたプログラムは、中間言語に変換
され、さらに機械語に翻訳され、ワード単位のビット情
報としてRAM等のメモリにアドレス順に格納される。
This PC programming method is quite different from normal computer programming, and generally,
The developed connection diagram (ladder diagram) of the relay circuit using the symbol marks such as contacts (limit switches) and coils (relays) that have been used in the field before the PC was used. The program described in the ladder diagram is converted into an intermediate language, further translated into a machine language, and stored as bit information in word units in a memory such as a RAM in the order of addresses.

【0004】このPCのプログラム記述方法として、近
年、PCの制御動作を分かり易く図形表示できるSFC
(Sequencial Function Chart )という国際規格(IE
C SC 65A/WG6 )の記述形式が用いられるようになって
いる。
As a program description method for this PC, in recent years, an SFC capable of graphically displaying the control operation of the PC has been shown.
(Sequencial Function Chart), an international standard (IE
The description format of CSC 65A / WG6) is used.

【0005】このSFCの記述形式は、図14(a) に示
すように、ステップ(STEP)と呼ばれる記述部(S
0、S1、S2、・・・)と、トランジション(TRA
NSITION)と呼ばれる記述部(TN0、TN1、
・・・)とが、リンク(LINK)によって接続され
て、S0,TN0,S1,TN1,S2,・・・と交互
に配列されて構成される。これらの図形プログラムはそ
のままグラフィックで記憶される。
The description format of this SFC is, as shown in FIG. 14 (a), a description part (S) called step (STEP).
0, S1, S2, ...) and transitions (TRA
The description part called "NSITION" (TN0, TN1,
...) are connected by a link (LINK), and are arranged alternately with S0, TN0, S1, TN1, S2, .... These graphics programs are stored as graphics as they are.

【0006】上記のリンクはSFCのグラフィック表現
においてステップ間を接続してステップ間の移行の道程
を示し、道程の方向は常に上から下である。また、ステ
ップ(S0、S1、S2、・・・)は、一連のシーケン
ス(制御プログラム)の中の一つの工程を意味し、活性
と非活性と2つの状態を持つ。活性時においては、その
ステップに所属するアクションにより入出力が演算され
る。そして、トランジション(TN0、TN1、・・
・)は、ステップとステップの間に必ず存在し、あるス
テップから後続ステップへの移行条件を表し、移行条件
のオン/オフにより後続ステップの選択/非選択が示さ
れる。
The above links connect the steps in a graphic representation of the SFC to show the path of transition between steps, the direction of the path always being from top to bottom. Further, a step (S0, S1, S2, ...) Means one process in a series of sequences (control program), and has two states, active and inactive. When activated, the input / output is calculated by the action belonging to that step. And the transition (TN0, TN1, ...
*) Always exists between steps and represents a transition condition from a certain step to a subsequent step, and ON / OFF of the transition condition indicates selection / non-selection of the subsequent step.

【0007】SFCの規約において、既に選択されてい
るステップからその後続ステップへの移行は、移行先ス
テップが非活性であること、及び移行元ステップと移行
先ステップ間にあるトランジションの移行条件が成立し
ていることの2つの条件が満たされているときのみ行な
われる。また、移行が行われると、移行先ステップが活
性化され移行元ステップが非活性化される。
According to the SFC rules, the transition from the already selected step to the subsequent step is that the transition destination step is inactive, and the transition transition condition between the transition source step and the transition destination step is satisfied. It is done only when the two conditions of doing are met. Further, when the transfer is performed, the transfer destination step is activated and the transfer source step is deactivated.

【0008】このようなプログラムの構成と上述した規
約に従って、ステップの流れをニーモニック(mnemoni
c:計算機の命令を表現するコード又は略号)で記述
し、さらに、ステップ及びトランジションの内容をラダ
ー図で記述する。
In accordance with the structure of such a program and the above-mentioned convention, the flow of steps is represented by a mnemonic.
c: Codes or abbreviations that represent computer instructions), and the contents of steps and transitions in a ladder diagram.

【0009】図図(b) は、上記ステップ(S0,S1,
S2)及びトランジション(TN0,TN1)のラダー
図による記述の一例である。同図(a) に示すトランジシ
ョンTN0のオン/オフ(真/偽)は、図図(b) に示す
トランジションTN0のプログラムaの2個の接点のオ
ン/オフの論理積が演算され、この演算結果のオン/オ
フがコイルTN0に出力されることにより決定される。
また、同図(a) に示すトランジションTN1のオン/オ
フ(真/偽)の場合は、図図(b) に示すトランジション
TN1のプログラムbの2個の接点のオン/オフの論理
和が演算されてその演算結果のオン/オフがコイルTN
1に出力される。コイルTN0、TN1・・・には、こ
れらに対応するビットメモリが用意されており、上記演
算結果のオン/オフのコイルTN1、TN1・・・に対
する出力は、対応するビットメモリのオン/オフ
(“1”/“0”)として記録される。
FIG. 2B shows the above steps (S0, S1,
It is an example of description by a ladder diagram of S2) and transitions (TN0, TN1). The on / off (true / false) of the transition TN0 shown in FIG. 6 (a) is the logical product of the on / off of two contacts of the program a of the transition TN0 shown in FIG. The resulting on / off is determined by being output to the coil TN0.
When the transition TN1 is turned on / off (true / false) shown in FIG. 7 (a), the on / off logical sum of the two contacts of the program b of the transition TN1 shown in FIG. 7 (b) is calculated. The calculated result is turned on / off by the coil TN.
It is output to 1. Bit memories corresponding to these coils are prepared for the coils TN0, TN1 ..., And the output to the coils TN1, TN1 ... It is recorded as "1" / "0").

【0010】また、ステップには、実際の処理内容プロ
グラムである複数(0個以上16個以下)のアクション
(ACTION)が記述される。1つのアクションは、
当該ステップで制御対象となる機器類に対する実際の動
作内容を表し、一連の論理演算を行う多数の命令(例え
ば複数のスイッチの直列又は並列の組み合わせ)からな
り、結果として1つの出力又は命令を生成する。ステッ
プ内の全てのアクションは、当該ステップが活性である
ときのみ実行される。上記各ステップにも対応するビッ
トメモリが用意されており、各ステップの活性/非活性
は、それぞれのステップに対応するビットメモリ(通
常、ステップリレーと称される)のオン/オフとして記
録される。
Further, a plurality of (0 or more and 16 or less) actions (ACTION) which are actual processing content programs are described in the steps. One action is
In this step, it represents the actual operation content for the devices to be controlled, and consists of a large number of instructions that perform a series of logical operations (for example, a series or parallel combination of a plurality of switches), and as a result generate one output or instruction. To do. All actions within a step are executed only when the step is active. A bit memory corresponding to each of the above steps is also prepared, and the activation / deactivation of each step is recorded as ON / OFF of the bit memory (usually called a step relay) corresponding to each step. .

【0011】このように記述されるステップの流れにお
いて、図15(a) 〜(d) に示すように、選択分岐、選択
合流、並列分岐、及び並列合流の4つのステップ移行方
法がSFCの規約により示されている。これについて説
明すると、先ず、同図(a) に示す選択分岐では、複数ス
テップ間の選択は、水平リンクの下に、展開し得る数の
ステップS4、S5、・・・に対応するトランジション
記号が記述される。同図では、ステップS3が活性で且
つトランジション条件「a」が真であるときにのみステ
ップS3からステップS4へ移行する。また、ステップ
S3が活性で、トランジション条件「b」が真、且つト
ランジション条件「a」が偽のときにのみステップS3
からステップS5へ移行する。
In the flow of steps described above, as shown in FIGS. 15 (a) to (d), four step transition methods of selective branching, selective merging, parallel branching, and parallel merging are SFC conventions. Indicated by. Explaining this, first, in the selection branch shown in FIG. 3A, the selection between a plurality of steps is performed by selecting the transition symbols corresponding to the expandable steps S4, S5, ... Under the horizontal link. Described. In the figure, only when step S3 is active and the transition condition "a" is true, the process proceeds from step S3 to step S4. Further, only when the step S3 is active, the transition condition "b" is true, and the transition condition "a" is false, the step S3 is performed.
To step S5.

【0012】次に、同図(b) に示す選択合流では、ステ
ップ選択の終りは、水平リンクの上に、選択し得る数の
終了ステップに対応するトランジション記号が記述され
る。同図では、ステップS6が活性で且つトランジショ
ン条件「c」が真のときにのみステップ6からステップ
8へ移行する。また、ステップ7が活性で且つトランジ
ション条件「d」が真であるときにのみステップ7から
ステップ8へ移行する。
Next, in the selection merging shown in FIG. 1B, at the end of the step selection, transition symbols corresponding to the number of selectable end steps are described on the horizontal link. In the figure, only when step S6 is active and the transition condition "c" is true, the process proceeds from step 6 to step 8. Further, only when step 7 is active and the transition condition “d” is true, the process proceeds from step 7 to step 8.

【0013】また、同図(c) に示す並列分岐では、分岐
を示す水平二重リンクの直ぐ上に唯一つの共通トランジ
ション記号が記述される。同図では、ステップ9が活性
で、且つ共通トランジションの移行条件「e」が真であ
るときにのみステップS9からステップS10、S1
1、・・・へ移行する。ステップS10、S11、・・
・は同時に活性化され、その後それぞれ独立してステッ
プ実行が進行する。
Further, in the parallel branch shown in FIG. 1C, only one common transition symbol is described immediately above the horizontal double link indicating the branch. In the figure, only when step 9 is active and the transition condition "e" of the common transition is true, steps S9 to S10 and S1 are performed.
Transition to 1 ... Steps S10, S11, ...
Are activated at the same time, and then step execution progresses independently of each other.

【0014】そして、同図(d) に示す並列合流では、合
流を示す水平二重リンクの直ぐ下に唯一つの共通トラン
ジション記号が記述される。同図では、水平二重リンク
に接続された全てのステップS12、S13、・・・が
活性で且つ共通トランジションの移行条件「f」が真で
あるときにのみステップS12、S13、・・・からス
テップS14への移行が行われる。
In the parallel merging shown in FIG. 3D, only one common transition symbol is described immediately below the horizontal double link indicating the merging. In the figure, only when all the steps S12, S13, ... Connected to the horizontal double link are active and the transition condition “f” of the common transition is true, the steps S12, S13 ,. The process proceeds to step S14.

【0015】[0015]

【発明が解決しようとする課題】ところで、現在、SF
C記述の分岐や合流に適切に対応できるニーモニックは
確立されていない。
By the way, at present, SF
A mnemonic that can appropriately deal with the branching and merging of the C description has not been established.

【0016】上記の分岐又は合流をニーモニックで記述
する場合、分岐ラインの先頭ステップ毎又は分岐ライン
の末尾ステップ毎に対応して複数命令に展開する方法
と、1つのオペランド内に上記複数命令を含む構成の1
つの命令の形に展開する方法とが考えられる。いずれの
場合も、分岐又は合流のステップ移行に際しては、全て
の移行元、全ての移行先、及びこれらの移行に係わる全
てのトランジションのオン/オフ(真/偽)状態を収集
し、前述したSFC規約に基づく移行実行の可否を決定
しなければならない。
When the above branch or merge is described by a mnemonic, a method of expanding into a plurality of instructions corresponding to each start step of the branch line or each end step of the branch line, and one operand containing the above plurality of instructions Configuration 1
It can be considered as a method of developing into one instruction form. In either case, when branching or merging step transition, the on / off (true / false) states of all transition sources, all transition destinations, and all transitions related to these transitions are collected, and the SFC described above is collected. It is necessary to decide whether to execute the migration based on the rules.

【0017】複数命令に展開した場合、通常、収集され
たオン/オフ状態データに基づく移行実行可否の決定
は、展開された複数命令の最終段階で行う。そして、移
行を実行するに際しては、移行に関係する各ステップの
活性化(移行先ステップの場合)及び非活性化(移行元
ステップの場合)を行う。そして、このためには、これ
ら活性化又は非活性化する各ステップのアドレスを記録
しておかねばならない。このため、最終段階の命令の動
作が極めて複雑になり、したがって、分岐や合流に対し
て、PCの動作が遅くなるという問題があった。
When expanded into a plurality of instructions, the decision as to whether or not the migration can be executed based on the collected on / off state data is usually made at the final stage of the expanded plurality of instructions. Then, when the migration is executed, each step related to the migration is activated (in the case of the migration destination step) and inactivated (in the case of the migration source step). For this purpose, the address of each step to be activated or deactivated must be recorded. For this reason, the operation of the instruction at the final stage becomes extremely complicated, and therefore, there is a problem that the operation of the PC becomes slow with respect to branching and joining.

【0018】またこの場合、ステップの最大分岐数は予
め用意されたメモリ容量に対応する。このため、最大分
岐数に制約を受け、したがって、複雑な又は大規模ある
いは広範なシーケンス制御に対応できないという問題が
あった。
In this case, the maximum number of branches of the step corresponds to the memory capacity prepared in advance. For this reason, there is a problem that the maximum number of branches is restricted, and therefore complicated or large-scale or wide range sequence control cannot be applied.

【0019】また、上記のように複数命令に展開しない
場合、すなわち、1つのオペランド内に更に複数の命令
を記述することを繰り返して1命令の形で展開しても、
命令の動作が複雑になることにおいては何ら変りはな
く、やはり問題は残る。
In the case where the instruction is not expanded into a plurality of instructions as described above, that is, even when a plurality of instructions are described in one operand repeatedly and expanded into a single instruction,
There is no change in the complexity of the operation of the instruction, and the problem still remains.

【0020】本発明の課題は、分岐/合流に対してより
高速に動作し、且つメモリ容量に制約を受けることなく
広範な処理ができるプログラマブルコントローラを提供
することである。
An object of the present invention is to provide a programmable controller that operates at a higher speed for branch / merge and can perform a wide range of processing without being restricted by the memory capacity.

【0021】[0021]

【課題を解決するための手段及び作用】本発明は、SF
C記述に基づく分岐又は合流プログラムを実行して動作
するプログラマブルコントローラに適用される。
The present invention is based on SF and
It is applied to a programmable controller that operates by executing a branch or merge program based on the C description.

【0022】請求項1記載の発明のプログラマブルコン
トローラ(図1のブロック図参照)では、記憶手段1
は、分岐又は合流の命令を記憶する。同手段は、例え
ば、RAM(Random-Access-Memory)等からなる。
In the programmable controller according to the first aspect of the invention (see the block diagram of FIG. 1), the storage means 1
Stores a branch or merge instruction. The means is, for example, a RAM (Random-Access-Memory) or the like.

【0023】解析手段2は、記憶手段1から読み出した
分岐又は合流の命令を解析する。同手段は、例えば、マ
イクロプロセッサ、プログラムROM(Read-Only-Memor
y)等からなる。
The analysis unit 2 analyzes the branch or merge instruction read from the storage unit 1. The means is, for example, a microprocessor, a program ROM (Read-Only-Memor
y) etc.

【0024】第1レジスタ3は、解析手段2が読み出し
た分岐又は合流の命令に係わるトランジションのオン又
はオフの状態データを格納する。第2レジスタ4は、第
1レジスタ3のオフ状態をインターロックする。
The first register 3 stores the ON or OFF state data of the transition relating to the branching or joining instruction read by the analyzing means 2. The second register 4 interlocks the off state of the first register 3.

【0025】第3レジスタ5は、解析手段2が読み出し
た分岐又は合流の命令に係わる移行元ステップのアドレ
スを格納する。第5レジスタ7は、解析手段2が読み出
した分岐又は合流の命令の処理手順を二者択一するため
のデータを格納する。
The third register 5 stores the address of the migration source step relating to the branch or merge instruction read by the analysis means 2. The fifth register 7 stores data for selecting the processing procedure of the branch or merge instruction read by the analysis unit 2.

【0026】そして、上記解析手段2は、選択分岐の開
始を宣言する命令を読み出したとき、第2レジスタ4を
初期設定することにより第1レジスタ3をセット可能状
態にすると共に第5レジスタ7に命令の処理手順の第1
の選択を指示するデータを設定する。また、分岐におけ
る移行元ステップの活性・非活性の状態を検出する命令
を読み出したときは、検出した該移行元ステップの状態
が非活性であるとき第2レジスタ4を介して第1レジス
タ3をオフ状態にインターロックし、一方、検出した該
移行元ステップの状態が活性であるときは該移行元ステ
ップのアドレスを第3レジスタ5に格納する。また、ト
ランジションのオン・オフの状態を検出する命令を読み
出したときは、検出した該トランジションの状態がオン
であるとき第1レジスタ3にオン状態を設定するデータ
を出力し、一方、検出した該トランジションの状態がオ
フであるときは第1レジスタ3にオフ状態を設定するデ
ータを出力する。また、選択分岐を指示する命令を読み
出したときは、第1レジスタ3がオン状態であり且つ移
行先ステップの状態が非活性であるとき該移行先ステッ
プを活性化すると共に第3レジスタ5に格納されたアド
レスの移行元ステップを非活性化し且つ第2レジスタ4
を介して第1レジスタをオフ状態にインターロックし、
一方、第1レジスタ3がオフ状態であるとき又は上記移
行先ステップの状態が活性であるときは処理を終了す
る。そして、分岐の終了を宣言する命令を読み出したと
きは、第2レジスタ4を初期設定することにより第1レ
ジスタ3をセット可能状態にした後、第5レジスタ7に
設定されたデータが命令の処理手順の第1の選択を指示
していることを確認して直ちに処理を終了する。
When the instruction for declaring the start of the selective branch is read, the analyzing means 2 initializes the second register 4 to set the first register 3 in the settable state and to the fifth register 7. First instruction processing procedure
Set data to instruct selection of. Further, when an instruction for detecting the active / inactive state of the transition source step in the branch is read, when the detected state of the transition source step is inactive, the first register 3 is transferred via the second register 4. When the state of the detected transition source step is active, the address of the transition source step is stored in the third register 5. Further, when the instruction for detecting the on / off state of the transition is read, when the detected state of the transition is on, the data for setting the on state to the first register 3 is output, while the detected When the transition state is OFF, the data for setting the OFF state is output to the first register 3. Further, when the instruction for instructing the selective branch is read, when the first register 3 is in the ON state and the state of the transition destination step is inactive, the transition destination step is activated and stored in the third register 5. The source step of the assigned address is deactivated and the second register 4
Interlock the first register to the off state via
On the other hand, when the first register 3 is in the OFF state or the state of the transition destination step is active, the processing is ended. When the instruction declaring the end of the branch is read out, the second register 4 is initialized to set the first register 3 in the settable state, and then the data set in the fifth register 7 is processed by the instruction. After confirming that the first selection of the procedure is instructed, the processing is immediately terminated.

【0027】また、上記解析手段2は、例えば請求項2
記載のように、選択合流の開始を宣言する命令を読み出
したとき、第2レジスタ4を初期設定することにより第
1レジスタ3をセット可能状態にすると共に第5レジス
タ7に命令の処理手順の第1の選択を指示するデータを
設定する。また、選択合流における移行元ステップの活
性・非活性の状態を検出する命令を読み出したときは、
検出した該移行元ステップの状態が非活性であるとき第
2レジスタ4を介して第1レジスタ3をオフ状態にイン
ターロックし、一方、検出した該移行元ステップの状態
が活性であるときは該移行元ステップのアドレスを第3
レジスタ5に格納する。また、トランジションのオン・
オフの状態を検出する命令を読み出したときは、検出し
た該トランジションの状態がオンであるとき第1レジス
タ3にオン状態を設定するデータを出力し、一方、検出
した該トランジションの状態がオフであるときは第1レ
ジスタ3にオフ状態を設定するデータを出力する。ま
た、選択合流を指示する命令を読み出したときは、第1
レジスタ3がオン状態であり且つ移行先ステップの状態
が非活性であるとき該移行先ステップを活性化すると共
に第3レジスタ5に格納されたアドレスの移行元ステッ
プを非活性化し且つ第2レジスタ4を介して第1レジス
タ3をオフ状態にインターロックし、一方、第1レジス
タ3がオフ状態であるとき又は上記移行先ステップの状
態が活性であるときは処理を終了する。そして、合流の
終了を宣言する命令を読み出したときは、第2レジスタ
4を初期設定することにより第1レジスタ3をセット可
能状態にした後、第5レジスタ7に設定されたデータが
命令の処理手順の第1の選択を指示していることを確認
して直ちに処理を終了する。
Further, the analyzing means 2 may be, for example, claim 2.
As described above, when the instruction declaring the start of selective merging is read, the first register 3 is set to the settable state by initializing the second register 4, and the fifth register 7 is set to the first instruction processing procedure. Data for instructing selection of 1 is set. Also, when an instruction to detect the active / inactive state of the transition source step in selective merging is read,
When the detected state of the transfer source step is inactive, the first register 3 is interlocked to the OFF state via the second register 4, while when the detected state of the transfer source step is active, The transfer source step address is the third
Store in register 5. In addition, the transition on
When the instruction for detecting the off state is read, when the detected state of the transition is on, the data for setting the on state to the first register 3 is output, while the detected state of the transition is off. At some time, data for setting the off state to the first register 3 is output. Further, when the command for instructing selective merging is read, the first
When the register 3 is in the ON state and the state of the transfer destination step is inactive, the transfer destination step is activated, the transfer source step of the address stored in the third register 5 is deactivated, and the second register 4 The first register 3 is interlocked to the off state via the, while the process is ended when the first register 3 is in the off state or when the state of the transition destination step is active. When the instruction declaring the end of the merge is read, the second register 4 is initialized to make the first register 3 settable, and then the data set in the fifth register 7 is processed by the instruction. After confirming that the first selection of the procedure is instructed, the processing is immediately terminated.

【0028】請求項3記載の発明のプログラマブルコン
トローラは、上記記憶手段1、解析手段2、第1レジス
タ3、第2レジスタ4、第3レジスタ5、及び第5レジ
スタ7の各構成に加えて、上記解析手段2が読み出した
分岐又は合流の命令のプログラムアドレスを格納する第
4レジスタ6を有し、上記解析手段は、並列分岐の開始
を宣言する命令を読み出したとき、第2レジスタ4を初
期設定することにより第1レジスタ3をセット可能状態
にすると共に第5レジスタ7に命令の処理手順の第2の
選択を指示するデータを設定し且つ第4レジスタ6に次
の命令の先頭プログラムアドレスを設定する。また、並
列分岐における移行元ステップの活性・非活性の状態を
検出する命令を読み出したときは、検出した該移行元ス
テップの状態が非活性であるとき第2レジスタ4を介し
て第1レジスタ3をオフ状態にインターロックし、一
方、検出した該移行元ステップの状態が活性であるとき
は該移行元ステップのアドレスを第3レジスタ5に格納
する。また、トランジションのオン・オフの状態を検出
する命令を読み出したときは、検出した該トランジショ
ンの状態がオンであるとき第1レジスタ3にオン状態を
設定するデータを出力し、一方、検出した該トランジシ
ョンの状態がオフであるときは第1レジスタ3にオフ状
態を設定するデータを出力する。また、並列分岐を指示
する命令を読み出したときは、第5レジスタ7に設定さ
れたデータが命令の処理手順の第2の選択を指示してい
るときにおいて、第1レジスタ3がオフ状態である場合
は処理を終了し、また、第1レジスタ3がオン状態であ
り且つ移行先ステップの状態が非活性である場合も処理
を終了し、第1レジスタ3がオン状態であり且つ移行先
ステップの状態が活性である場合は第1レジスタ3にオ
フ状態を設定するデータを出力し、一方、第5レジスタ
7に設定されたデータが命令の処理手順の第1の選択を
指示しているときにおいては、移行先ステップを活性化
すると共に第3レジスタ5に格納されたアドレスの移行
元ステップを非活性化する。そして、分岐の終了を宣言
する命令を読み出したときは、第2レジスタ4を初期設
定することにより第1レジスタ3をセット可能状態にし
た後、第5レジスタ7に設定されたデータが命令の処理
手順の第2の選択を示している場合は第1レジスタ3が
オフ状態であるとき処理を終了し、第1レジスタ3がオ
ン状態であるとき第5レジスタ7に命令の処理手順の第
1の選択を指示するデータを設定した後第4レジスタ6
に設定されているプログラムアドレスにジャンプし、一
方第5レジスタ7に設定されたデータが命令の処理手順
の第1の選択を指示している場合は直ちに処理を終了す
る。
A programmable controller according to a third aspect of the present invention, in addition to the respective configurations of the storage means 1, the analysis means 2, the first register 3, the second register 4, the third register 5 and the fifth register 7, The analysis means 2 has a fourth register 6 for storing the program address of the branch or merge instruction read out, and the analysis means initializes the second register 4 when the instruction declaring the start of the parallel branch is read out. By setting, the first register 3 is set to a settable state, data for instructing the second selection of the instruction processing procedure is set in the fifth register 7, and the start program address of the next instruction is set in the fourth register 6. Set. Further, when an instruction for detecting the active / inactive state of the transfer source step in the parallel branch is read, when the detected state of the transfer source step is inactive, the first register 3 via the second register 4 Is interlocked to the off state, and when the detected state of the transition source step is active, the address of the transition source step is stored in the third register 5. Further, when the instruction for detecting the on / off state of the transition is read, when the detected state of the transition is on, the data for setting the on state to the first register 3 is output, while the detected When the transition state is OFF, the data for setting the OFF state is output to the first register 3. When the instruction for parallel branch is read, the first register 3 is in the OFF state when the data set in the fifth register 7 indicates the second selection of the instruction processing procedure. If the first register 3 is in the ON state and the state of the transition destination step is inactive, the process is terminated, and the first register 3 is in the ON state and the transition destination step When the state is active, the data for setting the OFF state to the first register 3 is output, while the data set to the fifth register 7 indicates the first selection of the instruction processing procedure. Activates the migration destination step and deactivates the migration source step of the address stored in the third register 5. When the instruction declaring the end of the branch is read out, the second register 4 is initialized to set the first register 3 in the settable state, and then the data set in the fifth register 7 is processed by the instruction. When the second selection of the procedure is shown, the processing is ended when the first register 3 is in the off state, and when the first register 3 is in the on state, the first register 3 of the instruction processing procedure is written in the fifth register 7. After setting data for instructing selection, the fourth register 6
When the data set in the fifth register 7 indicates the first selection of the instruction processing procedure, the processing is immediately terminated.

【0029】また、上記解析手段2は、例えば請求項4
記載のように、並列合流の開始を宣言する命令を読み出
したとき、第2レジスタ4を初期設定することにより第
1レジスタ3をセット可能状態にすると共に第5レジス
タ7に命令の処理手順の第2の選択を指示するデータを
設定し且つ第4のレジスタ6に次の命令の先頭プログラ
ムアドレスを設定する。また、並列合流における移行元
ステップの活性・非活性の状態を検出する命令を読み出
したときは、第5レジスタ7に設定されたデータが命令
の処理手順の第2の選択を指示しているときにおいて、
移行元ステップの状態が活性である場合は処理を終了
し、移行元ステップの状態が非活性である場合は第2レ
ジスタ4を介して第1レジスタ3をオフ状態にインター
ロックし、一方、第5レジスタ7に設定されたデータが
命令の処理手順の第1の選択を指示しているときにおい
ては、移行元ステップを非活性化する。また、並列合流
を指示する命令を読み出したときは、第5レジスタ7に
設定されたデータが命令の処理手順の第2の選択を指示
しているときにおいて、第1レジスタ3がオフ状態であ
る場合は処理を終了し、第1レジスタ3がオン状態であ
り且つ移行先ステップの状態が活性である場合も処理を
終了し、第1レジスタ3がオン状態であり且つ移行先ス
テップの状態が非活性である場合は該移行先ステップを
活性化し、一方、第5レジスタ7に設定されたデータが
命令の処理手順の第1の選択を指示しているときは処理
を終了する。そして、合流の終了を宣言する命令を読み
出したときは、第2レジスタ4を初期設定することによ
り第1レジスタ3をセット可能状態にした後、第5レジ
スタ7に設定されたデータが命令の処理手順の第2の選
択を示している場合は第1レジスタ3がオフ状態である
とき処理を終了し、第1レジスタ3がオン状態であると
き第5レジスタ7に命令の処理手順の第1の選択を指示
するデータを設定した後第4レジスタ6に設定されてい
るプログラムアドレスにジャンプし、一方第5レジスタ
7に設定されたデータが命令の処理手順の第1の選択を
指示している場合は直ちに処理を終了する。
Further, the analyzing means 2 may be, for example, claim 4.
As described above, when the instruction declaring the start of parallel merging is read, the first register 3 is set to the settable state by initializing the second register 4, and the fifth register 7 is set to the first instruction processing procedure. The data instructing the selection of 2 is set and the leading program address of the next instruction is set in the fourth register 6. Further, when an instruction for detecting the active / inactive state of the transition source step in parallel merging is read, when the data set in the fifth register 7 indicates the second selection of the instruction processing procedure. At
When the state of the transfer source step is active, the processing is terminated, and when the state of the transfer source step is inactive, the first register 3 is interlocked to the off state via the second register 4, while the first 5 When the data set in the register 7 indicates the first selection of the instruction processing procedure, the transfer source step is deactivated. When the instruction for parallel merging is read, the first register 3 is in the OFF state when the data set in the fifth register 7 indicates the second selection of the instruction processing procedure. If the first register 3 is in the ON state and the state of the transition destination step is active, the process is terminated and the first register 3 is in the ON state and the state of the transition destination step is non-active. If it is active, the transition destination step is activated. On the other hand, if the data set in the fifth register 7 indicates the first selection of the instruction processing procedure, the processing is terminated. When the instruction declaring the end of the merge is read, the second register 4 is initialized to make the first register 3 settable, and then the data set in the fifth register 7 is processed by the instruction. When the second selection of the procedure is shown, the processing is ended when the first register 3 is in the off state, and when the first register 3 is in the on state, the first register 3 of the instruction processing procedure is written in the fifth register 7. After setting the data for instructing selection, jump to the program address set in the fourth register 6, while the data set in the fifth register 7 instructs the first selection of the instruction processing procedure. Immediately ends the process.

【0030】これにより、分岐/合流に対してより高速
に処理でき、且つメモリ容量に制約を受けることなく任
意の分岐ステップ数を設定してより広範なシーケンス制
御が可能になる。
As a result, it is possible to perform branching / merging at a higher speed, and it is possible to set a desired number of branching steps and perform a wider range of sequence control without being restricted by the memory capacity.

【0031】[0031]

【実施例】以下、図面を参照しながら本発明の実施例に
ついて詳細に述べる。図2は、一実施例に係わるPCの
構成を示すブロック図である。同図に示すように、PC
10は、CPU(Central-Processing-Unit) 11と、こ
のCPU11に、バスライン12を介して、ROM(Rea
d-Only-Memory)13、RAM(Random-Access-Memory)1
4、及びI/F(入出力インタフェース)15が接続さ
れている。さらにバスライン12には、レジスタARG
16、レジスタNRG17、レジスタSADD18、レ
ジスタPCMEM19、及びレジスタRPT20が接続
されている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 2 is a block diagram showing the configuration of the PC according to the embodiment. As shown in the figure, PC
Reference numeral 10 denotes a CPU (Central-Processing-Unit) 11 and a ROM (Rea) to the CPU 11 via a bus line 12.
d-Only-Memory) 13, RAM (Random-Access-Memory) 1
4 and an I / F (input / output interface) 15 are connected. Further, the bus line 12 has a register ARG.
16, a register NRG17, a register SADD18, a register PCMEM19, and a register RPT20 are connected.

【0032】上記ROM13には、システム全体を制御
するプログラムが格納されている。RAM14には、後
述するプログラムローダから転送されるシーケンス制御
のニーモニックが格納される。I/F15には、被制御
システムを構成する各種の入出力機器が不図示のシステ
ムラインを介して接続される。
The ROM 13 stores a program for controlling the entire system. The RAM 14 stores mnemonics for sequence control transferred from a program loader described later. Various input / output devices that constitute the controlled system are connected to the I / F 15 via a system line (not shown).

【0033】CPU11は、RAM14に格納されたニ
ーモニックの命令を順次読み出し、読み出した命令をR
OM13に格納されているプログラムに基づいて解析
し、この解析結果に基づいて演算を行い、その演算結果
をI/F15に出力する。
The CPU 11 sequentially reads out the mnemonic instructions stored in the RAM 14 and outputs the read instructions as R.
Analysis is performed based on the program stored in the OM 13, calculation is performed based on the analysis result, and the calculation result is output to the I / F 15.

【0034】上記CPU11による解析・演算の処理に
おいて、レジスタARG16はCPU11が処理する分
岐又は合流の命令に係わるトランジションのオン/オフ
の状態データを格納する。レジスタNRG17はレジス
タARG16のオフ状態をインタ−ロックする。レジス
タSADD18は上記の分岐又は合流の命令に係わる移
行元ステップのアドレスを格納する。レジスタPCME
M19は上記分岐又は合流の命令プログラムのアドレス
を格納する。レジスタRPT20は上記分岐又は合流の
命令の処理手順を二者択一するためのデータを格納す
る。
In the analysis / calculation processing by the CPU 11, the register ARG 16 stores the ON / OFF state data of the transition relating to the branch or merge instruction processed by the CPU 11. Register NRG17 interlocks the off state of register ARG16. The register SADD18 stores the address of the transition source step related to the above branch or merge instruction. Register PCME
M19 stores the address of the branch or merge instruction program. The register RPT20 stores data for selecting one of the processing procedures of the branch or merge instruction.

【0035】図3に、上記レジスタARG16とレジス
タNRG17の関係を示す。同図に示すように、レジス
タARG16及びNRG17は、共に同一構成のフリッ
プフロップからなり、いずれもデータ入力端子D、クロ
ック入力端子、反転リセット端子R、及び出力端子Qを
備えている。レジスタNRG17の出力NRGは、レジ
スタARG16の反転リセット端子Rに入力する。レジ
スタNRG17は、CPU11から出力される反転リセ
ット端子Rへの“L”レベル(“0”)の入力によりリ
セットされ、“H”レベル(“1”)の入力によりリセ
ットが解除される。そして、レジスタARG16は、そ
の反転リセット端子Rに、上記レジスタNRGからの出
力NRGが“L”レベル(“0”)で入力することによ
りリセットされる。すなわち、出力AGRが“0”に固
定される。そして、レジスタNRG17の出力NRGが
“H”レベル(“1”)で入力することによってリセッ
トが解除され、データ入力端子Dに入力されるARG入
力データ(トランジションのオン/オフ情報)をラッチ
して、このラッチしたデータを出力ARGとしてCPU
11に出力する。
FIG. 3 shows the relationship between the register ARG16 and the register NRG17. As shown in the figure, both the registers ARG16 and NRG17 are flip-flops having the same configuration, and each has a data input terminal D, a clock input terminal, an inverting reset terminal R, and an output terminal Q. The output NRG of the register NRG17 is input to the inverting reset terminal R of the register ARG16. The register NRG17 is reset by "L" level ("0") input to the inverting reset terminal R output from the CPU 11, and reset by "H" level ("1") input. The register ARG16 is reset by inputting the output NRG from the register NRG at the "L" level ("0") to the inverting reset terminal R thereof. That is, the output AGR is fixed to "0". When the output NRG of the register NRG17 is input at "H" level ("1"), the reset is released, and the ARG input data (transition on / off information) input to the data input terminal D is latched. , This latched data as output ARG to CPU
Output to 11.

【0036】図4は、SFC記述からニーモニックに変
換されて、上記RAM14に格納されるプログラムの配
置を模式的に示したものである。同図に示すように、R
AM14には、先頭にトランジション群プログラム、次
にライン群プログラム、そして最後にアクション部のプ
ログラムが格納されている。
FIG. 4 schematically shows the arrangement of the program stored in the RAM 14 after the SFC description is converted into mnemonics. As shown in the figure, R
In the AM 14, a transition group program is stored at the top, a line group program is stored next, and an action section program is stored at the end.

【0037】同図にように格納されているプログラムに
対して、図2に示すPC10のCPU11は、先ずトラ
ンジション群のプログラムを実行し、入力されているデ
ータ(情報)に基づいて各トランジションTN0、TN
1、・・・のオン(真)/オフ(偽)情報を出力する。
次にライン群のプログラムを実行し、上記トランジショ
ンのオン/オフと移行元ステップおよび移行先ステップ
の活性/非活性の情報に基づいてステップ移行指示を出
力する(ステップリレーを更新する)。続いて、アクシ
ョン部のプログラムを順次読み出し、上記ステップ移行
指示に基づいてアクションの実行又は非実行を判断して
処理する。すなわち、移行先ステップ(活性になってい
るステップ)に所属するアクションを処理し、所属しな
いアクションは非処理として、アクション部の終点に到
る。そして、再びトランジション群のプログラムに戻っ
て、トランジション群の先頭からアクション部の終点ま
での処理を行うということを繰り返す。
The CPU 11 of the PC 10 shown in FIG. 2 first executes the program of the transition group with respect to the program stored as shown in the figure, and based on the input data (information), each transition TN0, TN
Outputs on (true) / off (false) information of 1, ...
Next, the program of the line group is executed, and a step transition instruction is output (the step relay is updated) based on the information on the on / off of the transition and the activation / inactivation of the transition source step and the transition destination step. Then, the program of the action unit is sequentially read, and it is determined whether or not to execute the action based on the step transition instruction, and the process is performed. That is, the actions belonging to the transition destination step (active step) are processed, and the actions that do not belong are treated as unprocessed and reach the end point of the action part. Then, returning to the program of the transition group again, the processing from the beginning of the transition group to the end point of the action section is repeated.

【0038】一般に、上述の1巡の処理を1スキャンと
いい、この1スキャンが1個のプロセスを形成する。1
プロセスは、1個の機械や1ラインといった制御処理の
単位であり、通常は、複数のプロセスによるSFCプロ
グラム群により全体のシーケンス制御が構成される。全
体のシーケンス制御のどこからどこまでを1プロセスと
して区切るかは、ユーザが決定する。
Generally, the above-mentioned one round of processing is called one scan, and this one scan forms one process. 1
A process is a unit of control processing such as one machine or one line, and normally the entire sequence control is configured by an SFC program group by a plurality of processes. The user determines where to divide the whole sequence control as one process.

【0039】1プロセスは、このように一連のシーケン
ス制御の区切りを形成し、また、以下に述べる分岐や合
流の分岐ラインを形成する。図5(a) は、SFC記述の
選択分岐の例である。この記述は、ステップS000か
ら、3つのステップS001、S002及びS003の
内、それぞれトランジションTN000、TN001又
はTN0010を介して、いずれかのステップへ選択的
に分岐する場合を示している。
In this way, one process forms a series of sequence control delimiters, and also forms branch lines for branching and merging described below. FIG. 5A shows an example of selective branch of SFC description. This description shows the case where the step S000 is selectively branched to any one of the three steps S001, S002 and S003 via the transition TN000, TN001 or TN0010, respectively.

【0040】SFC規約に基づく上記分岐の条件は図1
5で説明した通りであり、以下の選択合流、並列分岐、
及び並列合流の場合も同様である。同図(b) は選択合流
の例であり、3つのステップS010、S011及びS
012から選択的に、それぞれトランジションTN00
0、TN001又はTN0010を介して、ステップS
013に合流する場合を示している。
The above branching condition based on the SFC protocol is shown in FIG.
As described in 5, the following selective merging, parallel branching,
The same applies to the case of parallel merging. FIG. 3B shows an example of selective merging, and three steps S010, S011 and S
012 selectively, transition TN00 respectively
0, TN001 or TN0010, step S
The case of joining 013 is shown.

【0041】また、図6(a) は並列分岐の例である。こ
の記述は、ステップS000から、共通のトランジショ
ンTN000を介して、3つのステップS001、S0
02及びS003へ同時に分岐する場合を示している。
Further, FIG. 6A shows an example of parallel branching. This description starts from step S000 and goes through three steps S001 and S0 via a common transition TN000.
It shows the case of branching to 02 and S003 at the same time.

【0042】そして、同図(b) は並列合流の例であり、
3つのステップS020、S021及びS022から同
時に共通のトランジションTN000を介して、ステッ
プS023に合流する場合を示している。
FIG. 6 (b) shows an example of parallel merging.
The case where three steps S020, S021, and S022 are merged into step S023 via the common transition TN000 at the same time is shown.

【0043】本実施例では、上記のような分岐や合流の
プログラムを、より高速に処理するために、また、分岐
数に制限なく如何に大規模なシーケンス制御をも処理で
きるようにするために、上記のようなSFC記述の分岐
や合流に対応して、図5(a),(b) 及び図6(a),(b) の右
にそれぞれ示すニーモニックを展開する。このニーモニ
ックは、図5(a),(b) 及び図6(a),(b) の左に示すグラ
フィックス(SFC記述)から後述するプログラムロー
ダにより自動変換することができ、また手作業で転記
(変換)しながらプログラムローダに入力することもで
きる。
In this embodiment, in order to process the above-mentioned branching and merging programs at a higher speed, and also to enable processing of a large-scale sequence regardless of the number of branches. The mnemonics shown on the right side of FIGS. 5 (a) and (b) and FIGS. 6 (a) and 6 (b) are developed corresponding to the branching and merging of the SFC description as described above. This mnemonic can be automatically converted by the program loader described later from the graphics (SFC description) shown on the left of FIGS. 5 (a), (b) and 6 (a), (b), or manually. It is also possible to input to the program loader while transcribing (converting).

【0044】図5(a) に示すニーモニックは、先ず、命
令D−SLCで、選択分岐の開始を宣言し、次に、命令
STLで、分岐元ステップS000の活性状態を読み出
し、続いて、命令LDで、トランジションTN000の
オン/オフ状態を読み出し、そして、命令SLCTで、
上記分岐元ステップS000の活性状態とトランジショ
ンTN000のオン/オフ状態、及び分岐先ステップS
001の状態とに基づき分岐可能であるときはステップ
S001に分岐するよう指示している。引き続き、同様
に命令LD及び命令SLCTを、トランジションTN0
01及びステップS002を対象に繰り返し、さらに命
令LD及び命令SLCTを、トランジションTN002
及びステップS003を対象に繰り返した後、命令E−
TRAで、上記選択分岐の終了を宣言している。
In the mnemonic shown in FIG. 5 (a), the start of the selected branch is first declared by the instruction D-SLC, then the active state of the branch source step S000 is read by the instruction STL, and then the instruction Read on / off state of transition TN000 with LD, and with command SLCT,
The active state of the branch source step S000 and the on / off state of the transition TN000, and the branch destination step S
If it is possible to branch based on the state of 001, it is instructed to branch to step S001. Subsequently, the instruction LD and the instruction SLCT are similarly changed to the transition TN0.
01 and step S002 are repeated, and the instruction LD and instruction SLCT are changed to transition TN002.
And step S003 are repeated for the instruction E-
TRA declares the end of the above selection branch.

【0045】また、同図(b) に示すニーモニックでは、
先ず、命令C−SLCで、選択合流の開始を宣言し、次
に、命令JUNCで、合流元ステップS010の活性状
態を読み出し、続いて、命令LDで、トランジションT
N000のオン/オフ状態を読み出した後、命令SET
で、上記合流元ステップS010の活性状態とトランジ
ションTN000のオン/オフ状態、及び合流先ステッ
プS013の状態とに基づき合流可能であるときはステ
ップS010に合流するよう指示している。そして、さ
らに命令JUNC、LD及びSETを、ステップS01
1、トランジションTN001及びステップS013を
対象に上記同様に繰り返し、さらに続けて命令JUN
C、LD及びSETを、ステップS012、トランジシ
ョンTN002及びステップS013を対象に上記同様
に繰り返した後、命令E−TRAで上記選択合流の終了
を宣言している。
Further, in the mnemonic shown in FIG.
First, the start of selective merging is declared by the instruction C-SLC, then the active state of the merging source step S010 is read by the instruction JUNC, and then the transition T is made by the instruction LD.
After reading the ON / OFF status of N000, set SET
Then, when it is possible to merge based on the active state of the merge source step S010, the on / off state of the transition TN000, and the state of the merge destination step S013, it is instructed to merge to step S010. Then, the instructions JUNC, LD, and SET are further added in step S01.
1, transition TN001 and step S013 are repeated in the same manner as above, and the instruction JUN is continued.
After repeating C, LD and SET in the same manner as described above for step S012, transition TN002 and step S013, the instruction E-TRA declares the end of the selective merging.

【0046】さらに、図6(a) に示すニーモニックは、
先ず、命令D−SIMで、並列合流の開始を宣言し、次
に、命令STLで、分岐元ステップS000の活性状態
を読み出し、続いて、命令LDで、トランジションTN
000のオン/オフ状態を読み出し、そして、命令SI
MULで、上記分岐元ステップS000の活性状態とト
ランジションTN000のオン/オフ状態、及び分岐先
ステップS001の状態とに基づき分岐可能であるとき
はステップS001に分岐するよう指示している。引き
続き、上記同様に命令SIMULをステップS002を
対象に繰り返し、さらに同じく命令SIMULをステッ
プS003を対象に繰り返した後、命令E−TRAで、
上記並列分岐の終了を宣言している。
Further, the mnemonic shown in FIG. 6 (a) is
First, the start of parallel merging is declared by the instruction D-SIM, then the active state of the branch source step S000 is read by the instruction STL, and then the transition TN is issued by the instruction LD.
Read the ON / OFF status of 000 and execute the instruction SI
In the MUL, when it is possible to branch based on the active state of the branch source step S000, the ON / OFF state of the transition TN000, and the state of the branch destination step S001, the MUL is instructed to branch to step S001. Subsequently, similarly to the above, the instruction SIMUL is repeated for step S002, and the same instruction SIMUL is repeated for step S003, and then the instruction E-TRA is executed.
The end of the parallel branch is declared.

【0047】そして、同図(b) に示すニーモニックは、
先ず、命令C−SIMで、並列合流の開始を宣言し、次
に、命令SYNLを3回繰り返して、それぞれ合流元ス
テップS020、S021、及びS022の活性状態を
読み出し、続いて、命令LDで、トランジションTN0
00のオン/オフ状態を読み出した後、命令SYNC
で、上記各合流元ステップ活性状態とトランジションT
N000のオン/オフ状態、及び合流先ステップS02
3の状態とに基づき合流可能であるときはステップS0
23に同時に合流するよう指示して、最後に命令E−T
RAで上記並列合流の終了を宣言している。
Then, the mnemonic shown in FIG.
First, the command C-SIM declares the start of parallel merging, and then the command SYNL is repeated three times to read the active states of the merging source steps S020, S021, and S022, respectively, and then the command LD, Transition TN0
After reading the ON / OFF state of 00, the command SYNC
Then, the above-mentioned merge source step active state and transition T
ON / OFF state of N000, and merge destination step S02
When it is possible to merge based on the state of No. 3, step S0
23 at the same time, and finally command ET
RA has declared the end of the parallel merging.

【0048】図7に、上記の分岐や合流に用いられるニ
ーモニックの13個の命令を、一覧図表にして示す。以
下、同図に示す命令を説明する。命令D−SLCは選択
分岐の開始を宣言する。命令STLは選択分岐又は並列
分岐におけるステップ活性状態の読み出しを指示する。
命令LDはトランジションのオン/オフ状態の読み出し
を指示する。命令SLCTは選択分岐を指示する。命令
C−SLCは選択合流の開始を宣言する。命令JUNC
は選択合流におけるステップ活性状態の読み出しを指示
する。命令SETは選択合流を指示する。命令D−SI
Mは並列分岐の開始を宣言する。命令SIMULは並列
分岐を指示する。命令C−SIMは並列合流の開始を宣
言する。命令SYNLは並列合流におけるステップ活性
状態の読み出しを指示する。命令SYNCは並列合流を
指示する。そして、命令E−TRAは分岐又は合流の終
了を宣言する。
FIG. 7 shows a list of 13 mnemonic instructions used for branching and merging. The instructions shown in the figure will be described below. The instruction D-SLC declares the start of a taken branch. The instruction STL instructs reading of the step active state in the selected branch or the parallel branch.
The instruction LD gives an instruction to read the on / off state of the transition. The instruction SLCT points to a selected branch. The instruction C-SLC declares the start of selective merging. Command JUNC
Indicates reading of the step active state in selective merging. The command SET instructs selective merging. Command D-SI
M declares the start of a parallel branch. The instruction SIMUL indicates a parallel branch. The instruction C-SIM declares the start of parallel merging. The instruction SYNL instructs reading of the step active state in parallel merging. The instruction SYNC instructs parallel merging. The instruction E-TRA then declares the end of the branch or merge.

【0049】前述のSFC記述の図形から上記のような
ニーモニックに変換するSFCプログラミング装置(プ
ログラムコーダ)を、図8に示す。同図に示すように、
プログラムコーダ30は、入力部31、命令記憶部3
2、図形変換部33、図形記憶部34、表示変換部3
5、及び表示部35からなっている。
FIG. 8 shows an SFC programming device (program coder) for converting the above-mentioned SFC description graphic into the above mnemonic. As shown in the figure,
The program coder 30 includes an input unit 31, an instruction storage unit 3
2, graphic conversion unit 33, graphic storage unit 34, display conversion unit 3
5 and a display unit 35.

【0050】このプログラムコーダ30でプログラムを
作成する場合、まず、オペレータが入力部31を介して
SFC図形やラダー図の記号(シンボル)を表す図形情
報を指定する。図形記憶部34はこの図形情報を記憶
し、表示変換部35は図形記憶部34から上記指定され
た図形情報を読み出して表示形式すなわちSFC図形や
ラダー図に変換し、この表示形式に変換した図形を表示
部35のディスプレイ装置等に表示させる。これによ
り、オペレータはディスプレイ上に表示された図形を確
認しながら逐次プログラムを作成していく。
When a program is created by the program coder 30, first, the operator designates the graphic information representing the SFC graphic or the symbol of the ladder diagram through the input unit 31. The graphic storage unit 34 stores this graphic information, and the display conversion unit 35 reads the specified graphic information from the graphic storage unit 34, converts it into a display format, that is, an SFC graphic or a ladder diagram, and converts it into this display format. Is displayed on the display device or the like of the display unit 35. As a result, the operator successively creates a program while checking the graphic displayed on the display.

【0051】次に、図形変換部33が上記図形情報とし
て作成されたプログラムを図形記憶部34から読み出し
てニーモニックに変換し、そのニーモニックを命令記憶
部32に格納する。この命令記憶部32から、図2に示
すPC10のRAM14に不図示のデータ転送用インタ
フェースを介して転送され、例えば図4に示したような
プログラムが格納される。
Next, the graphic conversion unit 33 reads the program created as the graphic information from the graphic storage unit 34, converts it into a mnemonic, and stores the mnemonic in the instruction storage unit 32. From the instruction storage unit 32, the data is transferred to the RAM 14 of the PC 10 shown in FIG. 2 via a data transfer interface (not shown), and a program as shown in FIG. 4 is stored.

【0052】上記PC10に格納されるプログラムコー
ド(ニーモニック)は、一般にプログラム言語といわれ
ているような、PC10内部においてそのまま実行でき
る言語(マシンコード)ではなく、ユーザが理解しやす
い中間コードの形式をとっている。勿論、ニーモニック
を解析して実行形式のプログラムコードに変換してから
格納するようにしてもよく、その場合は、CPU11は
上記実行形式のプログラムコードに対応した処理を行
う。
The program code (mnemonic) stored in the PC 10 is not a language (machine code) that can be executed in the PC 10 as is generally called a programming language, but an intermediate code format that is easy for the user to understand. I am taking it. Of course, the mnemonics may be analyzed and converted into an executable program code before being stored. In that case, the CPU 11 performs a process corresponding to the executable program code.

【0053】尚、以下の説明では、ニーモニック(中間
コード)で格納されているものとする。そして、上記格
納されたニーモニックが更に機械語(マシンコード)に
順次変換されてPC10によるシーケンス制御が実行さ
れる。
In the following description, it is assumed that the mnemonic (intermediate code) is stored. Then, the stored mnemonic is further converted into a machine language (machine code) in sequence and the sequence control by the PC 10 is executed.

【0054】上記構成の本実施例において、上記ニーモ
ニックの図7に示した13個の命令を、図2に示した5
個のレジスタを用い、以下に説明するアルゴリズムに基
づいて解析することによって、SFC記述による分岐又
は合流のプログラムを高速に、且つ大規模なシステムに
対応できるように処理していく。この本実施例における
命令の処理動作を、図9乃至図13に示すフローチャー
トを用いて説明する。尚、具体例として、前述の図5及
び図6の右にそれぞれ示すニーモニックを参照する。
In the present embodiment having the above-mentioned configuration, the 13 instructions shown in FIG. 7 of the mnemonic are replaced by the 5 instructions shown in FIG.
By using each register and analyzing based on the algorithm described below, a branching or merging program by SFC description is processed at high speed so as to be compatible with a large-scale system. The instruction processing operation in this embodiment will be described with reference to the flowcharts shown in FIGS. As a concrete example, the mnemonics shown on the right side of FIGS. 5 and 6 are referred to.

【0055】先ず、選択分岐の場合を例にとって説明す
る。選択分岐では、図5(a) のニーモニックに示したよ
うに、選択分岐の開始宣言命令D−SLC、分岐元ステ
ップ活性状態読出し命令STL、トランジション・オン
/オフ状態読出し命令LD、選択分岐の指示命令SLC
T、及び分岐の終了宣言命令E−TRAによって処理が
なされる。
First, the case of selective branching will be described as an example. In the selected branch, as shown in the mnemonic in FIG. 5A, the start declaration instruction D-SLC of the selected branch, the branch source step active state read instruction STL, the transition on / off state read instruction LD, the instruction of the selected branch Command SLC
Processing is performed by T and a branch end declaration instruction E-TRA.

【0056】命令D−SLCでは、図9(a) のフローチ
ャートに示すように、2つのレジスタNRG及びRPT
の初期化を行って処理を終了する。この初期化では、ま
ず、レジスタNRGに“1”を設定する(手順S1)。
この処理は、レジスタNRGのクロック入力端子にラッ
チ信号を入力すると共に入力端子DにNRG入力データ
“1”を入力してラッチさせ、これにより、レジスタA
RGのリセットを解除する処理である。さらに、この初
期化ではレジスタRPTに“0”を設定する(同じく手
順S1)。これにより、レジスタRPTの内容が初期状
態である“0”に設定される。
The instruction D-SLC has two registers NRG and RPT as shown in the flowchart of FIG.
Is initialized and the process ends. In this initialization, first, "1" is set in the register NRG (step S1).
In this process, the latch signal is input to the clock input terminal of the register NRG and the NRG input data “1” is input to the input terminal D to be latched.
This is a process for canceling the reset of the RG. Further, in this initialization, "0" is set in the register RPT (also step S1). As a result, the content of the register RPT is set to "0" which is the initial state.

【0057】次に、命令STLでは、図9(b) のフロー
チャートに示すように、移行元(分岐元)ステップ(図
5(a) のステップS000参照)の活性状態を読み出
し、活性か否か判別する(手順S11)。この判別で、
移行元ステップが活性であれば、移行元ステップの移行
条件が成立している場合であり、このときは、次に、レ
ジスタNRGに“1”をセットする(手順S12)。こ
の処理は、レジスタARGがリセットされていた
(“0”にインターロックされている)場合に備えてレ
ジスタARGをセット状態にし、次に続く命令でトラン
ジションが活性である場合に、移行条件が成立している
ことをレジスタARGに設定できるようにする処理であ
る。
Next, in the instruction STL, as shown in the flow chart of FIG. 9B, the active state of the transition source (branch source) step (see step S000 of FIG. 5A) is read to determine whether it is active. It is determined (step S11). With this determination,
If the transfer source step is active, it means that the transfer condition of the transfer source step is satisfied. At this time, next, "1" is set in the register NRG (step S12). This processing sets the register ARG to the set state in preparation for the case where the register ARG has been reset (interlocked to "0"), and the transition condition is satisfied when the transition is active in the next subsequent instruction. This is a process that enables setting what is being done in the register ARG.

【0058】そして、上記に続いて、移行元ステップの
アドレスをレジスタSADDに記憶して(手順S1
4)、処理を終了する。上記手順S11の判別で、移行
元ステップが非活性であれば、移行元ステップの移行条
件が成立していない場合である。この場合はレジスタN
RGに“0”をセットして(手順S13)、処理を終了
する。この手順13の処理は、レジスタNRGのクロッ
ク入力端子にラッチ信号を入力すると共に入力端子Dに
NRG入力データ“0”を入力してラッチさせる処理で
ある。これにより、レジスタNRGの出力NRGが
“0”となり、レジスタARGがリセットされ、レジス
タARGの出力ARGが“0”に固定(インターロッ
ク)される。これによって、後述するトランジションの
移行条件の可否が「可」(オン、すなわち活性)であっ
ても、その「可」が無視される。
Then, following the above, the address of the transfer source step is stored in the register SADD (step S1).
4), the process ends. If the transfer source step is inactive in the determination in step S11, it means that the transfer condition of the transfer source step is not satisfied. In this case, register N
"0" is set in RG (step S13), and the process ends. The process of the procedure 13 is a process of inputting a latch signal to the clock input terminal of the register NRG and inputting NRG input data “0” to the input terminal D to latch it. As a result, the output NRG of the register NRG becomes "0", the register ARG is reset, and the output ARG of the register ARG is fixed (interlocked) to "0". As a result, even if the transition transition condition to be described later is "OK" (ON, that is, active), the "OK" is ignored.

【0059】続いて、命令LDでは、図10(a) のフロ
ーチャートに示すように、移行先(分岐先)ステップへ
のリンク上にあるトランジション(図5(a) のトランジ
ションTN000,TN001又はTN002参照)の
活性状態を読み出し、活性か否か判別する(手順S2
1)。そして、活性であれば、レジスタARGに“1”
をセットして(手順S22)、処理を終了する。この手
順S22の処理は、レジスタARGのクロック入力端子
にラッチ信号を入力すると共に入力端子DにARG入力
データ“1”を入力する処理である。これにより、レジ
スタARGがセット状態であるとき(移行元ステップが
活性のとき)は、ARG入力データ“1”がラッチさ
れ、出力ARGは“1”になる。一方、レジスタARG
がインターロックされた状態であるとき(移行元ステッ
プが非活性のとき)は、ARG入力データ“1”は無視
されて出力ARGは“0”に固定されたままである。
Then, in the instruction LD, as shown in the flow chart of FIG. 10A, the transition on the link to the transition destination (branch destination) step (see the transition TN000, TN001 or TN002 in FIG. 5A). ), The active state is read to determine whether it is active (step S2).
1). If it is active, the register ARG is set to "1".
Is set (step S22), and the process ends. The process of step S22 is a process of inputting a latch signal to the clock input terminal of the register ARG and inputting ARG input data “1” to the input terminal D. As a result, when the register ARG is in the set state (when the transition source step is active), the ARG input data "1" is latched and the output ARG becomes "1". Meanwhile, the register ARG
Is in an interlocked state (when the source step is inactive), the ARG input data "1" is ignored and the output ARG remains fixed at "0".

【0060】上記手順S21の判別で、トランジション
が非活性であるときは、レジスタARGに“0”をセッ
トして(手順S23)、処理を終了する。この手順S2
3の処理は、上述と同様にして、レジスタARGの入力
端子Dに“0”を入力する処理である。この場合、レジ
スタARGがセット状態であっても、インターロックさ
れた状態であっても、結果は同一であり、出力ARGは
“0”である。
If it is determined in step S21 that the transition is inactive, "0" is set in the register ARG (step S23) and the process ends. This step S2
The process of 3 is a process of inputting “0” to the input terminal D of the register ARG in the same manner as described above. In this case, the result is the same whether the register ARG is set or interlocked, and the output ARG is "0".

【0061】次に、命令SLCTでは、図10(b) のフ
ローチャートに示すように、先ずレジスタARGの内容
を調べる(手順S31)。この処理は、レジスタARG
の出力ARGが“1”になっているか否かを判別する処
理である。そして、出力ARGが“1”であれば、移行
元ステップが活性で且つトランジションも活性であると
判別し、この場合は続いて、移行先ステップ(図5(a)
のステップS001、S002又はS003参照)の活
性状態を判別する(手順S32)。この判別で、移行先
ステップが非活性であれば、移行条件が成立したと判別
して、この移行先ステップを活性化し(手順S33)、
続いて移行元ステップを非活性化する(手順S34)。
この処理では、上述の命令STLの処理によりレジスタ
SADDに格納されているアドレスのステップを非活性
化する。この後レジスタNRGに“0”をセットする
(手順S35)。これにより、レジスタARGがリセッ
トされ、その出力ARGが“0”に固定される。このた
め、この後、残る選択肢の移行先ステップ毎に実行され
る命令LD及び命令SLCTによる処理結果は全て無効
になり、したがって、上記最初に移行条件が成立した移
行先ステップが分岐先ステップとして固定・選択される
ことになる。
Next, in the instruction SLCT, as shown in the flowchart of FIG. 10 (b), the contents of the register ARG are first checked (step S31). This process is performed by register ARG
Is a process for determining whether or not the output ARG of "1" is "1". If the output ARG is "1", it is determined that the transition source step is active and the transition is also active. In this case, the transition destination step (FIG. 5 (a)) is continued.
(See step S001, S002, or S003) of (1) is determined (step S32). If the transition destination step is inactive in this determination, it is determined that the transition condition is satisfied, and the transition destination step is activated (step S33),
Then, the transfer source step is deactivated (step S34).
In this processing, the step of the address stored in the register SADD is deactivated by the processing of the above-mentioned instruction STL. Thereafter, "0" is set in the register NRG (step S35). As a result, the register ARG is reset and the output ARG is fixed to "0". For this reason, after that, all the processing results by the instructions LD and the instructions SLCT executed for each transition destination step of the remaining options become invalid, so that the transition destination step where the transition condition is first established is fixed as the branch destination step. -It will be selected.

【0062】上記手順S31の判別で、レジスタARG
の出力ARGが“0”であれば、移行元ステップとトラ
ンジションのいずれか又は両方が非活性であり、移行条
件が成立していないと判別して、ただちに処理を終了す
る。また、上記手順S32の判別で、移行先ステップが
活性であった場合も移行条件が成立していないと判別し
て、ただちに処理を終了する。
By the determination in the above step S31, the register ARG
If the output ARG of “1” is “0”, one or both of the transition source step and the transition are inactive, it is determined that the transition condition is not satisfied, and the process is immediately terminated. Further, in the determination of the above step S32, it is determined that the transition condition is not satisfied even when the transition destination step is active, and the process is immediately terminated.

【0063】続いて、命令E−TRNでは、図11のフ
ローチャートに示すように、レジスタNRGに“1”を
セットする(手順S41)。これにより、レジスタAR
Gがリセット状態であればリセットが解除され、セット
状態であればセット状態が継続する。次に、レジスタR
PTの内容を調べる(手順S42)。選択分岐の場合は
開始宣言命令D−SLCの処理でレジスタRPTは
“0”設定されている。この“0”を確認してただちに
処理を終了する。
Then, the instruction E-TRN sets "1" in the register NRG as shown in the flowchart of FIG. 11 (step S41). As a result, the register AR
If G is in the reset state, the reset is released, and if G is the set state, the set state continues. Then register R
The contents of PT are checked (step S42). In the case of the selective branch, the register RPT is set to "0" by the processing of the start declaration instruction D-SLC. When this "0" is confirmed, the processing is immediately terminated.

【0064】上記の処理により、選択分岐における移行
条件を満たす移行先ステップの検出と、移行決定後の移
行元ステップ及び移行先ステップの活性/非活性の状態
データの更新処理が分岐数に制限なく且つ高速に行われ
る。
By the above-mentioned processing, the detection of the migration destination step satisfying the migration condition in the selected branch and the update processing of the active / inactive state data of the migration source step and the migration destination step after the migration decision are not limited to the number of branches. And it is done at high speed.

【0065】次に、選択合流の場合を例にとって説明す
る。選択合流では、図5(b) のニーモニックに示したよ
うに、選択合流開始宣言命令C−SLC、選択合流元ス
テップの活性状態読出し命令JUNC、トランジション
・オン/オフ状態読出し命令LD、選択合流指示命令S
ET、及び合流の終了宣言命令E−TRAによって処理
がなされる。
Next, the case of selective merging will be described as an example. In the selective merging, as shown in the mnemonic of FIG. 5B, the selective merging start declaration instruction C-SLC, the active state read instruction JUNC of the selective merging source step, the transition on / off state read instruction LD, the selective merging instruction. Command S
Processing is performed by the ET and the merge end declaration instruction E-TRA.

【0066】命令C−SLCは、図9(a) のフローチャ
ートに示すように、選択分岐の命令D−SLCと共通の
手順で処理を行う。命令JUNCも、同図(b) のフロー
チャートに示すように、選択分岐の命令STLと共通の
手順で処理を行う。
The instruction C-SLC performs processing in the same procedure as the instruction D-SLC of the selected branch, as shown in the flowchart of FIG. 9 (a). The instruction JUNC also performs processing in the same procedure as the instruction STL of the selected branch, as shown in the flowchart of FIG.

【0067】命令LDは選択分岐の場合と同様に処理を
行う。命令SETは、同図(b) のフローチャートに示す
ように、選択分岐の命令SLCTと共通の手順で処理を
行う。このとき、手順S31でレジスタARGが
“1”、且つ手順S32で移行先ステップが活性、すな
わち移行条件が成立しているときは、選択分岐の場合と
同様に手順S35でレジスタNRGに“0”がセットさ
れ、これにより、レジスタARGがリセットされて、そ
の出力ARGが“0”に固定される。このため、この
後、残る選択肢の移行元ステップ毎に実行される命令L
D及びSETによる処理結果は全て無効となり、したが
って、上記最初に移行条件が成立した移行元ステップが
合流元ステップとして固定・選択されることになる。
The instruction LD performs the same processing as in the case of the selective branch. The instruction SET performs processing in the same procedure as the instruction SLCT of the selected branch, as shown in the flowchart of FIG. At this time, if the register ARG is "1" in step S31 and the transition destination step is active in step S32, that is, the transition condition is satisfied, the register NRG is set to "0" in step S35 as in the case of the selective branch. Is set, whereby the register ARG is reset and its output ARG is fixed to "0". Therefore, after this, the instruction L to be executed at each of the transfer source steps of the remaining options is executed.
All the processing results by D and SET are invalid, and therefore the transfer source step where the transfer condition is first established is fixed and selected as the merge source step.

【0068】そして、命令E−TRNは、図11のフロ
ーチャートに示すように共通手順であり、選択分岐の場
合と同様に、手順S42でレジスタRPTに設定されて
いる“0”を確認して、ただちに処理を終了する。
Then, the instruction E-TRN is a common procedure as shown in the flowchart of FIG. 11, and as in the case of the selective branch, "0" set in the register RPT is confirmed in step S42, Immediately ends the process.

【0069】上記の処理により、選択合流における移行
条件を満たす移行元ステップの検出と、移行決定後の移
行元ステップ及び移行先ステップの活性/非活性の状態
データの更新処理が分岐数に制限なく且つ高速に行われ
る。
By the above processing, the detection of the migration source step satisfying the migration condition in the selective merge and the update processing of the active / inactive state data of the migration source step and the migration destination step after the migration decision are not limited to the number of branches. And it is done at high speed.

【0070】続いて、並列分岐の場合を例にとって説明
する。並列分岐では、図6(a) のニーモニックに示した
ように、並列分岐開始宣言命令D−SIM、分岐元ステ
ップ活性状態読出し命令STL、トランジション・オン
/オフ状態読出し命令LD、並列分岐指示命令SIMU
L、及び分岐の終了宣言命令E−TRAによって処理が
なされる。
Next, the case of parallel branching will be described as an example. In the parallel branch, as shown in the mnemonic of FIG. 6A, the parallel branch start declaration instruction D-SIM, the branch source step active state read instruction STL, the transition on / off state read instruction LD, the parallel branch instruction instruction SIMU.
Processing is performed by L and a branch end declaration instruction E-TRA.

【0071】命令D−SIMでは、図12(a) のフロー
チャートに示すように、2つのレジスタNRG及びRP
Tの初期化を行って処理を終了する。この処理では、レ
ジスタNRGに“1”を設定し、レジスタRPTにも
“1”を設定する(手順S51)。これにより、前述し
たようにレジスタARGのリセットが解除されると共
に、レジスタRPTにフラグが設定される。
The instruction D-SIM has two registers NRG and RP as shown in the flow chart of FIG.
The initialization of T is performed and the processing is terminated. In this process, the register NRG is set to "1" and the register RPT is also set to "1" (step S51). As a result, as described above, the reset of the register ARG is released and the flag is set in the register RPT.

【0072】続いて、次命令の先頭プログラムアドレス
をレジスタPCMEMに格納して(手順S52)、処理
を終了する。この手順S52の処理は、この命令の次の
命令STLの先頭プログラムアドレスを記憶する処理で
ある。これにより、後述の処理でレジスタRPTのフラ
グが判別され、命令SIMULの処理機能が二重に活用
される。
Then, the head program address of the next instruction is stored in the register PCMEM (step S52), and the process is terminated. The process of step S52 is a process of storing the start program address of the instruction STL next to this instruction. As a result, the flag of the register RPT is discriminated by the processing described later, and the processing function of the instruction SIMUL is doubly utilized.

【0073】次に、命令STLは、選択分岐の場合と同
様である。すなわち、移行元(分岐元)ステップ(図6
(a) のステップS000参照)の活性状態を判別し(手
順S11)、活性なら(移行条件が成立)、レジスタN
RGに“1”をセットしてレジスタARGをセット状態
にし(手順12)、次に移行元ステップのアドレスをレ
ジスタSADDに記憶して(手順S14)、処理を終了
する。一方、非活性(移行条件が不成立)であれば、レ
ジスタNRGに“0”をセットしてレジスタARGの出
力ARGを“0”にインターロックしてから(手順S1
3)、処理を終了する。
Next, the instruction STL is the same as in the case of the selective branch. That is, the transfer source (branch source) step (see FIG. 6).
The active state of (a) (see step S000) is determined (step S11), and if active (transition condition is satisfied), register N
RG is set to "1" to set the register ARG to the set state (procedure 12), the address of the transition source step is then stored in the register SADD (procedure S14), and the process is terminated. On the other hand, if it is inactive (the transition condition is not satisfied), "0" is set in the register NRG to interlock the output ARG of the register ARG to "0" (step S1).
3), the process ends.

【0074】また、命令LDも、選択分岐の場合と同様
である。すなわち、トランジション(図6(a) の共通ト
ランジションTN000参照)の活性状態を判別し(手
順S21)、活性であればレジスタARGに“1”をセ
ットする(手順S22)。この場合も、レジスタARG
がセット状態であるときは(移行元ステップが活性)
“1”がラッチされ、インターロック状態では(移行元
ステップが非活性)“1”はラッチされず出力ARGは
“0”のままである。
The instruction LD is similar to the case of the selective branch. That is, the active state of the transition (see common transition TN000 in FIG. 6A) is determined (step S21), and if active, "1" is set in the register ARG (step S22). In this case also, the register ARG
Is set (when the source step is active)
"1" is latched, and in the interlock state (the transition source step is inactive), "1" is not latched and the output ARG remains "0".

【0075】続いて、命令SIMULでは、図12(b)
のフローチャートに示すように、先ずレジスタRPTの
フラグを判別する(手順S61)。ここでは、上記手順
S51で設定されているフラグ“1”を確認した後、続
いてレジスタARGの内容(出力)を調べる(手順S6
2)。そして、レジスタARGの出力ARGが“1”で
あれば、移行元ステップ(ステップS000)が活性で
且つトランジション(共通トランジションTN000)
も活性であると判別し、続いて、移行先ステップ(図6
(a) のステップS001、S002又はS003参照)
の活性状態を判別する(手順S63)。この判別で、移
行先ステップが非活性であれば、このステップについて
は移行条件が成立していると判別してただちに処理を終
了する。一方、移行先ステップが活性であれば、レジス
タARGに“0”をセットする(手順S64)。これに
より、移行先ステップS001、S002又はS003
のいずれか1つでも活性であれば、レジスタARGの出
力ARGが“0”になる。
Then, in the instruction SIMUL, FIG.
As shown in the flowchart of (1), first, the flag of the register RPT is determined (step S61). Here, after confirming the flag "1" set in step S51, the content (output) of the register ARG is subsequently checked (step S6).
2). If the output ARG of the register ARG is "1", the transition source step (step S000) is active and the transition (common transition TN000)
Is also active, and subsequently, the transition destination step (see FIG. 6) is performed.
(See step S001, S002 or S003 in (a))
The active state of is determined (step S63). In this determination, if the transition destination step is inactive, it is determined that the transition condition is satisfied for this step, and the process is immediately terminated. On the other hand, if the transfer destination step is active, "0" is set in the register ARG (step S64). As a result, the migration destination step S001, S002 or S003
If any one of these is active, the output ARG of the register ARG becomes "0".

【0076】上記手順S62で、レジスタARGの出力
ARGが“0”であれば、ただちに処理を終了する。こ
れにより、先行する分岐先ステップ(図6(a) のステッ
プS001、S002参照)のいずれか1つが活性であ
れば、後続の分岐先ステップ(ステップS002、S0
03参照)の活性状態の判別は行われずただちに処理が
終了する。
In step S62, if the output ARG of the register ARG is "0", the processing is immediately terminated. As a result, if any one of the preceding branch destination steps (see steps S001 and S002 in FIG. 6A) is active, the subsequent branch destination step (steps S002 and S0).
(See No. 03), the active state is not discriminated, and the process ends immediately.

【0077】上記手順S61で、レジスタRPTのフラ
グが“0”の場合については後述する。そして、命令E
−TRNでは、図11のフローチャートに示すように、
選択分岐/合流の場合と同様に手順S41の処理を行っ
て、手順S42ではレジスタRPTに設定されている
“1”を判別し、この場合は手順S43に進んでレジス
タARGの出力ARGが“1”であるか否か判別する。
この判別で出力ARGが“0”であれば、移行条件が成
立していないと判別してただちに処理を終了する。
The case where the flag of the register RPT is "0" in the above step S61 will be described later. And instruction E
-In TRN, as shown in the flowchart of FIG.
The process of step S41 is performed similarly to the case of the selective branching / merging, and in step S42, "1" set in the register RPT is determined. In this case, the process proceeds to step S43 and the output ARG of the register ARG is "1". It is determined whether or not it is ".
If the output ARG is "0" in this determination, it is determined that the transition condition is not satisfied, and the processing is immediately terminated.

【0078】一方、出力ARGが“1”であれば、全て
の分岐先ステップについて移行条件が成立していると判
別し、この場合はレジスタRPTに、これから同一命令
を繰り返して別処理を行うことを示すフラグ“0”を設
定した後(手順S44)、レジスタPCMEMの示すア
ドレスへジャンプする(手順S45)。これにより、命
令STLから処理が再開される(図6(a) 参照)。
On the other hand, if the output ARG is "1", it is determined that the transition condition is satisfied for all branch destination steps, and in this case, the same instruction is repeated in the register RPT to perform another processing. After setting the flag "0" indicating (step S44), the process jumps to the address indicated by the register PCMEM (step S45). As a result, the process is restarted from the instruction STL (see FIG. 6 (a)).

【0079】この再開される処理において、命令STL
及びLDでは、前回同様の処理を行う。そして、命令S
IMULでは、レジスタARGのフラグ“0”を判別し
て、この場合は手順S65に進み、移行先ステップを活
性化する。これにより、分岐先の全てのステップが活性
化される(図6(a) の右に示すニーモニック参照)。続
いて、手順S66に進んで、移行元ステップ、すなわち
レジスタSADDが示すアドレスのステップを非活性化
する。最後に命令E−TRNでは、手順S41の処理を
行い、手順S42でレジスタRPTの“0”を判別して
ただちに処理を終了する。
In this restarted processing, the instruction STL
And LD, the same processing as the previous time is performed. And the command S
In IMUL, the flag “0” of the register ARG is discriminated, and in this case, the process proceeds to step S65, and the transfer destination step is activated. As a result, all steps at the branch destination are activated (see the mnemonic shown on the right side of FIG. 6 (a)). Succeedingly, in the step S66, the transfer source step, that is, the step of the address indicated by the register SADD is deactivated. Finally, in the instruction E-TRN, the process of step S41 is performed, and in step S42, "0" of the register RPT is discriminated and the process is immediately terminated.

【0080】上記の処理により、並列分岐において移行
条件が満たされたとき、移行決定後の移行元ステップ及
び移行先ステップの活性/非活性の状態データの更新処
理が分岐数に制限なく且つ高速に行われる。
By the above processing, when the migration condition is satisfied in the parallel branch, the update processing of the active / inactive state data of the migration source step and the migration destination step after the migration is determined can be performed at high speed without limitation to the number of branches. Done.

【0081】続いて、並列合流の場合を例にとって説明
する。並列合流では、図3(b) のニーモニックに示した
ように、並列合流開始宣言命令C−SIM、並列合流元
ステップの活性状態読出し命令SYNL、トランジショ
ン・オン/オフ状態読出し命令LD、並列合流指示命令
SYNC、及び合流の終了宣言命令E−TRAによって
処理がなされる。
Next, the case of parallel merging will be described as an example. In the parallel merging, as shown in the mnemonic of FIG. 3B, the parallel merging start declaration instruction C-SIM, the active state read instruction SYNL of the parallel merging source step, the transition on / off state read instruction LD, the parallel merging instruction. Processing is performed by the instruction SYNC and the merge end declaration instruction E-TRA.

【0082】命令C−SIMは、図12(a) のフローチ
ャートに示すように、合流分岐の命令D−SIMと共通
の手順で処理を行う。そして、命令SYNLでは、図1
3(a) のフローチャートに示すように、先ずレジスタR
PTのフラグを判別する(手順S71)。ここでは、命
令C−SIMによる処理の手順51で設定されているフ
ラグ“1”を確認した後、移行元ステップ(図6(b) の
ステップS020、S021又はS022参照)の活性
状態を判別する(手順S72)。この判別で、当該ステ
ップが非活性であれば、レジスタNRGに“0”をセッ
トして、前述したように、レジスタARGの出力ARG
を“0”に固定する(手順S73)。これにより、移行
元ステップのいずれか1つでも非活性であれば、レジス
タARGの出力ARGが“0”に固定される。上記手順
S72で、当該ステップが活性であれば、何も行わず、
ただちに処理を終了する。また、上記手順S71で、レ
ジスタRPTのフラグが“0”の場合については後述す
る。
As shown in the flow chart of FIG. 12 (a), the instruction C-SIM performs processing in the same procedure as the merge branch instruction D-SIM. Then, in the command SYNL, as shown in FIG.
As shown in the flowchart of 3 (a), first, the register R
The PT flag is determined (step S71). Here, after confirming the flag "1" set in the procedure 51 of the processing by the instruction C-SIM, the active state of the migration source step (see step S020, S021 or S022 in FIG. 6B) is determined. (Procedure S72). If the step is inactive in this determination, "0" is set in the register NRG, and the output ARG of the register ARG is set as described above.
Is fixed to "0" (step S73). As a result, if any one of the transfer source steps is inactive, the output ARG of the register ARG is fixed to "0". If the step is active in step S72, nothing is done,
Immediately ends the process. The case where the flag of the register RPT is "0" in the above step S71 will be described later.

【0083】そして、命令LDでは、並列分岐の場合と
同様に、手順S21でトランジション(図6(b) の共通
トランジションTN000参照)の活性状態を判別し、
活性であれば手順S22でレジスタARGに“1”をセ
ットする。この場合、上記の命令SYNLによる全ての
移行元ステップに対する処理で(図6(b) のニーモニッ
ク参照)、全ての移行元ステップが活性であればレジス
タARGはセット状態であり、したがって上記の“1”
がラッチされる。一方、移行元ステップのいずれか1つ
でも非活性であればレジスタARGは“0”にインター
ロックされており、上記“1”はラッチされない。
Then, in the instruction LD, as in the case of the parallel branch, the active state of the transition (see the common transition TN000 in FIG. 6B) is determined in step S21,
If it is active, "1" is set in the register ARG in step S22. In this case, in the processing for all the transition source steps by the above-mentioned instruction SYNL (see the mnemonic in FIG. 6B), if all the transition source steps are active, the register ARG is in the set state, and therefore the above "1" ”
Is latched. On the other hand, if any one of the transfer source steps is inactive, the register ARG is interlocked with "0" and the above "1" is not latched.

【0084】続く命令SYNCでは、先ず、レジスタR
PTのフラグが“0”であることを確認して(手順S8
1)、レジスタARGの出力ARGを判別する(手順S
82)。そして、出力ARGが“1”であれば、全ての
移行元ステップ及び共通トランジションが合流可能状態
を示していると判別し、この場合は続いて移行先ステッ
プの活性状態を判別する(手順S83)。そして、非活
性となっていれば、並列合流の移行条件が成立したと判
別して、この移行先ステップを活性化する(手順S8
4)。
In the following instruction SYNC, first, the register R
Confirm that the PT flag is "0" (step S8).
1), determine the output ARG of the register ARG (step S
82). Then, if the output ARG is "1", it is determined that all the transition source steps and the common transitions show the merging possible state, and in this case, the activation state of the transition destination step is subsequently determined (step S83). . If it is inactive, it is determined that the transition condition for parallel merging is satisfied, and this transition destination step is activated (step S8).
4).

【0085】上記手順S83で、移行先ステップが活性
であれば、並列合流の移行条件が成立しないと判別し
て、ただちに処理を終了する。また上記手順S82で、
出力ARGが“0”である場合は、全ての移行元ステッ
プ又は共通トランジションが合流可能状態を示していな
いと判別し、この場合も、ただちに処理を終了する。ま
た、上記手順S81で、レジスタRPTのフラグが
“0”のときは、後述する再開処理において非処理を指
示されていると判別して、この場合も、ただちに処理を
終了する。
In step S83, if the transfer destination step is active, it is determined that the parallel merge transfer condition is not satisfied, and the process is immediately terminated. In step S82 above,
When the output ARG is "0", it is determined that all the transition source steps or the common transitions do not indicate a mergeable state, and in this case also, the processing is immediately terminated. In step S81, when the flag of the register RPT is "0", it is determined that the non-processing is instructed in the restart processing described later, and in this case also, the processing is immediately terminated.

【0086】そして、命令E−TRNでは、並列分岐の
場合と同様に処理を行って、移行条件が成立していない
ときは、ただちに処理を終了する。一方、移行条件が成
立しているときは、これの前述したように、レジスタR
PTにフラグ“0”を設定した後、レジスタPCMEM
の示すアドレスへジャンプする。これにより、命令C−
SIMの次の命令SYNLから処理が再開される(図6
(b) 参照)。
Then, the instruction E-TRN performs the same processing as in the case of the parallel branch, and immediately ends the processing when the transition condition is not satisfied. On the other hand, when the transition condition is satisfied, as described above, the register R
After setting the flag "0" in PT, register PCMEM
Jump to the address indicated by. As a result, the instruction C-
The processing is restarted from the instruction SYNL following the SIM (FIG. 6).
(See (b)).

【0087】この再開される処理において、命令SYN
Lでは、手順S71でレジスタRPTのフラグ“0”を
判別して、この場合は手順S74に進み、移行元ステッ
プを非活性化する。これにより、合流元の全てのステッ
プが非活性化される(図6(b) の右に示すニーモニック
参照)。
In this restarted process, the instruction SYN
In L, the flag "0" of the register RPT is discriminated in step S71, and in this case, the process proceeds to step S74 to deactivate the migration source step. As a result, all the merge source steps are inactivated (see the mnemonic shown on the right side of FIG. 6 (b)).

【0088】続いて、命令LDを前回同様に実行し、命
令SYNCでは、上述したようにレジスタRPTの
“0”により非処理を判別して、ただちに処理を終了
し、最後の命令E−TRNにおいても、手順S41の処
理を行った後、手順S42でレジスタRPTの“0”を
判別してただちに処理を終了する。
Then, the instruction LD is executed in the same manner as the previous time, and in the instruction SYNC, as described above, the non-processing is judged by the "0" of the register RPT, the processing is immediately terminated, and the last instruction E-TRN is executed. Also, after performing the process of step S41, "0" of the register RPT is determined in step S42, and the process is immediately terminated.

【0089】上記の処理により、並列合流において移行
条件が満たされたとき、移行決定後の移行元ステップ及
び移行先ステップの活性/非活性の状態データの更新処
理が分岐数に制限なく且つ高速に行われる。
By the above processing, when the migration condition is satisfied in parallel merging, the update processing of the active / inactive state data of the migration source step and the migration destination step after the migration determination can be performed at high speed without any limitation on the number of branches. Done.

【0090】尚、本実施例においては、ニーモニックの
命令、例えば選択分岐の開始を宣言する命令を「D−S
LC」で表しているが、選択分岐の開始を宣言すると規
定するものであればどのような形式のコードであっても
よい。これは、他の命令についても同様である。
In this embodiment, a mnemonic instruction, for example, an instruction declaring the start of a selective branch is called "DS".
Although it is represented by "LC", any form of code may be used as long as it defines that the start of the selective branch is declared. This also applies to other instructions.

【0091】[0091]

【発明の効果】本発明によれば、合流/分岐において、
移行元ステップの非活性化及び移行先ステップの活性化
の処理が最終段階の命令に集約するこなく分散でき、こ
のため、処理を高速に行えるようになる。また、1個の
レジスタの内容から複数の移行元ステップ及び複数のト
ランジションの移行条件成立の有無を認識することがで
きるので、移行元ステップ毎及び移行先ステップ毎のア
ドレスをメモリに記録しておく必要がなく、このためメ
モリ・コストが低減する。また同様に、分岐ステップ数
の設定に対しメモリ容量による制約を受けることがない
ので、多分岐を必要とする大規模なあるいは複雑なシー
ケンス制御が可能となる。
According to the present invention, in merging / branching,
The process of deactivating the transfer source step and the process of activating the transfer destination step can be distributed without being concentrated in the final stage instruction, and therefore the process can be performed at high speed. Further, since it is possible to recognize whether or not the transition conditions of a plurality of transition source steps and a plurality of transitions are satisfied from the contents of one register, the addresses of each transition source step and each transition destination step are recorded in the memory. There is no need, which reduces memory costs. Similarly, since the setting of the number of branch steps is not restricted by the memory capacity, large-scale or complicated sequence control that requires multiple branches can be performed.

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

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

【図2】一実施例のプログラマブルコントローラの構成
ブロック図である。
FIG. 2 is a configuration block diagram of a programmable controller according to an embodiment.

【図3】レジスタNRGとレジスタARGの関係を説明
する図である。
FIG. 3 is a diagram illustrating a relationship between a register NRG and a register ARG.

【図4】RAMに格納されるSFCプログラムの配置を
示す模式図である。
FIG. 4 is a schematic diagram showing an arrangement of SFC programs stored in a RAM.

【図5】(a) は選択分岐のニーモニックの記述例を示す
図、(b) は選択合流のニーモニックの記述例を示す図で
ある。
5A is a diagram showing a description example of a mnemonic of selective branching, and FIG. 5B is a diagram showing a description example of a mnemonic of selective merging.

【図6】(a) は並列分岐のニーモニックの記述例を示す
図、(b) は並列合流のニーモニックの記述例を示す図で
ある。
6A is a diagram showing a description example of a parallel branch mnemonic, and FIG. 6B is a diagram showing a description example of a parallel merging mnemonic.

【図7】本実施例に用いられるニーモニックの命令を説
明する図表である。
FIG. 7 is a table for explaining mnemonic instructions used in this embodiment.

【図8】プログラミング装置(プログラムローダ)の構
成ブロック図である。
FIG. 8 is a configuration block diagram of a programming device (program loader).

【図9】(a) は命令D−SLC又は命令C−SLCの動
作を示すフローチャート、(b)は命令STL又は命令J
UNCの動作を示すフローチャートである。
9A is a flowchart showing the operation of an instruction D-SLC or an instruction C-SLC, and FIG. 9B is an instruction STL or an instruction J.
It is a flowchart which shows operation | movement of UNC.

【図10】(a) は命令LDの動作を示すフローチャー
ト、(b) は命令SLCT又は命令SETの動作を示すフ
ローチャートである。
10A is a flowchart showing an operation of an instruction LD, and FIG. 10B is a flowchart showing an operation of an instruction SLCT or an instruction SET.

【図11】命令E−TRNの動作を示すフローチャート
である。
FIG. 11 is a flowchart showing an operation of an instruction E-TRN.

【図12】(a) は命令D−CIM又は命令C−CIMの
動作を示すフローチャート、(b)は命令SIMULの動
作を示すフローチャートである。
12A is a flowchart showing the operation of an instruction D-CIM or instruction C-CIM, and FIG. 12B is a flowchart showing the operation of an instruction SIMUL.

【図13】(a) は命令SYNLの動作を示すフローチャ
ート、(b) は命令SYNCの動作を示すフローチャート
である。
13A is a flowchart showing an operation of an instruction SYNC, and FIG. 13B is a flowchart showing an operation of an instruction SYNC.

【図14】(a),(b) はSFCのプログラム構造を説明す
る模式図である。
14A and 14B are schematic diagrams illustrating the program structure of SFC.

【図15】(a),(b),(c),(d) はSFCの分岐及び合流を
説明する図でる。
15 (a), (b), (c), and (d) are diagrams for explaining SFC branching and merging.

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

1 記憶手段 2 解析手段 3 第1レジスタ 4 第2レジスタ 5 第3レジスタ 6 第4レジスタ 7 第5レジスタ 1 storage means 2 analysis means 3 first register 4 second register 5 third register 6 fourth register 7 fifth register

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】SFC記述に基づくプログラムにより動作
するプログラマブルコントローラにおいて、 分岐又は合流の命令を記憶する記憶手段(1) と、 該記憶手段(1) から読み出した分岐又は合流の命令を解
析する解析手段(2) と、 該解析手段(2) が読み出した分岐又は合流の命令に係わ
るトランジションのオン又はオフの状態データを格納す
る第1レジスタ(3) と、 該第1レジスタ(3) のオフ状態をインターロックする第
2レジスタ(4) と、 前記解析手段(2) が読み出した分岐又は合流の命令に係
わる移行元ステップのアドレスを格納する第3レジスタ
(5) と、 前記解析手段(2) が読み出した分岐又は合流の命令の処
理手順を二者択一するためのデータを格納する第5レジ
スタ(7) と、 を有し、 前記解析手段(2) は、 選択分岐の開始を宣言する命令を読み出したとき、前記
第2レジスタ(4) を初期設定することにより前記第1レ
ジスタ(3) をセット可能状態にすると共に前記第5レジ
スタ(7) に命令の処理手順の第1の選択を指示するデー
タを設定し、 分岐における移行元ステップの活性・非活性の状態を検
出する命令を読み出したときは、検出した該移行元ステ
ップの状態が非活性であるとき前記第2レジスタ(4) を
介して前記第1レジスタ(3) をオフ状態にインターロッ
クし、一方、検出した該移行元ステップの状態が活性で
あるときは該移行元ステップのアドレスを前記第3レジ
スタ(5) に格納し、 トランジションのオン・オフの状態を検出する命令を読
み出したときは、検出した該トランジションの状態がオ
ンであるとき前記第1レジスタ(3) にオン状態を設定す
るデータを出力し、一方、検出した該トランジションの
状態がオフであるときは前記第1レジスタ(3) にオフ状
態を設定するデータを出力し、 選択分岐を指示する命令を読み出したときは、前記第1
レジスタ(3) がオン状態であり且つ移行先ステップの状
態が非活性であるとき該移行先ステップを活性化すると
共に前記第3レジスタ(5) に格納されたアドレスの移行
元ステップを非活性化し且つ前記第2レジスタ(4) を介
して前記第1レジスタをオフ状態にインターロックし、
一方、前記第1レジスタ(3) がオフ状態であるとき又は
前記移行先ステップの状態が活性であるときは処理を終
了し、 分岐の終了を宣言する命令を読み出したときは、前記第
2レジスタ(4) を初期設定することにより前記第1レジ
スタ(3) をセット可能状態にした後、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第1の選択
を指示していることを確認して直ちに処理を終了する、 ことを特徴とするプログラマブルコントローラ。
1. A programmable controller operated by a program based on an SFC description, a storage means (1) for storing a branch or merge instruction, and an analysis for analyzing the branch or merge instruction read from the storage means (1). A means (2), a first register (3) for storing the on / off state data of a transition relating to a branch or merge instruction read by the analyzing means (2), and an off state of the first register (3) A second register (4) for interlocking the state, and a third register for storing the address of the transfer source step relating to the branch or merge instruction read by the analyzing means (2).
(5) and a fifth register (7) for storing data for selecting one of the branching or merging instruction processing procedures read by the analyzing means (2), the analyzing means ( When the instruction for declaring the start of the selective branch is read, 2) initializes the second register (4) to make the first register (3) settable and the fifth register (7). ) Is set to the data for instructing the first selection of the instruction processing procedure, and when the instruction for detecting the active / inactive state of the transfer source step in the branch is read, the detected state of the transfer source step is When it is inactive, the first register (3) is interlocked to the off state via the second register (4), while when the detected state of the transition source step is active, the transition source step Store the address of the above into the third register (5) When the instruction to detect the on / off state of the transition is read, when the detected state of the transition is on, the data for setting the on state to the first register (3) is output, and on the other hand, it is detected. When the state of the transition is off, data for setting the off state to the first register (3) is output, and when the instruction instructing the selective branch is read, the first register (3) is output.
When the register (3) is on and the state of the transfer destination step is inactive, the transfer destination step is activated and the transfer source step of the address stored in the third register (5) is deactivated. And interlocking the first register to the off state via the second register (4),
On the other hand, when the first register (3) is in the OFF state or when the state of the transition destination step is active, the processing is terminated, and when the instruction declaring the end of the branch is read, the second register After setting the first register (3) to the settable state by initializing (4), the fifth register
A programmable controller characterized in that the processing is immediately terminated after confirming that the data set in (7) indicates the first selection of the instruction processing procedure.
【請求項2】 前記解析手段(2) は、 選択合流の開始を宣言する命令を読み出したとき、前記
第2レジスタ(4) を初期設定することにより前記第1レ
ジスタ(3) をセット可能状態にすると共に前記第5レジ
スタ(7) に命令の処理手順の第1の選択を指示するデー
タを設定し、 選択合流における移行元ステップの活性・非活性の状態
を検出する命令を読み出したときは、検出した該移行元
ステップの状態が非活性であるとき前記第2レジスタ
(4) を介して前記第1レジスタ(3) をオフ状態にインタ
ーロックし、一方、検出した該移行元ステップの状態が
活性であるときは該移行元ステップのアドレスを前記第
3レジスタ(5) に格納し、 トランジションのオン・オフの状態を検出する命令を読
み出したときは、検出した該トランジションの状態がオ
ンであるとき前記第1レジスタ(3) にオン状態を設定す
るデータを出力し、一方、検出した該トランジションの
状態がオフであるときは前記第1レジスタ(3) にオフ状
態を設定するデータを出力し、 選択合流を指示する命令を読み出したときは、前記第1
レジスタ(3) がオン状態であり且つ移行先ステップの状
態が非活性であるとき該移行先ステップを活性化すると
共に前記第3レジスタ(5) に格納されたアドレスの移行
元ステップを非活性化し且つ前記第2レジスタ(4) を介
して前記第1レジスタ(3) をオフ状態にインターロック
し、一方、前記第1レジスタ(3) がオフ状態であるとき
又は前記移行先ステップの状態が活性であるときは処理
を終了し、 合流の終了を宣言する命令を読み出したときは、前記第
2レジスタ(4) を初期設定することにより前記第1レジ
スタ(3) をセット可能状態にした後、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第1の選択
を指示していることを確認して直ちに処理を終了する、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
2. The analysis means (2) sets the first register (3) in a settable state by initializing the second register (4) when an instruction declaring the start of selective merging is read. In addition, when data for instructing the first selection of the instruction processing procedure is set in the fifth register (7) and an instruction for detecting the active / inactive state of the transition source step in the selection merge is read out, The second register when the state of the detected transition source step is inactive
The first register (3) is interlocked to the off state via (4), while when the detected state of the transfer source step is active, the address of the transfer source step is set to the third register (5). ) And read the instruction to detect the on / off state of the transition, output the data to set the on state to the first register (3) when the detected state of the transition is on. On the other hand, when the detected state of the transition is OFF, the data for setting the OFF state to the first register (3) is output, and when the instruction to instruct the selective merging is read,
When the register (3) is on and the state of the transfer destination step is inactive, the transfer destination step is activated and the transfer source step of the address stored in the third register (5) is deactivated. Also, the first register (3) is interlocked to the off state through the second register (4), while the first register (3) is in the off state or the state of the transition destination step is active. When the instruction for declaring the end of merging is read, the second register (4) is initialized to set the first register (3) to the settable state. The fifth register
The programmable controller according to claim 1, wherein the processing is immediately terminated after confirming that the data set in (7) instructs the first selection of the processing procedure of the instruction.
【請求項3】 前記解析手段(2) が読み出した分岐又は
合流の命令のプログラムアドレスを格納する第4レジス
タ(6) をさらに有して、 前記解析手段(2) は、 並列分岐の開始を宣言する命令を読み出したとき、前記
第2レジスタ(4) を初期設定することにより前記第1レ
ジスタ(3) をセット可能状態にすると共に前記第5レジ
スタ(7) に命令の処理手順の第2の選択を指示するデー
タを設定し且つ前記第4レジスタ(6) に次の命令の先頭
プログラムアドレスを設定し、 並列分岐における移行元ステップの活性・非活性の状態
を検出する命令を読み出したときは、検出した該移行元
ステップの状態が非活性であるとき前記第2レジスタ
(4) を介して前記第1レジスタ(3) をオフ状態にインタ
ーロックし、一方、検出した該移行元ステップの状態が
活性であるときは該移行元ステップのアドレスを前記第
3レジスタ(5) に格納し、 トランジションのオン・オフの状態を検出する命令を読
み出したときは、検出した該トランジションの状態がオ
ンであるとき前記第1レジスタ(3) にオン状態を設定す
るデータを出力し、一方、検出した該トランジションの
状態がオフであるときは前記第1レジスタ(3) にオフ状
態を設定するデータを出力し、 並列分岐を指示する命令を読み出したときは、前記第5
レジスタ(7) に設定されたデータが命令の処理手順の第
2の選択を指示しているときにおいて、前記第1レジス
タ(3) がオフ状態である場合は処理を終了し、また、前
記第1レジスタ(3) がオン状態であり且つ移行先ステッ
プの状態が非活性である場合も処理を終了し、前記第1
レジスタ(3) がオン状態であり且つ移行先ステップの状
態が活性である場合は前記第1レジスタ(3) にオフ状態
を設定するデータを出力し、一方、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第1の選択
を指示しているときにおいては、移行先ステップを活性
化すると共に前記第3レジスタ(5) に格納されたアドレ
スの移行元ステップを非活性化し、 分岐の終了を宣言する命令を読み出したときは、前記第
2レジスタ(4) を初期設定することにより前記第1レジ
スタ(3) をセット可能状態にした後、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第2の選択
を示している場合は前記第1レジスタ(3) がオフ状態で
あるとき処理を終了し、前記第1レジスタ(3) がオン状
態であるとき前記第5レジスタ(7) に命令の処理手順の
第1の選択を指示するデータを設定した後前記第4レジ
スタ(6) に設定されているプログラムアドレスにジャン
プし、一方前記第5レジスタ(7) に設定されたデータが
命令の処理手順の第1の選択を指示している場合は直ち
に処理を終了する、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
3. The analysis means (2) further comprises a fourth register (6) for storing the program address of a branch or merge instruction read by the analysis means (2), and the analysis means (2) detects the start of a parallel branch. When the instruction to be declared is read, the second register (4) is initialized so that the first register (3) can be set and the fifth register (7) receives the second instruction processing procedure. When the data for instructing the selection of is set, the start program address of the next instruction is set in the fourth register (6), and the instruction for detecting the active / inactive state of the migration source step in the parallel branch is read. Is the second register when the state of the detected transition source step is inactive.
The first register (3) is interlocked to the off state via (4), while when the detected state of the transfer source step is active, the address of the transfer source step is set to the third register (5). ) And read the instruction to detect the on / off state of the transition, output the data to set the on state to the first register (3) when the detected state of the transition is on. On the other hand, when the detected state of the transition is off, the data for setting the off state to the first register (3) is output, and when the instruction for parallel branch is read,
When the data set in the register (7) is instructing the second selection of the instruction processing procedure and the first register (3) is in the OFF state, the processing is terminated, and the first register (3) is terminated. Even when the 1 register (3) is in the ON state and the state of the transition destination step is inactive, the processing is terminated and the first
When the register (3) is in the ON state and the state of the transition destination step is active, the data for setting the OFF state to the first register (3) is output, while the fifth register is output.
When the data set in (7) indicates the first selection of the instruction processing procedure, the migration destination step is activated and the migration source of the address stored in the third register (5) is also activated. When the step is deactivated and the instruction declaring the end of branch is read, the second register (4) is initialized to make the first register (3) settable, and then the fifth register (5) is set. register
When the data set in (7) indicates the second selection of the instruction processing procedure, the processing is terminated when the first register (3) is in the off state, and the first register (3) is When in the ON state, after setting data for instructing the first selection of the instruction processing procedure in the fifth register (7), jump to the program address set in the fourth register (6), while The programmable controller according to claim 1, wherein when the data set in the fifth register (7) indicates the first selection of the instruction processing procedure, the processing is immediately ended.
【請求項4】 前記解析手段(2) は、 並列合流の開始を宣言する命令を読み出したとき、前記
第2レジスタ(4) を初期設定することにより前記第1レ
ジスタ(3) をセット可能状態にすると共に前記第5レジ
スタ(7) に命令の処理手順の第2の選択を指示するデー
タを設定し且つ前記第4のレジスタ(6) に次の命令の先
頭プログラムアドレスを設定し、 並列合流における移行元ステップの活性・非活性の状態
を検出する命令を読み出したときは、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第2の選択
を指示しているときにおいて、移行元ステップの状態が
活性である場合は処理を終了し、移行元ステップの状態
が非活性である場合は前記第2レジスタ(4) を介して前
記第1レジスタ(3) をオフ状態にインターロックし、一
方、前記第5レジスタ(7) に設定されたデータが命令の
処理手順の第1の選択を指示しているときにおいては、
移行元ステップを非活性化し、 並列合流を指示する命令を読み出したときは、前記第5
レジスタ(7) に設定されたデータが命令の処理手順の第
2の選択を指示しているときにおいて、前記第1レジス
タ(3) がオフ状態である場合は処理を終了し、前記第1
レジスタ(3) がオン状態であり且つ移行先ステップの状
態が活性である場合も処理を終了し、前記第1レジスタ
(3) がオン状態であり且つ移行先ステップの状態が非活
性である場合は該移行先ステップを活性化し、一方、前
記第5レジスタ(7) に設定されたデータが命令の処理手
順の第1の選択を指示しているときは処理を終了し、 合流の終了を宣言する命令を読み出したときは、前記第
2レジスタ(4) を初期設定することにより前記第1レジ
スタ(3) をセット可能状態にした後、前記第5レジスタ
(7) に設定されたデータが命令の処理手順の第2の選択
を示している場合は前記第1レジスタ(3) がオフ状態で
あるとき処理を終了し、前記第1レジスタ(3) がオン状
態であるとき前記第5レジスタ(7) に命令の処理手順の
第1の選択を指示するデータを設定した後前記第4レジ
スタ(6) に設定されているプログラムアドレスにジャン
プし、一方前記第5レジスタ(7) に設定されたデータが
命令の処理手順の第1の選択を指示している場合は直ち
に処理を終了する、 ことを特徴とする請求項3記載のプログラマブルコント
ローラ。
4. The analysis means (2) sets the first register (3) in a settable state by initializing the second register (4) when reading an instruction declaring the start of parallel merging. In addition, the data for instructing the second selection of the instruction processing procedure is set in the fifth register (7), and the start program address of the next instruction is set in the fourth register (6). When the instruction for detecting the active / inactive state of the transition source step in
When the data set in (7) indicates the second selection of the instruction processing procedure, if the state of the transfer source step is active, the processing is terminated and the state of the transfer source step is deactivated. If it is, the first register (3) is interlocked to the off state via the second register (4), while the data set in the fifth register (7) is the first in the instruction processing procedure. When instructing to select 1,
When the source step is deactivated and the instruction for parallel merging is read,
When the data set in the register (7) is instructing the second selection of the instruction processing procedure and the first register (3) is in the off state, the processing is terminated and the first
Even when the register (3) is in the ON state and the state of the transition destination step is active, the processing is terminated and the first register
When (3) is in the ON state and the state of the transition destination step is inactive, the transition destination step is activated, while the data set in the fifth register (7) is the first in the instruction processing procedure. When the instruction to select 1 is given, the processing is ended, and when the instruction declaring the end of the merge is read, the first register (3) is set by initializing the second register (4). After enabling, the fifth register
When the data set in (7) indicates the second selection of the instruction processing procedure, the processing is terminated when the first register (3) is in the off state, and the first register (3) is When it is in the ON state, the fifth register (7) is set to the data for instructing the first selection of the instruction processing procedure, and then the program address set in the fourth register (6) is jumped to. 4. The programmable controller according to claim 3, wherein when the data set in the fifth register (7) indicates the first selection of the instruction processing procedure, the processing is immediately ended.
JP21453793A 1993-08-30 1993-08-30 Programmable controller Expired - Lifetime JP3344020B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21453793A JP3344020B2 (en) 1993-08-30 1993-08-30 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21453793A JP3344020B2 (en) 1993-08-30 1993-08-30 Programmable controller

Publications (2)

Publication Number Publication Date
JPH0764470A true JPH0764470A (en) 1995-03-10
JP3344020B2 JP3344020B2 (en) 2002-11-11

Family

ID=16657382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21453793A Expired - Lifetime JP3344020B2 (en) 1993-08-30 1993-08-30 Programmable controller

Country Status (1)

Country Link
JP (1) JP3344020B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000073863A1 (en) * 1999-05-28 2000-12-07 Mitsubishi Denki Kabushiki Kaisha Programmable controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000073863A1 (en) * 1999-05-28 2000-12-07 Mitsubishi Denki Kabushiki Kaisha Programmable controller
DE19983210B4 (en) * 1999-05-28 2011-07-21 Mitsubishi Denki K.K. Programmable control device

Also Published As

Publication number Publication date
JP3344020B2 (en) 2002-11-11

Similar Documents

Publication Publication Date Title
JPH01188951A (en) Control system for execution of data flow program
JPH0769842B2 (en) Mutual exclusion control method and system for resources
JP2007272353A (en) Processor device and compound condition processing method
JP3819639B2 (en) Programming device
JP4876537B2 (en) Programmable controller programming device
JP3344020B2 (en) Programmable controller
JPH06259583A (en) Connecting method for data driving type processor
JP2006195590A (en) Programmable controller system, and controller and program therefor
JP2628784B2 (en) Program creation device
JP4443436B2 (en) Control system and control method
JP2970142B2 (en) Programmable controller
JP3018814B2 (en) Programmable controller
WO2024018516A1 (en) Simulation device and program
JP2902888B2 (en) Programmable controller
JP2943434B2 (en) Programmable controller
JP3769445B2 (en) Data-driven information processing device
JPH0679245B2 (en) Programmable controller sequence program execution method
JP2001005517A (en) Monitor method for control program and its device
JP3813756B2 (en) Programmable controller
JP2971251B2 (en) SFC programming device
JP3018790B2 (en) Programmable controller
WO2020031903A1 (en) Support device and support program
JP3686091B2 (en) Data-driven information processing device
JP2921228B2 (en) Programmable controller
JP2022135170A (en) Development assisting device, control method for development assisting device, information processing program and recording medium

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

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20080830

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080830

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090830

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090830

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100830

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110830

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110830

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120830

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120830

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130830

Year of fee payment: 11