JPS6112564B2 - - Google Patents
Info
- Publication number
- JPS6112564B2 JPS6112564B2 JP4828880A JP4828880A JPS6112564B2 JP S6112564 B2 JPS6112564 B2 JP S6112564B2 JP 4828880 A JP4828880 A JP 4828880A JP 4828880 A JP4828880 A JP 4828880A JP S6112564 B2 JPS6112564 B2 JP S6112564B2
- Authority
- JP
- Japan
- Prior art keywords
- command
- output
- condition
- instruction
- routine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Program-control systems
- G05B19/02—Program-control systems electric
- G05B19/04—Program control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/054—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/10—Plc systems
- G05B2219/11—Plc I-O input output
- G05B2219/1151—Fast scanning of I-O to put I-O status in image table
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
Description
この発明はプログラマブル・シーケンスコント
ローラに関し、特に工程歩進形の命令体系を基盤
としてスキヤニング形の処理も行なえるようにし
た制御方式に関する。
プログラマブル・シーケンスコントローラの命
令体系、アーキテクチヤは、スキヤニング形(ラ
ンダムロジツク形ともいう)と工程歩進形(タイ
ムチヤート形ともいう)とに大別される。
スキヤニング形には有接点または無接点シーケ
ンス回路図に基づいてプログラムを作成するもの
と、フローチヤートに基づいてプログラムを作成
するもの等があるが、そのアーキテクチヤの基本
は、各出力端子の個々について、どのような条件
が成立したらオンにし、その条件が成立していな
いときはオフにするという各出力のオン、オフ条
件を所定の命令フオーマツトで表現してプログラ
ム記憶部に記憶しておき、その実行に際しては、
各出力端子に関する命令を順次高速に繰返し読出
して実行するものである。
工程歩進形では、出力状態の遷移を個々の出力
端子毎にとらえるのではなく、各出力端子の出力
の組合せによる全体としてのある出力状態を1つ
の工程ととらえ、出力状態の遷移を多数の工程の
順次変化ととらえる。そして、各工程での出力状
態と、その工程から次の工程へ進む条件や、ジヤ
ンプ等の工程の変化を所定の命令フオーマツトで
表現してプログラム記憶部に記憶する。その実行
に際しては、ある1つの工程の命令を読出し、そ
の工程で設定された出力状態を全出力端子から出
力するとともに、次の工程に進めるための設定さ
れた条件を常時チエツクし、その条件が成立しな
い間は該工程の出力状態を維持し、上記条件が成
立したとき次の工程へ進める、という処理を行な
う。
ところで、工程歩進形では上述のように全出力
端子の状態をまとめて1つの工程として取扱うも
のであるため、出力端子数の比較的少ない小規模
な装置に適しており、また工程歩進形ではシーケ
ンス回路等の従来からの制御知識のない人もプロ
グラムを作成できるという特徴を有している。一
方、上記スキヤニング形の場合、従来からの布線
論理によるシーケンス回路の専門家がその専門知
識を活かして利用でき、複雑で高度な制御を行な
うことができる。このように、工程歩進形とスキ
ヤニング形とでは性格が異なり、適用する制御仕
様や使う人によつていずれかの形式のコントロー
ラが選択されている。
この発明は1台のコントローラで工程歩進形と
スキヤニング形の両方の処理を行なえるようにす
るもので、詳細には、工程歩進形の命令体系の下
で、任意に指定する命令をスキヤニング形の処理
で実行するようにした制御方式を提供するもので
ある。これによれば、工程歩進形のコントローラ
の制御機能が拡大され、ユーザーの必要に応じた
様々な使用が可能となるのである。
以下、この発明の一実施例を図面に基づいて詳
細に説明する。
第1図は本発明に係るシーケンスコントローラ
の電気的構成を示すブロツク図であり、第2図は
その外観を示している。このシーケンスコントロ
ーラは、フアームウエア化されたいわゆるマイク
ロコンピユータで構成された中央処理装置2と、
入力端子INに接続される外部接点と中央処理装
置2との入力インターフエースである入力回路3
と、中央処理装置2からの出力信号に応じて出力
端子OUTに接続される外部機器を制御する出力
回路4と、ユーザーが任意に設定するシーケンス
プログラムを記憶するプログラム記憶部5と、プ
ログラム設定時等に使用するキー入力装置6と、
プログラム設定時には設定中の命令が、プログラ
ム実行時には実行中の命令が表示される表示器7
等を備えている。
このシーケンスコントローラにおける各工程単
位のユーザー命令は下表に示すフオーマツトで構
成される。
The present invention relates to a programmable sequence controller, and more particularly to a control system based on a step-by-step command system that can also perform scanning-type processing. The command systems and architectures of programmable sequence controllers are broadly classified into scanning type (also called random logic type) and process step type (also called time chart type). There are scanning types in which programs are created based on contact or non-contact sequence circuit diagrams, and programs are created based on flowcharts, but the basic architecture is that each output terminal is The on/off conditions for each output are expressed in a predetermined command format and stored in the program storage unit, such as turning on the output when the condition is met and turning it off when the condition is not met. When executing,
Instructions related to each output terminal are sequentially and repeatedly read out and executed at high speed. In the step-by-step method, instead of considering output state transitions for each individual output terminal, a certain output state as a whole resulting from a combination of outputs from each output terminal is considered as one process, and output state transitions are considered as one process. Think of it as a sequential change in the process. Then, the output state in each process, the conditions for proceeding from that process to the next process, and process changes such as jumps are expressed in a predetermined command format and stored in the program storage unit. When executing this process, the command for one process is read out, the output status set in that process is output from all output terminals, and the set conditions for proceeding to the next process are constantly checked, and the conditions are checked. As long as the condition is not satisfied, the output state of the process is maintained, and when the condition is satisfied, the process proceeds to the next process. By the way, as mentioned above, the step-by-step type handles the states of all output terminals as one process, so it is suitable for small-scale equipment with a relatively small number of output terminals. The feature is that even people without conventional control knowledge such as sequence circuits can create programs. On the other hand, in the case of the above-mentioned scanning type, experts in conventional sequence circuits based on wiring logic can utilize their expertise to perform complex and sophisticated control. As described above, the stepwise type and the scanning type have different characteristics, and one type of controller is selected depending on the control specifications to be applied and the user. This invention enables a single controller to perform both process step-type and scanning-type processing. Specifically, under the process step-type command system, scanning can be performed by arbitrarily specified commands. The present invention provides a control method that is executed by processing shapes. According to this, the control function of the step-by-step controller is expanded, and it becomes possible to use it in various ways according to the needs of the user. Hereinafter, one embodiment of the present invention will be described in detail based on the drawings. FIG. 1 is a block diagram showing the electrical configuration of a sequence controller according to the present invention, and FIG. 2 shows its external appearance. This sequence controller includes a central processing unit 2 composed of a so-called microcomputer made into firmware,
An input circuit 3 is an input interface between an external contact connected to the input terminal IN and the central processing unit 2.
, an output circuit 4 that controls an external device connected to the output terminal OUT according to an output signal from the central processing unit 2, a program storage section 5 that stores a sequence program arbitrarily set by the user, and a program storage section 5 that stores a sequence program arbitrarily set by the user; A key input device 6 used for
Display 7 that displays the command being set when setting a program, and the command being executed when executing the program.
etc. User commands for each process unit in this sequence controller are configured in the format shown in the table below.
【表】
命令コード「OP」は4ビツトで、処理動作の
種類を表わす。修飾データ「DATA−1」およ
び「DATA−2」はそれぞれ8ビツト(2桁の
2進化10進符号であつて、修飾データ全体として
は4桁の2進化10進符号である)であり、命令コ
ードで表わされた種類の処理動作を具体的に特定
する。また出力制御命令「OUT」は、各出力端
子と1対1に対応した出力端子数と同じビツト数
のデータで、通常の工程歩進形の処理では各出力
端子のオン、オフをそれぞれ表わす。
この命令フオーマツトに対応し、上記表示器7
は第2図に示すように、工程番号(ステツプ番
号)を表示する2桁の数字表示器71と、命令コ
ード「OP」を10進変換して表示する1桁の数字
表示器72と、修飾データ「DATA−1」およ
び「DATA−2」を10進変換して表示する合計
4桁の数字表示器73および74と、各出力端子
OUTの出力信号状態をそれぞれ表示するLEDラ
ンプ群75等から構成されている。
次に、このプログラマブル・コントローラにお
ける一般的な命令コードとその実行内容について
簡単に説明する。
(a) 「NOP」;ノンオペレーシヨン命令
何もせずに次の工程番号へ進む。
(b) 「END」;エンド命令
1サイクルの処理が終了したことを表わす。
(c) 「JMP」;ジヤンプ命令
「DATA−1」に指定した工程番号へジヤ
ンプし、そこから引続き実行する。
また、「DATA−2」に入力端子番号がプロ
グラムされている場合は、「DATA−2」に指
定した入力を受けて「DATA−1」に指定し
た工程番号へジヤンプし、そこから引続き実行
する。
(d) 「AND」;アンド命令
「DATA−1」と「DATA−2」に指定し
た2つの入力端子番号の入力信号がそろつたと
き、次の工程番号へ進む。
(e) 「OR」;オア命令
「DATA−1」と「DATA−2」に指定し
た2つの入力端子番号のいずれか先にきた入力
信号を受け、次の工程番号に進む。
(f) 「CNT」;カウント命令
「DATA−1」に指定した数だけ「DATA
−2」に指定した入力端子番号からの入力信号
をカウントし、カウントアツプすると次の工程
番号へ進む。
(g) 「CJP」;コンデイシヨンナルジヤンプ命令
「DATA−2」に指定した入力端子番号の
入力信号がオンの場合は「DATA−1」に指
定した工程番号へジヤンプし、上記入力信号が
オフの場合は次の工程番号へ進む。
(h) 「RAT」;リピード命令
「DATA−1」に指定した回数まで
「DATA−2」に指定した工程番号から現在の
工程番号間を繰返す。
(i) 「TIM」;タイマ命令
「DATA−1」「DATA−2」に指定した時
間が経過すると次の工程番号へ進む。
以上は非常に良く知られた命令コードであり、
これの実行の際の信号処理手順も良く知られてい
るので詳述しない。
この発明に係るコントローラでは、上記のよう
に良く知られた命令体系、処理方式を基本とし、
これに以下説明する新たな制御方式を導入してい
るのである。
この発明の制御方式を具体化するために、上記
命令コード「OP」として、上記に加えて新たに
スキヤニング開始命令「SCA」を定義している
(これに対応してキー入力装置6に「SCA」キー
が設けられている)。このスキヤニング開始命令
は以下に続く命令をスキヤニング処理することを
表わすもので、この命令に関しては修飾データは
設定しない。本実施例においては、上述のアンド
命令とオア命令についてスキヤニング処理も行な
えるようにしており、またスキヤニング処理から
通常の工程歩進処理に戻す命令として上記コンデ
イシヨンナルジヤンプ命令を使う。以下、具体的
なプログラムをあげて説明する。次表のプログラ
ムでは、説明を簡単にするため、出力端子数を8
として出力制御命令を表わしている。[Table] The instruction code "OP" has 4 bits and represents the type of processing operation. The modification data "DATA-1" and "DATA-2" are each 8 bits (2-digit binary coded decimal code, the modification data as a whole is a 4-digit binary coded decimal code), and the instruction Specify specifically the type of processing operation represented by the code. The output control command ``OUT'' is data having the same number of bits as the number of output terminals in one-to-one correspondence with each output terminal, and in normal step-by-step processing, it indicates whether each output terminal is on or off. Corresponding to this command format, the display 7
As shown in Fig. 2, there is a two-digit numerical display 71 that displays the process number (step number), and a one-digit numerical display 72 that displays the decimal converted instruction code "OP". , a total of 4 digit numerical displays 7 3 and 7 4 that convert and display the modified data "DATA-1" and "DATA-2" in decimal, and each output terminal.
It is composed of a group of LED lamps 75 , etc., each displaying the output signal status of OUT. Next, general instruction codes and their execution contents in this programmable controller will be briefly explained. (a) "NOP"; Non-operation command Proceeds to the next process number without doing anything. (b) “END”; End command Indicates that one cycle of processing has ended. (c) "JMP"; Jump command Jumps to the process number specified in "DATA-1" and continues execution from there. Also, if the input terminal number is programmed in "DATA-2", the input specified in "DATA-2" will be received, the process will jump to the process number specified in "DATA-1", and the execution will continue from there. . (d) "AND"; AND instruction When the input signals of the two input terminal numbers specified as "DATA-1" and "DATA-2" are aligned, proceed to the next step number. (e) "OR"; OR instruction Receive the input signal that comes first from either of the two input terminal numbers specified as "DATA-1" and "DATA-2" and proceed to the next process number. (f) "CNT"; Count instruction "DATA-1"
The input signal from the input terminal number designated as "-2" is counted, and when the count is up, the process advances to the next process number. (g) "CJP"; Conditional jump command If the input signal of the input terminal number specified in "DATA-2" is on, jumps to the process number specified in "DATA-1", and the above input signal If it is off, proceed to the next process number. (h) “RAT”; Repeat command Repeats the process from the process number specified in “DATA-2” to the current process number up to the number of times specified in “DATA-1”. (i) "TIM"; Timer command When the time specified in "DATA-1" and "DATA-2" has elapsed, proceed to the next process number. The above is a very well-known instruction code,
The signal processing procedures used in this implementation are also well known and will not be described in detail. The controller according to the present invention is based on the well-known command system and processing method as described above,
To this end, a new control method, which will be explained below, has been introduced. In order to embody the control method of the present invention, a scanning start command "SCA" is newly defined as the command code "OP" in addition to the above (correspondingly, the key input device 6 is set to "SCA"). ” key is provided). This scanning start command indicates that the following command is to be scanned, and no modification data is set for this command. In this embodiment, scanning processing can also be performed for the above-mentioned AND instruction and OR instruction, and the above-mentioned conditional jump instruction is used as an instruction for returning from scanning processing to normal process step processing. A specific program will be explained below. In the program in the table below, the number of output terminals is 8 to simplify the explanation.
represents an output control command.
【表】
工程番号21の命令はタイマ命令であつて、端子
番号1、2、3、4の出力をオン、端子番号5、
6、7、8の出力をオフにする出力状態を10分30
秒間続け、次の工程番号22に進むことを表わして
いる。
工程番号22の命令はアンド命令で、端子番号
2、3、4、5の出力をオン、他の出力をオフに
する出力状態を、入力端子番号01の入力信号と入
力端子番号02の入力信号のアンド条件が成立する
まで続け、そのアンド条件が成立したら次の工程
番号23に進むことを表わしている。
工程番号23の命令はオア命令で、端子番号1、
3、5、7の出力をオン、他の出力をオフにする
出力状態を、入力端子番号03と04の入力信号のオ
ア条件が成立するまで続け、そのオア条件が成立
したら次の工程番号24に進むことを表わしてい
る。
工程番号24の命令はカウンタ命令で、端子番号
5、6、7、8の出力をオン、その他の出力をオ
フにする出力状態を、入力端子番号05からの入力
信号を12回計数するまでの間続け、12回計数した
時点(カウント条件が成立)で次の工程番号25に
進む。
工程番号25の命令は上記スキヤニング開始命令
で、続く工程番号26にはアンド命令が、工程番号
27にはオア命令が、工程番号28にはコンデイシヨ
ナルジヤンプ命令が設定されている。このコンデ
イシヨナルジヤンプ命令の内容は、入力端子番号
15からの入力信号がなければ工程番号25にジヤン
プし、端子番号15からの入力信号があれば次の工
程番号29に進むことを表わしている。以上の工程
番号25、26、27、28の命令により、工程番号26の
アンド命令と工程番号27のオア命令をスキヤニン
グ処理することを表わしているのである。
工程番号26のアンド命令は、通常の工程歩進処
理であれば、端子番号1の出力のみをオンにして
他の出力をオフにする出力状態を、入力端子番号
11と12の入力信号のアンド条件が成立するまで続
けること意味するが、これをスキヤニング処理で
は次のように実行する。この工程番号26の命令の
実行時点で、入力端子番号11と12の入力信号のア
ンド条件が成立していれば、端子番号1の出力を
オンにし(他の出力は操作しない、したがつて前
の状態を続ける)、アンド条件が成立していなけ
れば端子番号1の出力をオフにし(他の出力は操
作しない)、アンド条件の成立、不成立にかかわ
らず即座に次の工程番号27に進む。
工程番号27のオア命令は、通常の工程歩進処理
であれば、端子番号2、3をオンにして他の出力
をオフにする出力状態を、入力端子番号13と14の
入力信号のオア条件が成立するまで続けることを
意味するが、これをスキヤニング処理では次のよ
うに実行する。工程番号26の命令実行時点で、入
力端子番号13と14の入力信号のオア条件が成立し
ていれば、端子番号2と3の出力をオンにし(他
の出力は操作しない)、オア条件が成立していな
ければ、端子番号2と3の出力をオフにし(他の
出力は操作しない)、オア条件の成立、不成立に
かかわらず即座に次の工程番号28に進む。
したがつて、工程番号28のコンデイシヨナルジ
ヤンプ命令の条件となつている入力端子番号15か
らの入力信号がない間は、スキヤニング処理によ
り工程番号25、26、27、28の命令が高速に繰返し
実行される。その結果、端子番号1の出力は入力
端子番号11と12のアンド条件が成立したときオ
ン、不成立のときオフとなり、端子番号2と3の
出力は入力端子番号13と14のオア条件が成立した
ときオン、不成立のときオフとなり、他の出力は
工程番号24のカウント命令の実行時のまま(端子
番号4の出力がオフ、端子番号5、6、7、8の
出力がオン)となつている。このような出力状態
が、入力端子番号15の入力信号が検出されるまで
続き、その入力信号が検出されると、工程番号29
へ進むのである。工程番号29の命令はアンド命令
で、上述のごとく工程歩進処理され、次の工程番
号30の命令はタイマ命令で、上述のごとく工程歩
進処理される。
次に、上記のような命令実行制御が中央処理装
置2によるどのような信号処理手順によつて実現
されるかを第3図のフローチヤートに従つて説明
する。このフローチヤートは、マイクロコンピユ
ータよりなる出力制御命令2中のROMに格納さ
れた動作プログラムの構成を示している。
ルーチン1では、中央処理装置2中のRAMに
設定された工程カウンタPCの内容(すなわち工
程番号)でプログラム記憶部5をアドレツシング
し、その工程番号のユーザー命令(工程更新命令
および出力制御命令)を読出し、上記RAM中に
設定された命令レジスタにストアする。次のルー
チン2では、上記命令レジスタにストアした命令
中の命令コード「OP」を解読し、各命令コード
に応じて制御を振り分ける。
解読した命令コードがスキヤニング開始命令の
場合、ルーチン3に進み、上記RAMに設定され
たスキヤニングSFを“1”にセツトし、次のル
ーチン4で工程カウンタPCを歩進(1を加算)
して最初のルーチン1に戻る。
命令コードがコンデイシヨナルジヤンプ命令の
場合、ルーチン5に進み、上記スキヤンフラグ
SFを“0”にリセツトし、次のルーチン6で修
飾データ「DATA−2」で指定された入力端子
番号の入力信号があるか否かをチエツクし、その
入力信号があるときはルーチン4で工程カウンタ
PCを歩進してルーチン1に戻り、入力信号がな
いときはルーチン7に進み、修飾データ
「DATA−1」で指定された工程番号を工程カウ
ンタPCにプリセツトしてルーチン1に戻る。
命令コードがアンド命令の場合、ルーチン8に
進み、修飾データ「DATA−1」と「DATA−
2」に指定された2つの入力端子番号の入力信号
をチエツクし、そのアンド条件が成立するか否か
を判定し、条件成立しておればルーチン9へ、条
件不成立であればルーチン10へそれぞれ進む。
ルーチン9と10の判定内容は同じで、上記スキ
ヤンフラグSFが“1”か否かを判定する。この
判定結果により、上述の工程歩進処理かスキヤニ
ング処理かに振り分けるのである。
上記アンド条件が不成立でルーチン8にてNO
と判定され、このときスキヤンフラグSFが
“0”であつてルーチン10でNOと判定された場
合、ルーチン11に進み、工程歩進形の処理がな
される。すなわちルーチン11では、出力制御命
令「OUT」で“1”が設定された端子番号の出
力をオンにし、“0”が設定された端子番号の出
力をオフにする。しかる後ルーチン2に戻る。し
たがつて、先に命令レジスタに読出したアンド命
令について、再度ルーチン2→8が実行され、さ
らにアンド条件が成立していなければルーチン1
0→11と実行され、ルーチン2に戻る。つまり
アンド条件が成立しない間は、ルーチン2→8→
10→11が繰返され、出力制御命令に設定した
出力状態が保たれる。そして、上記アンド条件が
成立すると、ルーチン8でNOと判定され、ルー
チン9に進むが、ここでは上記と同じくNOと判
定され、ルーチン12に進み、工程カウンタPC
を歩進し、ルーチン1に戻る。すなわち、次の工
程番号の命令の実行に移るのである。以上がアン
ド命令の通常の工程歩進形の処理である。
ルーチン2でオア命令が解読されると、ルーチ
ン18に進み、修飾データ「DATA−1」と
「DATA−2」に指定された2つの入力端子番号
の入力信号をチエツクし、そのオア条件が成立す
るか否かを判定し、条件成立しておればルーチン
9へ、条件不成立であればルーチン10へそれぞ
れ進み、上記アンド命令の場合と同様に、スキヤ
ンフラグSFの状態に応じて工程歩進処理かスキ
ヤニング処理かに振り分ける。SF=“0”の工程
歩進処理は上記アンド命令の場合と同じであるの
で詳述しない。
ルーチン13は上述の4種の命令以外の他の命
令の実行ルーチンとしてまとめて示している。こ
のルーチン13は、タイマ命令、カウント命令、
ジヤンプ命令、リピート命令の条件の成否の判定
を行なう他、ルーチン11と同様に、出力制御命
令で“1”が設定された端子番号の出力をオン
“0”が設定された端子番号の出力をオフにする
工程歩進形の出力制御を行ない、さらに上記条件
が成立していない間はルーチン2に戻つて、ルー
チン2→13を繰返し、上記条件が成立したと
き、ルーチン14に進んで工程カウンタPCを更
新してルーチン1に戻る。この工程カウンタPC
の更新とは、PCの内容に1を加算する歩進と、
ルーチン7のように特定の工程番号をPCにプリ
セツトすることの両方を含んでいる。
次にアンド命令とオア命令のスキヤニング形の
処理について説明する。スキヤニング開始命令で
スキヤンフラグSFが“1”にされ、続く工程番
号の命令がアンド命令であつた場合、ルーチン8
でそのアンド条件の成否がチエツクされ、その成
否に応じてルーチン9または10でスキヤンフラ
グSFの状態がチエツクされる。まず、アンド条
件が不成立であつた場合、ルーチン10に進んで
YESと判定され、ルーチン15に進む。このル
ーチン15では、出力制御命令で“1”が設定さ
れた端子番号の出力をオフにする。しかる後ルー
チン12で工程カウンタPCを歩進してルーチン
1に戻る。また、上記アンド条件が成立した場合
は、ルーチン9に進んでYESと判定され、ルー
チン16に進む。このルーチン16では、出力制
御命令で“1”が設定された端子番号の出力をオ
ンにする。しかる後ルーチン12で工程カウンタ
PCを歩進してルーチン1に戻る。このように、
出力制御命令で“1”が設定された端子番号の出
力を、アンド条件の成否に応じてオンまたはオフ
にし、そしてアンド条件の成否にかかわらず工程
カウンタPCを歩進して次の命令の実行に進むの
である。オア命令のスキヤニング形の処理も上記
と同様であるので詳述しない。そして、このスキ
ヤニング形の処理は、コンデイシヨナルジヤンプ
命令でスキヤンフラグSFが“0”に戻され、か
つルーチン6でYESと判定され、ルーチン4で
工程カウンタPCが歩進されるまで続くのであ
る。
なお、以上の実施例ではアンド命令とオア命令
についてスキヤニング形の処理を行なえるように
したが、この発明はこれに限定されず、他の命令
についてもスキヤニング処理を行なうこともでき
る。
以上詳細に説明したように、この発明は、プロ
グラム記憶部に工程番号と対応させて格納される
各工程単位のユーザー命令が、自工程から他工程
へ移行させる条件等を表わす工程更新命令と、自
工程の実行期間に各出力端子の出力をオンにする
かオフにするかを各出力端子番号と1対1に対応
させて“1”および“0”で表わしてなる出力制
御命令とで構成され、中央処理装置で上記プログ
ラム記憶部から1工程分づつユーザー命令を読出
し、上記工程更新命令で表わされた条件が成立す
るまで上記出力制御命令で表わされた出力状態に
保ち、上記条件が成立したとき工程を更新する工
程歩進形プログラマブル・シーケンスコントロー
ラにおいて、ユーザー命令として設定する特定の
スキヤニング開始命令に応答し、かつ、スキヤニ
ング処理から工程歩進処理への復帰条件の成立有
無の判定を指示する条件付き復帰命令までの間に
設定された一連のユーザ命令を、その工程更新命
令で表わされた条件の成否に応じてその出力制御
命令で“1”が設定された出力端子番号の出力を
オンまたはオフにするとともに、上記条件の成否
にかかわりなく即座に工程を更新するスキヤニン
グ処理で実行するようにしたことを特徴とするも
のであり、これにより命令体系の理解が極めて容
易な工程歩進形のコントローラにおいて、必要に
応じてプログラムの一部をスキヤニング形と同様
な処理で実行することができ、ユーザーが求める
各種の制御仕様に容易に対応でき、利用範囲、汎
用性が大きく拡大される。[Table] The instruction with process number 21 is a timer instruction, which turns on the output of terminal numbers 1, 2, 3, and 4, and turns on the output of terminal numbers 5 and 4.
Turn off outputs 6, 7, and 8 Set output status to 10 minutes 30
It continues for a second and then goes to the next step number 22. The instruction with step number 22 is an AND instruction, which turns on the outputs of terminal numbers 2, 3, 4, and 5, and turns off the other outputs. This indicates that the process continues until the AND condition is satisfied, and when the AND condition is satisfied, the process proceeds to the next step number 23. The instruction with process number 23 is an OR instruction, and terminal number 1,
The output state of turning on outputs 3, 5, and 7 and turning off the other outputs continues until the OR condition of the input signals of input terminal numbers 03 and 04 is satisfied, and when the OR condition is satisfied, the next step number 24 It means to proceed to. The instruction with step number 24 is a counter instruction that turns on the outputs of terminal numbers 5, 6, 7, and 8 and turns off the other outputs until the input signal from input terminal number 05 is counted 12 times. Continue for a while, and when the count is completed 12 times (counting conditions are met), proceed to the next step number 25. The command with process number 25 is the above-mentioned scanning start command, and the following process number 26 is an AND command, and the process number is
An OR instruction is set in 27, and a conditional jump instruction is set in step number 28. The contents of this conditional jump instruction are the input terminal number
This indicates that if there is no input signal from terminal number 15, the process jumps to process number 25, and if there is an input signal from terminal number 15, the process proceeds to the next process number 29. The instructions in step numbers 25, 26, 27, and 28 represent scanning of the AND instruction in step number 26 and the OR instruction in step number 27. The AND instruction in process number 26 changes the output state of turning on only the output of terminal number 1 and turning off the other outputs in normal process step processing, using the input terminal number.
This means continuing until the AND condition of input signals 11 and 12 is satisfied, and this is executed in the scanning process as follows. If the AND condition of the input signals of input terminal numbers 11 and 12 is satisfied at the time of execution of the instruction of step number 26, the output of terminal number 1 is turned on (other outputs are not operated, so ), if the AND condition is not satisfied, turn off the output of terminal number 1 (other outputs are not operated), and immediately proceed to the next step number 27 regardless of whether the AND condition is satisfied or not. The OR instruction of process number 27 is the OR condition of the input signals of input terminal numbers 13 and 14, which would turn on terminal numbers 2 and 3 and turn off the other outputs in normal process step processing. This means to continue until the following is established, and this is executed in the scanning process as follows. If the OR condition of the input signals of input terminal numbers 13 and 14 is satisfied at the time of execution of the instruction in step number 26, the outputs of terminal numbers 2 and 3 are turned on (other outputs are not operated), and the OR condition is satisfied. If the OR condition is not satisfied, the outputs of terminal numbers 2 and 3 are turned off (other outputs are not operated), and the process immediately proceeds to the next step number 28 regardless of whether the OR condition is satisfied or not. Therefore, while there is no input signal from input terminal number 15, which is the condition for the conditional jump command of step number 28, the commands of step numbers 25, 26, 27, and 28 are repeated at high speed due to scanning processing. executed. As a result, the output of terminal number 1 is turned on when the AND condition of input terminal numbers 11 and 12 is satisfied, and is turned off when it is not satisfied, and the output of terminal number 2 and 3 is turned on when the OR condition of input terminal numbers 13 and 14 is satisfied. When the count instruction is not established, it is turned on, and when it is not satisfied, it is turned off, and the other outputs remain as they were when the count instruction of process number 24 was executed (the output of terminal number 4 is off, and the output of terminal numbers 5, 6, 7, and 8 is on). There is. This output state continues until the input signal of input terminal number 15 is detected, and when that input signal is detected, step number 29
Let's move on to. The instruction with process number 29 is an AND instruction, and the process step is processed as described above, and the next instruction with process number 30 is a timer instruction, and the process is processed as described above. Next, the signal processing procedure by which the central processing unit 2 implements the above-mentioned instruction execution control will be explained with reference to the flowchart shown in FIG. This flowchart shows the configuration of an operating program stored in the ROM in the output control command 2 formed by a microcomputer. In routine 1, the program storage unit 5 is addressed with the contents of the process counter PC (i.e., the process number) set in the RAM in the central processing unit 2, and the user command (process update command and output control command) for that process number is executed. Read and store in the instruction register set in the RAM. In the next routine 2, the instruction code "OP" in the instruction stored in the instruction register is decoded, and control is distributed according to each instruction code. If the decoded instruction code is a scanning start instruction, proceed to routine 3, set the scanning SF set in the RAM above to "1", and increment the process counter PC (add 1) in the next routine 4.
and return to the first routine 1. If the instruction code is a conditional jump instruction, proceed to routine 5 and set the above scan flag.
Reset SF to "0" and check in the next routine 6 whether or not there is an input signal with the input terminal number specified by the modifier data "DATA-2". If there is that input signal, proceed to routine 4. process counter
The PC is incremented and the process returns to routine 1. If there is no input signal, the process proceeds to routine 7, where the process number designated by the modification data "DATA-1" is preset in the process counter PC, and the process returns to routine 1. If the instruction code is an AND instruction, the process advances to routine 8 and the modification data “DATA-1” and “DATA-
The input signals of the two input terminal numbers specified in "2" are checked, and it is determined whether the AND condition is satisfied or not. If the condition is satisfied, the process goes to routine 9, and if the condition is not satisfied, the process goes to routine 10. move on.
The determination contents of routines 9 and 10 are the same, and it is determined whether the scan flag SF is "1" or not. Depending on the result of this determination, the processing is divided into the above-mentioned process step process or scanning process. The above AND condition is not satisfied, so NO in routine 8.
If it is determined that the scan flag SF is "0" at this time and the determination in routine 10 is NO, the process advances to routine 11 and step-by-step processing is performed. That is, in routine 11, the output of the terminal number set to "1" by the output control command "OUT" is turned on, and the output of the terminal number set to "0" is turned off. After that, the routine returns to routine 2. Therefore, for the AND instruction previously read into the instruction register, routine 2 → 8 is executed again, and if the AND condition is not satisfied, routine 1 is executed again.
The sequence is executed from 0 to 11, and the process returns to routine 2. In other words, while the AND condition is not satisfied, routine 2 → 8 →
Steps 10→11 are repeated, and the output state set in the output control command is maintained. When the above AND condition is satisfied, the routine 8 makes a NO judgment and proceeds to the routine 9, but here, the same as above, it makes a NO judgment and proceeds to the routine 12, where the process counter PC
and returns to routine 1. In other words, the process moves on to execution of the instruction with the next process number. The above is the normal step-by-step processing of the AND instruction. When the OR instruction is decoded in Routine 2, the process proceeds to Routine 18, where the input signals of the two input terminal numbers specified by the qualifying data "DATA-1" and "DATA-2" are checked, and the OR condition is met. If the condition is satisfied, the process goes to routine 9, and if the condition is not satisfied, the process goes to routine 10. As with the AND instruction above, the process progresses depending on the state of the scan flag SF. or scanning processing. The step progression process when SF="0" is the same as that for the AND instruction, so it will not be described in detail. Routine 13 is collectively shown as an execution routine for instructions other than the above-mentioned four types of instructions. This routine 13 includes a timer instruction, a count instruction,
In addition to determining the success or failure of the jump command and repeat command conditions, similarly to routine 11, it turns on the output of the terminal number set to "1" by the output control command, and turns the output of the terminal number set to "0" by the output control command. Perform step-by-step output control to turn off, and as long as the above conditions are not met, return to routine 2 and repeat routines 2→13. When the above conditions are met, proceed to routine 14 to control the process counter. Update the PC and return to Routine 1. This process counter PC
An update is an step that adds 1 to the contents of the PC,
This includes both presetting a specific step number into the PC, such as Routine 7. Next, scanning type processing of AND instructions and OR instructions will be explained. If the scanning flag SF is set to "1" by the scanning start command and the following process number command is an AND command, routine 8
The success or failure of the AND condition is checked, and depending on the success or failure, the state of the scan flag SF is checked in routine 9 or 10. First, if the AND condition is not satisfied, proceed to routine 10.
The determination is YES, and the routine proceeds to routine 15. In this routine 15, the output of the terminal number set to "1" by the output control command is turned off. Thereafter, in routine 12, the process counter PC is incremented and the process returns to routine 1. Further, if the above AND condition is satisfied, the routine proceeds to routine 9, where a YES determination is made, and the routine proceeds to routine 16. In this routine 16, the output of the terminal number set to "1" by the output control command is turned on. After that, in routine 12, the process counter
Step through the PC and return to Routine 1. in this way,
The output of the terminal number set to "1" by the output control command is turned on or off depending on the success or failure of the AND condition, and the process counter PC is incremented regardless of the success or failure of the AND condition and the next command is executed. We proceed to The scanning type processing of the OR instruction is also the same as described above, so it will not be described in detail. This scanning type processing continues until the scan flag SF is returned to "0" by the conditional jump command, YES is determined in routine 6, and the process counter PC is incremented in routine 4. . In the embodiments described above, scanning-type processing can be performed for AND instructions and OR instructions, but the present invention is not limited thereto, and scanning processing can also be performed for other instructions. As described in detail above, the present invention provides a process update instruction in which a user command for each process unit stored in a program storage unit in association with a process number includes a process update command representing conditions for transitioning from the own process to another process, etc. Consists of output control instructions that indicate whether to turn on or turn off the output of each output terminal during the execution period of the own process, in a one-to-one correspondence with each output terminal number and expressed as "1" and "0". The central processing unit reads the user instructions for each process from the program storage unit, maintains the output state expressed by the output control instruction until the condition expressed by the process update instruction is satisfied, and maintains the output state expressed by the output control instruction until the condition expressed by the process update instruction is satisfied. In a step-by-step programmable sequence controller that updates the process when the process is met, in response to a specific scanning start command set as a user command, and determining whether the conditions for returning from scanning to step-by-step processing are met. The series of user commands set up to the conditional return command that instructs the output terminal number set to "1" by the output control command depending on the success or failure of the condition expressed in the process update command. The system is characterized by a scanning process that turns the output on or off and updates the process immediately regardless of the success or failure of the above conditions.This makes the command system extremely easy to understand. Process progressive type controllers can execute part of the program as needed in the same way as scanning type controllers, and can easily accommodate various control specifications required by users, offering a wide range of use and versatility. Expanded.
第1図はこの発明に係るシーケンスコントロー
ラの電気的構成を示すブロツク図、第2図はその
外観図、第3図は同上コントローラの基本動作を
表わすフローチヤートである。
2……中央処理装置、3……入力回路、4……
出力回路、5……プログラム記憶部、6……キー
入力装置、7……表示器。
FIG. 1 is a block diagram showing the electrical configuration of a sequence controller according to the present invention, FIG. 2 is an external view thereof, and FIG. 3 is a flow chart showing the basic operation of the same controller. 2...Central processing unit, 3...Input circuit, 4...
Output circuit, 5...program storage section, 6...key input device, 7...display device.
Claims (1)
納される各工程単位のユーザ命令が、自工程から
他工程へ移行させる条件などを表わす工程更新命
令と、自工程の実行期間に各出力端子の出力をオ
ンにするかオフにするかを各出力端子番号と1対
1に対応させて“1”および“0”で表わしてな
る出力制御命令とで構成され、中央処理装置で上
記プログラム記憶部から1工程分づつユーザ命令
を読出し、上記工程更新命令で表わされた条件が
成立するまで上記出力制御命令で表わされた出力
状態に保ち、上記条件が成立したとき工程を更新
する工程歩進形プログラマブル・シーケンスコン
トローラにおいて、 ユーザ命令として設定する特定のスキヤニング
開始命令に応答し、かつ、スキヤニング処理から
工程歩進処理への復帰条件の成立有無の判定を指
示する条件付き復帰命令までの間に設定された一
連のユーザ命令を、その工程更新命令で表わされ
た条件の成否に応じてその出力制御命令で“1”
が設定された出力端子番号の出力をオンまたはオ
フにするとともに、上記条件の成否にかかわりな
く即座に工程を更新するスキヤニング処理で実行
するようにしたことを特徴とする工程歩進形プロ
グラマブル・シーケンスコントローラの制御方
式。[Claims] 1. User commands for each process stored in the program storage unit in association with process numbers include process update commands representing conditions for transitioning from the current process to another process, and the execution period of the current process. The central processing unit reads the user commands for each process from the program storage section, maintains the output state represented by the output control command until the condition represented by the process update command is satisfied, and when the condition is satisfied, the process is started. In a step-by-step programmable sequence controller that updates the step-by-step programmable sequence controller, a conditional function that responds to a specific scanning start command set as a user command and instructs to determine whether a condition for returning from scanning to step-by-step processing is met is established. A series of user commands set up to the return command are set to "1" by the output control command depending on the success or failure of the condition expressed by the process update command.
A step-by-step programmable sequence that is characterized in that it turns on or off the output of the output terminal number to which it is set, and executes scanning processing that immediately updates the process regardless of whether the above conditions are met or not. Controller control method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4828880A JPS56145405A (en) | 1980-04-12 | 1980-04-12 | Control system of process driving type programmable sequence controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4828880A JPS56145405A (en) | 1980-04-12 | 1980-04-12 | Control system of process driving type programmable sequence controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS56145405A JPS56145405A (en) | 1981-11-12 |
| JPS6112564B2 true JPS6112564B2 (en) | 1986-04-09 |
Family
ID=12799244
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4828880A Granted JPS56145405A (en) | 1980-04-12 | 1980-04-12 | Control system of process driving type programmable sequence controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS56145405A (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5291391A (en) * | 1992-03-20 | 1994-03-01 | Cincinnati Milacron Inc. | Fast programmable scan logic controller method and apparatus |
-
1980
- 1980-04-12 JP JP4828880A patent/JPS56145405A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS56145405A (en) | 1981-11-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS6112562B2 (en) | ||
| KR900007131B1 (en) | Programmable Remote Control Transmitter | |
| US4215397A (en) | Automatic end-of-scan control system for a programmable process controller with expandable memory | |
| JPS6120773B2 (en) | ||
| JPS6112564B2 (en) | ||
| US5963446A (en) | Extended relay ladder logic for programmable logic controllers | |
| DE59904450D1 (en) | PROGRAM-CONTROLLED HOUSEHOLD APPLIANCE | |
| JPS6112563B2 (en) | ||
| JPH0728509A (en) | Programmable controller | |
| JPH0545963B2 (en) | ||
| EP0166391B1 (en) | Sequence controller | |
| US4688193A (en) | Bit processing utilizing a row and column ladder sequence | |
| JPS5856121B2 (en) | sequence programmer | |
| JPS6446459A (en) | Massager | |
| JPH0456321B2 (en) | ||
| KR20030052861A (en) | Method for Drafting Ladder Diagram Using Petri Net | |
| JPS6236563B2 (en) | ||
| JPH1115522A (en) | Operation control panel | |
| RU18585U1 (en) | AUTOMATIC CONTROL SYSTEM | |
| JP2731166B2 (en) | Programmable controller | |
| JPS55162107A (en) | Sequence programmer on stored program system | |
| JPS5477879A (en) | Sequence control method | |
| JPS6236565B2 (en) | ||
| JPS5923918A (en) | Numerical value setting system of program timer | |
| JPH0323921B2 (en) |