JPH0573109A - Method and device for generating sequence program - Google Patents

Method and device for generating sequence program

Info

Publication number
JPH0573109A
JPH0573109A JP23773891A JP23773891A JPH0573109A JP H0573109 A JPH0573109 A JP H0573109A JP 23773891 A JP23773891 A JP 23773891A JP 23773891 A JP23773891 A JP 23773891A JP H0573109 A JPH0573109 A JP H0573109A
Authority
JP
Japan
Prior art keywords
block
program
failure
data
map
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.)
Pending
Application number
JP23773891A
Other languages
Japanese (ja)
Inventor
Toshihiko Hoshino
俊彦 星野
Toshiharu Sakamoto
俊治 坂本
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.)
Mazda Motor Corp
Original Assignee
Mazda Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mazda Motor Corp filed Critical Mazda Motor Corp
Priority to JP23773891A priority Critical patent/JPH0573109A/en
Publication of JPH0573109A publication Critical patent/JPH0573109A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To optimize a sequence program by extracting the non-optimized program parts as irrationally operated results and improving the irrational parts. CONSTITUTION:This device is composed of a host computer 60, CRT panel control unit 53 and data file 56. The host computer 60 is equipped with three sub systems and composed of an automatic programming/data input sub system 104, fault diagnosis/recovery sub system 106 to execute fault diagnosis and recovery, and simulation sub system 105 to execute simulation. While operating the temporarily generated sequence program for real facilities, data showing the states of operating the devices of these facilities are stored. Irrationality between the stored states of operating the devices and generation rules 112 describing the operations of the devices is judged and when it is judged that the states of really operating the devices are irrational, the generation rules are changed based on a prescribed change rule.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えばシーケンサ等に
より制御される生産設備を管理するシーケンスプログラ
ムの生成方法およびその装置に関し、特に、そのシーケ
ンスプログラムの最適化に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for generating a sequence program for managing production equipment controlled by, for example, a sequencer, and more particularly to optimizing the sequence program.

【0002】[0002]

【従来の技術】自動車の組立ラインの如くの生産ライン
において、設置された種々の設備に対してコンピユータ
を内蔵したシーケンス制御部を設け、かかるシーケンス
制御部により各設備が順次行なうべき動作についてのシ
ーケンス制御を行なうようにすることが知られている。
かかるシーケンス制御では、シーケンス制御部に内蔵さ
れたコンピユータに制御プログラムがロードされ、その
シーケンス制御部が生産ラインに設置された種々の設備
の夫々に対する動作制御の各段階をシーケンス動作制御
プログラムに従って順次進めていくようになっている。
2. Description of the Related Art In a production line such as an automobile assembly line, a sequence control unit having a built-in computer is provided for various installed facilities, and the sequence control unit performs a sequence of operations to be sequentially performed by each facility. It is known to have control.
In such sequence control, a control program is loaded into a computer incorporated in the sequence control unit, and the sequence control unit sequentially advances each step of operation control for each of various equipment installed in the production line according to the sequence operation control program. It is designed to continue.

【0003】かかるシーケンス制御のための制御手法と
して、本出願人は、特願平1−335271号,2−1
10977号、2−30379号、1−253991
号、2−304022号、2−304023号、2−3
04024号、3−67290号、3−67291号、
3−67292号等を出願している。これらの出願にお
ける生産ラインの管理手法は、生産ラインの全設備のシ
ーケンサによる一般的な制御条件を入出力マップとして
記述し、その一方、ラインの具体的な順次動作を動作ブ
ロックと動作ステップという概念で把握し、その上で、
入出力マップ,動作ステップフローマップ,動作ブロッ
クフローマップとに基づいて、ラダープログラムを生成
するというものであった。
As a control method for such sequence control, the present applicant has filed Japanese Patent Application No. 1-335271, 2-1.
No. 10977, 2-30379, 1-253991
No. 2-304022, 2-304023, 2-3
04024, 3-67290, 3-67291,
No. 3-67292 is filed. The production line management method in these applications describes general control conditions by the sequencer of all the equipment of the production line as an input / output map, while the concrete sequential operation of the line is defined as an operation block and an operation step. And then on that,
The ladder program is generated based on the input / output map, the operation step flow map, and the operation block flow map.

【0004】また、上記出願における故障診断において
は、設備が正常に作動している状態におけるシーケンス
制御回路部の構成要素の動作態様を基準動作態様として
予め設定しておき、設備の実際の作動時におけるシーケ
ンス制御回路部の構成要素の動作態様を上記基準動作態
様と順次比較していき、その差に基づいて故障検出を行
うようにしている。
Further, in the failure diagnosis in the above application, the operation mode of the constituent elements of the sequence control circuit section in a state where the equipment is operating normally is preset as a reference operation mode, and when the equipment is actually operating, The operation mode of the constituent elements of the sequence control circuit section is sequentially compared with the reference operation mode, and the failure is detected based on the difference.

【0005】更に、本出願人は、プログラム作成を効率
化し、且つ容易にできるようにするために、個々の動作
ステツプを記述するルールにおいて、その動作を端的に
表わす名称を付けて上記ルールをデータベース化して、
さらに、生産ラインを管理するシステムを、プログラム
の自動生成サブシステム、故障診断を行なうためのサブ
システム、ユーザインターフェースのためのサブシステ
ム、生成されたプログラムのシュミレーションを行なう
シュミレーションサブシステムの4つのサブシステムに
分け、これらのサブシステムのいずれからも上記データ
ベースを名前によりアクセスできるようにして、プログ
ラムの自動生成、プログラムの実行、故障の解析等のあ
るゆる操作において操作の簡便化、ミスの減少化を計っ
た。
Further, in order to make the program creation efficient and easy, the applicant of the present invention assigns a name that briefly represents the operation in the rule describing each operation step to the database of the above rules. Turn into
In addition, the system for managing the production line includes four subsystems: a program automatic generation subsystem, a failure diagnosis subsystem, a user interface subsystem, and a simulation subsystem that simulates the generated program. The database can be accessed by name from any of these subsystems to simplify the operation and reduce mistakes in any operation such as automatic program generation, program execution, and failure analysis. I measured it.

【0006】[0006]

【発明が解決しようとする課題】本出願人からの上記出
願になるシーケンスプログラムの自動生成では、上述し
たように名前により全ての設備をプログラム的に特定で
きるために、そのプログラムは容易に作成でき、また保
守も容易であるという利点をもつものの、機械がプログ
ラムを自動生成するという点で、個々の生産ラインに対
して必ずしも最適化されていないという点を否めない。
In the automatic generation of the sequence program filed by the applicant of the present invention, all the equipment can be programmatically specified by name as described above, and therefore the program can be easily created. Although it has the advantage of being easy to maintain, it cannot be denied that it is not necessarily optimized for each production line in that the machine automatically generates a program.

【0007】例えば、生産ラインの設備のなかには、動
作特性がバラツいたものがある。例えば、同じ型式のシ
リンダであっても、使用過程において、経時、経年変化
や、粉塵等の付着により、その動作にバラツキがあり、
シリンダのアクチュエータがオフからオンするまでに要
する時間に差があったりする。またあるいは、複数のN
C装置がある場合に、それらの装置が本来同時に起動さ
れて動作開始を行なわなければならないのに、それらの
NC装置が異なるマイクロコンピユータを使っていた
り、あるいは異なるメーカのものである故に動作時間に
差が発生して、装置に動作不順が起きる場合がある。そ
して、上記出願の自動生成方法では、設備の動作を公称
値に基づいた生成ルールに従って記述しているために、
その生成されたプログラムは、動作特性がバラツいた実
際の設備に対してギャップがあるものとなり、それ故
に、必ずしも誤動作とは言えないものまでも故障と診断
されてシステムのダウンを将来することにもなる。
For example, some equipment on the production line has different operating characteristics. For example, even in the case of cylinders of the same model, there are variations in the operation due to changes over time, aging, dust, etc.
There is a difference in the time required for the cylinder actuator to turn on. Alternatively, a plurality of N
If there are C devices, they must start up at the same time to start operation, but the NC devices use different microcomputers, or they are from different manufacturers, and therefore the operation time is longer. Differences may occur, causing a malfunction of the device. And in the automatic generation method of the above application, since the operation of the equipment is described according to the generation rule based on the nominal value,
The generated program has a gap with respect to actual equipment with different operating characteristics. Therefore, even if it is not necessarily a malfunction, it can be diagnosed as a failure and the system can be brought down in the future. Become.

【0008】また、上記出願による自動生成方法により
自動生成されたプログラムが最適化されていないことの
他の問題は、動作ブロックの起動あるいは動作ステツプ
の起動が画一的であることである。ここで、動作ブロッ
クとは一連の複数の動作ステツプのかたまりであり、そ
の途中の動作ステツプから他の動作ブロックを起動し、
あるいは、他の動作ブロックからその動作ブロックの途
中の動作ステツプが起動され、ということはないという
関係により、各動作ブロックは他の動作ブロックと関連
付けられている。シーケンスプログラムは、個々の動作
ステツプがシーケンスに実行されていくという特徴故
に、ある動作ブロックまたは動作ステツプの起動条件
は、その動作ブロック,動作ステツプに至るまでの全て
の動作ブロック,動作ステツプの出力の確認条件の総和
であるということができる。そして、上記出願では、あ
る動作ブロックCが動作ブロックA,Bの終了を待って
起動される場合に、その動作ブロックCの起動条件は、
動作ブロックAの出力確認条件がa1 ,a2 ,…であ
り、動作ブロックBの出力確認条件がb1 ,b2 ,…で
あれば、a1 *a2 *…*b1 *b2 *…となる。しか
しながら、実際のところ、動作ブロックA,B内のあら
ゆる動作ステツプが動作ブロックCの起動条件に関与す
るものではない。換言すれば、例えば、動作ブロックB
の出力b2 が動作ブロックCのいかなる動作ステツプの
動作と干渉しないのであれば、動作ブロックCの起動条
件からb2 を除去することができ、またその方が処理の
高速化、プログラム保守の容易化をもたらす。
Another problem that the program automatically generated by the automatic generation method according to the above application is not optimized is that activation of an operation block or activation of an operation step is uniform. Here, the operation block is a group of a plurality of operation steps, and another operation block is activated from the operation step in the middle,
Alternatively, each operation block is associated with another operation block because the operation step in the middle of the operation block is not activated from another operation block. Since the sequence program is characterized in that each operation step is executed in sequence, the start condition of a certain operation block or operation step is that the operation block, all the operation blocks up to the operation step, and the output of the operation step are It can be said that it is the sum of confirmation conditions. In the above application, when a certain operation block C is activated after waiting for the end of the operation blocks A and B, the activation condition of the operation block C is
If the output confirmation conditions of the operation block A are a 1 , a 2 , ... And the output confirmation conditions of the operation block B are b 1 , b 2 , ..., a 1 * a 2 * ... * b 1 * b 2 * ... However, in reality, all the operation steps in the operation blocks A and B do not contribute to the activation condition of the operation block C. In other words, for example, the operation block B
If the output b 2 of the operation block C does not interfere with the operation of any operation step of the operation block C, b 2 can be removed from the start condition of the operation block C, and the processing speed can be increased and the program maintenance can be facilitated. Bring to life.

【0009】このように、我々の出願になるシーケンス
プログラムの自動生成方法は、最適化という観点からで
はまだ改良の余地が大ということである。そこで、本発
明の目的は、プログラム開発効率が高く、また、そのメ
インテナンスも容易なシーケンスプログラムの生成方法
およびその装置を提案するものである。
As described above, there is still a lot of room for improvement in the automatic generation method of the sequence program in our application from the viewpoint of optimization. SUMMARY OF THE INVENTION Therefore, an object of the present invention is to propose a sequence program generation method and its apparatus that have high program development efficiency and are easy to maintain.

【0010】[0010]

【課題を達成するための手段及び作用】上記課題を達成
するための本発明の構成は、個々の設備の動作を起動し
あるいは規制しあるいはその動作を確認するための1つ
または複数のデバイスの状態を記述する生成ルールを複
数の設備について組み合わせてなるシーケンスプログラ
ムを自動生成する生成方法であって、 a:一度生成されたシーケンスプログラムを実際の設備
に対して動作させながら、これらの設備のデバイスの動
作状態を示すデータを記憶する工程と、 b:記憶されたデバイスの動作状態と、そのデバイスの
動作を記述する前記生成ルールとの不合理性を判断する
工程と、 c:bにおいて、デバイスの実際の動作状態がそのデバ
イスの前記生成ルールに対して不合理であると判断され
た場合に、所定の変更ルールに基づいて、その生成ルー
ルを変更する工程とを具備することにより、このシーケ
ンスプログラムを最適化することを特徴とする。
[Means and Actions for Achieving the Object] The structure of the present invention for achieving the above-mentioned object comprises one or a plurality of devices for activating or regulating the operation of individual equipment or for confirming the operation. A generation method for automatically generating a sequence program in which a generation rule that describes a state is combined with respect to a plurality of pieces of equipment, wherein: a: a device of these pieces of equipment while operating the once generated sequence program on actual equipment. Storing the data indicating the operating state of the device, b: determining an absurdity between the stored operating state of the device and the generation rule describing the operation of the device, and c: b, the device If the actual operating state of the device is determined to be unreasonable with respect to the generation rule of the device, By providing the step of changing the product rule, characterized by optimizing the sequence program.

【0011】上記課題課題を達成するための本発明は、
個々の設備の動作を起動しあるいは規制しあるいはその
動作を確認するための1つまたは複数のデバイスの状態
を記述する生成ルールを複数の設備について組み合わせ
るなるシーケンスプログラムを自動生成する生成装置で
あって、 a:前記生成ルールを記憶する第1の記憶部と、 b:一度生成されたシーケンスプログラムを実際の設備
に対して動作させながら、これらの設備のデバイスの動
作状態を監視する監視部と、 c:動作状態を示すデータを記憶する第2の記憶部と、 d:記憶されたデバイスの動作状態と、そのデバイスの
動作を記述する前記生成ルールとの不合理性を判断し、
デバイスの実際の動作状態がそのデバイスの前記生成ル
ールに対して不合理であると判断された場合に、所定の
変更ルールに基づいて、その生成ルールを変更するルー
ル変更部とを具備する。
The present invention for achieving the above-mentioned object is as follows:
A generation device for automatically generating a sequence program for combining a plurality of facilities with a generation rule that describes the state of one or more devices for activating, regulating, or confirming the operation of each facility. A: a first storage unit that stores the generation rule, b: a monitoring unit that monitors the operating state of devices of these facilities while operating the sequence program once generated on actual facilities, c: a second storage unit that stores data indicating an operating state; d: determine an absurdity between the stored operating state of the device and the generation rule that describes the operation of the device,
And a rule changing unit that changes the generation rule based on a predetermined change rule when it is determined that the actual operating state of the device is unreasonable with respect to the generation rule of the device.

【0012】[0012]

【実施例】以下、本発明を自動車の生産ラインのシーケ
ンス制御に適用した実施例を説明する。 〈実施例システムの特徴〉本実施例のシステムは、本出
願人の特願平3−67290,3−67291,3−6
7292を更に発展させたものである。ちなみに、上記
3件の特徴は、次のi〜iiiの3点にある。 : 生産ラインにおける管理対象となる設備の全ての
動作は、動作ブロックに分解され、そして、個々の動作
ブロックは更に複数の動作ステップに分解されている。ii : 各動作ブロック,各動作ステップには、それら
をプログラマ若しくは操作者(以下、操作者と略す)が
把握し易いように、その動作ブロック若しくは動作ステ
ップのそのものを、そしてその動作を想起でき易いよう
なユニークな『名称』が付けられている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to the sequence control of an automobile production line will be described below. <Characteristics of Example System> The system of this example is the same as the Japanese Patent Application No. 3-67290, 3-67291, 3-6 of the present applicant.
It is a further development of the 7292. By the way, the above three characteristics are in the following three points i to iii. i : All operations of the equipment to be managed in the production line are decomposed into operation blocks, and each operation block is further decomposed into a plurality of operation steps. ii : For each operation block and each operation step, the operation block or operation step itself and the operation can be easily recalled so that the programmer or the operator (hereinafter abbreviated as operator) can easily understand them. Such a unique "name" is attached.

【0013】iii: このシステムは、ラダープログ
ラムの自動生成、生成されたラダープログラムのシュミ
レーション、実際の動作中若しくはシュミレーション中
におけるシステム管理、故障診断等の機能を有するが、
これらの機能をプログラム化する過程において、システ
ムと操作者とのユーザインターフェースは、そして、プ
ログラム間のプログラムインターフェースは上記『名
称』により行なわれる。換言すれば、上記機能及びユー
ザインターフェース、そしてプログラムインターフェー
スにより、シーケンス制御プログラムの開発や、システ
ムのメインテナンスに必要な工数の削減が可能となる。
即ち、
Iii : This system has functions such as automatic generation of a ladder program, simulation of the generated ladder program, system management during actual operation or during simulation, and failure diagnosis.
In the process of programming these functions, the user interface between the system and the operator and the program interface between the programs are performed by the "name". In other words, the functions, the user interface, and the program interface can reduce the man-hours required for the development of the sequence control program and the maintenance of the system.
That is,

【0014】iii−1: 本システムでは、後述する
ように、システム全体の全設備のデバイスや、そのデバ
イスを使うステツプや、それらのステツプからなる動作
ブロックに、換言すれば、このシステムでランされる全
てのプログラムにおいて変数となり得る全てのものに名
称が付され、それらの名称がライブラリ化される。従っ
て、本システムでランされる全てのプログラム(特に、
シーケンスラダープログラム)の作成過程で、ライブラ
リ化されたこれらの『名称』を使うことができるので、
効率的なプログラム開発が可能となる。
Iii-1 : In this system, as will be described later, the devices of all equipment of the entire system, the steps using the devices, and the operation blocks composed of these steps are, in other words, run by this system. All the programs that can be variables are named, and those names are made into a library. Therefore, all programs run by this system (especially,
In the process of creating a sequence ladder program, these "names" that have been made into a library can be used,
It enables efficient program development.

【0015】iii−2: 本システムでは、特にシー
ケンス制御プログラム、シュミレーションプログラム、
故障診断プログラム、CRT操作盤の画面制御プログラ
ムなど、生産設備に何等かの関連性のある全てのプログ
ラムは、共通のデータベース(このデータベースの一部
のデータを、『実I/Oマップ』と呼ぶ)をアクセスす
ることができる。このデータベースには、その生産ライ
ンの全デバイスに関する、そのデバイスを制御するのに
必要な一般化された情報(例えば、そのデバイスを駆動
する信号名、その駆動情報を確認する信号名など)を含
む。従って、上記のシーケンス制御プログラム、シュミ
レーションプログラム、故障診断プログラム、CRT操
作盤の画面制御プログラムは、の作成過程においては、
操作者はそのプログラム中でデバイス名、動作名等をプ
ログラム中に使うだけで、そのデバイスや動作に必要な
情報を参照することができる。
Iii-2 : In this system, a sequence control program, a simulation program,
A common database (some data of this database is called "real I / O map") for all programs that have some relation to the production equipment, such as the failure diagnosis program and the screen control program of the CRT operation panel. ) Can be accessed. This database contains generalized information about all devices on the production line needed to control the device (eg, the signal name that drives the device, the signal name that confirms the drive information, etc.) . Therefore, the above sequence control program, simulation program, failure diagnosis program, and screen control program for the CRT operation panel
The operator can refer to the information necessary for the device or operation simply by using the device name, operation name, etc. in the program.

【0016】そして、上記システムの特徴i〜iiiに
加えて、これから説明する実施例システムの特徴は、iv : 故障発生時のシステムの状態のみならず、正常
動作時のシステムの状態を記憶してデータベース化して
おく。更に、故障が発生したときに、故障が検出された
動作ステツプの数ステップ前からその故障が検出された
動作ステツプまでのシステムの変化を記録する。これら
のデータを故障診断に役立てる。故障原因箇所の探索で
は、本明細書では、過去における故障原因探索ルート
(バイナリツリーサーチ法)を選択的に用いる手法と、
過去の故障原因を優先的に今回の故障原因と推定すると
いう手法とを提案している。
In addition to the above system features i to iii , the features of the embodiment system to be described below are: iv Create a database. In addition, when a fault occurs, the change in the system is recorded from a few steps before the fault detected operating step to the fault detected operating step. These data are useful for failure diagnosis. In the search for a failure cause location, in the present specification, a method of selectively using a failure cause search route (binary tree search method) in the past,
A method of preferentially estimating the cause of failure in the past as the cause of failure this time is proposed.

【0017】: 故障が発生してから、復旧の工程を
記憶しておき、故障原因毎に復旧工程をデータベース化
する。過去の故障原因と同じ原因で故障が起こったとき
に、データベースからその復旧工程を取り出して表示装
置に表示する。操作者は、その表示に従って、復旧を行
なうようにする。即ち、過去の復旧シーケンスが今回の
復旧のガイドとなる。これにより、復旧が早く行なえ、
且つ、復旧操作が操作者の熟練度に依らなくなる。vi : iii−1で述べたシーケンスプログラムの自
動生成では生成されたプログラムが必ずしも最適なもの
とは限らない。本実施例システムは、生成されたプログ
ラムを最適化する方法を提供する。
V : A recovery process is stored after a failure occurs, and a recovery process is stored in a database for each cause of the failure. When a failure occurs due to the same cause as the previous failure, the recovery process is retrieved from the database and displayed on the display device. The operator performs restoration according to the display. That is, the past recovery sequence serves as a guide for this recovery. This will speed up recovery,
Moreover, the recovery operation does not depend on the skill level of the operator. vi : In the automatic generation of the sequence program described in iii-1, the generated program is not always the optimum one. The system of the present embodiment provides a method for optimizing the generated program.

【0018】vi−1: 本機能は、動作ブロックまた
は動作ステツプを起動させる起動条件が冗長部分を含む
場合には、その冗長な部分を検出し、それを除去すると
共に、シーケンス制御プログラムの次回の自動生成の際
に、そのような冗長部分が再度生成されないように、生
成ルールを改善することにより、シーケンスプログラム
を最適化するものである。冗長な起動条件を含むプログ
ラムの動作パターンは、その冗長部分に対応するパター
ン部分が、プログラムが複数回故障もなく実行された場
合に、その実行の度毎に異なる筈である。起動条件の最
適化は、この異なるパターン部分を検出することから始
まる。
Vi-1 : This function detects the redundant part and removes the redundant part when the starting condition for activating the operation block or the operation step includes the redundant part, and the next time the sequence control program is executed. The sequence program is optimized by improving the generation rule so that such a redundant portion is not generated again at the time of automatic generation. The operation pattern of the program including the redundant starting condition should be different every time the program is executed without failure, the pattern part corresponding to the redundant part is executed every time the program is executed. The optimization of the start condition starts by detecting this different pattern part.

【0019】vi−2: この特徴は、動作が不安定な
設備を含む場合に、その不安定な動作を行なうプログラ
ム部分を検出し最適化するものである。不安定な動作を
行なう設備をプログラム的に救済するためには、その不
安定な動作を行なった設備を検出する必要がある。そこ
で、疑わしい故障が検出されたときに、過去の原因のは
っきりした故障が発生したときのシステムの動作パター
ンと今回の疑わしい故障の動作パターンとを比較し、異
なるパターンに対応する設備が動作の不安定な設備と判
断する。そして、この設備のためのラダープログラムの
生成ルールを、上記不安定な動作を抑えるようなプログ
ラム要素を含むように最適化する。vii : 本機能はシュミレーションを効率的に行なう
ために、実際の設備で起こった動作パターンを複数の動
作ステツプに亙って記憶しておき、これらの動作パター
ンをシュミレーションプログラムにシュミレーション条
件として自動的に渡すことにより、シュミレーションを
効率良く正確に行なうものである。
Vi-2 : This feature is for detecting and optimizing a program portion that performs an unstable operation when the equipment includes an unstable operation. In order to programmatically rescue the equipment that performs the unstable operation, it is necessary to detect the equipment that performed the unstable operation. Therefore, when a suspicious failure is detected, the operation pattern of the system when a failure with a clear cause in the past occurred and the operation pattern of this suspicious failure are compared, and the equipment corresponding to the different pattern does not operate properly. Judge as stable equipment. Then, the generation rule of the ladder program for this equipment is optimized so as to include a program element that suppresses the unstable operation. vii : In order to carry out the simulation efficiently, this function stores the operation patterns that occurred in the actual equipment over a plurality of operation steps, and these operation patterns are automatically stored in the simulation program as simulation conditions. By passing it, the simulation is performed efficiently and accurately.

【0020】これから説明する実施例は、自動車の生産
ラインのうちの、車体にエンジンやサスペンションをド
ッキングする工程におけるシーケンス制御プログラムの
自動生成等に本発明を適用したものである。従って、先
ず、シーケンス制御プログラム101の制御対象となる
車両組立ラインについて説明する。次に、本実施例のシ
ーケンス制御プログラムの自動生成等に重要な概念であ
る動作ブロックと動作ステップについて言及する。そし
て、その後に、本実施例の特徴部分である制御プログラ
ムの自動生成等にっいて説明する。
The embodiment described below is one in which the present invention is applied to automatic generation of a sequence control program in a process of docking an engine and a suspension on a vehicle body in a production line of an automobile. Therefore, first, the vehicle assembly line to be controlled by the sequence control program 101 will be described. Next, operation blocks and operation steps, which are important concepts for automatic generation of the sequence control program of this embodiment, will be described. Then, after that, the automatic generation of the control program, which is a characteristic part of the present embodiment, will be described.

【0021】〈組立ラインの一例〉先ず、生成されるべ
きシーケンス制御プログラムの制御対象となる車両組立
ラインの一例について、第1図及び第2図を参照して述
べる。第1図及び第2図に、車両組立ラインの一部が示
されている。このラインは、例示的に、3つのステーシ
ョンST1,ST2,ST3からなる。位置決めステー
ションST1では、車両のボデイ11を受台12上に受
け、受台12の位置を制御することによりボデイ11の
位置決めを行う。ドッキングステーションST2では、
パレット13上の所定の位置に載置されたエンジン14
とフロントサスペンションアッセンブリ(不図示)とリ
アサスペンションアッセンブリ15とボデイ11とを組
み合わせる。締結ステーションST3では、ボデイ11
に対して、ST2にて組み合わされたエンジン14とフ
ロントサスペンション組立15とを、螺子を用いて締結
固定留する。また、位置決めステーションST1とドッ
キングステーションST2との間には、ボデイ11を保
持して搬送するオーバーヘッド式の移載位置16が設け
られている。ドッキングステーションST2と締結ステ
ーションST3との間には、パレット13を搬送するパ
レット搬送位置17が設けられている。
<Example of Assembly Line> First, an example of a vehicle assembly line to be controlled by the sequence control program to be generated will be described with reference to FIGS. 1 and 2. A part of the vehicle assembly line is shown in FIGS. 1 and 2. This line illustratively consists of three stations ST1, ST2, ST3. At the positioning station ST1, the body 11 of the vehicle is received on the pedestal 12 and the position of the pedestal 12 is controlled to position the body 11. In docking station ST2,
Engine 14 placed at a predetermined position on pallet 13
The front suspension assembly (not shown), the rear suspension assembly 15 and the body 11 are combined. At the fastening station ST3, the body 11
On the other hand, the engine 14 and the front suspension assembly 15 assembled in ST2 are fastened and fixed by using a screw. An overhead transfer position 16 for holding and transporting the body 11 is provided between the positioning station ST1 and the docking station ST2. A pallet transfer position 17 for transferring the pallet 13 is provided between the docking station ST2 and the fastening station ST3.

【0022】位置決めステーションST1における受台
12は、レール18に沿って往復走行移動する。位置決
めステーションST1では、受台12をレール18に直
交する方向(車幅方向)に移動させることにより、受台
12上に載置されたボデイ11を、その前部の車幅方向
についての位置決めを行う位置決め手段(BF)並びに
その後部の車幅方向の位置決めを行う位置決め手段(B
R)と、受台12をレール18に沿う方向(前後方向)
に移動させることにより、その前後方向における位置決
めを行う位置決め手段(TL)とが設けられている。さ
らに、ST1には、ボデイ11における前方左右部及び
後方左右部に係合することにより、ボデイ11の、受台
12に対する位置決めを行う昇降基準ピン(FL,F
R,RL,RR)が設けられている。そして、これらの
位置決め手段及び昇降基準ピンによって、位置決めステ
ーションST1における位置決め装置19が構成されて
いる。即ち、これらの位置決め手段及び昇降基準ピン
が、シーケンス制御プログラムの位置決め装置19につ
いての制御対象となる。
The pedestal 12 in the positioning station ST1 reciprocates along a rail 18. In the positioning station ST1, the pedestal 12 is moved in a direction (vehicle width direction) orthogonal to the rails 18 to position the body 11 placed on the pedestal 12 in the vehicle width direction of its front portion. Positioning means (BF) and positioning means (B) for positioning the rear portion in the vehicle width direction.
R) and the direction in which the pedestal 12 is along the rail 18 (front-back direction)
And a positioning means (TL) for performing positioning in the front-rear direction by moving the same. Further, ST1 is engaged with front left and right portions and rear left and right portions of the body 11 to position the body 11 with respect to the pedestal 12, and ascending / descending reference pins (FL, F).
R, RL, RR) are provided. Then, the positioning device and the elevating reference pin constitute a positioning device 19 in the positioning station ST1. That is, the positioning means and the lifting reference pins are control targets of the positioning device 19 of the sequence control program.

【0023】移載装置16は、位置決めステーションS
T1とドッキングステーションST2との上方において
両者間に掛け渡されて配されたガイドレール20と、ガ
イドレール20に沿って移動するキャリア21とから成
る。キャリア21には、昇降ハンガーフレーム22が取
り付けられていて、ボデイ11はこの昇降ハンガーフレ
ーム22により支持される。昇降ハンガーフレーム22
には、第3図に示されるように、左前方支持アーム22
FL,右前方支持アーム22FRが夫々一対の前方アー
ムクランプ部22Aを介して取付けられている共に、左
後方支持アーム22RL,右後方支持アーム22RR
(不図示)が夫々一対の前方アームクランプ部22Bを
介して取付けられている。左前方支持アーム22FL,
右前方支持アーム22FRの夫々は、前方アームアーム
クランプ部22Aを回動中心として回動し、前方アーム
クランプ22Aによるクランプが解除された状態におい
ては、ガイドレール20に沿って伸びる位置を取り、ま
た、前方アームクランプ部22Aによるクランプがなさ
れるときには、第3図に示される如く、ガイドレール2
0に直交する方向に伸びる位置をとる。同様に、左後方
支持アーム22RL,右後方支持アーム22RRの夫々
も、後方アームクランプ部22Bを回動中心として回動
し、後方アームクランプ部22Aによるクランプが解除
された状態においては、ガイド20に沿って伸びる位置
をとり、また、後方アームクランプ部22Bによるクラ
ンプがなされるときには、ガイドレール20に直交する
方向に伸びる位置をとる。
The transfer device 16 includes a positioning station S.
The guide rail 20 is provided above the T1 and the docking station ST2 so as to be bridged therebetween, and the carrier 21 that moves along the guide rail 20. An elevating hanger frame 22 is attached to the carrier 21, and the body 11 is supported by the elevating hanger frame 22. Lifting hanger frame 22
As shown in FIG. 3, the left front support arm 22
The FL and the right front support arm 22FR are attached via the pair of front arm clamp portions 22A, respectively, and the left rear support arm 22RL and the right rear support arm 22RR are also mounted.
(Not shown) are attached via a pair of front arm clamp portions 22B, respectively. Left front support arm 22FL,
Each of the right front support arms 22FR rotates about the front arm arm clamp portion 22A as a center of rotation, and when the clamp by the front arm clamp 22A is released, the right front support arm 22FR takes a position extending along the guide rail 20. When the front arm clamp portion 22A is clamped, as shown in FIG.
The position is set to extend in the direction orthogonal to 0. Similarly, each of the left rear support arm 22RL and the right rear support arm 22RR also rotates about the rear arm clamp portion 22B, and when the clamp by the rear arm clamp portion 22A is released, the guide 20 is moved to the guide 20. It also has a position that extends along it, and when it is clamped by the rear arm clamp portion 22B, it has a position that extends in a direction orthogonal to the guide rail 20.

【0024】移載装置16にボデイ11が移載されるに
あたっては、移載装置16が、第1図において一点鎖線
により示されるように、レール18の前端部上方の位置
(原位置)に、左前方支持アーム22FL,右前方支持
アーム22FRの夫々が前方アームクランプ部22Aに
よるクランプが解除されてガイドレール20に沿って伸
びる。また、左後方支持アーム22RL,右後方支持ア
ーム22RRの夫々が後方アームクランプ部22Bによ
るクランプが解除されてガイドレール20に沿って伸び
て、その後、昇降ハンガーフレーム21Bが下降せしめ
られる。かかる状態で、ボデイ11が載置された受台1
2がレール18に沿ってその前端部にまで移動せしめら
れ、降下されていた移載装置16の昇降ハンガーフレー
ム21Bに対応する位置を取るようにされる。そして、
左前方支持アーム22FL,右前方支持アーム22FR
の夫々が回動されて、ボデイ11の前部の下方において
ガイドレール20に直交する方向に伸びる位置をとっ
て、前方アームクランプ部22Aによるクランプがなさ
れた状態となる。また、左後方支持アーム22RL,右
後方支持アーム22RRの夫々が回動されて、ボデイ1
1の後部の下方においてガイドレール20に直交する方
向に伸びる位置をとって、後方アームクランプ部22B
によるクランプがなされた状態となる。その後、昇降ハ
ンガーフレーム21Bが上昇させられて、第3図に示さ
れるように、ボデイ11が、移載装置16の昇降ハンガ
ーフレーム21Bに取付けられた左前方支持アーム22
FL,右前方支持アーム22FRと左後方支持アーム2
2RL,右後方支持アーム22RRとにより支持され
る。
When the body 11 is transferred to the transfer device 16, the transfer device 16 is moved to the position (original position) above the front end of the rail 18 as indicated by the alternate long and short dash line in FIG. Each of the left front support arm 22FL and the right front support arm 22FR extends along the guide rail 20 after the clamp by the front arm clamp portion 22A is released. Further, each of the left rear support arm 22RL and the right rear support arm 22RR is released from the clamp by the rear arm clamp portion 22B and extends along the guide rail 20, and then the elevating hanger frame 21B is lowered. In this state, the pedestal 1 on which the body 11 is placed
2 is moved along the rail 18 to the front end portion thereof so as to take a position corresponding to the lifted hanger frame 21B of the transfer device 16 that has been lowered. And
Left front support arm 22FL, right front support arm 22FR
Each of them is rotated to take a position below the front part of the body 11 and extends in a direction orthogonal to the guide rail 20, and is in a state of being clamped by the front arm clamp part 22A. In addition, the left rear support arm 22RL and the right rear support arm 22RR are rotated to move the body 1
The rear arm clamp portion 22B is positioned below the rear portion of the rear arm 1 and extends in a direction orthogonal to the guide rail 20.
It will be in the state of being clamped by. Thereafter, the elevating and lowering hanger frame 21B is raised, and the body 11 is attached to the elevating and lowering hanger frame 21B of the transfer device 16 as shown in FIG.
FL, right front support arm 22FR and left rear support arm 2
It is supported by 2RL and the right rear support arm 22RR.

【0025】また、パレット搬送装置17は、夫々、パ
レット13の下面を受ける多数の支持ローラ23が設け
られた一対のガイド部24L及び24Rと、このガイド
部24L及び24Rに夫々並行に延設された一対の搬送
レール25L及び25Rと、各々がパレット13を係止
するパレット係止部26を有し、夫々搬送レール25L
及び25Rに沿って移動するものとされたパレット搬送
台27L及び27Rと、これらのパレット搬送台27L
及び27Rを駆動するリニアモータ機構(図示は省略さ
れている)とを備える。
Further, the pallet conveying device 17 is provided with a pair of guide portions 24L and 24R provided with a large number of support rollers 23 for receiving the lower surface of the pallet 13, and the guide portions 24L and 24R, respectively, extending in parallel with each other. And a pair of transport rails 25L and 25R, and a pallet locking portion 26 that locks the pallet 13, respectively.
And pallet transfer tables 27L and 27R that are designed to move along the pallet transfer table 27L and the pallet transfer table 27L.
And a linear motor mechanism (not shown) that drives 27R.

【0026】ドッキングステーションST2には、フロ
ントサスペンションアセンブリ及びリアサスペンション
アッセンブリ15の夫々の組み付け時において、フロン
トサスペンションアッセンブリのストラット及びリアサ
スペンションアッセンブリ15のストラット15Aを夫
々支持して組付姿勢をとらせる一対の左右前方クランプ
アーム30L及び30Rと、及び、一対の左右後方クラ
ンプアーム31L及び31Rとが設けられている。この
左右前方クランプアーム30L及び30Rは、夫々、搬
送レール25L及び25Rに直交する方向に進退動可能
に、取付板部32L及び32Rに取り付けられるととも
に、左右後方クランプアーム31L及び31Rは、夫
々、取付板部33L及び33Rに、搬送レール25L及
び25Rに直交する方向に進退動可能に取り付けられて
いる。左右前方クランプアーム30L及び30Rの相互
に対向した先端部と、左右後方クランプアーム31L及
び31Rの相互に対向した先端部とは、夫々、フロント
サスペンションアッセンブリのストラットもしくはリア
サスペンションアッセンブリ15のストラット15Aに
係合する係合部を有する。そして、前記取付板部32L
は、アームスライド34Lにより固定基台35Lに対し
て、搬送レール25L及び25Rに沿う方向に移動可能
とされる。取付板部32Rはアームスライド34Rによ
り固定基台35Rに対して、搬送レール25L及び25
Rに沿う方向に移動可能とされる。取付板部33Lは、
アームスライド36Lにより固定基台37Lに対して、
搬送レール25L及び25Rに沿う方向に移動可能とさ
れる。さらに、取付板部33Rは、アームスライド36
Rにより固定基台37Rに対して、搬送レール25L及
び25Rに沿う方向に移動可能とされている。従って、
左右前方クランプアーム30L及び30Rは、それらの
先端部がフロントサスペンションアッセンブリのストラ
ットに係合した状態のもとで、前後左右に移動可能とな
る。また、左右後方クランプアーム31L及び31R
は、それらの先端部がリアサスペンションアッセンブリ
15のストラット15Aに係合した状態のもとで、前後
左右に移動可能となる。また、これらの左右前方クラン
プアーム30L及び30R,アームスライド34L及び
34R,左右後方クランプアーム31L及び31R、及
びアームスライド36L及び36Rが、ドッキング装置
40を構成している。
When the front suspension assembly and the rear suspension assembly 15 are respectively assembled to the docking station ST2, a pair of strut of the front suspension assembly and a strut 15A of the rear suspension assembly 15 are respectively supported to take an assembly posture. Left and right front clamp arms 30L and 30R, and a pair of left and right rear clamp arms 31L and 31R are provided. The left and right front clamp arms 30L and 30R are attached to the attachment plate portions 32L and 32R so as to be movable back and forth in a direction orthogonal to the transport rails 25L and 25R, respectively, and the left and right rear clamp arms 31L and 31R are attached respectively. The plate portions 33L and 33R are attached so as to be movable back and forth in a direction orthogonal to the transport rails 25L and 25R. The front end portions of the left and right front clamp arms 30L and 30R that face each other and the front end portions of the left and right rear clamp arms 31L and 31R that face the front suspension assembly strut 15A or the rear suspension assembly 15 strut 15A, respectively. It has a mating engaging portion. Then, the mounting plate portion 32L
Can be moved in a direction along the transport rails 25L and 25R with respect to the fixed base 35L by the arm slide 34L. The mounting plate portion 32R is attached to the fixed base 35R by the arm slides 34R, and the transport rails 25L and 25R.
It is movable in the direction along R. The mounting plate portion 33L is
With respect to the fixed base 37L by the arm slide 36L,
It is movable in the direction along the transport rails 25L and 25R. Further, the mounting plate portion 33R includes the arm slide 36.
By R, it is movable with respect to the fixed base 37R in the direction along the transport rails 25L and 25R. Therefore,
The left and right front clamp arms 30L and 30R can move back and forth and left and right under the condition that their front ends are engaged with the struts of the front suspension assembly. In addition, left and right rear clamp arms 31L and 31R
Are movable in the front-rear direction and the left-right direction in a state in which their tips are engaged with the struts 15A of the rear suspension assembly 15. The left and right front clamp arms 30L and 30R, the arm slides 34L and 34R, the left and right rear clamp arms 31L and 31R, and the arm slides 36L and 36R configure a docking device 40.

【0027】さらに、ドッキングステーションST2に
は、搬送レール25L及び25Rに夫々平行に伸びるよ
うに設置された一対のスライドレール41L及び41R
と、このスライドレール41L及び41Rに沿ってスラ
イドするものとされた可動部材42,可動部材42を駆
動するモータ43等から成るスライド装置45とが設け
られている。このスライド装置45における可動部材4
2には、パレット13上に設けられた可動エンジン支持
部材(図示は省略されている)に係合する係合手段46
と、パレット13を所定の位置に位置決めするための2
個の昇降パレット基準ピン47とが設けられている。ス
ライド装置45においては、移載装置16における昇降
ハンガーフレーム22により支持されたボデイ11に、
パレット13上に配されたエンジン14,フロントサス
ペンションアッセンブリ及びリアサスペンションアッセ
ンブリ15とを組み合わせる際に、その係合手段46が
昇降パレット基準ピン47により位置決めされたパレッ
ト13上の可動エンジン支持部材に係合した状態で前後
動せしめられ、それにより、ボデイ11に対してエンジ
ン14を前後動させて、ボデイ11とエンジン14との
干渉を回避するようになっている。
Further, in the docking station ST2, a pair of slide rails 41L and 41R installed so as to extend in parallel to the transport rails 25L and 25R, respectively.
And a slide device 45 including a movable member 42 that slides along the slide rails 41L and 41R, a motor 43 that drives the movable member 42, and the like. Movable member 4 in this slide device 45
On the second side, engaging means 46 for engaging a movable engine support member (not shown) provided on the pallet 13 is provided.
And 2 for positioning the pallet 13 at a predetermined position.
Elevating pallet reference pins 47 are provided. In the slide device 45, the body 11 supported by the elevating hanger frame 22 in the transfer device 16 is
When the engine 14, the front suspension assembly and the rear suspension assembly 15 arranged on the pallet 13 are combined, the engaging means 46 engages with the movable engine support member on the pallet 13 positioned by the lifting pallet reference pin 47. In this state, the engine 14 is moved back and forth, whereby the engine 14 is moved back and forth with respect to the body 11 to avoid interference between the body 11 and the engine 14.

【0028】締結ステーションST3には、ボデイ11
に、これに組み合わされたエンジン14及びフロントサ
スペンションアッセンブリを締結するための螺子締め作
業を行うためのロボット48Aと、ボデイ11に、これ
に組み合わされたリアサスペンションアッセンブリ15
を締結するための螺子締め作業を行うためのロボット4
8Bとが配置されている。さらに、締結ステーションS
T3においては、パレット13を所定の位置に位置決め
するための2個の昇降パレット基準ピン47が設けられ
ている。
At the fastening station ST3, the body 11
And a robot 48A for performing screw tightening work for fastening the engine 14 and the front suspension assembly combined with this, and the body 11 and the rear suspension assembly 15 combined therewith.
Robot 4 for performing screw tightening work for fastening
8B and are arranged. Furthermore, the fastening station S
At T3, two lifting pallet reference pins 47 for positioning the pallet 13 at a predetermined position are provided.

【0029】第1図乃至第3図により説明した車両組立
ラインにおいて、位置決めステーションST1における
位置決め装置19,移載装置16、そして、ドッキング
ステーションST2におけるドッキング装置40及びス
ライド装置45,パレット搬送装置17、そして、締結
ステーションST3におけるロボット48A及び48B
は、それらに接続されたシーケンス制御部により、本実
施例のプログラム生成装置によって生成されたシーケン
ス制御プログラムに基づいてシーケンス制御が行われ
る。即ち、これらの上記位置決め装置19,移載装置1
6等は、シーケンス制御対象であるところの“設備”で
ある。
In the vehicle assembly line described with reference to FIGS. 1 to 3, the positioning device 19 and the transfer device 16 in the positioning station ST1, and the docking device 40 and the slide device 45 and the pallet transfer device 17 in the docking station ST2, Then, the robots 48A and 48B at the fastening station ST3
The sequence control section connected to them performs sequence control based on the sequence control program generated by the program generation device of this embodiment. That is, these positioning device 19 and transfer device 1
6 and the like are "equipment" that are the sequence control targets.

【0030】〈動作ブロックと動作ステップ〉第1図,
第2図の生産ラインにおける組立動作は、即ち、上記の
シーケンス制御対象の“設備”の全てが行う動作は複数
の“動作ブロック”に分解することができる。ここで
“動作ブロック”とは、 :複数の単位動作の集合である と定義することができる。動作ブロックの最も重要な性
質は、 :ある動作ブロックの開始から終了に至るまでの中間
過程で、他の動作ブロックから独立して干渉を受けるこ
となく、動作を完結することができるということであ
る。
<Operation Block and Operation Step> FIG. 1,
The assembling operation in the production line shown in FIG. 2, that is, the operation performed by all the "equipment" to be sequence-controlled can be decomposed into a plurality of "operation blocks". Here, the “motion block” can be defined as: a set of a plurality of unit motions. The most important property of a motion block is: It is possible to complete a motion in the intermediate process from the start to the end of a motion block independently of other motion blocks without interference. ..

【0031】この,の性質のために、動作ブロック
を1つのブロック(かたまり)として表記することが可
能となる。換言すれば、動作ブロックは、動作ブロック
のレベルにおいてのみ、他の動作ブロックと関係する。
動作ブロックが動作を開始できるためには、他の動作ブ
ロックにおける動作の終了が必要となる。この他の動作
ブロックは、1つの場合もあれば、複数の場合もあろ
う。即ち、1つの動作ブロックの動作終了がそれに連結
する別の動作ブロック(1つまたは複数の動作ブロッ
ク)の起動条件になったり、複数の動作ブロックの動作
終了が起動条件になったりするということである。
Because of this property, it becomes possible to describe the operation block as one block (lump). In other words, a motion block is related to other motion blocks only at the level of the motion block.
In order for an operation block to start operation, it is necessary to end the operation in another operation block. There may be one or more other operation blocks. That is, the operation end of one operation block may be a start condition for another operation block (one or a plurality of operation blocks) connected to it, or the operation end of a plurality of operation blocks may be a start condition. is there.

【0032】また、上記性質によれば、動作ブロックに
おける動作の中間段階で、他の動作ブロックに対して起
動をかけるということはない。また、動作ブロックの中
間段階で、他の動作ブロックからの起動を待つというこ
ともない。上記,の動作ブロックの定義から、次の
付随的な動作ブロックの性質,を導くことができ
る。 :動作ブロックは、上記,の性質を満足する単位
動作の集合のなかで、最大のものであることが望まし
い。このの性質は絶対的に必要なものではない。しか
し、を満足すると、生産ラインを記述する動作ブロッ
クの数が減り、工程全体の記述が単純化され、大変見易
いものとなる。
Further, according to the above-mentioned property, in the intermediate stage of the operation in the operation block, the other operation blocks are not activated. Further, there is no need to wait for activation from another operation block in the intermediate stage of the operation block. From the above definition of the action block, the following ancillary action block properties can be derived. : It is desirable that the motion block is the largest of the unit motion sets that satisfy the above properties. The nature of this is not absolutely necessary. However, when the above is satisfied, the number of operation blocks that describe the production line is reduced, the description of the entire process is simplified, and it becomes very easy to see.

【0033】:動作ブロックは、その動作ブロックに
おいて行なわれる動作の種類に応じても制限される。即
ち、デバイスの動作は、「繰り返し動作」、「連続動
作」、「ロボット動作」等に大別される。本システムで
は、ラダープログラムを、定型的なラダーパターンから
自動生成するものであるが、このラダーパターンはその
動作が異なれば大きく異なるので、1つの動作ブロック
中には同一種類の動作だけを行なうデバイスを集める。
但し、この要請はプログラムの効率化という観点からの
ものであるので、このの要請を守らないと、ラダープ
ログラムの自動生成が行なうことができないというもの
ではない。
The operation block is also limited according to the type of operation performed in the operation block. That is, the operation of the device is roughly classified into "repetitive operation", "continuous operation", "robot operation", and the like. In this system, a ladder program is automatically generated from a standard ladder pattern. However, since the ladder pattern differs greatly depending on the operation, a device that performs only the same type of operation in one operation block. Collect.
However, since this request is from the viewpoint of improving the efficiency of the program, it is not that the ladder program cannot be automatically generated unless this request is observed.

【0034】第4図は、第1図,第2図の生産ラインに
おける動作の全体的な流れを示すものである。第1図,
第2図に示した生産ラインを、乃至の条件を満足す
る動作ブロックにより記述すると、この第4図に示すよ
うに、a〜sの19個の動作ブロックが得られる。この
ようにして得られたブロック図は第1図乃至第3図の生
産ラインにおける動作を操作者が分析した上で得られた
ものである。図中、横方向の二重線により結合された2
つ(以上)の動作ブロックは並行して動作することを意
味する。また、2つの動作ブロックが実線で上下に結合
されている場合、上方に位置した動作ブロックにおける
動作が終了して始めて下方に位置したブロックの動作が
始まる。また、二重線の四角形は各ブロックの先頭を意
味する。
FIG. 4 shows an overall flow of operations in the production line of FIGS. 1 and 2. Figure 1,
When the production line shown in FIG. 2 is described by the operation blocks which satisfy the following conditions, 19 operation blocks a to s are obtained as shown in FIG. The block diagram thus obtained is obtained after the operator analyzes the operation in the production line shown in FIGS. 1 to 3. In the figure, 2 connected by a horizontal double line
One (or more) motion block means to operate in parallel. Further, when the two motion blocks are vertically connected by a solid line, the motion of the motion block located above starts only after the motion of the motion block located above ends. The double-lined square means the beginning of each block.

【0035】動作ブロックaは受台12の前進動作を意
味し『荷受前進』と呼ぶ。この『荷受前進』ブロックが
終了すると、『基準出』という名称のブロックbと『受
具出』という名称のブロックcとが並行して行なわれ
る。『基準出』ブロックbでは、前述の各基準ピン(F
L基準ピン,RR基準ピンが「出」という名の位置に駆
動され、TL位置決め手段等が「戻り」という名の位置
に駆動される。ブロックcでは、受台12がドッキング
位置に移動する。ブロックdの『移載上昇』という名称
のブロックでは、移載装置16がステーションST1に
おいて上昇する。ブロックdの動作が終了すると、この
ブロックdに続いて2つの流れで動作ブロックが処理さ
れていく。即ち、『移載上昇』ブロックに続いて、『基
準戻り』という名称のブロックeと『移載前進』という
名称のブロックhとが並行して動作する。ブロックeで
は、ブロックbにおいて出された基準ピンを「戻り」位
置に戻すという動作が行なわれる。一方、ブロックhで
は、移載装置16がステーション2に前進する。
The operation block a means the forward movement of the pedestal 12 and is called "advance receiving". When this "load receiving forward" block is completed, a block b named "reference output" and a block c named "receiver output" are performed in parallel. In the “reference output” block b, the reference pins (F
The L reference pin and the RR reference pin are driven to a position named "out", and the TL positioning means and the like are driven to a position named "return". In block c, the pedestal 12 moves to the docking position. In the block named “transfer lifting” of the block d, the transfer device 16 moves up at the station ST1. When the operation of the block d is completed, the operation block is processed in two flows following the block d. That is, following the "transfer rising" block, a block e named "reference return" and a block h named "transfer forward" operate in parallel. In block e, the operation of returning the reference pin issued in block b to the "return" position is performed. On the other hand, in the block h, the transfer device 16 advances to the station 2.

【0036】ブロックeに続く『荷受後退』という名称
のブロックfにおいて、受台12が後退するという動作
が行なわれる。ブロックhでは移載装置16がステーシ
ョンST2に前進する。一方、ガイド部、ストラットク
ランプ部、パレットスライド部においては、ブロックl
(『ピン上昇』)とブロックm(『リフト上昇』)とブ
ロックn(『パレット前進』)が夫々実行される。ブロ
ックm(『リフト上昇』)とブロックn(『パレット前
進』)との終了はブロックo(『アーム出』)を起動す
る。
In a block f named "Receiving cargo" following the block e, the cradle 12 is retracted. In block h, the transfer device 16 advances to the station ST2. On the other hand, in the guide part, the strut clamp part, and the pallet slide part, the block 1
(“Pin up”), block m (“lift up”) and block n (“pallet forward”) are executed respectively. Completion of block m (“lift lift”) and block n (“pallet advance”) activates block o (“arm out”).

【0037】ブロックhとブロックlとブロックoにお
ける動作が終了すると、『移載下降』という名称の動作
ブロックiが実行される。以上の第4図の動作ブロック
の集合からなるフローチャートは、上述の〜の条件
に合致するような動作の集合をブロック化したものであ
り、前述したように、操作者が後述のフローチヤート作
成プログラムで作成したものである。そして、各動作ブ
ロックに付けられた名称は、その動作ブロックにおける
動作(複数)の特徴を短い言葉で表現するものである。
本実施例のシステムの特徴は、前記iiに記したよう
に、各動作ブロックの名称はユニークなものであり、動
作ブロックは、この名称によりソフトウエア的に特定す
ることができる。
When the operations in the blocks h, 1, and o are completed, the operation block i named "transfer lowering" is executed. The above-described flowchart of the operation block set in FIG. 4 is a block of an operation set that meets the above-mentioned conditions (1) to (4). It was created in. The name given to each operation block expresses the characteristics of the operations (plurality) in the operation block in short words.
The feature of the system of the present embodiment is that the name of each operation block is unique as described in ii above, and the operation block can be specified by software by this name.

【0038】各動作ブロックは複数の動作ステップから
なる。1つの動作ステップにおける動作には原則的には
1つのアクチュエータ(ソレノイド等)による動作が対
応する。第7図は、『基準出』ブロックbにおいて行な
われる複数の動作ステップからなるフローチャートであ
る。同図において、各ステップに付されたラベルは操作
者が付したそのステップの名称である。第7図のフロー
チヤートによると、『RRスライド出』ステツプにおい
ては、リア側の右スライドレール41Rが「出」状態に
され、『FL基準ピンA出』及び『FL基準ピンB出』
ステツプでは、受台12に対して車体12を位置決めす
るための前述の昇降基準ピンA,B(前部左側)を
「出」の状態にする。『RR基準ピン出』ステツプにお
いては、同じく後部右側の昇降基準ピンを「出」状態に
する。また、『TL位置決戻』、『BR位置決戻』、
『BF位置決戻』の夫々のステツプにおいては、位置決
め手段TL,BR,BFが「戻り」位置に戻される。こ
のようにして、第4図の『基準出』ブロックbは、第7
図に示されたステップ動作により表現される。この動作
ステツプフローチヤートも前述のフローチヤート作成プ
ログラムで作成する。
Each operation block consists of a plurality of operation steps. In principle, an operation by one actuator (solenoid or the like) corresponds to the operation in one operation step. FIG. 7 is a flowchart consisting of a plurality of operation steps performed in the "reference output" block b. In the figure, the label attached to each step is the name of the step given by the operator. According to the flow chart of FIG. 7, in the "RR slide out" step, the right slide rail 41R on the rear side is set to the "out" state, and "FL reference pin A out" and "FL reference pin B out".
At the step, the above-mentioned raising / lowering reference pins A and B (left side of the front portion) for positioning the vehicle body 12 with respect to the pedestal 12 are set to the “out” state. In the "RR reference pin output" step, the raising / lowering reference pin on the rear right side is also set to the "out" state. Also, "TL position return", "BR position return",
In each step of "BF position return", the positioning means TL, BR, BF are returned to the "return" position. In this way, the "reference output" block b in FIG.
This is represented by the step operation shown in the figure. This operation step flow chart is also created by the aforementioned flow chart creation program.

【0039】1つの動作ブロックの動作を表現する例え
ば第7図のような動作ステップフローチャートにおける
各ラベルは、前述したように、その動作ステップで駆動
されるアクチュエータデバイスを特定し、そのアクチュ
エータの動作を端的に表現するものとなっている。例え
ば、RR基準ピンが「出」状態にされる『RR基準ピン
出』というステップに対して、『RR基準ピン出』とい
う名称が付されている。ここで、この名称の前半部分の 『RR基準ピン』 はその動作ステップで駆動されるアクチュエータを特定
し、次の、 『出』 は、そのアクチュエータの駆動状態を意味する。換言す
れば、第4図,第7図のフローチャートの各動作ブロッ
ク及び動作ステップの名称に与えられた意味が理解でき
る人間及び装置にとっては、それらのフローチヤートが
第1図の生産ラインにおける動作を記述するものとなっ
ていると理解することは容易である。本実施例のシーケ
ンス制御プログラムの自動生成システムの目標は、この
ような第4図,第7図のフローチャートから第8図〜第
10図のようなラダープログラムを自動的に生成するこ
とである。尚、第8図〜第10図のラダープログラム
は、第7図に示された動作ブロックbの動作の一部に対
応するラダープログラム要素である。
As described above, each label expressing the operation of one operation block in the operation step flow chart as shown in FIG. It is a simple expression. For example, the name “RR reference pin out” is given to the step “RR reference pin out” in which the RR reference pin is in the “out” state. Here, the "RR reference pin" in the first half of this name specifies the actuator driven in that operation step, and the next "exit" means the drive state of that actuator. In other words, for humans and devices who can understand the meanings given to the names of the operation blocks and operation steps in the flowcharts of FIGS. It is easy to understand that it is written. The goal of the automatic generation system for sequence control programs of this embodiment is to automatically generate the ladder programs shown in FIGS. 8 to 10 from the flow charts of FIGS. 4 and 7. The ladder program shown in FIGS. 8 to 10 is a ladder program element corresponding to a part of the operation of the operation block b shown in FIG.

【0040】〈ラダープログラムのシンボル〉ここで、
ラダープログラムのシンボルについて説明する。第1図
の生産ラインの例えば昇降基準ピン等の設備そのものは
ラダープログラム上では制御の対象とはならず、それを
駆動する例えばソレノイド等が問題となる。従って、生
産ラインの設備は、第11図に示されるようなシリンダ
アクチュエータにより等価され得る。このアクチュエー
タは、シリンダ内を図面上左右に移動するピストンの位
置により、その「出」状態と「戻り」状態が規定され
る。ピストンは、ソレノイドバルブが入力される信号B
により付勢されあるいは消勢されることにより、そ
の「出」状態と「戻り」状態のいずれかを取る。これら
の2つの状態は2つのリミットスイッチにより確認され
る。即ち、第11図の「設備」からの出力として、駆動
された事を確認するためのリミットスイッチからの出力
(「出確認」信号)と、原位置に戻されたことを
確認するためのリミットスイッチからの出力A (戻
り確認信号)とがある。
<Ladder program symbol> Here,
The symbols of the ladder program will be explained. The equipment itself, such as the lifting reference pin, of the production line in FIG. 1 is not a control target on the ladder program, and a problem is the solenoid that drives it. Therefore, the equipment of the production line can be equivalentized by a cylinder actuator as shown in FIG. The "out" state and the "return" state of this actuator are defined by the position of the piston that moves left and right in the cylinder in the drawing. The piston is the signal B to which the solenoid valve is input.
It is energized or de-energized by 0 to assume either its "out" or "return" state. These two states are confirmed by two limit switches. That is, as the output from the “equipment” in FIG. 11, the output A O (“outgoing confirmation” signal) from the limit switch for confirming that it has been driven and for confirming that it has been returned to the original position. Output from the limit switch of A i (return confirmation signal).

【0041】第12図は、第11図の素子の出力駆動動
作の論理を説明する図である。ソレノイドがオンするた
めには、インターロック条件ILCが満足されることで
ある。インターロック条件ILCは、一般に、その動作
ステップに特有の種々の起動条件を含む。各動作ステッ
プは、その前段の動作ステップの動作終了が実行条件と
なるから、インターロック条件ILCには、例えば、前
段の動作ステップの出力状態が確認されたことを示す信
号(例えば、第11図のA )が含まれるのが通常で
ある。さらに、このプログラムが生成したのではない外
部からの信号を含む。
FIG. 12 is a diagram for explaining the logic of the output drive operation of the element of FIG. In order for the solenoid to turn on, the interlock condition ILC is satisfied. The interlock condition ILC generally includes various activation conditions specific to its operating steps. Since the execution condition of each operation step is the operation end of the operation step of the preceding stage, the interlock condition ILC has, for example, a signal indicating that the output state of the operation step of the preceding stage is confirmed (for example, FIG. 11). a O) of included is usual. In addition, it includes signals from outside that this program did not generate.

【0042】第13図は全体シーケンスを自動生成する
際に用いる定型的な動作回路の一例を示す。第13図に
おいて、条件C は自動モード(生産ラインがシーケ
ンス制御プログラムに従って動作するモードである)で
この動作回路が動作しているときは閉じられる。条件C
は手動モードでこの動作回路が動作しているときに
閉じられる。C は通常閉じられている。従って、通
常の自動モードでは、インターロック条件ILC
が満足されれば、出力B が出力される。一
方、ILC は手動モードにおける動作条件の論理を
記述する。手動モードでは、接点C が開くので、条
件A ,ILC が同時に満足するか、条件A
,A が同時に満足すれば、B は出力され
る。一般に、Aは、手動動作のインターロック条件I
LC を殺すための論理である。
FIG. 13 shows an example of a typical operation circuit used when automatically generating the entire sequence. In FIG. 13, the condition C A is closed when the operating circuit is operating in the automatic mode (the mode in which the production line operates according to the sequence control program). Condition C
S is closed when this operating circuit is operating in manual mode. C S is normally closed. Therefore, in the normal automatic mode, if the interlock conditions ILC 0 and Al are satisfied, the output B O is output. On the other hand, ILC 1 describes the logic of operating conditions in manual mode. In the manual mode, since the contact C S is opened, whether the conditions A k and ILC 1 are simultaneously satisfied, or the condition A is satisfied.
If k and A I are satisfied at the same time, B O is output. In general, A I, the interlock conditions of manual operation I
This is the logic for killing LC 1 .

【0043】第13図のラダーパターンは、ある動作ス
テップのラダープログラムを表現するのに用いられる定
型的なパターンである。本システムに用意されている他
のラダーパターンを第14図〜第16図に示す。第14
図は、動作ブロックの開始と停止を定型的に記述するパ
ターンである。第15図は、第13図に関連して説明し
たパターンと同じである。第16図は、第15図のパタ
ーンに更に1つの接点条件を付加したものである。
The ladder pattern shown in FIG. 13 is a standard pattern used for expressing a ladder program of a certain operation step. Other ladder patterns prepared in this system are shown in FIGS. 14 to 16. 14th
The figure is a pattern that describes the start and stop of motion blocks in a standard manner. FIG. 15 is the same as the pattern described with reference to FIG. FIG. 16 is a pattern in which one contact condition is added to the pattern of FIG.

【0044】第8図のラベル1360,1372は第7
図の『RRスライド出』に対応するラダープログラムで
ある。ラベル1360の論理において、5041番地の
「B4ステップ1出力」は、 (B4ステップOFF*基準ピン戻り*荷受台前進+B
4ステップ1出力) *B4ステップ2出力/*B4ステップ3出力/ =
1 が満足されると、“1”を出力する。ここで、B4は第
4図における『基準出』ブロックbのブロック番号であ
る。また、「/」は論理NOTを表記する。また、「B
4ステップOFF」は、ブロック4の全てのステップが
オフ(即ち、実行されていない)であることを意味す
る。また、1753番地の『基準ピン戻り』,『荷受台
前進』は、ブロック4の『基準出』に先行する『荷受前
進』ブロックにおける動作終了を意味する。また、B4
ステップ2出力/やB4ステップ3出力/についても容
易に推測ができよう。かくして、ラベル1360の動作
は、『基準出』ブロックの最初の動作ステップ『RRス
ライド出』が正しく起動されるべき条件を表わす。従っ
て、ブロックの『荷受前進』の全ての動作ステップが終
了していれば、上記条件式は満足されて、「B4ステッ
プ1出力」は“1”になる。一旦、「B4ステップ1出
力」が“1”になると、ラベル1360のラッチ条件に
より、「B4ステップ1出力」は“1”のままである。
Labels 1360 and 1372 in FIG.
This is a ladder program corresponding to "RR slide out" in the figure. In the logic of label 1360, “B4 step 1 output” at address 5041 is (B4 step OFF * reference pin return * container forward + B
4 step 1 output) * B4 step 2 output / * B4 step 3 output / =
When 1 is satisfied, "1" is output. Here, B4 is the block number of the "reference output" block b in FIG. Further, "/" represents a logical NOT. Also, "B
"4 steps OFF" means that all steps of block 4 are off (i.e. not executed). Further, "reference pin return" and "conveyance table forward" at address 1753 mean the end of the operation in the "consignment forward" block preceding the "reference reference" in block 4. Also, B4
It can be easily guessed about the step 2 output / and B4 step 3 output /. Thus, the action at label 1360 represents the condition under which the first motion step "RR slide out" of the "reference out" block should be activated correctly. Therefore, if all the operation steps of "advance receipt of goods" of the block are completed, the above conditional expression is satisfied, and "B4 step 1 output" becomes "1". Once the “B4 step 1 output” becomes “1”, the “B4 step 1 output” remains “1” due to the latch condition of the label 1360.

【0045】第8図のラベル1372の出力「B4St
1RRスライド出」が“1”になるのは、 B4ステップ1出力*荷受台前進*B4動作ON*RR
スライド出/ =1 が満足されたときである。ここで、B4St1はブロッ
ク番号4の最初のステップであることを表記する。『R
Rスライド出』なる動作がなされるのは、「B4ステッ
プ1出力」が“1”になって、『RRスライド』なるア
クチュエータがオンされていない状態で『荷受台前進』
ステップが実行されたときである。
The output "B4St" of the label 1372 in FIG.
"1RR slide out" becomes "1" because B4 step 1 output * cargo cradle forward * B4 operation ON * RR
This is when the slide out / = 1 is satisfied. Here, it is noted that B4St1 is the first step of block number 4. "R
The operation of "R slide out" is performed when "B4 step 1 output" is set to "1" and the "RR slide" actuator is not turned on "advancement of the cradle".
It is when the step is executed.

【0046】第9図,第10図のラダープログラムは、
第7図の『FL基準ピンA出』,『FL基準ピンB出』
という2つの動作ステップに対応することは容易に理解
される。かくして、第4図のブロックbの『基準出』ブ
ロックが、第7図の動作ステップフローチャートに対応
する形で表わされた場合、その動作ステップフローチャ
ートの『RRスライド出』,『FL基準ピンA出』,
『FL基準ピンB出』という3つのステツプは第8図〜
第10図のラダープログラムに対応することが理解でき
よう。
The ladder programs shown in FIGS. 9 and 10 are
"FL reference pin A output" and "FL reference pin B output" in FIG.
It is easy to understand that the two operation steps of Thus, when the "reference output" block of the block b of FIG. 4 is represented in a form corresponding to the operation step flowchart of FIG. 7, "RR slide output" and "FL reference pin A" of the operation step flowchart are shown. Out ”,
The three steps called "FL reference pin B output" are shown in Fig. 8 ~.
It will be understood that this corresponds to the ladder program of FIG.

【0047】〈システムの構成〉 i)〜vii)で述べたように、本システムの大きな目
標は、第1図のような生産ラインの工程管理を如何に効
率良く行なうかである。そして、ラダープログラムの自
動生成、生成されたラダープログラムのシュミレーショ
ン、生成されたラダープログラムの実際の動作中若しく
はシュミレーション中におけるシステム管理、故障診断
等の機能を如何に自動化するかが大きな関心である。第
17図は、ある生産ラインに、工程管理を行なうシステ
ムが導入されるプロセスを、一般化して表わした概念図
である。また、第19図は、実施例システム全体に要求
されるプログラム機能を図示したものであり、第18図
は、本実施例のシステムに要求される機能間の結合関係
をブロック化して表わしたものである。
<System Configuration> As described in i) to vii), a major goal of this system is how to efficiently perform the process control of the production line as shown in FIG. There is great interest in how to automate functions such as automatic generation of ladder programs, simulation of generated ladder programs, system management during actual operation or simulation of generated ladder programs, and failure diagnosis. FIG. 17 is a generalized conceptual diagram of a process in which a system for performing process control is introduced into a certain production line. Further, FIG. 19 is a diagram showing program functions required for the entire system of the embodiment, and FIG. 18 is a block diagram showing the coupling relationship between the functions required for the system of the present embodiment. Is.

【0048】第17図に示すように、生産ライン及びそ
の管理システムの導入は、その基本設計から始まって、
更に詳細設計、シーケンスプログラムの作成、そのプロ
グラムのトライアル、そして実稼動という工程で表現さ
れる。第18図に示された本実施例に係るシステムは、
特に第17図における、「シーケンスプログラムの作
成」段階、「トライアル」段階、「稼動」段階で威力を
発揮する。そのためには、実施例システムは、第19図
に示すように、プログラムの自動生成機能、プログラム
実行中の故障の検出機能、故障が検出された場合の故障
箇所の解析機能、故障からの自動復旧機能、故障状態若
しくはトライアルにおけるシュミレーション機能、自動
生成されたプログラムの最適化機能等が要求される。
As shown in FIG. 17, the introduction of the production line and its management system begins with its basic design,
It is represented by the steps of detailed design, creation of a sequence program, trial of the program, and actual operation. The system according to this embodiment shown in FIG.
Particularly, it is effective in the "sequence program creation" stage, the "trial" stage, and the "operating" stage in FIG. To that end, the embodiment system, as shown in FIG. 19, is a program automatic generation function, a failure detection function during program execution, a failure location analysis function when a failure is detected, and an automatic recovery from a failure. Function, simulation function in failure state or trial, optimization function of automatically generated program, etc. are required.

【0049】第18図に従って、本実施例システムのプ
ログラム構成をブロック的に説明する。第18図におい
て、マスタテーブル101は、対象の生産ラインの全設
備(アクチュエータ等)に関する、デバイス名称、その
動作の種類、そして、それらのデバイスを第11図〜第
13図のようなシンボルで表記した場合の入力信号,出
力信号の名称をテーブル化したもので、その詳細な一例
が第13図に示される。このマスタテーブルは、各デバ
イスの実際の入出力関係を表現するものであるから、以
下、『実I/Oマップ』と呼ぶ。
With reference to FIG. 18, the program configuration of the system of this embodiment will be described in block form. In FIG. 18, the master table 101 describes device names, types of operations, and these devices with symbols as shown in FIGS. 11 to 13 for all equipment (actuators, etc.) of the target production line. The names of input signals and output signals in the case of doing so are tabulated, and a detailed example thereof is shown in FIG. Since this master table expresses the actual input / output relationship of each device, it will be referred to as "real I / O map" hereinafter.

【0050】データベース100は、この生産ラインに
使われる全設備(アクチュエータ等のデバイス)に付け
られる名称等を記憶する「名称ライブラリ」108を含
む。このライブラリ108は、操作者によるデバイス名
称の付与に恣意性が入り込むのを排除するために設けら
れている。即ち、ある設備に対し、操作者AがAAと名
称を付け、操作者BがBBと名付ければAAの設備とB
Bの設備とは別物になってしまう。「名称ライブラリ」
108により1つの設備には1つの名称を付することに
より、統一を計る。
The database 100 includes a "name library" 108 for storing names and the like given to all equipment (devices such as actuators) used in this production line. The library 108 is provided in order to prevent the operator from giving arbitrariness to the device name. That is, if the operator A names AA and the operator B names BB for a certain equipment, the equipment of AA and B
It will be different from the equipment of B. "Name Library"
By assigning one name to one facility according to 108, unification is achieved.

【0051】データベース100は、「名称ライブラ
リ」108の他に、「ラダーパターン」107,「ブロ
ックフローマップ」109,「ステップフローマップ」
110,「動作状態ファイル」111を含む。ラダーパ
ターン107は、第14図〜第16図に示したような基
本ラダーパターンを記憶する領域である。各設備はその
設備について前もって割り当てられた基本ラダーパター
ンを有する。
The database 100 includes a "name library" 108, a "ladder pattern" 107, a "block flow map" 109, and a "step flow map".
110 and “operation status file” 111. The ladder pattern 107 is an area for storing the basic ladder pattern as shown in FIGS. 14 to 16. Each facility has a basic ladder pattern pre-assigned for that facility.

【0052】ブロックフローマップ109は第13図の
ようなマップであって、第4図〜第5図に示された人間
の理解の容易さを意図した動作ブロックフローチャート
を第13図のようにマップ化することにより、コンピユ
ータのデータ処理を可能にしたものである。ステップフ
ローマップ110は第7図に示された動作ステップフロ
ーチャートを第13図のようにマップ化することによ
り、コンピユータのデータ処理を可能にしたものであ
る。
The block flow map 109 is a map as shown in FIG. 13, and the operation block flow chart shown in FIG. 4 to FIG. This enables computer data processing. The step flow map 110 enables the computer data processing by mapping the operation step flowchart shown in FIG. 7 as shown in FIG.

【0053】動作状態ファイル111は、実際にシーケ
ンス制御プログラムが動作した時の各設備の各確認デバ
イスの信号(例えば、第11図のA ,A )の変
化を記録する。第11図は動作状態ファイル111の構
造を示す。このファイルは、信号が変化した時点で変化
した信号について記録される。変化しない信号について
の記録は省かれる。このように、変化があったものにつ
いてだけファイル内に記憶するのは、全ての信号を単位
時間毎に記憶するようにすると、膨大な記憶容量を必要
とするからである。第11図において、ファイル111
の1つのレコードは、「発生時刻」は信号の値が変化し
た時刻を、「信号名」は変化のあった信号の名称を、
「値」は変化後の信号の値を、「故障/正常」は、ファ
イル111に記憶されているデータが、最終的に正常動
作として終わった(=1)ものか、故障として終わった
(=0)ものかを示す。第12図は、第11図に示され
た信号A,B,C,Dについての動作状態ファイルから
それらの信号の計時変化をタイミングチヤートとして復
元したものである。尚、第11図の例では、時刻t
初期設定時刻である。
The operation status file 111 records changes in the signals (for example, A 0 and A 1 in FIG. 11) of each confirmation device of each equipment when the sequence control program actually operates. FIG. 11 shows the structure of the operation status file 111. This file is recorded for signals that changed at the time the signal changed. Recording of unchanged signals is omitted. The reason why only the changed data is stored in the file is that a huge storage capacity is required if all the signals are stored at every unit time. In FIG. 11, the file 111
In one record of, the "occurrence time" is the time when the signal value changed, and the "signal name" is the name of the changed signal,
“Value” is the value of the signal after the change, and “fault / normal” is that the data stored in the file 111 ended up in normal operation (= 1) or ended in failure (= 0) It is shown. FIG. 12 is a diagram in which the timing changes of the signals A, B, C, and D shown in FIG. 11 are restored as timing charts from the operating state file. In addition, in the example of FIG. 11, the time t 0 is the initial setting time.

【0054】第18図のシステムは、上記のデータベー
ス100やマスタテーブル101内の『実I/Oマッ
プ』の他に、「データ生成」102、「自動プログラミ
ング」104、「シュミレーション」105、「故障診
断/復旧」106という4つのサブシステムからなる。
「自動プログラミング」サブシステム104はこれらの
データベース100やマスタテーブル101内の『実I
/Oマップ』を元にして、シーケンス制御のためのラダ
ープログラムを自動生成する。データ生成プログラム1
02は、上記のデータベース100やマスタテーブル1
01内の『実I/Oマップ』を作成し、あるいは修正す
る際の操作者とのインターフェースを司どるためのもの
である。このサブシステム102は主に第17図の「シ
ーケンスプログラム作成」過程において使われる。この
「自動プログラミング」サブシステムは、後述するよう
に、「ブロックフローマップ109」や「ステップフロ
ーマップ110」(これらのマップは、これからラダー
プログラムを自動生成しようとする対象となる生産ライ
ンを記述するものである)と、その生産ラインに使われ
るデバイスの入出力関係を一般的に表現する『実I/O
マップ』とを、結合することによりラダープログラムを
作成する。この結合は、「ブロックフローマップ10
9」や「ステップフローマップ110」に使われている
ブロックの名称やステップの名称やデバイスの名称と、
『実I/Oマップ』に記憶されているデバイスの名称と
をリンクすることによりなされる。
In addition to the "real I / O map" in the database 100 and master table 101, the system shown in FIG. 18 includes "data generation" 102, "automatic programming" 104, "simulation" 105, and "failure". It consists of four subsystems called "Diagnosis / Recovery" 106.
The "automatic programming" subsystem 104 uses the "real I" in these databases 100 and master tables 101.
/ O map ”, a ladder program for sequence control is automatically generated. Data generation program 1
02 is the above-mentioned database 100 or master table 1
This is for controlling the interface with the operator when creating or modifying the "real I / O map" in 01. This subsystem 102 is mainly used in the "sequence program creation" process of FIG. As will be described later, this "automatic programming" subsystem describes a "block flow map 109" and a "step flow map 110" (these maps describe a production line from which a ladder program is to be automatically generated). The actual I / O that generally expresses the input / output relationship of the devices used in the production line.
Create a ladder program by combining the map and. This combination is called “Block Flow Map 10
9 ”and“ Step Flow Map 110 ”block names, step names and device names,
This is done by linking with the device name stored in the "real I / O map".

【0055】「シュミレーション」サブシステム105
は自動プログラミング104が生成したラダープログラ
ムをシュミレーションするプログラムを自動生成する。
この生成されたシュミレーションプログラムは、第17
図の「トライアル」段階において主に使われる。「故障
診断/復旧」サブシステム106は、第17図の「トラ
イアル」段階や「稼動」段階において、シュミレーショ
ン結果を診断したり、あるいは実際の稼動段階での故障
を診断するもので、それらの診断結果は主にCRT表示
装置に表示される。この表示装置では、操作者の理解が
容易なように、故障箇所の名称等を上記『実I/Oマッ
プ』のデバイス名称から索引するようになっている。
"Simulation" Subsystem 105
Automatically generates a program for simulating the ladder program generated by the automatic programming 104.
This generated simulation program is the 17th
Mainly used in the "trial" stage of the figure. The "fault diagnosis / recovery" subsystem 106 diagnoses a simulation result in the "trial" stage or the "operating" stage of FIG. 17 or a fault in an actual operating stage. The results are mainly displayed on the CRT display device. In this display device, the name of the failure location or the like is indexed from the device name in the "real I / O map" so that the operator can easily understand.

【0056】このように、本システムにおける中心的な
データは、マスタテーブル101内の『実I/Oマッ
プ』(第24図)であり、この『実I/Oマップ』とデ
ータベース100内のブロックフローマップ109やス
テップフローマップ110と、ラダーパターン107と
が有機的にリンクされて、ラダープログラムやシュミレ
ーションプログラム等が自動的に生成されるようになっ
ている。そこで、以下、本システムのハード構成を説明
し、そのあとで、上述の3つのマップを順に説明する。
Thus, the central data in this system is the "real I / O map" (FIG. 24) in the master table 101, and this "real I / O map" and blocks in the database 100. The flow map 109 or the step flow map 110 and the ladder pattern 107 are organically linked to automatically generate a ladder program, a simulation program, or the like. Therefore, the hardware configuration of the present system will be described below, and then the above three maps will be described in order.

【0057】〈ハード構成〉第25図は、第18図で説
明した実施例システムを、ハードウエア構成の観点から
改めて書き直したものである。同図に示すように、ハー
ド構成の観点から見た本システムは、制御対象設備50
(第1図の各種の「設備」に対応)とホストコンピュー
タ60と、ユーザインタフェースとしてのCRTを制御
するCRTパネル制御ユニット53と、前述のマップや
データベースを格納するデータファイル56とからな
る。ホストコンピュータ60は3つのサブシステムを含
み、ラダープログラムの自動生成と前述のマップの生成
とを行う自動プログラミング/データ入力サブシステム
104(102)と、故障診断及び復旧を行う故障診断
/復旧サブシステム106と、シュミレーション制御を
行うシュミレーションサブシステム105とから成る。
これらのユニットは通信回線61で接続され、データフ
ァイル56は高速化を図るためにも半導体メモリまたは
高速ハードディスクドライブが適当である。データファ
イル56は、更に、ラダープログラムを自動作成する上
で必要な生成ルール112も記憶する。
<Hardware Configuration> FIG. 25 is a rewrite of the system of the embodiment shown in FIG. 18 from the viewpoint of the hardware configuration. As shown in the figure, this system from the viewpoint of the hardware configuration has
It comprises (corresponding to various "equipment" in FIG. 1), a host computer 60, a CRT panel control unit 53 for controlling a CRT as a user interface, and a data file 56 for storing the above-mentioned map and database. The host computer 60 includes three subsystems, an automatic programming / data input subsystem 104 (102) that automatically generates a ladder program and the above-described map, and a failure diagnosis / recovery subsystem that performs failure diagnosis and recovery. 106 and a simulation subsystem 105 for performing simulation control.
These units are connected by a communication line 61, and a semiconductor memory or a high speed hard disk drive is suitable for the data file 56 in order to increase the speed. The data file 56 further stores a generation rule 112 necessary for automatically creating a ladder program.

【0058】CRTパネル制御部53は、CRT表示装
置58のほかに、その表示画面のうえに装着されたタッ
チパネル57を有する。本システムでは、自動プログラ
ミングの過程、シュミレーションの過程、故障診断の過
程などで操作者とのインターフェースが必要となるが、
制御ユニット53は、周知のマルチウインド表示制御に
より、複数のウインドをCRT58上に表示し、操作者
は表示されたウインド内の複数のアイテムの中からタッ
チパネル57を使って所望のアイテムを選択する。した
がって、タッチパネル57の代わりに、ポインテイング
デバイスを用いてもよいのは言うまでもない。
The CRT panel control section 53 has a touch panel 57 mounted on the display screen in addition to the CRT display device 58. This system requires an interface with the operator during the automatic programming process, simulation process, failure diagnosis process, etc.
The control unit 53 displays a plurality of windows on the CRT 58 by the well-known multi-window display control, and the operator selects a desired item from the plurality of items in the displayed window using the touch panel 57. Therefore, it goes without saying that a pointing device may be used instead of the touch panel 57.

【0059】〈プログラム構成〉第26図は自動プログ
ラミング/データ入力サブシステム104(102)に
おけるプログラム構成を示す。尚、第53図〜第56図
は、ラダープログラムの実行及び故障検出及び故障診断
のためのプログラム構成を示す。第26図において、最
下層にはいわゆるオペレーテイングシステム120が格
納され、さらに、マルチウインドシステム121と、日
本語を入力するための日本語フロントエンドプロセサ
(FEP)123と、CRT58,タッチパネル57と
のインターフェースを司どるCRTインターフェースプ
ログラム122と、フローチャート作成するための図形
プロセサ124と、ライブラリを作成するプログラム1
25と、実I/Oマップを作成するプログラム126
と、フローマップを作成するプログラム128と、この
フローマップからラダープログラム(第6図)を作成す
るコンパイラ127と、生成された自動シーケンスラダ
ープログラムや生成ルール112を最適化するための最
適化プログラム129とからなる。
<Program Structure> FIG. 26 shows a program structure in the automatic programming / data input subsystem 104 (102). 53 to 56 show a program configuration for executing a ladder program, detecting a failure, and diagnosing a failure. In FIG. 26, a so-called operating system 120 is stored in the lowermost layer, and further includes a multi-window system 121, a Japanese front-end processor (FEP) 123 for inputting Japanese, a CRT 58, and a touch panel 57. CRT interface program 122 for controlling the interface, graphic processor 124 for creating a flow chart, and program 1 for creating a library
25 and a program 126 for creating an actual I / O map
, A program 128 for creating a flow map, a compiler 127 for creating a ladder program (FIG. 6) from this flow map, and an optimizing program 129 for optimizing the generated automatic sequence ladder program and generation rule 112. Consists of.

【0060】プログラム123〜129が自動プログラ
ミングサブシステム105(102)を構成する。図形
プロセサ124は、第4図や第7図のフローチャートを
作成するためのプロセサで、フローチャートのシンボル
としてのボックスを書く機能と、そのボックスに名称を
付す機能と、そのボックスの中に文章を入力する機能
と、複数のボックス同士を連結する機能とからなる。こ
の図形プロセサ124が作動している最中は、CRT装
置58の画面上には、データファイル56内の前述のラ
イブラリから入力可能なアイテムが、マルチウインドモ
ードで表示される。ここで、アイテムとは、前述した、
デバイス名称、動作ステツプ名称、動作ブロック名称等
のリテラルデータである。操作者はタッチパネル57に
より、特定のアイテムを選択することにより所望の入力
が可能となる。また、ライブラリにない名称について
は、前述の日本語FEP123の助けにより自由な入力
が可能となる。入力可能なアイテムをウインド表示し、
その中から所望のアイテムを選択するようにしたのは、
名称が恣意的なものとならないようにするためである。
なお、このようなマルチウインド制御システムや、図形
プロセサ124、日本語FEP123はすでに周知であ
り、その詳細な説明は不要である。
The programs 123 to 129 form the automatic programming subsystem 105 (102). The figure processor 124 is a processor for creating the flowchart of FIG. 4 and FIG. And a function of connecting a plurality of boxes to each other. While the graphic processor 124 is operating, items that can be input from the above-mentioned library in the data file 56 are displayed on the screen of the CRT device 58 in the multi-window mode. Here, the item is as described above,
It is literal data such as a device name, an operation step name, and an operation block name. The operator can make a desired input by selecting a specific item on the touch panel 57. In addition, it is possible to freely input names that are not in the library with the help of the Japanese FEP 123 described above. The items that can be entered are displayed in a window,
I chose the desired item from them.
This is to prevent the name from being arbitrary.
Note that such a multi-window control system, the graphic processor 124, and the Japanese FEP 123 are already well known, and detailed description thereof is unnecessary.

【0061】第27図はライブラリに格納されたデータ
の一部を示す。同図に示すように、データは、「デバイ
ス名称」フィールドと「動作名称」フィールドとからな
る。これらのフィールドのデータは上記各種マップを作
成するときに、別々にウインド表示される。ライブラリ
中で、このように2つのフィールドに分割したのは、
「デバイス名称」と「動作名称」とが固有の意味を持つ
ように成っているからである。
FIG. 27 shows a part of the data stored in the library. As shown in the figure, the data includes a "device name" field and an "operation name" field. The data in these fields are displayed separately when the various maps are created. In the library, this split into two fields is
This is because the “device name” and the “operation name” have unique meanings.

【0062】ブロックフローマップ 第22図は、本システムで重要な役割を有するブロック
フローマップであり、このマップは第4図の動作ブロッ
クフローチャートをホストコンピュータ60のフローマ
ップ作成プログラム128により変換したものであり、
データファイル56に格納される。このマップは、同図
に示すように、7つのアイテム、即ち、「ブロック番
号」、「ブロック名称」、「FROM」、「TO」、
「ステップフローマップポインタ」、「装置種別」、
「動作時間」からなる。ブロック名称はそのブロックに
つけられた名称である。ブロックはブロック名称により
ユニークに特定できるが、ブロック番号を付すことによ
り、そのブロックを簡単に特定することができる。第6
図のラダープログラムにおいて、信号名に例えば、「B
4」と付されているのは、このブロック番号を参照する
ことにより得たものである。「FROM」は、そのブロ
ックが、他の上位のどのブロックから連結されているか
を示す。「FROM」の部分に、複数のブロック番号が
記されている場合は、それらのブロックに当該ブロック
が接続されていることを示す。「TO」は、そのブロッ
クが、他の下位のどのブロックに連結されているかを示
す。「TO」の部分に、複数のブロック番号が記されて
いる場合は、それらのブロックに当該ブロックが接続さ
れていることを示す。第22図には、第4図のブロック
フローチャートにおけるブロック間の接続関係が示され
ている。前述したように、図形プロセサ124は、第4
図のフローチャートの各ボックスの連結関係をベクトル
データとして表現するから、そのようなデータから、第
22図のブロックフローマップを作成することは容易で
ある。
Block Flow Map FIG. 22 is a block flow map that plays an important role in this system. This map is the operation block flow chart of FIG. 4 converted by the flow map creation program 128 of the host computer 60. Yes,
It is stored in the data file 56. As shown in the figure, this map has seven items, namely, "block number", "block name", "FROM", "TO",
"Step flow map pointer", "Device type",
It consists of "operating time". The block name is the name given to the block. The block can be uniquely specified by the block name, but the block can be easily specified by adding the block number. Sixth
In the ladder program shown in the figure, for example, "B
The number "4" is obtained by referring to this block number. “FROM” indicates from which other upper block the block is connected. When a plurality of block numbers are written in the "FROM" portion, it indicates that the block is connected to the block. “TO” indicates to which other lower block the block is connected. When a plurality of block numbers are written in the “TO” part, it indicates that the block is connected to the block. FIG. 22 shows the connection relationship between blocks in the block flowchart of FIG. As described above, the graphics processor 124 is
Since the connection relation of each box in the flowchart of the figure is expressed as vector data, it is easy to create the block flow map of FIG. 22 from such data.

【0063】ブロックフローマップの「ステップフロー
マップポインタ」は当該ブロックのステップフローマッ
プ(第23図)がどのメモリ番地に作成されたかを示
す。このブロックフローマップは、自動プログラミング
部55が、第28図のステツプS16において、動作ブ
ロックフローチヤートから作成する。
The "step flow map pointer" of the block flow map indicates at which memory address the step flow map (FIG. 23) of the block is created. This block flow map is created by the automatic programming unit 55 from the operation block flow chart in step S16 of FIG.

【0064】実I/Oマップ ステップフローマップを説明する前に、実I/Oマップ
を第24図により説明する。この実I/Oマップは、こ
れから設計しようとする生産ラインに設けられた全ての
設備(アクチュエータ)について所定の入出力関係を定
義したものである。図中、「名称」はそのアクチュエー
タデバイスに対してユニークにつけられた「名前」であ
る。このマップを定義する他のアイテムは、「動作」、
「出力B」、「確認A」、「手動A」の4つである。
「出力B」とは、論理値1の信号が「出力B」で規定さ
れるメモリ番地に書き込まれたときに、当該デバイスが
「動作」に規定された動作を行うためのデータである。
この「出力B」は第11図で説明した出力Bに相当す
る。「確認A」とは、当該デバイスが「動作」に規定さ
れた動作を行ったときに、システムがその動作を確認す
る時に参照するメモリ番地を示す。この「確認A」は第
11図で説明した「確認A」に相当する。「手動A」と
は、手動動作を行うようにプログラムを組むときに、
「手動A」に示されたメモリ番地に論理値1を書き込
む。
Real I / O Map Before explaining the step flow map, the real I / O map will be described with reference to FIG. This actual I / O map defines a predetermined input / output relationship for all equipment (actuators) provided on the production line to be designed. In the figure, "name" is a "name" uniquely given to the actuator device. The other items that define this map are "behavior",
There are four: "output B", "confirmation A", and "manual A".
The “output B” is data for the device to perform the operation specified in the “operation” when the signal having the logical value 1 is written in the memory address specified in the “output B”.
This "output B" corresponds to the output B described in FIG. “Confirmation A” indicates a memory address to be referred to by the system when confirming the operation when the device performs the operation specified in “Operation”. This "confirmation A" corresponds to the "confirmation A" described in FIG. "Manual A" means that when you build a program to perform manual operation,
The logical value 1 is written in the memory address indicated by "manual A".

【0065】第24図により、実I/Oマップについて
具体的に説明すると、「BF位置決め」なるデバイスが
「出」動作を行うためには、「BA0」番地に1が書き
込まれ、その動作の結果は、「AC0」番地に1が書き
込まれたかを確認することにより確認される。また、
「BF位置決め」なるデバイスが「戻り」動作を行うた
めには、「BA1」番地に1が書き込まれ、その動作の
結果は、「AC1」番地に1が書き込まれたかを確認す
ることにより確認される。「BA0」や「ACo」など
の番地は、いわゆる、メモリマップI/Oの番地に対応
する。これらの番地は、第14図のシーケンサ制御部5
1のバックプレーンのピン番号に対応する。このピンは
該当するアクチュエータに接続されている。この制御部
51は、これらのメモリ番地(「出力B」や「手動
A」)の内容をスキャンしており、これらの番地の内容
が1になれば、対応するアクチュエータを駆動する。そ
して、そのアクチュエータの確認スイッチ(第8図を参
照)が変化すれば、その論理値を、例えば、「AC0
番地に書き込む。この実I/Oマップは、日本語FEP
123や実I/Oマップ作成プログラム126を使って
作成され、各「名称」や「動作」フィールドは検索可能
に構成されている。
The actual I / O map will be described in detail with reference to FIG. 24. In order for the device "BF positioning" to perform the "out" operation, 1 is written in the address "B A0 ", and the operation is performed. The result is confirmed by checking whether 1 is written in the address "A C0 ". Also,
In order for the device called “BF positioning” to perform the “return” operation, 1 is written in the address “B A1 ”, and the result of the operation is confirmed by checking whether 1 is written in the address “AC 1 ”. It is confirmed. Address, such as "B A0" and "A Co" is, so-called, corresponding to the address of the memory-mapped I / O. These addresses are the sequencer controller 5 of FIG.
Corresponds to pin number 1 on the backplane. This pin is connected to the corresponding actuator. The control unit 51 scans the contents of these memory addresses (“output B” and “manual A”), and when the contents of these addresses become 1, the corresponding actuator is driven. Then, if the confirmation switch (see FIG. 8) of the actuator changes, the logical value is changed to, for example, “A C0 ”.
Write in the address. This real I / O map is Japanese FEP
123 and the actual I / O map creation program 126, and each "name" and "operation" field is searchable.

【0066】ステップフローマップ 第23図のステツプフローマップは、実際の生産ライン
における動作を記述するマップである。このマップのア
イテムは、第23図に示すように、当該ステップが属す
るブロックの番号を示す「ブロック番号」、「ステップ
番号」、当該ステップの「名称」、そのステップにおけ
る「動作」のタイプを表す「動作」、「FROM」、
「TO」、「出力B」、「確認A」「手動A」、「動作
時間」である。「FROM」、「TO」は、ブロックフ
ローマップの場合と同じように、ステップ間の接続関係
を表す。「動作時間」は、当該ステップが動作するのに
要する公称の時間である。
Step Flow Map The step flow map of FIG. 23 is a map that describes the operation on the actual production line. As shown in FIG. 23, the items of this map represent the “block number”, which indicates the number of the block to which the step belongs, the “step number”, the “name” of the step, and the type of “action” in the step. "Operation", "FROM",
“TO”, “output B”, “confirmation A”, “manual A”, and “operating time”. “FROM” and “TO” represent the connection relationship between steps as in the case of the block flow map. "Operating time" is the nominal time required for the step to operate.

【0067】動作ステツプフローチヤート(第7図)
は、図形プロセツサ124を用いて作成したものであ
り、そのデータはベクトル化されている。ステツプフロ
ーマップの最初の6つのフィールド、即ち「ブロック番
号」、「ステップ番号」、「名称」、「動作」、「FR
OM」、「TO」のためのデータは、フローマップ作成
プログラム128が第28図のステツプS8において、
前記ベクトル化された動作ステツプフローチヤートか
ら、ブロックフローマップの作成と同じ要領で作成す
る。残りのフィールド、即ち「出力B」、「確認A」
「手動A」のためのデータは、自動プログラミング制御
部55のラダープログラムコンパイラ127がラダープ
ログラムを生成する時(第29図の手順が実行される
時)に、これらのフィールドに、前述の「実I/Oマッ
プ」からのデータを埋め込む。
Operation step flow chart (Fig. 7)
Is created by using the graphic processor 124, and the data is vectorized. The first six fields of the step flow map, namely "block number", "step number", "name", "action", and "FR".
The data for "OM" and "TO" can be obtained by the flow map creation program 128 in step S8 of FIG.
A block flow map is created from the vectorized motion step flow chart in the same manner as the block flow map. The remaining fields, namely "output B" and "confirmation A"
The data for “manual A” is stored in these fields when the ladder program compiler 127 of the automatic programming control unit 55 generates a ladder program (when the procedure of FIG. 29 is executed). The data from the "I / O map" is embedded.

【0068】〈ユーザインターフェース〉第19図にお
いて説明した実施例システムの機能が有効に機能するた
めには、使いやすいユーザインターフェースが必要であ
る。本システムでは、ユーザインターフェースはCRT
58により行われる。本システムのCRT表示装置58
でのユーザインターフェースは2つの意味を有する。第
1の意味は、ラダーパターンの登録時、動作ブロックフ
ローチヤートや動作ステップフローチヤートの作成時、
「実I/Oマップ」の作成時などにおけるマルチウイン
ドを介したユーザインターフェースである。第2は、操
作者がシステムに操作指令を与えるために、タッチパネ
ル57によるインターフェース(以下、所謂「ボタンア
イコン」によるインターフェースと呼ぶ)である。この
場合、操作者は、CRT58に表示された内容によりシ
ステムからのメッセージを知り、そのメッセージに基づ
いて所定の位置を押すことにより、システムに対して指
令を与える。
<User Interface> In order for the functions of the embodiment system described in FIG. 19 to function effectively, an easy-to-use user interface is required. In this system, the user interface is CRT
58. CRT display device 58 of this system
The user interface in has two meanings. The first meaning is when registering a ladder pattern, when creating a motion block flow chart or motion step flow chart,
This is a user interface via a multi-window when creating an “real I / O map”. The second is an interface using the touch panel 57 (hereinafter, referred to as an interface using a so-called “button icon”) for the operator to give an operation command to the system. In this case, the operator knows a message from the system based on the contents displayed on the CRT 58, and gives a command to the system by pushing a predetermined position based on the message.

【0069】かかるタッチパネルによるユーザインター
フェースは、例えば、第32図に示すように、矩形15
0の左上端座標と右下端座標(x,y )(x
,y )で規定される表示領域に、例えば『O
N』と表示し、矩形151の左上端座標と右下端座標
(x ,y )(x ,y )で規定されるタ
ッチ検出領域の内部の任意の領域で操作者がタッチした
ことを検出したことをもって、所定の『ON』動作を行
なうようにプログラム化するというものである。本シス
テムにおけるタッチパネル57を用いたユーザインター
フェースも基本的にはこの手法を用いているが、その特
徴は、むしろ、CRT58に表示されるボタンアイコン
の表示データや機能が、前述の実I/Oマップから与え
られるという点にある。即ち、実I/Oマップやステツ
プフローマップを介して、シュミレーションプログラム
やCRT表示プログラム等が、他のサブシステム(自動
プログラミングサブシステム55)とプログラムインタ
ーフェースするということである。
A user interface using such a touch panel has a rectangular shape 15 as shown in FIG. 32, for example.
0 upper left and lower right coordinates (x 1 , y 1 ) (x
2 , y 2 ), for example, “O
“N” is displayed, and the operator has touched an arbitrary area inside the touch detection area defined by the upper left corner coordinates and the lower right corner coordinates (x 3 , y 3 ) (x 4 , y 4 ) of the rectangle 151. Upon detection of "," the program is programmed to perform a predetermined "ON" operation. The user interface using the touch panel 57 in this system basically uses this method, but the feature is that the display data and functions of the button icons displayed on the CRT 58 are rather the above-mentioned actual I / O map. The point is that it is given from. That is, the simulation program, the CRT display program, and the like interface with other subsystems (automatic programming subsystem 55) through the actual I / O map and the step flow map.

【0070】本システムにおける1つのボタンアイコン
は、第33図のようなデータ構造により規定される。同
図中、150,151は第32図で説明した表示領域及
びタッチ検出領域を規定する座標である。第34図に示
すように、本システムのボタンアイコンは3行のデータ
表示フィールドを有する。第33図の152,153,
154はこれら3つのフィールドに表示されるテキスト
を表わす。155のS/Lは、このボタンアイコンが単
に表示(L)を行なうに過ぎないのか、スイッチ機能
(S)を有するのかを区別する情報である。156のM
/Aは、当該ボタンにスイッチ機能が与えられている場
合において、Mであればモメンタリスイッチとして機能
し、Aであればオルタネートスイッチとして機能するこ
とを意味する。157は、このボタンに与えられた機能
の結果を表わす出力が“0”若しくは“1”であるとき
に、このボタンの表示色を規定するフィールドである。
One button icon in this system is defined by the data structure as shown in FIG. In the figure, 150 and 151 are coordinates defining the display area and the touch detection area described in FIG. As shown in FIG. 34, the button icon of this system has a data display field of three lines. 152, 153 of FIG.
154 represents the text displayed in these three fields. The S / L of 155 is information that distinguishes whether this button icon merely displays (L) or has a switch function (S). M of 156
/ A means that when the switch function is given to the button, M functions as a momentary switch, and A functions as an alternate switch. A field 157 defines the display color of this button when the output representing the result of the function given to this button is "0" or "1".

【0071】第35図はCRT装置58の画面に設けら
れた複数のボタンアイコンの配置を示す図である。これ
らのボタンアイコンの各々に、第33図のデータがアタ
ッチされる。第35図中の数字は表示位置を指定する番
号である。ユーザは、第37図に示すように、どのボタ
ンアイコン位置に、どのデバイスを表示させるかを個々
のボタン毎に指定することと、そして、個々のボタン毎
にフィールド157の色指定を行ない、スイッチのモー
ド(L/SとM/A)の指定を行なうだけでよい。第3
7図の表示位置番号は第35図の表示位置指定番号に等
しい。従来では、CRT装置に表示するデータは、ユー
ザが独自に設定し、それは面倒な作業であったが、本シ
ステムでは、ユーザは単に、ボタンの表示位置とデバイ
ス名称、そして色指定などを指定するだけでよい。
FIG. 35 is a view showing the arrangement of a plurality of button icons provided on the screen of the CRT device 58. The data of FIG. 33 is attached to each of these button icons. The numbers in FIG. 35 are numbers that specify the display position. As shown in FIG. 37, the user designates which device is to be displayed at which button icon position for each button, and the color of the field 157 is designated for each button. It is only necessary to specify the mode (L / S and M / A). Third
The display position number in FIG. 7 is equal to the display position designation number in FIG. Conventionally, the user independently sets the data to be displayed on the CRT device, which is a troublesome task, but in this system, the user simply specifies the display position of the button, the device name, and the color designation. Just enough.

【0072】第33図は、実I/Oマップの各デバイス
の名称フィールドのデータ構成の一例を示す。『実I/
Oマップ』の名称フィールドの最初のlバイトは(第3
6図の例では『TL』)は、第34図に示すように、表
示データの第1段目(152)にコピーされ、名称フィ
ールドの次のmバイトは(第36図の例では『位置決
め』)は表示データの第2段目(153)にコピーされ
る。表示データの第3段目(154)は、本システムで
は、実I/Oマップの『確認A』フィールドの値が
“0”であるか“1”であるかに応じて、『動作』フィ
ールドのリテラルデータをもってくるようにしている。
即ち、デバイス名称が位置決めタイプのものであり、そ
のデバイスの『確認A』フィールドの値が“1”であれ
ば、第3段目には『出』を、“0”であれば『戻り』を
表示する。
FIG. 33 shows an example of the data structure of the name field of each device of the actual I / O map. "Real I /
The first 1 byte of the name field of "O map" is (3rd
As shown in FIG. 34, “TL” in the example of FIG. 6 is copied to the first stage (152) of the display data, and the next m bytes of the name field are (“positioning” in the example of FIG. 36). )) Is copied to the second stage (153) of the display data. In the third stage (154) of the display data, in this system, the “operation” field is set according to whether the value of the “confirmation A” field of the actual I / O map is “0” or “1”. I am trying to bring the literal data of.
That is, if the device name is of the positioning type and the value of the "confirmation A" field of the device is "1", "output" is displayed in the third stage, and if it is "0", "return" is returned. Is displayed.

【0073】第37図のボタンアイコンの指定は操作者
がデータ生成プログラム55を起動することにより行な
われる。このデータ生成プログラム55は、第37図の
ようなデータを操作者が作成したならば、実I/Oマッ
プを参照しながら、個々のボタンについて第33図のよ
うなボタン定義データを作成する。ボタン定義データの
フィールド150乃至154の作成については前述した
通りである。第36図の例のような『TL位置決め』な
るデバイスが選択された場合は、そのデバイスが『出』
状態になったか『戻り』状態になったかがそのアイコン
に表示されるべきである。『出』状態になったか否か
は、そのデバイスの実I/Oマップの『確認A』フィー
ルドに示されるメモリ番地のデータを参照することによ
り判断できる。第33図のフィールド158はその参照
番地を格納する。
The button icon shown in FIG. 37 is designated by the operator activating the data generation program 55. When the operator creates the data as shown in FIG. 37, the data generation program 55 creates the button definition data as shown in FIG. 33 for each button with reference to the actual I / O map. The creation of the button definition data fields 150 to 154 is as described above. If a device called "TL positioning" as in the example of Fig. 36 is selected, that device is "output".
The icon should indicate whether it is in a state or a "return" state. Whether or not it is in the "out" state can be determined by referring to the data of the memory address indicated in the "confirmation A" field of the actual I / O map of the device. The field 158 in FIG. 33 stores the reference address.

【0074】かくして、1つの画面毎の全てのボタンア
イコンについての画面制御データ(第30図)が生成さ
れると、CRTパネル制御部53は、これらの画面制御
データを参照しながらCRT表示装置58上に画面表示
を行なう。もし、『0のときの色指定』が赤で、『1の
ときの色指定』が青ならば、『TL位置決め』デバイス
が『出』状態にあれば、青で表示される。
Thus, when the screen control data (FIG. 30) for all the button icons for each screen is generated, the CRT panel control section 53 refers to these screen control data, and the CRT display device 58. Show screen on top. If the "color designation when 0" is red and the "color designation when 1" is blue, the "TL positioning" device is displayed in blue if it is in the "out" state.

【0075】以下、第19図に示した順序に従って、本
システムの機能を、「プログラムの自動生成」、「故障
の検出」、「故障箇所の解析」、「シュミレーショ
ン」、「プログラムの最適化」という順で説明する。 〈プログラムの自動生成〉第29図,第30図は、ラダ
ープログラムを作成するコンパイラ(第26図の12
7)の制御手順を示すフローチヤートである。第29図
は、このコンパイラの、ステツプフローマップの「出力
B」、「確認A」「手動A」を作成するための制御手順
を示すフローチヤートであり、第30図がラダープログ
ラム要素を作成するためのフローチヤートである。
In the following, the functions of this system will be described in the order shown in FIG. I will explain in that order. <Automatic Program Generation> FIGS. 29 and 30 show a compiler (12 in FIG. 26) for creating a ladder program.
It is a flow chart which shows the control procedure of 7). FIG. 29 is a flow chart showing the control procedure for creating “output B”, “confirmation A” and “manual A” of the step flow map of this compiler, and FIG. 30 creates a ladder program element. It is a flow chart for.

【0076】第29図において、ステップS10、ステ
ップS12では、夫々、ブロック番号、ステップ番号を
示すカウンタm,nを“0”に初期化する。ステップS
14では、既に(ステツプS6において)作成されてい
るブロックフローマップをサーチして、カウンタmに対
応する名称を有するブロックを探す。そして、そのブロ
ック名称を有するステップフローマップを捜す。対応す
るマップが無ければ、ステップS30に進んで、カウン
タmをインクリメントして、ステップS32を経てステ
ップS14に戻る。対応するマップがあれば、ステップ
S18で、該当するステップフローマップの中の、ブロ
ックmステップn(BmSn)の「名称」を有するデバ
イスを実I/Oマップ中にサーチする。ステップS2
0,ステップS22,ステップS24においては、サー
チして見つかったデバイスに対応する「出力B」、「確
認A」「手動A」「動作時間」フィールドを、ステップ
フローマップ中にコピーする。ステップS26ではカウ
ンタnをインクリメントする。尚、対応するステツプフ
ローマップが見つかれば、そのマップのポインタアドレ
スをブロックフローマップ(第22図)の「ポインタ」
フィールドに書き込む。
In FIG. 29, in steps S10 and S12, the counters m and n indicating the block number and the step number are initialized to "0", respectively. Step S
At 14, the block flow map already created (at step S6) is searched for a block having a name corresponding to the counter m. Then, the step flow map having the block name is searched. If there is no corresponding map, the process proceeds to step S30, the counter m is incremented, and the process returns to step S14 via step S32. If there is a corresponding map, in step S18, the device having the "name" of block m step n (BmSn) in the corresponding step flow map is searched in the actual I / O map. Step S2
At 0, step S22, and step S24, the "output B", "confirmation A", "manual A", and "operating time" fields corresponding to the device found by the search are copied into the step flow map. In step S26, the counter n is incremented. If the corresponding step flow map is found, the pointer address of the map is set to the "pointer" of the block flow map (Fig. 22).
Write in the field.

【0077】1つのステップフローマップ中では、デバ
イスが動作される順に並んでいるので、そのステップフ
ローマップの全てのステップについての、「出力B」、
「確認A」「手動A」「動作時間」フィールドを埋めた
ならば、ステップS14に戻って、上述の手順を繰り返
す。第30図は、ラダープログラムを自動生成するプロ
グラム(このプログラムは、自動プログラミング制御部
55のプログラムの一部である)の手順を示す。第30
図のステップS40では、レイヤを示すカウンタLを、
最上位を示す値にセットする。
Since the devices are arranged in the order in which they are operated in one step flow map, "output B" for all steps of the step flow map,
When the "confirmation A", "manual A" and "operating time" fields have been filled, the process returns to step S14 and the above procedure is repeated. FIG. 30 shows the procedure of a program for automatically generating a ladder program (this program is a part of the program of the automatic programming control unit 55). 30th
In step S40 in the figure, the counter L indicating the layer is set to
Set to the value that indicates the highest level.

【0078】ここでレイヤとは、ブロックフローチャー
トにおける層のレベルを示す。第4図の例では、ブロッ
クa,cが第1層を、ブロックbを第 2層、ブロック
dを第3層と、ブロックeを第4層と、ブロックfを第
5層と、ブロックgを第6層と呼ぶ。更に、ブロック
l,m,nを第7層と、ブロックoを第8層と、ブロッ
クiを第9層と、ブロックj,p,qを第10層と、ブ
ロックkを第11層と、ブロックr,sを第12層と呼
ぶ。層に分けた理由は、下位層のブロックが起動される
条件は、そのブロックの上位のブロックの動作終了条件
に規定されるからである。従って、階層のつけ方は、左
側に位置する複数のブロックの中で、並列に起動される
関係にあるブロック同士(例えば、ブロックa,c)を
グループ化してそれらを参照し、そのグループの全ての
ブロックに同じ階層番号をつける。次に、これらのブロ
ックに続く「枝」の中で、並列関係が変化する最下位の
ブロック(例えば、ブロックb)を探索する。並列関係
が発生したところから、並列関係が変化するところまで
の複数のブロックに対して、上から下に向けて順に階層
番号を付していく。
Here, the layer means the level of the layer in the block flow chart. In the example of FIG. 4, blocks a and c are the first layer, block b is the second layer, block d is the third layer, block e is the fourth layer, block f is the fifth layer, and block g is the block g. Is called the sixth layer. Further, the blocks l, m and n are the seventh layer, the block o is the eighth layer, the block i is the ninth layer, the blocks j, p and q are the tenth layer, and the block k is the eleventh layer. The blocks r and s are called the 12th layer. The reason why the blocks are divided into layers is that the condition that a block in the lower layer is activated is defined by the operation end condition of the block above the block. Therefore, the method of assigning a hierarchy is to group blocks (for example, blocks a and c) that have a relationship to be activated in parallel among a plurality of blocks located on the left side, refer to them, and refer to all of the groups. Assign the same hierarchy number to the blocks. Next, in the “branches” that follow these blocks, the lowest block (for example, block b) whose parallel relationship changes is searched. Hierarchical numbers are sequentially assigned from the top to the bottom of a plurality of blocks from where the parallel relationship occurs to where the parallel relationship changes.

【0079】ステップS40によれば、レイヤカウンタ
Lに対して、このように前もって付された階層番号の最
上位の番号がセットされる。第4図の例であれば、カウ
ンタLには1がセットされる。ステップS42では、カ
ウンタLに示される階層に属する1つのブロックをみつ
ける。このブロックの番号をカウンタmにセットする。
ステップ46では、このブロックの上位のブロックを全
てサーチする。カウンタLが3であれば、その層に属す
るブロックは、第4図の例では、ブロックdであり、こ
のブロックdの上位のブロックはb,cとなる。ステッ
プS48では、見つかったこれらの上位ブロックの動作
終了条件の積を生成する。例えば、あるブロックB
の上位のブロックB が4つの動作ステップからな
り、各々の動作ステップの動作終了を確認するスイッチ
出力を、例えば、A ,A ,A ,A とす
れば、ブロックB はブロックB の全ての動作が
終了していなくてはならないから、ブロックB の起
動条件は、 A *A *A *A となる。
According to step S40, the layer counter L is set to the highest number of the layer numbers thus given in advance. In the example of FIG. 4, 1 is set in the counter L. In step S42, one block belonging to the hierarchy indicated by the counter L is found. The number of this block is set in the counter m.
In step 46, all the blocks above this block are searched. If the counter L is 3, the block belonging to that layer is the block d in the example of FIG. 4, and the upper blocks of this block d are b and c. In step S48, the product of the operation end conditions of these found upper blocks is generated. For example, a block B 2
Block B 1 level of consists of four operation steps, the switch output to check the operation end of each operating step, for example, if A 0, A 1, A 2 , A 3, block B 2 is block Since all the operations of B 1 must be completed, the starting condition of the block B 2 is A 0 * A 1 * A 2 * A 3 .

【0080】尚、このブロックB の起動条件の作成
において、ブロックB の各動作ステツプにおいて
は、通常、『出』のためのデバイス動作(例えば、『B
F位置決め出』)と『戻り』のためのデバイス動作(例
えば、『BF位置決め戻り』)等のような相補関係の動
作が存在する。かかる動作に対応する論理は互いに消去
し合うので、上記起動条件に含める必要はない。
In creating the activation condition for the block B 2 , normally, in each operation step of the block B 1 , a device operation for "output" (for example, "B") is performed.
There are complementary operations such as device operation for "F positioning output") and "return" (for example, "BF positioning return"). Since the logics corresponding to such operations are erased from each other, it is not necessary to include them in the above activation condition.

【0081】また、並列動作を有するブロックを探索す
る手法は上記手法以外にもあり、例えば、下位のブロッ
クから上位のブロックを探索する手法等がある。ステッ
プS48〜ステップS50では、見つかった全ての上位
ブロックについての動作終了条件の積を生成する。ステ
ップS52では、これをカウンタmが示すブロックB
の起動条件としたラダー要素を生成する。第8図の例
では、ラベル1360のラダー要素がこの起動条件を表
わしている。ここで生成されるラダー要素は、データフ
ァイル56(第23図)に前もってデータベース化され
ているラダーパターンのなかから、条件に合致したもの
を探す。ラダーパターンを探す手法は、本出願人によ
り、特願平1−253991、2−30378、2−3
0379、2−231843、2−231845に詳細
に開示されている。
In addition to the above-described methods, there are other methods for searching for blocks having parallel operation, for example, there is a method for searching for an upper block from a lower block. In steps S48 to S50, products of the operation end conditions for all the found upper blocks are generated. In step S52, this is indicated by the block B m indicated by the counter m.
Create a ladder element that is the start condition for. In the example of FIG. 8, the ladder element with the label 1360 represents this activation condition. The ladder element generated here is searched for one that matches the condition from the ladder patterns stored in the data file 56 (FIG. 23) in advance. The method of searching for a ladder pattern is disclosed in Japanese Patent Application Nos. 1-253991, 2-30378, 2-3 by the present applicant.
0379, 2-231843, 2-231845.

【0082】ステップS54では、システムに固定のラ
ダー要素(第14図のSRTラダーと、STPラダーで
ある)を生成する。尚、ステップS52において自動生
成されたブロックmの起動条件は冗長な部分を含んでい
る場合が多い。冗長部分は最適化プログラム129によ
り最適化される。この最適化プログラムの詳細は後に説
明される。
In step S54, the ladder elements fixed to the system (the SRT ladder and the STP ladder shown in FIG. 14) are generated. The starting condition of the block m automatically generated in step S52 often includes a redundant part. The redundant part is optimized by the optimization program 129. The details of this optimization program will be described later.

【0083】ステップS56〜ステップS62は、1つ
のブロック内の全ての動作ステップに対応するラダー要
素を次々と生成していく手順である。先ず、ステップS
56で、ステップ番号を示すカウンタnをゼロに初期化
し、ステップS58では、動作ステップB
対応するラダー要素を生成する。この場合、番号B
のステップフローマップが参照される。そして、そ
のステップの「出力B」、「確認A」「手動A」のメモ
リ番地が参照され、ラダー要素が作成される。第8図の
例でいえば、「確認A」は「0C6」番地の『RRスラ
イド出』であり、「出力B」は「3041」番地の『B
4St1RRスライド出』である。ステップS60で
は、このステップB が起動されるためのイン
ターロック条件を生成する。動作ステップが起動される
ためには、その前までの動作ステップが終了されている
ことが前提である。この場合、動作ステップB
n− の終了条件が、このブロックB のイ
ンターロック条件となる。第8図の例でいえば、『B4
ステップ1出力』『荷受台前進』『B4動作ON』がイ
ンターロック条件となる。こうして生成されたインター
ロック条件は、次のサイクルで、動作ステップB
n+1 のインターロック条件となる。尚、上述の、ラ
ダー要素の生成は、本出願人による、前述の特願平1−
253991、2−30378、2−30379、2−
231843、2−231845に詳細に開示されてい
る。
Steps S56 to S62 are a procedure for successively generating ladder elements corresponding to all operation steps in one block. First, step S
At 56, a counter n indicating a step number is initialized to zero, and at step S58, a ladder element corresponding to the operation step B m S n is generated. In this case, the number B m S
The n step flow maps are referenced. Then, the memory addresses of “output B”, “confirmation A”, and “manual A” in that step are referenced to create a ladder element. In the example of FIG. 8, "confirmation A" is "RR slide out" at address "0C6" and "output B" is "B at address 3041".
4St1RR slide out ”. In step S60, it generates the interlock condition for the step B m S n is activated. In order for an operation step to be activated, it is premised that the operation step up to that point has been completed. In this case, the operation step B m S
The termination condition of n− 1 becomes the interlock condition of this block B m S n . In the example of FIG. 8, "B4
The interlock conditions are "step 1 output", "advancement of the receiving tray", and "B4 operation ON". The interlock condition generated in this way is determined by the operation step B m S in the next cycle.
The interlock condition is n + 1 . The generation of the ladder element described above is performed by the applicant of the present invention as described in Japanese Patent Application No.
253991, 2-30378, 2-30379, 2-
231843, 2-231845.

【0084】ステップS56〜ステップS60の処理
を、同じブロックB 内の全ての動作ステップに対し
て行なうと、ステツプS66に進む。そして、ステップ
S66,ステップS72で、レイヤ番号Lに属する他の
動作ブロックを探して、そのような動作ブロックが見つ
かったならば、ステップS44に戻り、見つかった動作
ブロックについて、ステップS44〜ステップS62の
処理を繰り返す。
[0084] The processing of step S56~ step S60, is performed for all operation steps in the same block B m, the process proceeds to step S66. Then, in steps S66 and S72, another operation block belonging to the layer number L is searched, and if such an operation block is found, the process returns to step S44, and for the found operation block, steps S44 to S62 are performed. Repeat the process.

【0085】同じ階層に属するブロックに対する処理を
全て行なったならば、カウンタLをステップS68でイ
ンクリメントしてからステップS70で、上述の処理を
全ての階層に対して行なったかを判断する。全ての階層
のブロックに対して上述の処理を行なったのであれば、
ラダープログラムの生成処理は終了する。
When all the processes for the blocks belonging to the same layer have been performed, the counter L is incremented in step S68 and then it is determined in step S70 whether the above-mentioned process has been performed for all the layers. If the above process is performed for blocks of all layers,
The ladder program generation process ends.

【0086】尚、ステップフローマップにおいても、例
えば、第7図の『FL基準ピンA出』と『FL基準ピン
B出』のように、並列動作を行なう動作ステップが存在
する。動作ステップの並列性は、ステップフローマップ
における「FROM」と「TO」フィールドから判断で
きるのは、動作ブロックにおける並列性の判断と同じで
ある。並列関係にある複数の動作ステップ(例えば、
『FL基準ピンA出』と『FL基準ピンB出』)のイン
ターロック条件は、その上位の動作ステップ(「RRス
ライド出」ステップ)の終了条件が共通になっている。
また、この並列関係にある複数の動作ステップの下位の
動作ステップ(例えば、第7図の『RR基準ピン出』)
の起動条件は、その並列関係にある複数の動作ステップ
の終了条件の積であるのは、動作ブロックにおけるラダ
ープログラム要素の生成と同じである。
Also in the step flow map, there are operation steps for performing parallel operation, such as "FL reference pin A output" and "FL reference pin B output" in FIG. The parallelism of the operation step can be judged from the "FROM" and "TO" fields in the step flow map, as in the judgment of the parallelism in the operation block. Multiple operational steps in parallel relationship (eg,
As for the interlock conditions of "FL reference pin A output" and "FL reference pin B output", the end condition of the higher operation step ("RR slide output" step) is common.
In addition, the lower operation step of the plurality of operation steps in the parallel relationship (for example, “RR reference pin out” in FIG. 7).
The starting condition of is a product of end conditions of a plurality of operation steps in the parallel relationship, which is the same as the generation of the ladder program element in the operation block.

【0087】第31図は、第25図乃至第30図で説明
した処理を模式化して示した。第28図によれば、シス
テムの一部変更も、簡単に行なうことができる。即ち、
その変更が、デバイスの変更であれば、実I/Oマップ
において、その変更に係わる部分を「データ生成プログ
ラムにより修正すればよい。この場合、メモリ番地に変
更がない限りは、ラダープログラムの再生成は不要であ
ろう。また、変更がシーケンスの変更であれば、その変
更にかかる動作ブロックフローチヤート(第4図)また
は動作ステップフローチヤート(第7図)を修正し、再
度、第29図,第30図のプログラムをランさせて、ラ
ダープログラムを作成すればよい。この点において、本
システムの特徴は、実I/Oマップ(第22図)に全て
のデバイスに関する情報が集中し、このマップをデバイ
ス名称で索引できることにより、シーケンス手順の変
更、デバイスの変更等は、その変更に係る部分だけの修
正を行なうだけで済む。即ち、システムの変更、修正が
極めて簡単である。
FIG. 31 schematically shows the processing described with reference to FIGS. 25 to 30. According to FIG. 28, a part of the system can be easily changed. That is,
If the change is a device change, the part related to the change in the actual I / O map may be corrected by "the data generation program. In this case, unless the memory address is changed, the reproduction of the ladder program is performed. If the change is a sequence change, the operation block flow chart (FIG. 4) or the operation step flow chart (FIG. 7) associated with the change is corrected and again shown in FIG. , The ladder program can be created by running the program shown in Fig. 30. In this respect, the feature of this system is that the information about all devices is concentrated in the actual I / O map (Fig. 22). Since the map can be indexed by device name, changes in sequence procedures, device changes, etc. need only be made to the parts related to the changes. . In other words, the change of the system, modifications are very simple.

【0088】尚、第1図の生産ラインでは、移載装置や
リニア搬送装置やねじ締めロボット等の設備が存在して
いる。これらの装置では、移載装置における動作は繰返
し動作であり、一方、連続搬送装置では連続動作であ
る。そして、繰り返し動作と連続動作とは、それらを表
現するラダーパターンは異なる。そこで、本システムの
データファイル(第23図)中では、あらかじめ準備し
たラダーパターンを移載装置や連続搬送装置やねじ締め
ロボット毎に異なるライブラリとして分離して記憶して
いる。また、この装置間の相違により、1つの動作ブロ
ックのは、移載装置や連続搬送装置やねじ締めロボット
が混在することはないようにしており、各動作ブロック
のブロックフローマップ(第22図)には、その種別を
表わすデータ(「装置種別」)が設けられている。ラダ
ープログラムを生成するときは、この種別を参照して、
対応するラダーパターンをライブラリから取り出すよう
にしている。これにより、ラダー要素の生成が速くな
る。尚、第38図に、連続搬送におけるラダーパターン
の一例を示す。
The production line shown in FIG. 1 has equipment such as a transfer device, a linear transfer device, and a screw tightening robot. In these devices, the operation of the transfer device is a repetitive operation, while the operation of the continuous transfer device is a continuous operation. The ladder pattern that expresses the repeated motion and the continuous motion is different. Therefore, in the data file (FIG. 23) of this system, the prepared ladder patterns are separately stored as different libraries for each transfer device, continuous transfer device, and screw tightening robot. Further, due to the difference between the devices, the transfer device, the continuous transfer device, and the screw tightening robot do not coexist in one operation block, and the block flow map of each operation block (FIG. 22). Is provided with data indicating the type (“device type”). When creating a ladder program, refer to this type and
The corresponding ladder pattern is taken out from the library. This speeds up the generation of ladder elements. Note that FIG. 38 shows an example of a ladder pattern in continuous conveyance.

【0089】〈プログラム実行/故障監視/故障診断〉
以上、本実施例システムにおけるラダープログラムの自
動生成及びユーザインターフェースについて説明した。
またその過程で、ブロックステップ動作ブロックマップ
及び動作ステップがどういうものかが理解できた。第3
9図,第40図,第41図は、シュミレーションサブシ
ステム105,故障診断/復旧サブシステム106の夫
々のプログラム構成を示す。これらのサブシステム10
5,106は、自動プログラミングサブシステム104
と同じく、マルチウインドシステム121とインターフ
ェースするCRTインターフェースプログラムを夫々有
する。換言すれば、CRT58は、3つのサブシステム
104,105,106により共有される。同図はサブ
システム105,106のプログラム構成も示す。特
に、故障診断/復旧サブシステム106は、マップ制御
プログラム201,動作監視プログラム202,故障診
断解析プログラム203,復旧プログラム204等から
なる。故障診断は、故障の発生したことを特定する故障
検出動作と故障の実際に発生した箇所の特定(解析)動
作とからなる。
<Program execution / fault monitoring / fault diagnosis>
The automatic generation of the ladder program and the user interface in the system of this embodiment have been described above.
In the process, I was able to understand what the block step motion block map and motion steps are. Third
FIG. 9, FIG. 40, and FIG. 41 show the respective program configurations of the simulation subsystem 105 and the failure diagnosis / recovery subsystem 106. These subsystems 10
5, 106 are automatic programming subsystems 104
Similarly, each has a CRT interface program for interfacing with the multi-window system 121. In other words, the CRT 58 is shared by the three subsystems 104, 105, 106. The figure also shows the program configuration of the subsystems 105 and 106. In particular, the failure diagnosis / recovery subsystem 106 includes a map control program 201, an operation monitoring program 202, a failure diagnosis analysis program 203, a recovery program 204, and the like. The failure diagnosis includes a failure detection operation for specifying that a failure has occurred and an operation for specifying (analyzing) the location where the failure actually occurred.

【0090】故障発生の検出 第40図,第41図を用いて、シーケンス制御及び監視
及び故障診断のためのプログラム構成について説明す
る。第40図,第41図において、ラダープログラム2
20は、個々の動作ステップにおける個々のアクチュエ
ータの具体的な動作を記述するものである。また、マッ
プ制御プログラム201は、動作ブロックマップ(第2
2図)及び動作ステップマップ(第23図)を参照しな
がらラダープログラム220が実行する設備の動作をモ
ニタする。このマップ制御プログラム201の詳細は第
53図に示さのる。また、動作監視プログラム202
は、マップ制御プログラム201とラダープログラム2
20間とのやり取りを監視しながら、故障の発生を検知
するものであり、その詳細は第54図に示される。さら
に、故障診断プログラム203は、監視プログラム20
2の通知により故障が発生したことを知られされると、
故障診断を行なうものである。この故障の発生したアク
チュエータ(即ち、動作ステップ)は、監視プログラム
202とマップ制御プログラム201とが記録している
後述のステップカウンタの内容を診断プログラム203
が調べることにより知れる。アクチュエータ内の具体的
なデバイス若しくは接点は、診断プログラム203が、
入出力マップ(I/Oマップ:第24図)のデータに基
づいて検出することができる。
Detection of Failure Occurrence A program configuration for sequence control, monitoring and failure diagnosis will be described with reference to FIGS. 40 and 41. 40 and 41, the ladder program 2
20 describes a specific operation of each actuator in each operation step. Further, the map control program 201 uses the operation block map (second
2) and the operation step map (FIG. 23), the operation of the equipment executed by the ladder program 220 is monitored. Details of this map control program 201 are shown in FIG. Also, the operation monitoring program 202
Is the map control program 201 and the ladder program 2
The occurrence of a failure is detected while monitoring the exchange with the 20. The details are shown in FIG. Further, the failure diagnosis program 203 is the monitoring program 20.
When it is known from the notification of 2 that a failure has occurred,
It is used for fault diagnosis. For the actuator (that is, the operation step) in which the failure has occurred, the contents of a step counter, which will be described later, recorded by the monitoring program 202 and the map control program 201 are compared with the diagnostic program 203.
Can be known by investigating. The specific program or contact in the actuator is
It can be detected based on the data of the input / output map (I / O map: FIG. 24).

【0091】故障診断システムを理解するためには、動
作ブロック毎に設定された前述のSC−REG(CSと
略記する)等の理解が必要である。第42図は、ある動
作ブロックi(BL )に設けられた上記CSレジス
タと、タイムレジスタ(TSSi,TSei)と、ブロ
ックタイムレジスタTBを説明するものである。CS
レジスタCS は、ブロックiで最後に実行終了した
動作ステップの番号を格納する。また、ステップタイム
レジスタTSSiは、最後に実行された、あるいは現在
実行中の動作ステップが開始された時刻を格納する。T
eiは最後に実行が終了した動作ステップがその終了
した時刻が格納される。また、ブロックタイムレジスタ
TB は、当該ブロックが起動可能になるまではゼロ
である。起動可能になると、TB には起動可能にな
った時刻が格納される。
In order to understand the failure diagnosis system, it is necessary to understand the above-mentioned SC-REG (abbreviated as CS) set for each operation block. FIG. 42 illustrates the CS register, the time register (TS Si , TS ei ) and the block time register TB S provided in a certain operation block i (BL i ). CS
The register CS i stores the number of the operation step last executed in block i. Further, the step time register TS Si stores the time when the last executed operation step or the currently executed operation step is started. T
S ei stores the time at which the operation step that was last executed was completed. The block time register TB i is zero until the block can be activated. When the activation becomes possible, the time when the activation becomes possible is stored in TB i .

【0092】ステップタイムオーバ 第43図は、個々のブロックに夫々のCSレジスタが設
定されている様子を示している。ある動作ステップの実
行が終了した時点では、 TSxi=TSei−TSSi‥‥‥(1) がその動作ステップを実行するのに要した時間となる。
前述したように、カウンタCS は、ブロックiが最
後に実行終了した動作ステップの番号(実際には、その
動作ステップの次の動作ステップ番号を示す)を記憶す
るから、このCS の内容から、最後に終了した動作
ステップの実行に要した時間TSxiを計算することが
できる。本実施例の故障診断システムでは、このTS
xiと第23図の動作ステップマップに記憶されている
個々の動作ステップの実行に要する標準時間τSiとを
比較することにより、 TSxi−τsi>δ ‥‥‥(2) であれば、その動作ステップの実行に障害(『ステップ
タイムオーバ』)があったと判断する。ここでδ
定数である。
[0092]Step time over Figure 43 shows that each block has its own CS register.
It shows that it is set. The fruit of an action step
At the end of the line, TSxi= TSei-TSSi(1) is the time required to execute the operation step.
As described above, the counter CSi Block i is
The number of the operation step that ended after execution (actually,
(Indicates the operation step number next to the operation step)
Because this CS i From the contents of, the last finished operation
Time required to execute the step TSxiCan be calculated
it can. In the failure diagnosis system of this embodiment, this TS
xiAnd stored in the operation step map of FIG.
Standard time τ required to execute each operation stepSiAnd
By comparing, TSxi−τsi> Δ0 If it is (2), there is an obstacle in the execution of that operation step (“Step
It is judged that there was "time over"). Where δ0 Is
It is a constant.

【0093】ステップハングアップ また、本故障診断システムでは、定期的に実行が終了し
ていない動作ステップをスキャンし、現在までの経過時
間T −TSSiが、 T −TSSi>δ ‥‥‥(3) であれば、当該動作ステップはループ若しくはハングア
ップしていると判断する。ここで、T は現在の時刻
であり、また、δ は定数である。δ は、通常、
その生産ラインの動作ステップの実行に要する時間のな
かで最大のものにある許容幅をもたせたものである。か
かる故障が『ステップハングアップ』である。
Step hang-up Further , in this failure diagnosis system, the operation step which has not been executed is periodically scanned, and the elapsed time T P -TS Si up to the present time is T P -TS Si > δ 1. If (3), it is determined that the operation step is in a loop or hung up. Here, T P is the current time, and δ 1 is a constant. δ 1 is usually
It has a maximum allowable width in the time required to execute the operation steps of the production line. Such a failure is "step hangup".

【0094】ブロックハングアップ 第43図,第44図乃至第48図を用いて『ブロックハ
ングアップ』について説明する。第43図若しくは第5
図に示すように、互いに並行動作を行なう複数のブロッ
クが存在する。かかる複数のブロックをグループと考え
ると、ある1つのグループ(第43図の例では、BL1
が1つのグループを形成する)の全ステップ動作が終了
して、そのグループに続く他のグループ(第43図の例
では、BL2,BL3,BL4からなるGR1)が実行
されるまでの時間経過を監視する必要がある。前述のブ
ロックタイムレジスタTB は、上記ブロックグルー
プが起動されるまでの経過時間である。各グループにつ
いて、測定動作時間を基準時間と比較しつつモニタする
ことにより、各グループ毎の異常、換言すれば、ブロッ
クから別のブロック間に遷移する過程で発生した故障を
診断することができるようになっている。このような故
障が『ブロックハングアップ』である。本実施例システ
ムにおいては、ブロックハングアップが発生した場合
は、更に、その原因となった動作ステップを特定するこ
とまでを行なう。
Block hang-up "Block hang-up" will be described with reference to FIGS. 43 and 44 to 48. Fig. 43 or 5
As shown, there are multiple blocks that operate in parallel with each other. Considering such a plurality of blocks as a group, a certain group (in the example of FIG. 43, BL1
Form a group) and the time elapses until the other groups (GR1 consisting of BL2, BL3, BL4 in the example of FIG. 43) following that group are executed. Need to be monitored. The block time register TB i described above is the elapsed time until the block group is activated. By monitoring the measurement operation time of each group while comparing it with the reference time, it is possible to diagnose an abnormality of each group, in other words, a failure that occurs in the process of transitioning from one block to another block. It has become. Such a failure is a “block hangup”. In the system of this embodiment, when a block hang-up occurs, the operation step that caused the hang-up is further specified.

【0095】『ブロックハングアップ』の原因となった
動作ステップを特定する手法について、第44図乃至第
48図を用いて説明する。これらの図は、『ブロックハ
ングアップ』の説明を容易にするために、4つの動作ブ
ロックからなるある生産ラインの動作ブロックマップを
簡略化したものである。第44図の生産ラインは、簡単
に4つの動作ブロックから構成される。これらの動作ブ
ロックに対する動作ブロックマップは、簡略化して第4
5図のように示される。
A method of identifying the operation step that causes the "block hang-up" will be described with reference to FIGS. 44 to 48. These drawings are simplified operation block maps of a certain production line consisting of four operation blocks in order to facilitate the description of the “block hang-up”. The production line in FIG. 44 is simply composed of four operation blocks. The motion block map for these motion blocks is simplified to the fourth
It is shown as in FIG.

【0096】第45図では、ブロック1からブロック2
が起動されるまでに要する時間をΓ 12、ブロック1か
らブロック3が起動されるまでに要する時間をΓ13
と表わされている。これらの遷移時間Γは前もって設定
可能だからである。例えば、ブロック4は、並行したブ
ロック2,3の終了により起動される。第43図に関連
して説明したように、ブロックタイムレジスタTB
は、当該ブロックが起動可能になるまではゼロである。
そして、起動可能になると、その時刻が格納される。従
って、レジスタTB の値がゼロでなく、現在までの
経過時間が上記Γよりも十分に大きいときは、ブロック
ハングアップが起こっているものと判断できる。従っ
て、ブロック2,3の終了から、時間Γ24,Γ34
経過してもブロック4が起動されない場合は、ブロック
ハングアップとして故障認識される。
In FIG. 45, block 1 to block 2
Γ is the time required to start 12, Block 1
The time it takes to activate block 3 fromThirteenetc
Is represented. These transition times Γ are preset
Because it is possible. For example, block 4 is
It is activated by the end of locks 2 and 3. Related to Figure 43
As described above, the block time register TBi 
Is zero until the block can be activated.
Then, when the activation becomes possible, the time is stored. Servant
So, register TBi The value of is not zero
If the elapsed time is sufficiently larger than Γ above, block
You can determine that a hangup is occurring. Obey
Then, from the end of blocks 2 and 3, time Γ24, Γ34But
If block 4 is not activated after the elapse, block
Failure is recognized as a hang-up.

【0097】ブロック4が起動されないためにブロック
ハングアップが検出されたときは、その原因となった動
作ステップはブロック2,3のいずれかにある筈であ
る。第46図は動作ブロック2の動作ステップマップ
を、第47図はブロック3の動作ステップマップを示
す。第46図によれば、ブロック2には4つの動作ステ
ップが設定され、各々のステップにおける出力は、Y
,Y ,…Y であり、それらの出力アクチュエ
ータの確認スイツチはX ,X ,…X であ
る。また、第47図によれば、ブロック3には3つの動
作ステップが設定され、各々のステップにおける出力
は、Y ,Y ,Y であり、それらの出力アク
チュエータの確認スイツチはX ,X ,X
ある。上記確認スイツチX 乃至X の状態は、ブ
ロック2,3を終了する時点では、ブロック毎にユニー
クであり、且つ、事前に知り得るものである。第48図
の起動条件マップは、第44図の例に示された4つの動
作ブロックの夫々が起動されるための条件、即ち、動作
確認スイツチの状態論理を示すものである。図中、ブロ
ック4について言えば、ブロック2では出力Y 乃至
がオンされて、確認スイツチX 乃至X
でがオンされている。また、ブロック3では出力Y
至Y がオンされて、確認スイツチX 乃至X
までがオンされている。従って、ブロック4が正常に起
動されるときは、 X *X * … *X でなくてはならない。ブロック2,3はブロック1の終
了によって起動される。従って、ブロック2,ブロック
3の起動条件はブロック1の全動作ステップの確認スイ
ツチの状態の論理積となる。尚、第48図において、
〈N〉は、確認スイツチが出力Yが“出”状態にあるこ
とを確認する状態にあることを意味し、〈I〉は、確認
スイツチが出力Yが“戻り”状態にあることを確認する
状態にあることを意味する。
When the block hangup is detected because the block 4 is not activated, the operation step causing the hangup must be in any one of the blocks 2 and 3. 46 shows an operation step map of the operation block 2, and FIG. 47 shows an operation step map of the block 3. According to FIG. 46, four operating steps are set in the block 2, and the output in each step is Y 1
, Y 2 , ... Y 4 and the confirmation switches of their output actuators are X 1 , X 2 , ... X 4 . Further, according to FIG. 47, three operation steps are set in the block 3, the outputs at the respective steps are Y 5 , Y 6 , and Y 7 , and the confirmation switches of those output actuators are X 5 , X 6 and X 7 . The states of the confirmation switches X 1 to X 7 are unique to each block and can be known in advance when the blocks 2 and 3 are finished. The activation condition map of FIG. 48 shows the conditions for activating each of the four operation blocks shown in the example of FIG. 44, that is, the state logic of the operation confirmation switch. Referring to the block 4 in the drawing, in the block 2, the outputs Y 1 to Y 4 are turned on, and the confirmation switches X 1 to X 4 are turned on. Further, in the block 3, the outputs Y 4 to Y 7 are turned on, and the confirmation switches X 4 to X 7 are turned on.
Is turned on. Therefore, when block 4 is started normally, it must be X 1 * X 2 * ... * X 7 . Blocks 2 and 3 are activated by the end of block 1. Therefore, the activation conditions of blocks 2 and 3 are the logical product of the states of the confirmation switches of all the operation steps of block 1. Incidentally, in FIG. 48,
<N> means that the confirmation switch is in a state of confirming that the output Y is in the "out" state, and <I>, the confirmation switch confirms that the output Y is in the "return" state. Means you are in a state.

【0098】このように、各動作ブロックの起動条件
に、そのブロックの前段のブロックの全動作ステップの
出力を確認するデバイスの状態を論理積として組み合せ
たものをプログラム化すれば、当該動作ブロックの起動
は、前段の動作ブロックの全動作ステップの正常な終了
を確認しない限り行なわれない。換言すれば、起動条件
が満足されなければ、前述のブロックハングアップが起
こって、故障と正しく検知されるのである。しかも、故
障が検知されたブロックが認識されれば、起動条件マッ
プと、実際の確認スイツチの状態とを比較すれば、どの
スイツチが異常であるか、そして、入出力マップ(第2
4図)と動作ステップマップ(第23図)とを参照する
ことにより、どの動作ステップのどの出力アクチュエー
タがおかしかったかを速やかに知ることができる。
As described above, if a combination of the activation condition of each operation block and the state of the device for confirming the output of all the operation steps of the preceding block of the block as a logical product is programmed, The activation is not performed unless it is confirmed that all the operation steps of the operation block in the previous stage are normally completed. In other words, if the starting condition is not satisfied, the block hang-up described above occurs and the failure is correctly detected. Moreover, if the block in which the failure is detected is recognized, the start condition map is compared with the state of the actual confirmation switch to determine which switch is abnormal, and the input / output map (second
By referring to FIG. 4) and the operation step map (FIG. 23), it is possible to quickly know which output actuator of which operation step was wrong.

【0099】生産ラインにおけるシーケンス制御には、
経験上、動作ステップのアクチュエータが、「出」状態
でもなく、「戻」状態でもない状態で停止したり、ある
いは、「出」状態と「戻」状態の両方を示したりする場
合がある。この原因の1つは、重量の重いアクチュエー
タがバウンドにより「出」状態でもなく、「戻」状態で
もない「中途半端」な状態に陥ってしまうからである。
そして、従来では、このような状態は、見掛け上は、シ
ーケンス制御は正常に進んでいくから、その不良確認ス
イツチの状態によって起動される(別の動作ブロック
の)筈の動作ステップが何時までも起動されないという
理由で故障と認識されるに至るものの、しかしながら、
その停止点は、実際に障害が発生した動作ステップとは
かけ離れた動作ステップである可能性が高い。
For sequence control in the production line,
Experience has shown that the actuator in the operating step may stop in neither the "out" state nor the "return" state, or may exhibit both "out" and "return" states. One of the causes for this is that the heavy actuator is bound to a "halfway" state in which the actuator is neither in the "out" state nor in the "return" state.
In the past, in such a state, apparently the sequence control proceeds normally, so that the operation step that should be started (in another operation block) should be started depending on the state of the defect confirmation switch. Although it is recognized as a failure because it is not started, however,
The stopping point is highly likely to be an operation step far from the operation step in which the failure actually occurred.

【0100】しかしながら、本実施例のブロックハング
アップ検知の手法によれば、前述したように、各動作ブ
ロックの起動条件に、第48図のような、前段ブロック
の全確認デバイスのあるべき論理状態の論理積を設定し
ているので、ある1つの動作ブロックの動作ステップで
上述の中途半端なスイツチ状態に陥って、その動作ステ
ップで故障と認識できなくても、その動作ブロックが終
了して、次に続く動作ブロックが起動される際に、ブロ
ックハングアップとして確認できる。即ち、故障のあっ
た動作ステップと故障認識が行なわれた動作ステップと
が時間的にも空間的に余り離れたものとはならず、故障
診断が正確になるばかりでなく、復旧もより速やかにな
るという効果がある。
However, according to the method of block hang-up detection of this embodiment, as described above, the activation condition of each operation block requires the logical state of all confirmation devices of the preceding block as shown in FIG. Since the logical product of is set, even if the operation block of one operation block falls into the above-mentioned halfway switch state and the failure cannot be recognized in the operation step, the operation block ends. This can be confirmed as a block hangup when the next operation block is activated. That is, the operation step in which the failure has occurred and the operation step in which the failure recognition has been performed are not spatially separated from each other in terms of time, and not only the failure diagnosis is accurate, but also the recovery is performed more quickly. There is an effect of becoming.

【0101】〈故障箇所の解析〉上述したように、ステ
ップタイムオーバ、ステップハングアップ、ブロックハ
ングアップ等により故障が検知されると、故障ステップ
の特定により、動作ステップマップ(第23図)から障
害のあるアクチュエータ(設備)が特定される。第23
図に示すように、1つの動作ステップは設備の1つのア
クチュエータに対応するからである。ここで、故障アク
チュエータから、このアクチュエータがどのような状態
で停止しているか、即ち、このアクチュエータの動作を
定義するLS(出と戻りの2つリミツトスイツチLS)
がどのような状態になっているかを知る必要がある。
<Analysis of Failure Location> As described above, when a failure is detected due to step time over, step hang up, block hang up, etc., the failure step is identified and the failure is identified from the operation step map (FIG. 23). An actuator (equipment) having 23rd
This is because, as shown in the figure, one operation step corresponds to one actuator of the equipment. Here, LS (two limit switches LS for output and return) that defines the state in which this actuator is stopped from the faulty actuator, that is, the operation of this actuator.
It is necessary to know what kind of state is in.

【0102】第24図の入出力マップ及び第23図の動
作ステップマップはこのLSの状態を知るのに使われ
る。第23図の動作ステップマップにおいては、アクチ
ュエータ識別番号欄が設けられている。この識別番号
は、それに対応するステップ(例えば、B
で使われるアクチュエータを識別する番号(例えば、A
)である。この識別番号は入出力マップの個々のア
イテムの番号である。第24図の入出力マップは、個々
のアクチュエータの動作タイプや接点名を示すだけでは
なく、出状態を示す接点と戻り状態を示す接点との関係
をも記述する。アクチュエータは往復動作を行なうか
ら、1つのアクチュエータには必ず、出状態と戻り状態
とがペアで存在する。第24図の入出力マップにおい
て、「対応関係」は、そのペア関係を記述している。例
えば、BFというアクチュエータ(このアクチュエータ
は番号A02で識別される)の対応関係の欄には“A0
3”と記されている。即ち、BFアクチュエータが出状
態にあるときを番号A02により特定し、この出状態に
対応する戻り状態は、番号A03にあるということを示
している。
The input / output map of FIG. 24 and the operation step map of FIG. 23 are used to know the state of this LS. In the operation step map of FIG. 23, an actuator identification number column is provided. This identification number corresponds to the corresponding step (eg B 0 S 0 )
A number that identifies the actuator used in the
0 1 ). This identification number is the number of each item in the input / output map. The input / output map of FIG. 24 not only indicates the operation type and contact name of each actuator, but also describes the relationship between the contact indicating the output state and the contact indicating the return state. Since the actuator reciprocates, one actuator always has a pair of the output state and the return state. In the input / output map of FIG. 24, “correspondence relationship” describes the pair relationship. For example, in the column of the correspondence of the actuator BF (this actuator is identified by the number A02), "A0
That is, it indicates that the BF actuator is in the output state by the number A 02 , and the return state corresponding to this output state is the number A 03 .

【0103】従って、故障診断システムは、故障ブロッ
ク番号と故障動作ステップ番号とを得たならば、動作ス
テップマップから故障したアクチュエータの識別番号を
知り、この番号から、この故障アクチュエータには、ど
のようなLSが設定されているかを知ることができる。
そして、どのLSが設けられているかを知ることができ
れば、そのLSの状態を読出して、例えば、表示するこ
と等により、操作者に故障状態を伝えることができる。
Therefore, when the fault diagnosis system obtains the fault block number and the fault operation step number, it knows the identification number of the faulty actuator from the action step map. It is possible to know which LS is set.
Then, if it is possible to know which LS is provided, the operator can be notified of the failure state by reading out the state of the LS and displaying it, for example.

【0104】第24図の入出力マップは、実際の動作シ
ーケンスを記述する動作ステップマップ(第23図)
や、ラダープログラム(例えば、第49図)とは独立し
ている。即ち、生産ラインが変更されて、動作ステップ
マップ(第23図)やラダープログラム(第49図)が
修正されても、入出力マップを修正する必要はない。即
ち、生産ラインの変更毎に故障診断プログラムを修正す
る労力から解放される。
The input / output map of FIG. 24 is an operation step map (FIG. 23) that describes the actual operation sequence.
Also, it is independent of the ladder program (for example, FIG. 49). That is, even if the production line is changed and the operation step map (Fig. 23) and the ladder program (Fig. 49) are changed, it is not necessary to correct the input / output map. In other words, the effort to modify the failure diagnosis program each time the production line is changed is released.

【0105】尚、上記標準実行時間τは、例えば、正常
作動時における所定回数のサイクルについての測定動作
時間の平均値{TSxi}(ここで、記号{ }は平均
を表わすものとする)と標準偏差値σとで規定される、
例えば、 τ={TSxi}+3σ ‥‥‥(4) と定義することが好ましい。より好ましくはサイクル毎
にデータτが更新される方がよい。何故なら、アクチュ
エータの動作特性は経年変化するからである。また、ブ
ロックハングアップの検出に用いる時間Γ(第22図の
動作ブロックマップを参照)についても、経年変化を考
慮して、実際に要した時間に基づいて更新することが望
ましい。
The standard execution time τ is, for example, the average value {TS xi } of the measured operation time for a predetermined number of cycles during normal operation (here, the symbol {} represents the average). Specified by the standard deviation value σ,
For example, it is preferable to define τ = {TS xi } + 3σ ... (4). More preferably, the data τ should be updated every cycle. This is because the operating characteristics of the actuator change over time. Further, it is desirable that the time Γ used for detecting the block hangup (see the operation block map in FIG. 22) is also updated based on the actually required time in consideration of the secular change.

【0106】〈故障箇所の解析方法の改良〉ある動作ス
テツプや動作ブロックで、ステップタイムオーバ,ステ
ップタイムアウトやブロックタイムアウトが検出された
場合に、実際に故障が発生した箇所を特定する必要があ
る。ある設備のアクチュエータが故障しても、システム
はそのアクチュエータの確認スイツチの状態を読み出し
たときにのみ故障を認知し得る。換言すれば、上述の動
作ステツプについての、ステップタイムオーバ,ステッ
プタイムアウトが検出されるのは、故障したアクチュエ
ータの確認スイツチの出力を用いているラダーステップ
でタイムアウトやタイムオーバが検出されたときのみで
ある。本システムのラダープログラムの生成方法は、生
産ラインにおける動作を複数の動作ブロックに、個々の
動作ブロックにおける動作を更に複数の動作ステツプの
動作に分割し、個々の動作ステツプの動作における各ア
クチュエータの動作を実I/Oマップから引出してラダ
ープログラムを完成していた。上述の故障箇所の検出方
法によれば、個々の動作ステツプ段階で故障を検出でき
るのであるが、1つの動作ステツプが多くのラダープロ
グラム要素からなる場合(実際には、動作ステツプの動
作が1つや2つのラダープログラム要素からできあがっ
ていることは少ない)には、どのラダープログラム要素
で故障が発生したかを解析することは困難である。本出
願人の従来のシステムでは、故障箇所を解析するとき
は、多数の故障と思われる候補の信号から実際の故障箇
所の解析を行なうのに、人間が関与せざるを得ず、その
ために、故障箇所の解析は時間のかかるものであった。
<Improvement of Failure Area Analysis Method> When a step time over, a step time out, or a block time out is detected in a certain operation step or operation block, it is necessary to specify the location where the failure actually occurred. If an actuator of an installation fails, the system can only recognize the failure by reading the status of the confirmation switch of that actuator. In other words, the step time-out and step time-out for the above operation step are detected only when the time-out or time-out is detected in the ladder step using the output of the confirmation switch of the defective actuator. is there. The ladder program generation method of this system divides the operation in the production line into a plurality of operation blocks, and further divides the operation in each operation block into the operation of a plurality of operation steps, and the operation of each actuator in the operation of each operation step. Was drawn from the actual I / O map to complete the ladder program. According to the above-described method for detecting a failure point, a failure can be detected at each operation step stage. However, when one operation step consists of many ladder program elements (actually, one operation step is It is rare to be composed of two ladder program elements), and it is difficult to analyze which ladder program element has a failure. In the conventional system of the present applicant, when analyzing a failure point, human beings must be involved in analyzing the actual failure point from a large number of candidate signals that are considered to be failures, and therefore, Analysis of the failure location was time consuming.

【0107】更に、工程を動作ブロックと動作ステツプ
に分解して記述する手法では、動作ステツプの並列動作
は原則として行なわれないが、プログラムの改良過程
で、複数の動作ステツプを並列して処理ことも行なわれ
得る。このようなラダープログラム要素が1つの動作ス
テツプ内で並列して実行される場合にも、前述の手法で
故障を動作ステツプで検出しても、故障原因のデバイス
(リミツトスイツチ)を特定することはできない。
Further, in the method in which a process is divided into motion blocks and motion steps and described, in principle, parallel motion of motion steps is not performed. Can also be done. Even when such ladder program elements are executed in parallel in one operation step, even if a failure is detected in the operation step by the above-mentioned method, the device (limit switch) causing the failure cannot be specified. .

【0108】そこで、本実施例の故障診断システム10
6は、故障原因の探索(候補の絞り込み)にバイナリ・
ツリー・サーチ(二分木探索)法を採用する。そして、
本実施例の二分木探索法は次のような特徴を有する。即
ち、今回の故障を探索し終えたときに、次回の探索を効
率化するために、今回の探索結果に重み付けを行ない、
次回の探索はその重みに応じて探索ルートを選択するの
である。
Therefore, the failure diagnosis system 10 of the present embodiment.
6 is a binary for searching the cause of failure
The tree search method is adopted. And
The binary tree search method of this embodiment has the following features. That is, when the search for the failure of this time is completed, the search result of this time is weighted in order to improve the efficiency of the next search,
In the next search, the search route is selected according to the weight.

【0109】バイナリ・ツリー・サーチ法の概略 バイナリツリーサーチを説明するために、第49図に、
1つの動作ブロック内にS からS までの4つの
動作ステツプからなる生産工程プログラムの例を示す。
第49図中、表記Yはアクチュエータに対する出力信号
を示し、Mはその出力の確認信号を示すものとする。ア
クチュエータY の動作確認を示す信号は第49図の
例ではM となる。更に、Xはその動作ステツプの起
動を規制する各種スイツチの信号を意味する。
Outline of the Binary Tree Search Method In order to explain the binary tree search, FIG.
An example of a production process program including four operation steps S 1 to S 4 in one operation block is shown.
In FIG. 49, the notation Y indicates an output signal to the actuator, and M indicates a confirmation signal of the output. The signal indicating the operation confirmation of the actuator Y 0 is M 0 in the example of FIG. 49. Further, X means a signal of various switches that regulates the activation of the operation step.

【0110】ところで動作ブロック単位で故障検出を行
なう場合、換言すれば、ブロックハングアップのみを検
出するようにした場合に、第49図のS が動作ブロ
ックの最終動作ステツプであるならば、例えば、第49
図のプログラムで、スイツチX が故障した場合で
も、Y が出力されないために、確認スイツチM
故障と検知される。即ち、スイツチX が故障である
ことを解析するためには、スイツチM が正常ではな
いと分っても更に上流にさかのぼって故障解析を行なわ
ねばならない。一方、X のようなスイツチ信号はラ
ダープログラムで生成された信号ではなく、外部から入
力された信号であるから、X が故障と解析されれ
ば、それ以上さかのぼる必要はない。このように見掛け
上の故障部位と、真の故障部位とを故障解析において切
り分けるために、本システムでは、『内部信号』と『外
部信号』という概念を導入する。ここで、ラダープログ
ラム内部で生成された信号そのもの、または、ラダープ
ログラムでオンされるアクチュエータ(例えば第49図
のY )の動作確認信号(例えば、M )は『内部
信号』である。そして、ラダープログラム外から入力さ
れる信号は『外部信号』である。
By the way, when failure detection is performed in units of operation blocks, in other words, when only block hangup is detected, if S 4 in FIG. 49 is the final operation step of the operation block, for example, , 49th
In the program shown in the figure, even if the switch X 8 fails, Y 2 is not output, so it is detected that the confirmation switch M 2 has failed. That is, in order to analyze the switch X 8 is failure, must perform failure analysis further back upstream even found to switch M 2 is not normal. On the other hand, the switch signal such as X 8 is not a signal generated by the ladder program but a signal input from the outside, and therefore, if X 8 is analyzed as a failure, there is no need to go back any further. In this way, in order to distinguish the apparent failure part and the true failure part in the failure analysis, the concept of "internal signal" and "external signal" is introduced in this system. Here, the signal itself generated inside the ladder program or the operation confirmation signal (for example, M 0 ) of the actuator (for example, Y 0 in FIG. 49) turned on by the ladder program is an “internal signal”. The signal input from outside the ladder program is an "external signal".

【0111】第51図は、第49図のラダープログラム
を二分木(バイナリ・ツリー)で表現した図である。第
51図中、より左側に位置したある信号(例えば、M
)は、これにシリーズに接続している右側に位置した
信号(例えば、X ,M)とAND(積)で結ばれ
ている。また、分岐点がある場合に、その分岐点はOR
(和)関係を示し、例えばM (アクチュエータY
の確認スイツチ信号)は(X *M *…)と
(X *X )の両者と積(AND)を作る。第5
1図で、X ,X 〜X13は全て『外部信号』で
あり、M ,M 〜M は『内部信号』である。
FIG. 51 is a diagram in which the ladder program of FIG. 49 is represented by a binary tree. In FIG. 51, a signal located on the left side (for example, M 2
) Is ANDed with the signal located on the right side (for example, X 7 , M 1 ) connected to this in series. If there is a branch point, the branch point is ORed.
(Sum) relationship, for example M 2 (actuator Y 2
Confirmation switch signal) of (X 7 * M 1 * ...) and (X 9 * X 8 ) are both producted (AND). Fifth
In FIG. 1, X 1 , X 2 to X 13 are all “external signals”, and M 0 , M 1 to M 3 are “internal signals”.

【0112】本システムでは、上記3つの故障(ステッ
プハングアップ,ステップタイムアウト,ブロックハン
グアップ)のいずれかが検出されると、その時点の全て
の確認スイツチ及びインターロツク条件を形成する信号
の状態(動作状態ファイル111)を記録するようにし
ている。そして、例えば第49図のラダープログラムの
動作ステツプS で例えばステップタイムアウトが検
出された場合は、故障診断プログラムは、第49図のラ
ダープログラムから第51図の如き二分木チャートを作
成し、そのチャートに示されたルートに沿って各確認ス
イツチの出力信号やインターロツク条件を構成する信号
をチェックしていく。この探索の過程にたいして二分木
探索の手法が使われる。
In the present system, when any of the above three faults (step hangup, step timeout, block hangup) is detected, the state of all confirmation switches and signal states forming interlock conditions at that time ( The operation status file 111) is recorded. Then, for example, when the operation step S 4, for example, step-out of the ladder program 49 Figure is detected, the failure diagnosis program creates a binary tree chart, such as the 51 view from the ladder program of the 49 figure, the The output signal of each confirmation switch and the signals forming the interlock condition are checked along the route shown in the chart. A binary tree search method is used for this search process.

【0113】二分木チャートを作成することは簡単であ
る。前述したように、本システムにより生成されたラダ
ープログラムは、全て登録された信号名により特定され
る。従って、そのラダープログラムがコンパイルされた
時点で、そのプログラム中で使われている全ての信号の
各々がどの動作ステツプで使われているかを示す第50
図のような所謂「クロスリファレンスリスト」が作成さ
れる。このリストは、第50図に示すように、信号名の
アイウエオ順(または、アルファベット順)に並べられ
ている。このリストの各要素は、参照される信号名と、
その信号が前記の『内部信号』であるか『外部信号』で
あるかの種別と、その信号が出力される動作ステツプ番
号(『動作ステツプ(出力)』)と、その信号が確認信
号として使われる動作ステツプ番号(『動作ステツプ
(入力)』)とからなる。勿論、参照信号が複数の動作
ステツプで参照されれば、リスト中には複数の『動作ス
テツプ(入力)』フィールドが設定される。
Creating a binary tree chart is straightforward. As described above, the ladder programs generated by this system are all specified by the registered signal name. Therefore, when the ladder program is compiled, it is indicated in which operation step each of all the signals used in the program are used.
A so-called "cross reference list" as shown in the figure is created. As shown in FIG. 50, this list is arranged in the order of signal names (in alphabetical order). Each element in this list consists of the referenced signal name and
The type of whether the signal is the above-mentioned "internal signal" or "external signal", the operation step number ("operation step (output)") at which the signal is output, and that signal are used as confirmation signals. The operation step number (“operation step (input)”) to be displayed. Of course, if the reference signal is referred to by a plurality of operation steps, a plurality of "operation steps (input)" fields are set in the list.

【0114】故障が検出され、故障が検出された動作ス
テツプから派生する二分木ツリーを作成するためには、
故障の検出された動作ステツプ番号が分ればよい。そし
て、その動作ステツプのアクチュエータの出力信号を動
作ステツプマップ(第23図)から知り、この出力信号
がアクテイブになるための条件を動作ステツプマップか
ら調べ、この条件中に現われる全ての動作確認信号及び
インターロツク条件中の信号を前記クロスリファレンス
リスト中に探索する。このようにして、次々に、現われ
る信号をクロスリファレンスリスト中に探し、その信号
を出力する動作ステツプを探索していけば、二分木ツリ
ーが作成される。
In order to create a binary tree that has a fault detected and is derived from the fault detected motion step:
It suffices to know the operation step number in which the failure is detected. Then, the output signal of the actuator of the operation step is known from the operation step map (FIG. 23), the condition for this output signal to become active is examined from the operation step map, and all the operation confirmation signals appearing in this condition and Search for signals in the interlock condition in the cross-reference list. In this way, a binary tree is created by successively searching for a signal that appears in the cross reference list and searching for an operation step that outputs that signal.

【0115】二分木探索法の理論そのものは、情報処理
の分野では周知である。探索方法の概略は、第51図の
二分木ツリーの下流から上流に向かって、そのルートに
現われた信号を動作状態ファイル111に探し、探し出
した信号の値を読み出す。その読み出された信号が条件
を満たしていれば、更に上流の信号をツリーに沿って探
していく。ツリー若しくは動作ステツプマップが当該信
号が“1”(あるいは、“0”)であるべきことを示し
ているときに、読み出された信号が“0”(または
“1”)であるときに、条件を満たしていないと判断さ
れる。上流に向かって探索する過程で、分岐点に至れば
(例えば、第51図でX13の上流)、常に例えば右側
の枝に分岐するというルールを設定しておく。1つの枝
の終端に至れば、元のルートを戻って先の分岐点(X
13)に戻り、先にたどらなかった他の分岐(X10
上流)をたどっていく。
The theory of the binary tree search method itself is well known in the field of information processing. The outline of the search method is to search the signal appearing at the root of the binary tree in FIG. 51 from the downstream side to the upstream side in the operating state file 111 and read the value of the found signal. If the read signal satisfies the condition, a further upstream signal is searched for along the tree. When the read signal is "0" (or "1"), when the tree or operation step map indicates that the signal should be "1" (or "0"), It is judged that the conditions are not met. In the process of searching upstream, a rule is set such that when a branch point is reached (eg, upstream of X 13 in FIG. 51), the branch always branches to the right branch, for example. When the end of one branch is reached, the original route is returned and the branch point (X
Return to 13 ) and follow another branch (upstream of X 10 ) that was not followed previously.

【0116】かくして、第51図のツリーをたどってい
けば、いつかは実際の故障原因となった確認スイツチに
到達する。かかる二分木探索の手法は、故障がブロック
ハングアップとして検出されたときに特に有効である。
何故なら、本実施例システムでは、ある設備のアクチュ
エータが故障しても、そのアクチュエータの確認信号を
使用する動作ステツプにおいて、ステップタイムアウト
若しくはステップタイムオーバとして検出されるからで
ある。ところが、ブロックハングアップの場合は、ハン
グアップが検出されたこと自体が、故障がどのブロック
のどの動作ステツプで発生したかを特定しないからであ
る。従って、ブロックハングアップが発生した場合に
は、第48図に関連して説明したブロック起動条件マッ
プから二分木ツリーを作成してサーチを行なえばよい。
Thus, if the tree shown in FIG. 51 is traced, the confirmation switch, which is the cause of the actual failure, will eventually be reached. Such a binary tree search method is particularly effective when a failure is detected as a block hangup.
This is because, in the system of this embodiment, even if the actuator of a certain equipment fails, it is detected as step time-out or step time-over in the operation step using the confirmation signal of the actuator. However, in the case of block hang-up, the fact that the hang-up is detected does not specify the fault in which operation step of which block. Therefore, when a block hang-up occurs, a search may be performed by creating a binary tree from the block activation condition map described with reference to FIG.

【0117】しかし、この二分木探索法は全てのノード
(信号がツリー上で形成するノード)を探索するために
時間がかかる。それは、 :探索が分岐点に至った場合に、どちらの分岐を選択
してよいか分らない。従来では、分岐点でどちらの分岐
を選ぶかは、前述したように右か左の分岐を画一的に選
択するか、あるいはオペレータがどちらかの分岐を選択
指示していたために、効率の悪いものであった。 :内部信号(例えば、M )が故障でないというこ
とを示す場合は、その内部信号を生成した元の信号 X /*(X *X +X *X ) を探索する必要はないのに、単なる二分木探索では、全
ての信号をチェックしている。そこで、本実施例では、 :の問題を解消するために、過去探索されたルート
のうち、実際に故障デバイスが見付かったルートに、故
障デバイスがみつかった毎に“1”の累積的に重み値
(次回の探索時の優先準位)を与えるようにしている。
ある1つのルートで4回故障デバイスが見付かれば、そ
のルートには値“4”が与えられる。値が大きなルート
は故障が過去多く発生したデバイスが存在するルートで
あるから、次回に故障が発生したときは、重み値が大き
なルートに沿って故障デバイスを探索すれば故障デバイ
スの見付かる確率は高まる。 :の問題を解消するために、信号をチェックする毎
に、それが内部信号か外部信号かをチェックして、探索
の遡行を継続するか否かを判断している。
However, this binary tree search method takes time to search all nodes (nodes formed by signals on the tree). It is: When the search reaches a branch point, it does not know which branch to select. Conventionally, which branch to select at the branch point is inefficient because the right or left branch is uniformly selected as described above, or the operator has instructed to select either branch. It was a thing. : It is not necessary to search for the original signal X 5 / * (X 1 * X 2 + X 3 * X 4 ) that generated the internal signal if it indicates that the internal signal (for example, M O ) is not a failure. However, in a simple binary tree search, all signals are checked. Therefore, in the present embodiment, in order to solve the problem of :, among the routes searched in the past, a cumulative weight value of "1" is added every time a faulty device is found in the route in which the faulty device is actually found. (Priority level for the next search) is given.
If a faulty device is found four times in a route, the route is given the value "4". A route with a large value is a route in which there are devices with many failures in the past, so when the next failure occurs, searching for a failed device along the route with a large weight value increases the probability of finding a failed device. . In order to solve the problem of :, every time a signal is checked, it is checked whether it is an internal signal or an external signal, and it is determined whether or not to continue the search backward.

【0118】第D図は、第51図の二分木ツリーのラダ
ープログラムにおいて、過去に故障が、デバイスX
で4回、X で2回発見されたと場合に、各ルートに
どのような重み付けがなされるかを示したものである。
同図から明らかなように、 X13→X10→M →分岐点 には重み“6”が与えられ、 分岐点→X →X には重み“4”が与えられ、 分岐点→X →M →X →M →X/→分
岐点→X には重み“2”が与えられ、 分岐点→X11→X12 には重み“0”が与えられ、 分岐点→X →X には重み“0”が与えられる。このような重みが与えら
れた状態で、次に故障が起こったときには、分岐点で
は、重み値の大きな方の分岐を選び、具体的には、 X13→X10→M →X →X の順で探索が行なわれる。換言すれば、過去故障の起こ
ったところは再度発生する確率が高いので、その箇所を
優先的に解析の対象とすることで故障箇所の発見を効率
的にする。尚、上記の、内部信号か外部信号かの判断
に係る制御は第57図,第58図に関連して後に詳細に
説明する。
[0118] The D diagram in the ladder program of a binary tree tree 51 Figure, is a fault in the past, the device X 8
In 4 times, if that is found twice in X 3, in which what weighting showed either made to the route.
As is clear from the figure, a weight “6” is given to the branch point X 13 → X 10 → M 2 → the branch point, a weight “4” is given to the branch point → X 9 → X 8 , and a branch point → X 7 → M 1 → X 6 → M 0 → X 5 / → Branch point → X 3 is given weight “2”, Branch point → X 11 → X 12 is weighted “0”, branch A weight “0” is given to the point → X 2 → X 1 . When such a weight is given and the next failure occurs, the branch having the larger weight value is selected at the branch point, and specifically, X 13 → X 10 → M 2 → X 9 → The search is performed in the order of X 8 . In other words, there is a high probability that a place where a past failure has occurred will occur again. Therefore, by prioritizing that part for analysis, the failure part can be found efficiently. Incidentally, the control relating to the judgment of the internal signal or the external signal will be described in detail later with reference to FIGS. 57 and 58.

【0119】故障監視の制御手順 次に、第53図乃至第56図に従って本実施例システム
における、ラダープログラムの実行/故障監視の制御動
作を説明する。第53図は、動作ブロックマップ,動作
ステップマップに従って、当該生産ラインの各アクチュ
エータをラダープログラム220の動作を監視するマッ
プ制御プログラム201の制御手順である。このプログ
ラムが起動されるとステップS82で、初期化を行な
い、起動可能な最初のブロックグループを検出する。こ
のグループには1つのブロックを含む場合もあれば複数
のブロックを含む場合もある。
Control Procedure of Fault Monitoring Next, the control operation of the execution / fault monitoring of the ladder program in the system of this embodiment will be described with reference to FIGS. 53 to 56. FIG. 53 is a control procedure of a map control program 201 for monitoring the operation of the ladder program 220 for each actuator of the production line according to the operation block map and the operation step map. When this program is activated, initialization is performed in step S82 to detect the first block group that can be activated. This group may include one block or multiple blocks.

【0120】ステップS84では、新たに起動可能とさ
れたブロックの存在を調べる。このステップS84の目
的は、主に、ある1つの動作ブロックの全ステップ動作
が終了して、この動作ブロックに続く実行可能な動作ブ
ロックが存在するかを調べるものである。このようなブ
ロックが存在すれば(ステップS82から起動された場
合は、実行可能な動作ブロックは存在する筈である)、
ステップS86では、そのブロック番号を検出する。か
かるブロック番号をiとし、この番号は、当然、複数の
番号を含み得るものである。グループで実行可能な場合
があるからである。
In step S84, the existence of a newly activated block is checked. The purpose of this step S84 is mainly to check whether or not all the step operations of a certain operation block are completed and there is an executable operation block following this operation block. If such a block exists (if it is started from step S82, there must be an executable operation block),
In step S86, the block number is detected. The block number is i, and this number can naturally include a plurality of numbers. This is because there are cases in which it can be executed in groups.

【0121】ステップS88では、そのような動作ブロ
ックの動作ステップマップを読み込み、ステップS90
でその動作ブロックを実行中とマークする。ステップS
92では、実行可能な動作ステップがあるかを調べる。
動作ステップが実行可能となるのは、CSレジスタに示
されている動作ステップの動作が終了しているときであ
り、監視プログラム202のステップS136(第54
図)で行なわれる。実行可能な動作ステップが当該動作
ブロックにあれば、ステップS110で、当該動作ブロ
ックiのタイマレジスタTSSiに現在時刻を開始時刻
として書込む。ステップS110の動作を実行可能な動
作ステップがある限り行なう。実際には、グループ内に
複数の動作ブロックが存在すれば、その動作ブロックの
各々で1つの動作ステップが実行されることになろう。
実行可能な動作ステップが全て起動されると、いずれか
の動作ステップの動作が終了するまでは、ステップS9
2の判断はNOとなって、ステップS94に進み、いず
れかの動作ステップの実行終了を待つ。
At step S88, the operation step map of such an operation block is read, and step S90
Mark the action block as running. Step S
At 92, it is checked if there are any action steps that can be performed.
The operation step becomes executable when the operation of the operation step shown in the CS register is completed, and step S136 (54th operation) of the monitoring program 202 is executed.
Fig.). If there is an executable operation step in the operation block, the current time is written as the start time in the timer register TS Si of the operation block i in step S110. The operation of step S110 is performed as long as there is an executable operation step. In practice, if there are multiple motion blocks in a group, each motion block will perform one motion step.
When all the executable operation steps are activated, until the operation of any of the operation steps is completed, step S9
The determination of 2 is NO, the process proceeds to step S94 to wait for the end of execution of any operation step.

【0122】いずれかの動作ステップの実行が終了した
と終了信号がラダープログラム側からシーケンス制御プ
ログラムに伝えられたら、ステップS94からステップ
S96に進む。ここで、終了した動作ブロック番号iと
動作ステップ番号を読む。このiにより終了した動作ス
テップを含む動作ブロックが特定できる。ステップS9
8では、終了時刻を当該動作ブロックiのタイマレジス
タTSeiに書込み、ステップS99で、当該動作ステ
ツプが終了した時刻、その動作ステツプに関連する確認
スイツチの状態を動作状態ファイル111に書き込む。
終了した動作ステツプの状態を書き込むのは、第20
図,第21図に関連して説明したように、後に一連の動
作ステツプの動作を時間を追って復元するためである。
ステップS100では、次に実行すべき動作ステップを
示すためにCSレジスタを1つインクリメントする。こ
のような動作を行なっていけば、アクチュエータ動作を
終了した動作ステップから順に、対応するブロックのC
Sレジスタが更新されると共にTSeiも更新されてい
く。
When the end signal is transmitted from the ladder program side to the sequence control program when the execution of any operation step is completed, the process proceeds from step S94 to step S96. Here, the completed operation block number i and operation step number are read. The operation block including the operation step completed by this i can be specified. Step S9
In step 8, the end time is written in the timer register TS ei of the operation block i, and in step S99, the time when the operation step ends and the state of the confirmation switch associated with the operation step are written in the operation state file 111.
It is the 20th time to write the status of the completed operation step.
This is because, as described with reference to FIGS. 21 and 21, the operation of a series of operation steps is later restored with time.
In step S100, the CS register is incremented by 1 to indicate the next operation step to be executed. If such an operation is performed, the C of the corresponding block is sequentially processed from the operation step in which the actuator operation is completed.
As the S register is updated, TS ei is also updated.

【0123】一方、監視プログラム202は、第54図
のステップS120において、ラダープログラム220
からのステップ終了信号を監視している。いずれかのラ
ダー要素でアクチュエータ動作終了があったときは、ス
テップS122に進み、ラダープログラム側から知らさ
れた当該ブロック番号i、ステップ番号を読取る。そし
て、ステップS124で、このブロック番号iからその
ブロックのタイマ値TSSiとTSei並びに、動作ス
テップマップから当該動作ステップの実行予測時間τを
読取り、(1)式に従って経過時間TSxiを演算す
る。そしてステップS46で、実行に要した時間TS
xiが異常に長かったかを判断する。
On the other hand, the monitoring program 202 executes the ladder program 220 in step S120 of FIG.
Is monitoring the step end signal from. When the actuator operation is completed in any ladder element, the process proceeds to step S122, and the block number i and the step number notified from the ladder program side are read. Then, in step S124, the timer values TS Si and TS ei of the block are read from the block number i, and the predicted execution time τ of the operation step is read from the operation step map, and the elapsed time TS xi is calculated according to the equation (1). . Then, in step S46, the time required for execution TS
Determine if xi was abnormally long.

【0124】ステップS126の判断がOKであれば、
ステップS134に進んで、当該動作ブロックのタイマ
レジスタの内容をクリアし、ステップS136では、現
在レジスタCS に示されている動作ステップを実行
可能とマークする。このCS で示される動作ステッ
プは、ステップS100で更新したように、終了した次
の動作ステップである。ある動作ブロックの動作ステッ
プが実行可能とマークされると、シーケンス制御プログ
ラムの第53図のステップS92でYESと判断されて
次の動作ステップの実行が行なわれていく。
If the determination in step S126 is OK,
In step S134, the timer of the operation block
The contents of the register are cleared.
Current register CSi Perform the operation steps shown in
Mark as possible. This CS i Operation step indicated by
Is the next one after the end, as updated in step S100.
Is the operation step. The motion step of a motion block
Sequence control program is marked as executable.
If YES is determined in step S92 of FIG.
The next operation step is executed.

【0125】このように次々と動作ステップが実行され
ると、ある動作ブロックについて、ステップS102に
おいて、CSレジスタの内容が最終ステップ番号を超え
るとき、即ち、その動作ブロックの全処理を終了したと
なるときがくる。このときはステップS104で、当該
ブロックを終了とマークする。そして、ステップS10
5で、全ての設備の確認スイツチの状態を、動作状態フ
ァイル111に当該動作ブロックの終了時刻と共に書き
込む。この全ての設備の確認スイツチの状態データは、
後述するように、シュミレーションを行なう時に利用さ
れる。
When the operation steps are successively executed in this way, when the content of the CS register exceeds the final step number in step S102 for a certain operation block, that is, all the processing of the operation block is completed. The time will come. At this time, in step S104, the block is marked as finished. Then, step S10
In step 5, the states of the confirmation switches of all the equipment are written in the operation state file 111 together with the end time of the operation block. Check switch status data for all of these equipment
As will be described later, it is used when performing a simulation.

【0126】ステップS106では、現在のブロックの
次に起動されるべきブロックのためのタイマTBij
現在時刻を書込む。ここで、TBijは、ブロックiが
終了して、このブロックiの次に起動されるべきブロッ
クjが存在することを明示するためのタイマであり、第
45図のΓ12等に対応する。尚、タイムレジスタTB
は次に起動されるべき動作ブロックの最初の動作ステッ
プが起動されれば、ステップS108でクリアされる。
In step S106, the current time is written in the timer TB ij for the block to be activated next to the current block. Here, TB ij is a timer for clearly indicating that there is a block j to be activated next to this block i after completion of the block i, and corresponds to Γ 12 and the like in FIG. 45. The time register TB
Is cleared in step S108 if the first operation step of the operation block to be activated next is activated.

【0127】ステップS106からステップS84に戻
り、新たに実行可能な動作ブロックを探す。例えば、第
5図の例で、B13の処理が終了してステップS84に
戻ったときに、まだブロックB17の処理が終了してい
なければ、ブロックB13は実行可能とマークされな
い。次に、第54図のステップS126に戻って、ステ
ップタイムオーバ故障の発見の手順について説明する。
The process returns from step S106 to step S84 to search for a newly executable operation block. For example, in the example of FIG. 5, when the process of B13 ends and the process returns to step S84, if the process of block B17 has not finished yet, the block B13 is not marked as executable. Next, returning to step S126 in FIG. 54, the procedure for finding a step time over failure will be described.

【0128】ステップS126で、TSxi−τ>δ
と判断されたときは、当該動作ステップの実行にかか
った時間が異常に長かったのであるから、ステップS1
28で、その動作ステップの属する動作ブロックを故障
とマークし、ステップS130で、予想時間τの更新を
行なう。この更新処理は第56図にその処理手順の詳細
が示されている。即ち、動作ステップの処理に実際に要
した時間Txiと予想時間τとの差が小さくて、即ち、 Txi−τ/τ<ε (ここで、ε《1) であって、要した時間Txiがτよりも若干長かった場
合には、それは設備の経年変化によるものと判断して、
ステップS192において、過去のTxiと今回のT
xiとから、次回のためのτを計算して更新する。この
ような更新により経年変化をも考慮した正確な故障検知
が可能となる。
At step S126, TS xi -τ> δ 0
If it is determined that the time taken to execute the operation step is abnormally long, step S1
In step 28, the operation block to which the operation step belongs is marked as a failure, and in step S130, the expected time τ is updated. This update process is shown in detail in FIG. 56. That is, a small difference between the expected time tau and actually required time T xi to the processing operation step, i.e., T xi -τ / τ <ε ( here, epsilon "1) A, the time required If T xi is slightly longer than τ, we judge that it is due to aging of equipment,
In step S192, the past T xi and this T
Calculate τ for the next time from xi and update. Such an update enables accurate failure detection in consideration of secular changes.

【0129】第54図の制御手順において、ステップS
132で診断プログラム(第55図)を起動してから、
ステップS120に戻る。ステップS120に戻るの
は、他の動作ブロックの動作ステップにおいても故障を
検出するためである。また、故障検出を行なってシーケ
ンス制御プログラムの実行を停止しないのは、1つの動
作ブロックを停止しても、並行動作すべき動作ブロック
があるので、その動作ブロックの動作を停止してはなら
ないからである。他の動作ブロックを停止しなくてもよ
いのは、そもそも、動作ブロックが他の動作ブロックと
独立して動作することを条件に定義されたものだからで
ある。
In the control procedure of FIG. 54, step S
After starting the diagnostic program (Fig. 55) at 132,
It returns to step S120. The reason for returning to step S120 is to detect a failure also in an operation step of another operation block. Further, the reason why the failure detection is not performed and the execution of the sequence control program is not stopped is that even if one operation block is stopped, there is an operation block to be operated in parallel, so the operation of the operation block must not be stopped. Is. The reason that the other operation blocks do not have to be stopped is that the operation blocks are originally defined on the condition that they operate independently of the other operation blocks.

【0130】ステップS138以下は、ブロックハング
アップ若しくはステップハングアップを検出する手順で
ある。ある動作ステップでラダープログラムがハングア
ップした場合の対処を説明する。かかる場合は終了信号
は発生されない。従って、ステップS120からステッ
プS138に進む。ステップS138では一定時間の経
過を見る。これは、前回ステップS138に来てから現
在時点(時刻T )までの経過時間が一定の値を超え
たかを見るものであり、換言すれば、ブロックハングア
ップ若しくはステップハングアップの有無ははこの一定
時間毎にチェックされるということである。ステップS
140では、実行中とマークされている動作ステップを
サーチする。これは、実行中とマークされている動作ブ
ロックの各CSレジスタの内容が特定の動作ステップを
指し、且つ、TSSiに開始時間が書込まれていなが
ら、TSeiが未だ更新されていないものである。ステ
ップS142では、現在までの経過時間T −TS
Siを計算し、ステップS144では、(3)式に従っ
て、 T −TSSi>δ ‥‥‥(3) を判断する。判断がYESであれば、ステップS64に
進み当該ブロックをステップハングアップ故障とマーク
する。
Steps S138 and thereafter are procedures for detecting block hangup or step hangup. The following is a description of what to do when the ladder program hangs up at a certain operation step. In such a case, the end signal is not generated. Therefore, the process proceeds from step S120 to step S138. In step S138, the progress of a fixed time is checked. This is to see whether the elapsed time from the previous step S138 to the current time (time T P ) has exceeded a certain value. In other words, whether or not the block hangup or the step hangup is It means that it is checked at regular intervals. Step S
At 140, the operating steps marked as running are searched. This is because the content of each CS register of the operation block marked as executing points to a specific operation step, and the start time is written in TS Si , but TS ei has not been updated yet. is there. In step S142, the elapsed time to the present T P −TS
Si is calculated, and in step S144, T P −TS Si > δ 1 ... (3) is determined according to the equation (3). If the determination is YES, the process proceeds to step S64 and the block is marked as a step hangup failure.

【0131】ステップS140で、実行中の動作ステッ
プがないと判断された場合について説明する。この場合
は、ステップS150では、ブロックタイムレジスタT
の値がゼロでないブロックjをサーチする。ステ
ップS106に関連して前述したように、TBijがゼ
ロでないものは、ブロックiが終了してもそれに続くブ
ロックjが未だ起動されていないことを示す。ステップ
S152では、そのようなブロックにおける動作ステッ
プが未起動のままの経過時間と前記予想時間Γ ijとの
差、 (T −TBij)−Γij を計算する。そして、その差が定数δ よりも大きい
ならば、ステップS156でブロックハングアップと判
断する。ステップS158では、故障診断プログラム
(第55図)を起動する。
At step S140, the operation step being executed is executed.
The case where it is determined that there is no group will be described. in this case
Is the block time register T in step S150.
Bi jSearch for block j whose value of is not zero. Ste
As described above in connection with step S106, TBijGaze
If it is not b, the block following the block i
Indicates that lock j has not been activated yet. Step
In S152, the operation step in such a block is
Time that has not been started and the estimated time Γ ijWith
Difference, (TP -TBij) −Γij To calculate. Then, the difference is a constant δTwo Greater than
If so, it is determined that the block hangs up in step S156.
Refuse. In step S158, the failure diagnosis program
(Fig. 55) is started.

【0132】第55図に従って、故障診断プログラム2
03について説明する。この故障診断プログラムは、故
障がブロックハングアップであるか、あるいは、ステッ
プタイムオーバ,ステップハングアップであるかによ
り、処理を若干異にする。ステップタイムオーバ,ステ
ップハングアップが検出されれば、故障動作ステップが
直接的に知ることができるのに対し、ブロックハングア
ップの場合は、故障動作ステップを遡って追跡する必要
があるからである。
According to FIG. 55, the fault diagnosis program 2
03 will be described. This failure diagnosis program makes the processing slightly different depending on whether the failure is block hangup, step time over, or step hangup. This is because if a step time over or a step hang up is detected, the failure operation step can be known directly, whereas in the case of a block hang up, the failure operation step needs to be traced back.

【0133】ステップタイムオーバ,ステップハングア
ップ故障の場合は、ステップS162において、故障と
マークされたブロックをサーチする。このマークはステ
ップS128しくはステップS148でなされたもので
ある。ステップS164では、検出されたブロックのC
Sレジスタの内容を読み、故障が検出された動作ステッ
プを特定する。ステップS166では、動作ステップマ
ップから故障したアクチュエータの識別番号を知る。ス
テップS168では、この識別番号から入出力マップ
(第24図)をサーチし、ステップS170で、この識
別番号を有するアクチュエータの出と戻りのLSの番号
を知る。ステップS170では、これら知り得た、故障
の起こった動作ブロック番号,動作ステップ番号,アク
チュエータ番号,LS番号を表示して、操作者に対処を
うながす。
In the case of step time over or step hang up failure, the block marked as failure is searched in step S162. This mark is made in step S128 or step S148. In step S164, C of the detected block
The contents of the S register are read and the operation step where the failure is detected is specified. In step S166, the identification number of the failed actuator is known from the operation step map. In step S168, the input / output map (FIG. 24) is searched from this identification number, and in step S170, the output and return LS numbers of the actuator having this identification number are known. In step S170, the operation block number, the operation step number, the actuator number, and the LS number in which the failure has been found are displayed to prompt the operator to take action.

【0134】ステップS160でブロックハングアップ
が検出された場合について説明する。この場合は、ステ
ップS174で、ブロックハングアップが検出されたブ
ロック番号に対応する起動条件マップ(第48図)を読
み込む。ステップS176では、マップに書かれている
確認スイツチの論理状態と、それらの確認スイツチの実
際状態とを比較して不一致の確認スイツチを探す。この
不一致スイツチデバイスの特定がなされれば、次に、ス
テップS178で、ハングアップが検出されたブロック
の親ブロックをブロックマップ(第22図)からサーチ
する。ステップS180では、検出された親ブロックの
動作ステップマップ(第23図)から、上記不一致スイ
ツチを使用している動作ステップを特定、これからステ
ップS182で、この動作ステップのアクチュエータ番
号やL/S番号を特定してステップS184に進む。ス
テップS184では、これらを表示する。以上のように
してサーチされた故障箇所が、デイスプレイ装置8のモ
ニタ画面上で所定の色で強調表示される。そして、作業
者による故障箇所の復旧作業が行なわれる。
A case where block hangup is detected in step S160 will be described. In this case, in step S174, the activation condition map (FIG. 48) corresponding to the block number in which the block hangup is detected is read. In step S176, the logical states of the confirmation switches written on the map and the actual states of the confirmation switches are compared to search for a nonconforming confirmation switch. If the mismatched switch device is specified, then in step S178, the parent block of the block in which the hangup is detected is searched from the block map (FIG. 22). In step S180, the operation step using the non-matching switch is specified from the operation step map (FIG. 23) of the detected parent block, and in step S182, the actuator number and L / S number of this operation step are specified. After specifying, the process proceeds to step S184. In step S184, these are displayed. The failure location searched as described above is highlighted in a predetermined color on the monitor screen of the display device 8. Then, the operator performs the work of recovering the faulty part.

【0135】以上説明した『ステップタイムオーバ』や
『ステップハングアップ』の検出は、基本的には、ステ
ップラダープログラム203とは独立したプログラムに
より行なわれている。このことは次のような効果を奏す
る。即ち、ステップラダープログラムには、上記故障検
出するための所謂、「トラツプ回路」を設ける必要がな
くなるということである。第46図において、M
は、インターロツク条件ILCが満足されたことによる
出力であり、M が出力されると、アクチュエータ出
力Yが出力される。従来では、第46図に示すように、
スイツチM が閉じたら起動されるタイマ回路Tを設
け、このタイマがタイムアウトする前に、出力Yを確認
するスイツチXLSが開かなければ故障(ALMオン)
とするものであった。しかし、本実施例によれば、この
ようなタイマ回路は不要になり、第45図のように、本
来の生産シーケンス制御に必要なステップラダープログ
ラムのみを作成すればよいことになる。
The detection of "step time over" and "step hang up" described above is basically performed by a program independent of the step ladder program 203. This has the following effects. That is, the step ladder program does not need to be provided with a so-called "trap circuit" for detecting the failure. In FIG. 46, M Y
Is an output due to Intarotsuku condition ILC is satisfied, when M Y is output, actuator output Y is output. Conventionally, as shown in FIG.
A timer circuit T is provided which is started when the switch M Y is closed, and the switch X LS that confirms the output Y is not opened before the timer times out. Failure (ALM on)
Was to be. However, according to the present embodiment, such a timer circuit becomes unnecessary, and only the step ladder program necessary for the original production sequence control needs to be created as shown in FIG.

【0136】故障解析のための制御手順 以上が故障診断(故障発生の検出、故障箇所の簡易な診
断)のための制御手順である。次に、故障解析の制御手
順について第58図,第59図,第60図に基づいて説
明する。第58図のプログラムは、第25図のCRT5
8の所定の起動アイコン(例えば、『故障解析アイコ
ン』)を指定することにより起動される。ステップS2
00では、故障診断システム106からフェールした動
作ステツプB の番号を教えてもらう。ステッ
プS202では、B から始まる第51図に示
された如き二分木ツリーを第50図のクロスリファレン
ステーブルに基づいて作成する。動作ステツプB
が複数の出力ラダー要素を有すれば、個々の出力に
対して第51図の二分木ツリーを作成する。本実施例で
は、ツリーの個々の信号は、ノード番号Nで特定され
る。ステップS204ではノード番号Nを保持するカウ
ンタNを“0”に初期化する。第51図の例では、N=
0のノードはX13である。ステップS206では、カ
ウンタNが指定する信号のデータを動作状態ファイル1
11から読み出す。そして、ステップS208でこのデ
ータが正しいかを調べる。
Control Procedure for Failure Analysis The above is the control procedure for failure diagnosis (detection of failure occurrence, simple diagnosis of failure location). Next, the control procedure of the failure analysis will be described with reference to FIGS. 58, 59 and 60. The program shown in FIG. 58 is the CRT5 shown in FIG.
It is activated by designating a predetermined activation icon 8 (for example, "fault analysis icon"). Step S2
At 00, the failure diagnosis system 106 is informed of the failed operation step B x S Y number. In step S202, a binary tree tree as shown in FIG. 51 starting from B x S Y is created based on the cross reference table in FIG. Operation step B x S
If Y has multiple output ladder elements, the binary tree tree of FIG. 51 is created for each output. In this embodiment, each signal of the tree is identified by the node number N. In step S204, the counter N holding the node number N is initialized to "0". In the example of FIG. 51, N =
The node of 0 is X 13 . In step S206, the data of the signal designated by the counter N is set to the operation state file 1
Read from 11. Then, in step S208, it is checked whether this data is correct.

【0137】先ず、故障が『外部信号』X13において
発生した場合を例にして説明する。前述したようにフェ
ール原因が外部信号である場合には、そのノードよりも
更に上流にさかのぼる必要はない。即ち、制御はステッ
プS208→ステップS226→ステップS234に進
み、ステップS234で、当該ノードの番号若しくは信
号をレジスタFDNに格納する。ここで、FDNはフェ
ールと判定された信号名若しくはノード番号を記憶する
レジスタである。ステップS236では、フェールと判
定されたノードまでのルートに“1”ずつ重みを追加す
る。
[0137] First, will be described as an example when a failure occurs in the "external signal" X 13. As described above, if the cause of the failure is an external signal, it is not necessary to trace upstream from the node. That is, the control proceeds from step S208 to step S226 to step S234, and in step S234, the number or signal of the node is stored in the register FDN. Here, the FDN is a register that stores a signal name or a node number that has been determined to have failed. In step S236, a weight is added by "1" to the route to the node determined as fail.

【0138】次に、フェールが外部信号X11で発生し
た場合を説明する。かかる場合は、N=0(信号
13)のデータは正しいので、ステップS208→ス
テップS210に進む。ステップS210では、当該信
号が外部信号か内部信号かを判断する。第51図の例で
はN=0の信号は外部信号なのでステップS240に進
んで、次のノードが存在するかを調べる。第51図の例
では次のノードはX10又はX11のいずれかである。
ステップS242では探索されていない分岐ルートが存
在するかを調べる。第51図の例では、探索されていな
い分岐ルートはX10に向かうルートとX11に向かう
ルートの2つである。そこで、ステップS242からス
テップS244に進んで、探索されていない分岐ルート
のうちの最大重みを有するルートを選択する。探索され
ていない分岐ルートが1つしか内場合はステップS24
4ではそのルートが選択される。また、探索されていな
い分岐ルートが2つ以上あって、それらが全て同じ値
(“0”も含む)の重みを有する場合は、最右側のルー
トが便宜上選択される。ステップS245では分岐ノー
ドポインタスタックBNPに、この分岐点に戻ってきた
場合に次回に探索されるべき分岐ルートを対比する。そ
してステップS246でその選択されたルート上の現在
のノードに最近の1つのノード(即ち、X11)が指定
される。そして、ステップS206に戻って、そのノー
ド(即ち、X11)に対応する信号データを状態ファイ
ル111から読み出す。X11の信号は正しくないの
で、制御はステップS208からステップS226に進
む。X11はX13と同様に外部信号ノードなので、ス
テップS226→ステップS234→ステップS236
と進んで、X11が故障と記録すると共に、X13→X
11に至るルートに重み“1”を追加する。
Next, the case where a failure occurs with the external signal X 11 will be described. In such a case, since the data of N = 0 (signal X 13 ) is correct, the process proceeds from step S208 to step S210. In step S210, it is determined whether the signal is an external signal or an internal signal. In the example of FIG. 51, the signal of N = 0 is an external signal, so the flow advances to step S240 to check whether the next node exists. In the example of FIG. 51, the next node is either X 10 or X 11 .
In step S242, it is checked whether there is a branch route that has not been searched. In the example of FIG. 51, there are two branch routes that have not been searched for, a route to X 10 and a route to X 11 . Therefore, the process proceeds from step S242 to step S244, and the route having the maximum weight is selected from the branch routes not searched. If there is only one branch route that has not been searched, step S24
In 4, the route is selected. When there are two or more branch routes that have not been searched and they all have the same weight (including "0"), the rightmost route is selected for convenience. In step S245, the branch node pointer stack BNP is compared with the branch route to be searched next time when returning to this branch point. Then, in step S246, the latest one node (ie, X 11 ) is designated as the current node on the selected route. Then, returning to step S206, the signal data corresponding to the node (that is, X 11 ) is read from the state file 111. Since the signal of X 11 is incorrect, the control advances from step S208 to step S226. Since X 11 is an external signal node similarly to X 13 , step S226 → step S234 → step S236.
Then, X 11 records as a failure and X 13 → X
A weight “1” is added to the route reaching 11 .

【0139】次に、アクチュエータY の確認スイツ
チ信号M がフェールしている場合を例にして説明す
る。この場合は、ノードX13,X11,X10,X
12は正常である。ノードX13,X11のチェックを
終了した時点では、分岐ノードポインタスタックBNP
には、X10のルートが次に探索されるべきことが記憶
されている。次にX12のチェックをステップS208
で行なうところから説明を始める。制御はステップS2
08→ステップS210→ステップS240→ステップ
S242に進む。X12の後には分岐点もノードも存在
しないから制御はステップS248からステップS25
0に進む。ステップS250のフラグFは前の探索でい
ずれかの内部信号にフェールが発見されたことを示すも
のである。前述したように、確認信号Mのような内部信
号はそれがフェールであることを示しているとしても、
その上流の信号がフェールしているためにフェールを示
しているに過ぎない場合がある。フラグFは、以前の探
索で内部信号にフェールしているものがあったことを記
憶し、そのフェールしていることを示す内部信号のノー
ド番号は第60図に示す故障ノードポインタスタックF
NPに格納される。今の場合は、F=0であるから、ス
テップS250からステップS256に進む。ステップ
S254では、ステップS245で退避しておいたリタ
ーン分岐点をスタックBNPから取り出す。ステップS
256では、スタックBNPにリターンポイント(ステ
ップS245で退避したX10のルート)が退避されて
いることを確認してから、ステップS258で次のノー
ドX10を指定し、ステップS206に戻る。外部信号
10は正常であるから、X10に対しては、制御はス
テップS208→ステップS210→ステップS240
→ステップS242→ステップS248→ステップS2
69に進み内部信号であるノードM を指定する。
[0139] Next, the confirmation switch signal M 2 actuator Y 2 will be described as an example a case in which fail. In this case, the nodes X 13 , X 11 , X 10 , X
12 is normal. When the check of the nodes X 13 and X 11 is completed, the branch node pointer stack BNP
Stores that the route of X 10 should be searched next. Next, check X 12 in step S208.
Let's start the explanation from where we do. Control is step S2
08 → step S210 → step S240 → step S242. Since there is no branch point or node after X 12 , control is performed from step S248 to step S25.
Go to 0. The flag F in step S250 indicates that a failure has been found in any of the internal signals in the previous search. As mentioned above, even if an internal signal such as the confirmation signal M indicates that it is a failure,
It may only indicate a failure because the upstream signal is failing. The flag F stores that the internal signal failed in the previous search, and the node number of the internal signal indicating the failure is the fault node pointer stack F shown in FIG.
Stored in NP. In this case, since F = 0, the process proceeds from step S250 to step S256. In step S254, the return branch point saved in step S245 is taken out from the stack BNP. Step S
In 256, after confirming that the return point (route of X 10 saved in step S245) is saved in the stack BNP, the next node X 10 is designated in step S258, and the process returns to step S206. Since the external signal X 10 is normal, the control for X 10 is step S208 → step S210 → step S240.
→ step S242 → step S248 → step S2
In step 69, the node M 2 which is an internal signal is designated.

【0140】フェールしているノードM について
は、制御は、ステップS206→ステップS208→ス
テップS226と進む。M は内部信号であるので、
更にステップS226→ステップS228→ステップS
230と進んで、前述のフラグFをセットする。そし
て、ステップS232で現在のノードカウント値Nをフ
ェールノードポインタスタックFNPに退避する。
For the failing node M 2 , control proceeds in the order of step S206 → step S208 → step S226. Since M 2 is an internal signal,
Furthermore, step S226 → step S228 → step S
Proceeding to 230, the aforementioned flag F is set. Then, in step S232, the current node count value N is saved in the fail node pointer stack FNP.

【0141】ところで、ステップS228でフラグFが
セットされている場合も、ステップS232でスタック
FNPにノードカウントNを退避している。これは、例
えばノードX がフェールしているときには、ノード
,M もフェールというデータを状態ファイル
111に含んでいるので、X に至るまでに内部信号
が2つあったことを示す必要があるからである。
By the way, even if the flag F is set in step S228, the node count N is saved in the stack FNP in step S232. This means that, for example, when the node X 6 is failing, since the nodes M 1 and M 0 also include the data of failing in the state file 111, there are two internal signals before reaching X 6. It is necessary.

【0142】ステップS232からステップS240に
進んで、次のノードを探す。第51図の例では、M
の次には分岐点が存在する。そこで、制御はステップS
240→ステップS242→ステップS244→ステッ
プS245→ステップS246と進んで、次のノードX
を指定する。このノードには正常な外部信号X
ある。このノードX については、制御はステップス
テップS246→ステップS206→ステップS208
→ステップS210→ステップS240→ステップS2
42→ステップS248→ステップS269と進んで、
新たにノードMを指定する。
The process proceeds from step S232 to step S240 to search for the next node. In the example of FIG. 51, M 2
There is a branch point next to. Therefore, the control is step S
240 → step S242 → step S244 → step S245 → step S246, and the next node X
Specify 7 . There is a normal external signal X 7 at this node. For this node X 7 , control is performed in steps S246 → S206 → S208.
→ step S210 → step S240 → step S2
42 → step S248 → step S269,
The node M 1 is newly designated.

【0143】ノードM については、制御は、ステッ
プS206→ステップS208→ステップS210→ス
テップS212と進んで、フラグFをチェックする。フ
ラグFは、フェールしたノードM を調べる過程でス
テップS228でセットされている。従って、制御はス
テップS212→ステップS222と進み、フェールノ
ードポインタスタックの最新のポインタが示すノード番
号をフェールしたノードとする。前述したように、この
ポインタにはステップS232でノードMがセットさ
れている。ステップS224では、ノードM に至る
ルートに対して重み値を更新する。
For the node M 2 , the control proceeds to step S206 → step S208 → step S210 → step S212 to check the flag F. Flag F is set at step S228 in the process of examining the node M 2 which fail. Therefore, control proceeds from step S212 to step S222, and the node number indicated by the latest pointer of the fail node pointer stack is set as the failed node. As described above, the node M 2 is set to this pointer in step S232. In step S224, the weight value is updated for the route to the node M 2 .

【0144】このように、内部信号がフェールしている
ことを示す場合は、そのフェールがその内部信号自体の
フェールによるフェールであるのか、それともその内部
信号の上流の信号によるフェールか直ちには分らないの
で、フラグFとスタックFNPにフェールしたノードの
存在を仮に退避しておく。そして、次に現われた内部信
号がフェールを示していないということは、その上流に
はフェールしたノードが無いことを示しているから、ス
タックFNPに退避されている内部信号ノードが実際に
フェールしているノードであることになる。換言すれ
ば、信号に内部信号と外部信号という区別を付けること
により、不必要なノード探索が省略できる。
As described above, when an internal signal indicates a failure, it is not immediately known whether the failure is a failure due to a failure of the internal signal itself or a failure due to a signal upstream of the internal signal. Therefore, the existence of the failed node in the flag F and the stack FNP is temporarily saved. The fact that the internal signal that appears next does not indicate a failure indicates that there is no failed node upstream thereof, so the internal signal node saved in the stack FNP has actually failed. It is a node that has In other words, the unnecessary node search can be omitted by distinguishing the signal from the internal signal and the external signal.

【0145】次に、ステップS214以下の手順につい
て、第62図の例を参考にして説明する。第62図で外
部信号ノードX31がフェールしているとする。また、
内部信号M20は第62図に示しているように、多くの
外部信号の積から生成されているので、通常の二分木サ
ーチ法では、M20の他に、X41〜X100 という
多くのノードを調べなければ、フェールノードX31
チェックには入れない。第58図のステップS214以
下の手順はこの非効率を解消するものである。
Next, the procedure after step S214 will be described with reference to the example of FIG. In FIG. 62, it is assumed that the external signal node X 31 has failed. Also,
Since the internal signal M 20 is generated from the product of many external signals as shown in FIG. 62, in the usual binary tree search method, in addition to M 20 , many of X 41 to X 100 . Without checking the node, the fail node X 31 cannot be checked. The procedure following step S214 in FIG. 58 eliminates this inefficiency.

【0146】ノードX20のチェックを終了してノード
40を探す過程で、スタックBNPにはステップS2
45でリターン分岐点が退避され、ステップS246で
が指定される。X40のチェック過程のステップ
S269で内部信号ノードM 20が指定される。このM
20のデータは正常であるから、制御はステップS20
6→ステップS208→ステップS210→ステップS
212→ステップS214と進む。ステップS214で
は、上記リターン分岐点(X20とM30の間の分岐
点)がスタックBNPから取り出され、ステップS21
6でM30に向かう分岐ルートがあることを確認してか
ら、ステップS218でそのルートを指定する。そし
て、ステップS240→ステップS242→ステップS
248→ステップS269→ステップS206でノード
30のデータを取り出す。M30は内部信号であるの
で、外部信号X31がフェールしている場合は、M30
もフェールしていることを示しているので、制御はステ
ップS206からステップS208→ステップS226
に進む。ノードM30の次にノードX31がフェールし
ていることを発見するために、スタックFNPが使用さ
れることの制御手順は前に行なっているので省略する。
Node X20Node after checking
X40In the process of searching for, step S2
The return branch point is saved at 45, and at step S246
XFour 0Is specified. X40Check process steps
At S269, the internal signal node M 20Is specified. This M
20Is normal, the control is step S20.
6-> step S208-> step S210-> step S
The process proceeds from 212 to step S214. In step S214
Is the return branch point (X20And MThirtyBranch between
Point) is taken out from the stack BNP, and step S21
6 in MThirtyMake sure there is a branching route to
Then, the route is designated in step S218. That
Step S240 → Step S242 → Step S
248 → step S269 → node in step S206
MThirtyTake out the data of. MThirtyIs an internal signal
And the external signal X31Is failing, MThirty
Is also failing, so control is
Step S206 to Step S208 → Step S226
Proceed to. Node MThirtyThen node X31Has failed
Stack FNP is used to discover that
Since the control procedure for this is performed before, the description is omitted.

【0147】第62図の例のように、分岐点に複数の分
岐ルート(X40のルートとM30のルート)があり、
その一部のルート(X40ルート)内に内部信号ノード
(M 20)があり、その内部信号ノードが多くの信号
(X41〜X100 )から形成されており、ところが
フェールは他の分岐ルート(M30のルート)にある場
合は、ステップS214以下の制御手順により、内部信
号M20の正常を確認した(この確認で充分である)時
点で、このルートの探索をそれ以上は行なわないで、本
来のフェールノードの存在するルート上の探索を開始す
る。このように、本実施例の探索手法は効率的なものと
なっている。
As shown in the example of FIG. 62, there are a plurality of branch points.
Ki route (X40Root and MThirtyRoute),
Part of the route (X40Internal signal node in route)
(M 20), And its internal signal node has many signals
(X41~ X100 ), Where
Fail is another branch route (MThirtyRoute)
If this is the case, follow the control procedure from step S214
Issue M20When the normality of is confirmed (this confirmation is sufficient)
At this point, the book should not be searched any further for this route.
Start a search on the route where the next fail node exists.
It Thus, the search method of this embodiment is efficient.
Is becoming

【0148】〈故障復旧〉以上が、本実施例システムに
用意された故障検出/故障診断/故障解析の手法であ
る。次に、このように検出された故障からシステムを再
起動可能状態(通常は、故障が発見された動作ステツプ
を含む動作ブロックの先頭)に復旧して再起動する手法
について説明する。本実施例システムの復旧方法の特徴
は、再起動可能状態への復帰に、マニュアルモードと自
動モードが用意されていることである。マニュアルモー
ドとは、オペレータが上記可能状態に復帰するように自
分の判断で順に手動スイツチをCRT58からセットし
ていくものである。このマニュアルモードでは、上記状
態に復帰すると、それまでに行なった手動スイツチのセ
ットシーケンスをファイル(第40図の210)に登録
しておく。このファイルは過去に起こった故障の復帰過
程を、故障の発生箇所毎に記録しているもので、後に故
障発生箇所をキーにして検索可能になっている。
<Fault Recovery> The above is the fault detection / fault diagnosis / fault analysis method prepared for the system of this embodiment. Next, a method of recovering the system from a failure detected in this way to a restartable state (usually the head of an operation block including an operation step in which a failure is found) and restarting the system will be described. A feature of the recovery method of the system of this embodiment is that a manual mode and an automatic mode are prepared for returning to the restartable state. The manual mode is for the operator to sequentially set the manual switches from the CRT 58 so that the operator can return to the above-mentioned possible state. In this manual mode, when the above state is restored, the set sequence of the manual switch performed up to that point is registered in the file (210 in FIG. 40). This file records the recovery process of failures that occurred in the past for each failure occurrence point, and can be searched later using the failure occurrence point as a key.

【0149】自動復帰モードでは、その故障の発生箇所
に対応する過去記憶された復帰手順をファイル210か
ら呼び出して、その復帰シーケンスをシュミレートして
再起動可能状態に復帰する。同じ故障に対する復帰手順
は大体同じものである。従って、このような復帰手順を
記憶し、自動モードにおいて、そのシーケンスをシュミ
レートすれば、復帰操作が敏速に行なえるのみならず、
その手順が統一化され、例えば、初心者でも簡単に復帰
作業を実行することができる。
In the automatic recovery mode, the previously stored recovery procedure corresponding to the location of the failure is called from the file 210, and the recovery sequence is simulated to recover the restartable state. The recovery procedure for the same failure is roughly the same. Therefore, if such a return procedure is stored and the sequence is simulated in the automatic mode, not only the return operation can be performed promptly,
The procedure is unified, and for example, even a beginner can easily perform the restoration work.

【0150】以下、第63図乃至第70図を参照しなが
ら、本実施例の復旧方法を説明する。第63図は、復旧
方法の説明のために例示されたある設備(ワーク把持設
備)におけるワーク把持動作を説明する。この設備で
は、ワークWを3つのシリンダが把持する。把持順序
は、シリンダY →シリンダY →シリンダY
である。これらのシリンダYは、第64図に示すよう
に、出状態と戻り状態が2つのスイツチにより確認され
る。第65図は、第63図の設備に対応する実I/Oマ
ップの例である。このI/Oマップでは、各シリンダに
対して夫々、出動作と戻り動作が定義されている。それ
らのシリンダがアクテイベートされるためには、『出
力』フィールドに記されている番号のメモリに“1”が
書き込まれることが必要である。夫々のシリンダの動作
は、対応する『確認A』『確認B』フィールドの番地の
内容をチェックすることにより確認できる。これら3つ
のシリンダの全部で6つの動作は全て、マニュアルでシ
ュミレートできる。第65図には、マニュアルでシュミ
レートするために“1”をセットすべきメモリ番地が
『手動』フィールドに設定されている。第66図及び第
67図は、夫々、3つのシリンダをシリンダY →シ
リンダY →シリンダY の順序で駆動してワーク
Wを把持し、所定の加工動作を行なってから、シリンダ
→シリンダY→シリンダY の順で把持を解
除するという動作を示すところの、動作ステツプマッ
プ,ラダープログラムである。第67図のラダープログ
ラムをみても分るように、各シリンダは、独立して手動
で出状態に、あるいは戻り状態にセットすることができ
る。ラダープログラムで、MAスイツチは自動実行モー
ドにおいてシステムが閉じる自動モードスイツチであ
り、MSは手動実行モードにおいてシステムが閉じる手
動実行モードスイツチである。
The recovery method of this embodiment will be described below with reference to FIGS. 63 to 70. FIG. 63 illustrates a work gripping operation in certain equipment (work gripping equipment) illustrated for the purpose of explaining the recovery method. In this equipment, the work W is held by three cylinders. The gripping order is cylinder Y 0 → cylinder Y 1 → cylinder Y 2
Is. As shown in FIG. 64, these cylinders Y are confirmed to be in the output state and the return state by two switches. FIG. 65 is an example of an actual I / O map corresponding to the equipment of FIG. 63. In this I / O map, an output operation and a return operation are defined for each cylinder. In order for those cylinders to be activated, it is necessary to write "1" to the memory of the number written in the "output" field. The operation of each cylinder can be confirmed by checking the contents of the corresponding addresses in the "confirmation A" and "confirmation B" fields. All six movements of all three of these cylinders can be manually simulated. In FIG. 65, a memory address to which “1” is set for manual simulation is set in the “manual” field. 66 and 67, three cylinders are respectively driven in the order of cylinder Y 0 → cylinder Y 1 → cylinder Y 2 to grip the work W and perform a predetermined machining operation, and then the cylinder Y 2 The operation step map and the ladder program show the operation of releasing the grip in the order of → cylinder Y 1 → cylinder Y 0 . As can be seen from the ladder program shown in FIG. 67, each cylinder can be independently set to the output state or the return state manually. In the ladder program, the MA switch is an automatic mode switch that the system closes in the automatic execution mode, and the MS is a manual execution mode switch that the system closes in the manual execution mode.

【0151】第63図の例で再起動可能状態は、シリン
ダが全て初期位置に戻った状態であると定義できる。も
し、シリンダY がフェールしているならば、復帰手
順は、先ず、シリンダY を戻し、次にY を戻
し、次にY を戻すことにより、再起動可能状態に復
帰できる。尚、第67図のラダープログラムの各スイツ
チの信号に付された名称は、第66図の動作ステツプに
より、I/Oマップ(第65図)内のメモリ番地と関連
付けられている。
In the example of FIG. 63, the restartable state can be defined as the state where all the cylinders have returned to their initial positions. If cylinder Y 2 is failing, the recovery procedure can be returned to the restartable state by first returning cylinder Y 2 , then Y 1 , then Y 0 . The name given to each switch signal of the ladder program of FIG. 67 is associated with the memory address in the I / O map (FIG. 65) by the operation step of FIG. 66.

【0152】第68図は、CRT58の表示画面の例を
示す。図中、301はマニュアル復帰を指示するための
アイコンであり、302は自動復帰を指示するためのア
イコンである。300の表示領域にはラダープログラム
が表示される。領域300内の全ての表示要素はアイコ
ンとして機能する。即ち、領域300に手動スイツチが
表示されていれば、オペレータがそのスイツチの表示部
分を選択すると、システムはタッチパネル57を介して
そのスイツチが押されたと認識できる。オペレータがど
のスイツチを領域300内で選択したかをシステムが認
識できれば、システムはそのスイツチにI/Oマップ
(第65図)の該当番地に“1”を書き込むことができ
る。『SI』アイコンは、ラダープログラム要素の1つ
を実行させるアイコンである。
FIG. 68 shows an example of the display screen of the CRT 58. In the figure, 301 is an icon for instructing a manual return, and 302 is an icon for instructing an automatic return. A ladder program is displayed in the display area 300. All display elements in area 300 function as icons. That is, when the manual switch is displayed in the area 300, when the operator selects the display portion of the switch, the system can recognize through the touch panel 57 that the switch is pressed. If the system can recognize which switch the operator has selected in the area 300, the system can write "1" in the corresponding address of the I / O map (FIG. 65) to the switch. The "SI" icon is an icon for executing one of the ladder program elements.

【0153】このようにして、システムはCRT58を
ユーザインターフェースのための入力出力装置として使
うことができる。第68図中、303は、領域300を
上下左右方向にスクロールするためのアイコンである。
また、304はブロック番号を指定するためのアイコ
ン、305はステップ番号を指定するためのアイコン、
307,308は指定されたブロック番号及びステップ
番号を表示する表示領域である。306は、『起動』ア
イコンであり、オペレータがシステムが再起動可能状態
に復帰したと判断してこのアイコンを選択すると、シス
テムはこれを検知して自動実行モードでラダープログラ
ムを再起動する。
In this way, the system can use the CRT 58 as an input / output device for the user interface. In FIG. 68, reference numeral 303 denotes an icon for scrolling the area 300 vertically and horizontally.
Also, 304 is an icon for designating a block number, 305 is an icon for designating a step number,
Reference numerals 307 and 308 are display areas for displaying the designated block number and step number. Reference numeral 306 denotes a “start” icon. When the operator determines that the system has returned to the restartable state and selects this icon, the system detects this and restarts the ladder program in the automatic execution mode.

【0154】第69図は、故障が上述の故障診断システ
ムで検知された後において、マニュアルモードでの復帰
を制御する手順を示し、第70図は自動モードでの復帰
の制御手順を示す。アイコン301(マニュアル復帰モ
ード)が選択されると、CRT58上に第68図のよう
な画面が現われる。ステップS270では、故障が検出
されたブロック番号ステップ番号B を復帰プ
ログラムに入力する。CRT画面の領域300には入力
されたラダープログラムB が表示される。ス
テップS272では、ラダープログラムの自動実行モー
ドを消勢し、マニュアル実行モードを付勢するためにM
=1,M =0とする。ステップS274ではタ
ッチパネル57からの入力を待つ。オペレータは領域3
00に表示された各スイツチアイコンにタッチしなが
ら、そのスイツチをオンしたりオフしたりする。領域3
00に目的のステップが表示されていない場合は、スク
ロール用のアイコン303を操作し、または、目的のブ
ロック番号,ステップ番号を入力するためにアイコン3
04,306を操作する(ステップS300またはステ
ップS308,310)。
FIG. 69 shows a procedure for controlling the return in the manual mode after a failure is detected by the above-mentioned failure diagnosis system, and FIG. 70 shows a control procedure for the return in the automatic mode. When the icon 301 (manual return mode) is selected, a screen as shown in FIG. 68 appears on the CRT 58. In step S270, the block number in which the failure is detected, step number B x S Y , is input to the restoration program. The input ladder program B x S Y is displayed in the area 300 of the CRT screen. In step S272, M is used to deactivate the automatic execution mode of the ladder program and activate the manual execution mode.
Let S = 1 and M A = 0. In step S274, the input from the touch panel 57 is waited for. Operator is area 3
While touching each switch icon displayed at 00, the switch is turned on or off. Area 3
If the target step is not displayed at 00, the icon 303 for operating the scroll icon 303 or inputting the target block number and step number
04 and 306 are operated (step S300 or steps S308 and 310).

【0155】領域300上のいずれかのスイツチアイコ
ンがタッチされると、ステップS282で、タッチされ
た座標位置がどのスイツチに当るかを検出し、そのスイ
ツチの対応メモリアドレスをI/Oマップ(第65図)
から探し、そのアドレス中に指定された値を書き込む。
この場合、スイツチはモメンタリとなっているので、ス
イツチアイコンがオン状態を示している状態でタッチパ
ネル57にタッチすると、そのスイツチはオフ状態
(“0”が書き込まれる)になり、逆にオフ状態でタッ
チされるとオンになる(“1”が書き込まれる)。CR
Tに表示されているスイツチのインターロツクは前述し
たように、種々制御可能であるが、オン状態では例えば
緑に、オフ状態では赤に設定されている。ステップS2
86では、ステップS282で同定されたスイツチをそ
れが操作されたシーケンスと共に復旧シーケンスファイ
ル210に記憶する。
When any switch icon on the area 300 is touched, in step S282 it is detected which switch the touched coordinate position corresponds to, and the corresponding memory address of that switch is assigned to the I / O map (first). (Figure 65)
, And write the value specified in that address.
In this case, since the switch is momentary, if the touch panel 57 is touched while the switch icon is in the ON state, the switch is in the OFF state (“0” is written), and conversely in the OFF state. When touched, it turns on ("1" is written). CR
The switch interlock displayed at T can be variously controlled as described above, but is set to, for example, green in the on state and red in the off state. Step S2
At 86, the switch identified at step S282 is stored in the recovery sequence file 210 along with the sequence in which it was operated.

【0156】このようにスイツチが手動で変更された状
態で、『SI』アイコンが押されるとステップS290
でラダープログラムが1つ実行される。復帰プログラム
のいずれかのラダープログラム要素で、その要素は実行
される。即ち、例えば、シリンダY が戻される条件
が揃っていれば、シリンダY は初期位置に戻され
る。ステップS292では、そのアクチュエータが戻さ
れた(あるいは起動された)後の確認スイツチ信号を入
力し、ステップS294でそれらのスイツチの表示の更
新を行なう。ステップS282〜ステップS286,ス
テップS290〜ステップS294の動作を繰り返すこ
とにより設備は再起動可能状態に戻る。
When the "SI" icon is pressed in the state where the switch is manually changed in this way, step S290
One ladder program is executed with. In any ladder program element of the return program, that element is executed. That is, for example, if the uniform conditions cylinder Y 1 is returned, cylinder Y 1 is returned to the initial position. In step S292, a confirmation switch signal after the actuator is returned (or activated) is input, and the display of those switches is updated in step S294. The equipment returns to the restartable state by repeating the operations of steps S282 to S286 and steps S290 to S294.

【0157】操作者が再起動可能状態に戻った事を確認
し『再起動』アイコンを選択すると、ステップS302
で、ステップS286で記憶していたスイツチシーケン
スをファイルとして登録する。即ち、そのシーケンスは
ステップS270で入力された故障の発生したブロック
番号,ステップ番号と関連付けられて登録されて、以降
そのファイルにアクセスすることが可能となる。ステッ
プS304では、手動実行モードを解除し自動実行モー
ドに移るために、M=0,M =1とする。そし
て、ステップS306でラダープログラムをスタートす
る。
When the operator confirms that the restartable state is returned and selects the "restart" icon, step S302
Then, the switch sequence stored in step S286 is registered as a file. That is, the sequence is registered in association with the block number in which the failure has occurred and the step number input in step S270, and the file can be accessed thereafter. In step S304, M S = 0 and M A = 1 are set in order to cancel the manual execution mode and shift to the automatic execution mode. Then, in step S306, the ladder program is started.

【0158】第70図は、前述の手動再起動(第69
図)により蓄積された起動シーケンスに基づいて再起動
をかけるための制御手順を示すフローチヤートである。
故障箇所が特定され、操作者が『自動復帰』アイコンを
選択すると、この自動復旧プログラムが起動される。復
旧プログラムは、ステップS320で故障が検出された
ブロック番号ステップ番号B を入力する。C
RT画面の領域300には入力されたラダープログラム
のラダー図が表示される。ステップS32
2では、復帰シーケンスファイル210から該当するシ
ーケンスをサーチし、ステップS324でそにシーケン
スデータを読み出す。ステップS326では、手動実行
モードに変えるために、M =0,M =1とす
る。ステップS328〜ステップS332は、読み出さ
れたシーケンスに従ってスイツチをセットし、1ステツ
プずつラダープログラムを実行するものである。ステッ
プS334では、操作者が再起動アイコン306を選択
するのを待つ。このアイコンが選択されたなら、ステッ
プS336,ステップS338で、元のシーケンス制御
ラダープログラムに従って生産が再開される。かくし
て、上述の復帰方法によれば、操作者の経験の多寡によ
らずに、正確で安定な復旧が可能となる。
FIG. 70 shows the manual restart (69th) described above.
It is a flow chart which shows the control procedure for making a restart based on the starting sequence accumulated by the figure.
When the failure location is specified and the operator selects the "automatic recovery" icon, this automatic recovery program is started. The restoration program inputs the block number step number B x S Y in which the failure is detected in step S320. C
In the area 300 of the RT screen, the ladder diagram of the input ladder program B x S Y is displayed. Step S32
At 2, the corresponding sequence is searched from the return sequence file 210, and the sequence data is read at step S324. In step S326, M A = 0 and M S = 1 are set to change to the manual execution mode. In steps S328 to S332, the switch is set according to the read sequence and the ladder program is executed step by step. In step S334, the operation waits for the operator to select the restart icon 306. If this icon is selected, in step S336 and step S338, production is restarted according to the original sequence control ladder program. Thus, according to the above-described restoration method, accurate and stable restoration can be performed regardless of the experience of the operator.

【0159】〈シュミレーション〉シュミレーション
は、通常、第17図のトライアル段階、または、実稼動
時に発生した故障を再現させることを主な目的とする。
本実施例のシュミレーションとは、実際の設備が動くこ
となくCRT58上でラダープログラムがシュミレート
されるものである。トライアル段階であろうと実稼動段
階であろうと、シュミレーションを行なうためには、そ
の条件を整える必要がある。本実施例のような、生産工
程を複数の動作ブロックに分解し、個々の動作ブロック
を更に複数の動作ステツプに分解して表現した場合に
は、シュミレーションは一般的には動作ブロック単位に
行なわれる。従って、その動作ブロックがシュミレーシ
ョンされるためには、その動作ブロックの起動条件と、
その動作ブロック内の個々の動作ステツプの実行に必要
な種々の入力が必要となる。従来のシュミレーションシ
ステムでは、これらの条件を手動で与えていた。本シュ
ミレーションサブシステムは上記条件を自動的に与える
ものである。
<Simulation> The main purpose of the simulation is usually to reproduce a failure that occurs during the trial stage in FIG. 17 or during actual operation.
In the simulation of this embodiment, the ladder program is simulated on the CRT 58 without moving the actual equipment. Whether it is a trial stage or a production stage, it is necessary to prepare the conditions in order to carry out the simulation. When the production process is decomposed into a plurality of motion blocks and each motion block is further decomposed into a plurality of motion steps as in this embodiment, the simulation is generally performed in motion block units. .. Therefore, in order to simulate the action block, the activation condition of the action block,
The various inputs required to perform the individual motion steps within that motion block are required. In the conventional simulation system, these conditions are manually given. This simulation subsystem automatically gives the above conditions.

【0160】第53図のフローチヤートに関連して説明
したように、ステップS99では1つのステップの動作
を終了すると、故障の検出の有無にかかわらずに、変化
のあったスイツチの状態を動作状態ファイル111に書
き込む。また、ステップS105では、ブロックの終了
毎に、全確認スイツチの状態を動作状態ファイル111
に書き込む。また、故障が検出されれば、その故障が検
出された時点のスイツチ状態も同ファイル111に書き
込まれる。そして、第20図,第21図に関連して説明
したように、上記状態ファイル111に記憶されたデー
タから任意の時点のスイツチ変化を忠実に復元できる。
As described with reference to the flow chart of FIG. 53, when the operation of one step is completed in step S99, the changed switch state is changed to the operation state regardless of whether or not a failure is detected. Write to file 111. In step S105, the state of all confirmation switches is set to the operation state file 111 every time the block is finished.
Write in. When a failure is detected, the switch state at the time when the failure is detected is also written in the file 111. Then, as described with reference to FIGS. 20 and 21, the switch change at any time can be faithfully restored from the data stored in the state file 111.

【0161】第71図は、動作ステツプB
おいてあるインターロツク条件ILC が満足される
とシリンダY を駆動し、動作ステツプB
でシリンダY がオンされ外部から信号X100
入力されたことを確認(X=1)してシリンダY
を駆動し、動作ステツプB でシリンダY
がオンされ外部信号X101 が入力されたことを確認
(X =1)してシリンダY を駆動するというラ
ダープログラムである。第72図は、第71図のラダー
プログラムをシュミレートするためのシュミレートプロ
グラムである。シリンダ要素Y ,Y は、タイマ
要素TM ,TM に置き換えられている。これら
のタイマ要素のセット時間は、シリンダY ,Y
のI/Oマップに与えられている。例えば、第15図の
I/Oマップでは、この時間は『動作時間τ』フィール
ドに与えられている。従って、第71図のシーケンスラ
ダープログラムから第72図のシュミレーションプログ
ラムを作成することは、動作時間τのデータを有してい
るI/Oマップを前もって作成しておくことにより容易
である。そして、第72図のシュミレーションプログラ
ムは、動作ステツプB においてあるインター
ロツク条件ILC が満足されるとTM を駆動
し、動作ステツプB でタイマTMがタイム
アウトし外部から信号X100 が入力されたことを確
認(TM =1)して、タイマTM を駆動し、動
作ステツプB でTM がタイムアウトし外
部から信号X101 が入力されたことを確認(TM
=1)してTM を駆動するというように、第71
図のプログラムをシュミレーションする。
FIG. 71 shows an operation step B.0 S0 To
Interlock condition ILC0 Will be satisfied
And cylinder Y0 Drive the operation step B0 S1 
With cylinder Y0 Is turned on and signal X from the outside100 But
Confirm that it has been entered (X0= 1) and then cylinder Y1 
Drive the operation step B0 STwo With cylinder Y 1 
Is turned on and external signal X101 Confirm that is entered
(X1 = 1) and then cylinder YTwo Drive that
It is a dar program. 72 is the ladder of FIG. 71.
Simulation Pro for simulating programs
It is gram. Cylinder element Y0 , Y1 Is a timer
Element TM0 , TM1 Has been replaced by. these
The set time of the timer element of is cylinder Y0 , Y1 
Given in the I / O map of. For example, in FIG.
In the I / O map, this time is the "operation time τ" field.
Have been given to De. Therefore, the sequencer in FIG.
From the Dar program to the simulation program shown in Fig. 72.
Creating a ram has data of operating time τ
Easy by creating an I / O map in advance
Is. Then, the simulation program of FIG.
Operation step B0 S0 At an inter
Lock condition ILC0 Is satisfied with TM 0 The drive
Then, operation step B0 S1 With timer TM0Is time
Out and signal X from the outside100 Confirm that the
Approval (TM0 = 1) and timer TM1 Drive and move
Work step B0 STwo At TM1 Is timed out
Signal from department X101 Confirm that is entered (TM1
 = 1) and then TMTwo Driving the 71st
Simulate the program shown in the figure.

【0162】このように、シュミレーションプログラム
では、ラダープログラム中の、シリンダのようなアクチ
ュエータのように駆動されると物理的に動いて、その動
作に時間のかかるものがタイマ要素に変換される。そし
て、そのアクチュエータの動作確認スイツチ(例えば、
)は、タイマ要素の内部スイツチ(TM )に
変換される。そして、アクチュエータ以外の出力(例え
ば、第71図のB 信号)等は内部信号であるの
で変更する必要はない。換言すれば、操作者にシュミレ
ーションの過程を可視的に表示させるには、シュミレー
ションプログラム(第72図)の動作の推移状態をCR
T58上に表示するよりも、第71図のラダープログラ
ムのシンボルを表示した方が、操作者に違和感のない現
実感のあるシュミレーション表示を提供できる。その場
合、例えば、タイマTM がタイムアウトしていない
ときは、シリンダY のシンボルの表示は赤色で、タ
イムアウトしていればシリンダY のシンボルの表示
は緑色で表示するようにする。同じ理由により、アクチ
ュエータではない確認スイツチ類でも、オンしているス
イツチは緑色で、オンしていないスイツチは赤色で表示
する。
As described above, in the simulation program, when it is driven like an actuator such as a cylinder in the ladder program, it physically moves, and a time-consuming operation is converted into a timer element. Then, a switch for confirming the operation of the actuator (for example,
X 0) is converted into an internal timer element switch (TM 0). The outputs other than the actuator (for example, the B 0 S 1 signal in FIG. 71) are internal signals and need not be changed. In other words, in order to allow the operator to visually display the simulation process, the transition state of the motion of the simulation program (Fig. 72) should be CR.
Displaying the symbol of the ladder program shown in FIG. 71 can provide the operator with a realistic and realistic simulation display rather than displaying it on T58. In that case, for example, when the timer TM 0 has not timed out, the symbol of the cylinder Y 0 is displayed in red, and when it is timed out, the symbol of the cylinder Y 0 is displayed in green. For the same reason, confirmation switches that are not actuators are displayed in green when they are on and in red when they are not.

【0163】前述したように、シュミレーションプログ
ラム(例えば、第72図のプログラム)が起動されるに
は、そのブロックの起動条件が満足されなければならな
い。このブロックの起動条件は、第44図〜第48図に
関連して説明したように、当該動作ブロック(第44図
のブロック4)の前段にある動作ブロック(動作ブロッ
ク2,3)内の全ての確認スイツチの総和である。この
起動条件の論理式は、第72図の例では、ILC
して示されている。シュミレーションの起動時には、こ
のインターロツク条件の論理の実際の論理値は動作状態
ファイル111から得られる。即ち、第72図のブロッ
ク0のシュミレーションラダープログラムの起動は、I
LC にファイル111からデータを与えることによ
り可能となる。シュミレーションプログラムの各動作ス
テツプの起動は、タイマ要素のタイムアウトと外部信号
の入力があれば可能となる。
As described above, in order for the simulation program (for example, the program shown in FIG. 72) to be activated, the activation condition of the block must be satisfied. As described with reference to FIGS. 44 to 48, the activation conditions for this block are all in the operation blocks (operation blocks 2 and 3) preceding the operation block (block 4 in FIG. 44). This is the sum of confirmation switches. The logical expression of this activation condition is shown as ILC 0 in the example of FIG. At the start of the simulation, the actual logic value of this interlock condition logic is obtained from the operating state file 111. That is, the simulation ladder program of block 0 in FIG.
It is possible by giving data from the file 111 to LC 0 . Each operation step of the simulation program can be activated if the timer element times out and an external signal is input.

【0164】第73図は、動作状態ファイル111に記
憶されたデータから復元した信号変化のタイミングチヤ
ートである。第73図の例では、シリンダY は時間
τ’ でオンし、シリンダYはτ ’ でオンし
た。第74図は第72図のシュミレーションプログラム
により再現された動作の遷移を示すタイミングチヤート
である。第73図と第74図とで若干の差異があるの
は、実動作時間τ’ ,τ ’ と、タイマ要素T
,TM の公称時間τ ,τとで差異があ
るからである。そして、外部から入力される信号X
100 ,X 101 が入力された時間(第74図で時
刻t ,t )は動作状態ファイル111に記憶さ
れているので、この時刻t ,t に状態ファイル
111からシュミレーションプログラムに入力される。
FIG. 73 shows the operation status file 111.
Timing check of signal change restored from stored data
It is In the example of FIG. 73, the cylinder Y0 Is time
τ0’Turns on, cylinder Y1Is τ1 ’Turn on
It was Figure 74 shows the simulation program shown in Figure 72.
Timing chart showing transition of motion reproduced by
Is. There is a slight difference between Fig. 73 and Fig. 74.
Is the actual operating time τ0’, Τ1 'And the timer element T
M0 , TM1 Nominal time τ0 , Τ1And there is a difference
This is because that. Then, the signal X input from the outside
100 , X 101 The time when was input (the hour in Fig. 74
Tick t1 , TTwo ) Is stored in the operating status file 111.
Therefore, this time t1 , TTwo To state file
Input from 111 to the simulation program.

【0165】第75図は、シュミレーション用のラダー
プログラムの実行制御を行なうシュミレーション制御プ
ログラム206の動作を示すフローチヤートである。ま
た、第76図はある動作ブロックの動作状態ファイルの
フォーマツトを示す。第76図の例では、この動作ブロ
ックの動作は複数個のレコードにより記憶されている。
最初のレコードは当該ブロックが時刻t に起動され
たことを、2番目のレコードはその後t に変化があ
ったことを、3番目のレコードはt に変化があった
ことを、‥‥‥示している。
FIG. 75 is a flow chart showing the operation of the simulation control program 206 for controlling the execution of the simulation ladder program. Further, FIG. 76 shows the format of the operation state file of a certain operation block. In the example of FIG. 76, the operation of this operation block is stored by a plurality of records.
The first record indicates that the block was activated at time t I , the second record indicates that t 1 has changed since then, the third record indicates that t 2 has changed, and so on. Shows.

【0166】第75図の制御プログラムは所定の『シュ
ミレーション起動』アイコンを操作者が選択することに
より起動される(ステップS402)。ステップS40
4では、シュミレーション対象の動作ブロックの指定を
オペレータに促す。ステップS406では、指定された
ブロック番号に対応するデータファイルをファイル11
1中に探し、ステップS408で、その最初のレコード
のデータ(起動条件)を読み出し、ステップS410で
そのデータをシュミレーションラダープログラム(第7
2図のILC )にセットする。ここで、データをラ
ダープログラム中にセットするとは、ラダープログラム
要素の対応メモリ番地はI/Oマップに保持されている
ので、このI/Oマップを参照することにより、対応す
るメモリ番地にデータを書き込む。ステップS412で
はラダープログラムを起動する。ステップS414で
は、シュミレーションの起動時刻t を記憶する。ス
テップS416〜ステップS426のループでは、ファ
イル111から1つのレコード(n番目のレコード)を
読み出し、シュミレーション開始からの経過時間が、そ
のレコードの記録時刻から求めた経過時間(t −t
)に等しくなった時点で、そのレコードのデータを
ラダープログラム中にセットするものである。即ち、実
際のラダープログラム(第71図)の実際の動作の記録
の開始(時刻t )からの経過時間 (t −t ) が、シュミレーション実行中に経過したということは、
に対応するn番目のレコードに記録された信号状
態の変化をシュミレーションプログラムに与えるべきと
きであることを意味する。そこで、ステップS416で
は、n番目のレコードを読む。そして、制御プログラム
206によるシュミレーションの起動開始(t )か
らの現在時刻tまでの経過時間 (t−t ) が、そのn番目のレコードに記録された信号状態の変化
をシュミレーションプログラムに与えるべき時点に至っ
たかを判断するために、ステップS418で、(t
−t )と(t−t )とを比較する。その比較結
果が等しいならば、ステップS420では、そのn番目
のレコードに記録されている信号データを対応するメモ
リ番地に書き込む。ステップS422では、ファイル1
11の当該ブロックの全てのレコードを読み取っていな
いことを確認してからステップS416に戻って上記動
作を繰り返す。
The control program shown in FIG.
When the operator selects the "Start Millation" icon
It is further activated (step S402). Step S40
In 4, specify the motion block to be simulated.
Prompt the operator. In step S406, the specified
The data file corresponding to the block number is file 11
1 in step S408, the first record
Data (start condition) is read out, and in step S410
Simulation data of the data (7th
2 ILC0 ). Here, the data
Setting during ladder program means ladder program
The corresponding memory address of the element is held in the I / O map
Therefore, by referring to this I / O map
Write the data to the memory address. In step S412
Launches the ladder program. In step S414
Is the start time t of the simulation0 Memorize Su
In the loop from step S416 to step S426,
1 record (nth record) from file 111
The time elapsed from the start of reading and simulation
Elapsed time (tn -T
I ) Is equal to
It is set during the ladder program. That is, the real
Record of actual operation of ladder program (Fig. 71)
Start (time t I ) Elapsed time (tn -TI ) Has passed during the simulation,
tn Signal recorded in the nth record corresponding to
That the change of state should be given to the simulation program
Means that it is Therefore, in step S416
Reads the nth record. And the control program
Simulation start by 206 (t0 )
Elapsed time to the present time t (t−t0 ) Is the change in the signal state recorded in the nth record
To reach the simulation program
In step S418, (tn 
-TI ) And (t-t0 ) And. The comparison result
If the results are equal, in step S420, the nth
Of the signal data recorded in the record
Write at address. In step S422, the file 1
I haven't read all the records in 11 of the block
After confirming that there is not, return to step S416 and perform the above operation.
Repeat the work.

【0167】ステップS418で、シュミレーション開
始から時間t −t が経過していないと判断され
たときは、ステップS424で全ての確認スイツチの出
力を読み取り、ステップS426で、それらの信号に変
化に応じてCRT58上における表示を更新する。かく
して、本実施例のシュミレーション方法によれば、シュ
ミレーション条件が、実際に動作させたラダープログラ
ムの起動条件を記憶したものに基づいてセットされるの
で、正確且つ効率的なシュミレーションを実現できる。
If it is determined in step S418 that the time t n -t I has not elapsed from the start of the simulation, the outputs of all confirmation switches are read in step S424, and the signals are changed to those in step S426. The display on the CRT 58 is updated accordingly. Thus, according to the simulation method of the present embodiment, the simulation condition is set based on the stored start condition of the ladder program actually operated, so that the accurate and efficient simulation can be realized.

【0168】〈ラダープログラムの最適化〉前述のシー
ケンスラダープログラムの自動生成サブシステム104
は、例えば、動作ブロックの起動条件の生成は、第44
図〜第48図に関連して説明したように、起動条件の生
成対象となる当該動作ブロックの直前段の全ての動作ブ
ロック内で用いられる確認スイツチの論理積で表わされ
るとした。そして、それらの論理積のなかで、同じ設備
(アクチュエータ)の相補的な2つの確認信号(『出』
確認信号と『戻り』確認信号)が含まれていれば、それ
らをキヤンセルすることにより、ある意味では、ラダー
プログラムを簡素化し、最適化しようとしていた。本シ
ステムの最適化プログラム129は、 :動作ブロックの起動条件の中で、そのブロックの起
動に実際には関係しない条件を除去することにより、ラ
ダープログラムを更に最適化しようとするものである。 :さらに、曖昧な動作をラダープログラムが有してい
るならば、その曖昧な動作のプログラム部分を検出し修
正することにより、ラダープログラムを最適化するもの
である。
<Optimization of Ladder Program> The automatic generation subsystem 104 for the sequence ladder program described above.
Is, for example, the generation of the activation condition of the operation block is
As described with reference to FIG. 48 to FIG. 48, it is assumed to be represented by the logical product of the confirmation switches used in all the operation blocks immediately preceding the operation block for which the activation condition is to be generated. Then, in those logical products, two complementary confirmation signals (“output”) of the same equipment (actuator) are
If there was a confirmation signal and a "return" confirmation signal), I was trying to simplify and optimize the ladder program in a sense by canceling them. The optimizing program 129 of the present system aims to further optimize the ladder program by removing a condition that is not actually related to the activation of the block among the activation conditions of the operation block. : Further, if the ladder program has an ambiguous operation, the ladder program is optimized by detecting and correcting the program part of the ambiguous operation.

【0169】起動条件の最適化 ある動作ブロックの起動条件の中で、そのブロックの起
動に実際には関係しないものの例を第77図を参照して
説明する。第77図において、ワーク402は移載装置
400によりA位置まで移動される。ロボット406は
A位置にあるワークを、そのワークに適したハンドによ
り把持する。複数のハンド404が、回転治具401に
装着されている。回転治具401は、ロボット406が
必要とするハンドをロボット側に供給するために回転
し、所定の回転位置で割り出しロックピン407により
ロックされる。第78図は、第71図の設備の動作を記
述したブロックフローマップ(一部にラダープログラム
が記載されている)であり、このマップは3つのブロッ
クからなる。ブロックB はワーク402をA位置に
移載する動作を記述し、ブロックB は回転治具の動
作を記述し、ブロックB はロボット406によるワ
ーク402の把持動作が起動されるための起動条件を記
述する。ブロックB の動作では、ワークがリミツト
スイツチ『ワーク到着』をアクチエートすると『ブロッ
ク0完了』信号を発生する。一方、ブロックB
は、信号L を受けると『ロックピンアンロック』信
号が生成されて所定のアクチュエータ(不図示)をアク
チベートして治具401をアンロック状態にする。治具
401がアンロック状態になって信号『アンロック』が
発生すると信号『割り出し回転』が生成されて治具40
1が中心403の周りに回転される。治具401のサー
ボが働いて所望のハンドがロボット側に着た時点で『割
り出し回転完』信号が生成されると『ブロック1完了』
信号が生成される。ブロックB の最初のステップは
内部信号『ブロック2起動』を生成するロジツクを記述
する。ブロックB 中の『起動条件』とは第48図に
関連して説明したように、ブロックB とブロックB
の確認信号の論理積となる。従って、この『起動条
件』中には、信号『ロック』や『アンロック』等が含ま
れる。しかしながら、実際には、搬送されてきたワーク
の種類によっては治具401の回転は必要であったり不
要であったりする。何故なら、同じ種類のワークが送ら
れてくる限りは、ハンドの交換は不要となるからであ
る。従って、上記『起動条件』中の、信号『ロック』や
『アンロック』等が起動条件としては必ずしも必要なも
のではなく、除去した方がプログラム構造を簡易にし、
プログラム保守を行ない易くし、且つ不要なロジツクが
無くなることからプログラムも効率的に動作することと
なる。従って、どのようにして不要なロジツクが起動条
件中に含まれていることを検知するかが問題となる。
Optimization of Start-up Condition An example of start-up conditions of a certain operation block which are not actually related to the start-up of the block will be described with reference to FIG. In FIG. 77, the work 402 is moved to the position A by the transfer device 400. The robot 406 grips the work at the position A with a hand suitable for the work. A plurality of hands 404 are attached to the rotating jig 401. The rotating jig 401 rotates to supply the robot 406 with the necessary hand, and is locked by the index lock pin 407 at a predetermined rotation position. FIG. 78 is a block flow map describing the operation of the equipment of FIG. 71 (a ladder program is described in part), and this map consists of three blocks. A block B 0 describes an operation of transferring the work 402 to the position A, a block B 1 describes an operation of a rotating jig, and a block B 2 is an activation for activating the gripping operation of the work 402 by the robot 406. Describe the conditions. In the operation of block B 0 , when the work activates the limit switch “work arrival”, the “block 0 completion” signal is generated. On the other hand, in the block B 1 , when the signal L 1 is received, a “lock pin unlock” signal is generated and a predetermined actuator (not shown) is activated to bring the jig 401 into an unlocked state. When the jig 401 is unlocked and the signal "unlock" is generated, the signal "index rotation" is generated and the jig 40
1 is rotated about center 403. When the servo of the jig 401 works and the desired hand reaches the robot side, when the "index rotation complete" signal is generated, "block 1 complete"
A signal is generated. The first step of block B 2 describes the logic that produces the internal signal “block 2 fire”. As described in connection with FIG. 48, the “start condition” in the block B 2 is the block B 0 and the block B.
It is the logical product of the confirmation signals of 1 . Therefore, the "start condition" includes the signals "lock" and "unlock". However, in practice, the jig 401 may or may not need to be rotated depending on the type of the conveyed work. This is because it is not necessary to exchange the hands as long as the same type of work is sent. Therefore, the signals "lock" and "unlock" in the "starting conditions" are not always necessary as starting conditions, and removing them simplifies the program structure,
Program maintenance is facilitated and unnecessary logic is eliminated, so that the program operates efficiently. Therefore, how to detect that an unnecessary logic is included in the start condition becomes a problem.

【0170】最適化プログラム129は、起動条件に不
要な論理が含まれている場合には、実際の生産現場で記
録を取った場合に、その論理を示す信号の発生時期が場
合場合でまちまちであることに着目し、そのようなまち
まちな発生時期を示す信号が起動条件に含まれている場
合にはその信号を起動条件から外すようにしている。プ
ログラム129は、上記発生時期を動作状態ファイル1
11から検出するようにしている。第79図は、第77
図の設備における動作をケースIとケースIIとケース
III について記録した信号のタイミングチヤートで
ある。第79図において、『ロック』信号の発生時期
は、ケースIとケースIIとケースIIIでは全て異な
ったものとなっている。回転治具401が回転する必要
が無い場合(ケースIII )もあれば、回転量が少な
い場合(ケースII)もあるからである。
When the starting condition includes unnecessary logic, the optimizing program 129 may generate a signal indicating the logic at various times when it is recorded at an actual production site. Paying attention to a certain point, when a signal indicating such various occurrence times is included in the starting condition, the signal is excluded from the starting condition. The program 129 sets the above occurrence time to the operation status file 1
The detection is performed from 11. FIG. 79 shows the number 77
It is a timing chart of the signal which recorded the operation | movement in the installation of the figure about Case I, Case II, and Case III. In FIG. 79, the generation timing of the "lock" signal is different in case I, case II, and case III. This is because there are cases where the rotating jig 401 does not need to rotate (case III) and cases where the amount of rotation is small (case II).

【0171】第80図は最適化プログラム129の制御
手順を示すフローチヤートである。このプログラム12
9は所定のアイコンを選択することにより起動される。
ステップS450では、操作者が最適化しようと考えて
いる動作ブロックの指定を促す。ステップS452で
は、信号の発生時期をチェックするためにファイル11
1を考慮すべき期間を指定する。但し、この期間は無指
定であってもよい。ステップS454では、この期間内
の状態ファイルデータであって、正常な動作結果となっ
たもののみを入力し、ステップS456で、これらのデ
ータから第20図,第21図に関連して説明したよう
に、タイミングチヤートを再構成する。ステップS45
8では、第79図に関連して説明したように、発生時期
の定まらない信号(第79図の例では『ロック信号』)
を抽出する。ステップS460では、その動作ブロック
の起動条件を含むラダー図をCRT58に表示すると共
に、ステップS458で抽出された信号を起動条件をか
ら削除してよいかのメツセージをCRT58に表示す
る。削除してもよい旨の返答があったならば、ステップ
S464で、起動条件からその信号を削除する。ステッ
プS464では、更に、ブロックの起動条件にこの信号
を含めないとする生成ルールそのものを変更してもよ
い。かくして、ブロックの起動条件が最適化され、プロ
グラムが見易いものとなり、且つ、プログラムの実行速
度そのものが向上する。
FIG. 80 is a flow chart showing the control procedure of the optimization program 129. This program 12
9 is activated by selecting a predetermined icon.
In step S450, the operator is urged to specify the operation block that the operator intends to optimize. In step S452, the file 11 is checked to check the timing of signal generation.
Specify the period for which 1 should be considered. However, this period may be unspecified. In step S454, only the state file data within this period, which has a normal operation result, is input, and in step S456, as described with reference to FIGS. 20 and 21 from these data. Then, reconfigure the timing chart. Step S45
In No. 8, as described with reference to FIG. 79, a signal whose generation time is indefinite (“lock signal” in the example of FIG. 79)
To extract. In step S460, the ladder diagram including the activation condition of the operation block is displayed on the CRT 58, and the message indicating whether the signal extracted in step S458 may be deleted from the activation condition is displayed on the CRT 58. If there is a reply that the signal may be deleted, the signal is deleted from the start condition in step S464. In step S464, the generation rule itself that does not include this signal in the block activation condition may be changed. Thus, the start conditions of the block are optimized, the program is easy to see, and the program execution speed itself is improved.

【0172】曖昧部分の最適化 あるコントローラから他のコントローラに並列に複数の
信号を伝送する場合には、これらの信号間にスキュウが
発生する場合がある。このスキューは設備の誤動作の原
因となる。本来は、かかる制御の曖昧な部分は厳密に検
討されて対策されてしかるべきものであるが、あらゆる
部分で厳密にタイミングを検討することは不可能であ
る。そこで、最適化プログラム129は、曖昧部分を簡
便に検出し修正して最適化するものである。
Optimization of ambiguous part When a plurality of signals are transmitted from one controller to another controller in parallel, skew may occur between these signals. This skew causes malfunction of the equipment. Originally, the ambiguous part of such control should be strictly considered and taken countermeasures, but it is impossible to strictly consider the timing in every part. Therefore, the optimizing program 129 simply detects and corrects an ambiguous portion and optimizes it.

【0173】第81図,第82図により、タイミング制
御が曖昧なラダープログラムの例を説明する。第81図
は、ストローブ信号『データ送信』を受けて、X
までをメモリに記憶する動作を記述するラダープロ
グラムである。外部のコントローラから信号『データ送
信』を受けると、内部信号『データ記憶』を発生する。
この『データ記憶』はサンプリングタイミングを形成し
て、データ信号X〜X を受信すると、これらのデ
ータ信号をメモリに記憶すべく、記憶信号『X
憶』『X 記憶』等を発生する。第82図は、データ
信号X 〜X のうち、X が遅く送られてきた
ために、X が誤って記憶された例のタイミングチヤ
ートを示す。本来は、遅れたデータ信号は発生されない
ように、その外部コントローラのラダープログラムが構
成されてしかるべきである。最適化プログラム129
は、発生時期が曖昧な信号は、その信号を記録した場合
に記録ケース毎に異なることに着目する。そこで、故障
が発生した場合に、その故障時の信号のタイミングチヤ
ートと、過去記憶しておいた正常時のその信号のタイミ
ングチヤートとを比べて、異なる部分があれば、その信
号は不安定な動作を起こし易いものと判断して、不安定
動作を起こしたことをチェックするラダープログラム要
素を自動的に発生するように生成ルールを変更する。
An example of a ladder program whose timing control is ambiguous will be described with reference to FIGS. 81 and 82. FIG. 81 shows that when the strobe signal “data transmission” is received, X 1 to
It is a ladder program that describes the operation of storing up to X 4 in memory. When the signal "data transmission" is received from the external controller, the internal signal "data storage" is generated.
The "data storage" is to form a sampling timing, when receiving the data signal X 1 to X 4, in order to store these data signals to the memory, the memory signal "X 1 stores" generating "X 2 stores", etc. To do. FIG. 82 shows a timing chart of an example in which X 4 of the data signals X 1 to X 4 is erroneously stored because X 4 is sent late. Originally, the ladder program of the external controller should be configured so that the delayed data signal is not generated. Optimization program 129
Pays attention to the fact that a signal whose generation time is ambiguous differs for each recording case when the signal is recorded. Therefore, when a failure occurs, the timing chart of the signal at the time of the failure is compared with the timing chart of the signal at the normal time stored in the past, and if there is a different part, the signal is unstable. The generation rule is changed to automatically generate a ladder program element that checks that an unstable operation has occurred, judging that the operation is likely to occur.

【0174】第82図はルール変更の原理を説明する。
即ち、不安定だと疑われる信号のタイミングチヤートを
作成し、信号の交差範囲と考えられるウインド(T
MIN〜TMAX )を設定し、83図のようなラダー
ロジツクを作成する。第83図のロジツクは、信号『デ
ータ記憶』が入力されると、2つのタイマTMIN
MAX が起動される。タイマTMIN がタイムア
ウトしてTMAX がタイムアウトするまでの間にX
〜X の信号を記憶する。TMIN がタイムアウ
トする前に、または、TMAX がタイムアウトしてか
らX 〜Xのいずれかが入力されるとフェールする
というものである。
FIG. 82 illustrates the principle of rule change.
That is, a timing chart of a signal suspected to be unstable is created, and a window (T
MIN to T MAX ) is set and a ladder logic as shown in FIG. 83 is created. In the logic of FIG. 83, when the signal “data storage” is input, two timers T MIN and T MAX are activated. X 1 before timer T MIN times out and T MAX times out
Storing signals to X 4. It is to fail if any one of X 1 to X 4 is input before T MIN times out or after T MAX times out.

【0175】第84図はこの最適化のためのプログラム
129の制御手順である。この手順は所定のアイコンを
選択することにより起動される。ステップS480で
は、操作者が最適化しようと考えている動作ステップの
指定を促す。ステップS482では、信号の発生時期を
チェックするためにファイル111を考慮すべき期間を
指定する。但し、この期間は無指定であってもよい。ス
テップS484では、この期間内の状態ファイルデータ
であって、故障と判断されたもののみを入力し、ステッ
プS486で、これらのデータから第20図,第21図
に関連して説明したように、タイミングチヤートを再構
成する。ステップS488では、第82図に関連して説
明したように、発生時期の定まらない信号を抽出する。
ステップS490では、それらの信号のタイミングチャ
ートをCRT58上に表示する。そして、ステップS4
92で、ステップS488で抽出された信号についての
生成ルールを変更してもよいかのメツセージをCRT5
8に表示する。変更してもよい旨の返答があったなら
ば、ステップS494で、その信号のラダープログラム
及び生成ルールを変更するために、タイマ要素を第83
図のように追加する。
FIG. 84 shows the control procedure of the program 129 for this optimization. This procedure is activated by selecting a predetermined icon. In step S480, the operator is prompted to specify the operation step that he is considering to optimize. In step S482, the period in which the file 111 should be considered in order to check the signal generation timing is designated. However, this period may be unspecified. In step S484, only the state file data within this period, which is determined to be a failure, is input, and in step S486, as described with reference to FIGS. 20 and 21, from these data, Reconfigure the timing chart. In step S488, as described with reference to FIG. 82, a signal whose generation time is not determined is extracted.
In step S490, the timing chart of those signals is displayed on the CRT 58. Then, step S4
At 92, a message indicating whether the generation rule for the signal extracted at step S488 may be changed is displayed on the CRT5.
Display in 8. If there is a reply to the effect that it may be changed, in step S494, the timer element is set to the 83rd value in order to change the ladder program and generation rule of the signal.
Add as shown.

【0176】尚、ステップS484における過去の状態
ファイルデータの収集は、明白な故障データ、例えば、
信号伝送ラインの断線等の故障データは省くべきであ
る。また、付加すべきロジツクは、上記例では、ウイン
ドを設定するタイマロジツクであった。これは信号伝送
等の場合は、信号が遅れたり、進んだりするからであ
る。信号伝送以外のロジツク、例えば、シリンダの駆動
を最適化する場合には、シリンダの動作時間が早まると
いうことはないから、シリンダの動作をチェックするロ
ジツクのタイマ値を変更するだけでよい。
Incidentally, the collection of the past state file data in step S484 is performed by using clear failure data, for example,
Failure data such as disconnection of signal transmission line should be omitted. Further, the logic to be added is the timer logic for setting the window in the above example. This is because the signal is delayed or advanced in the case of signal transmission. In the case of optimizing the logic other than the signal transmission, for example, the cylinder drive, the cylinder operation time does not accelerate, so it is only necessary to change the timer value of the logic for checking the cylinder operation.

【0177】〈実施例の効果〉以上、説明した実施例シ
ステムによれば、 :ステツプタイムオーバ検出、ステツプハングアップ
検出、ブロツクハングアップ検出により、簡単で的確な
故障検出ができると共に、二分木サーチの手法により高
速に故障箇所の解析が可能になった。さらに、過去の故
障解析結果がノードの『重み』に反映されるので、故障
箇所の探索が更に高速化された。また、スイツチ信号
を、『外部信号』と『内部信号』に分類し、故障探索対
象の信号がそのどちらに属するかでそれ以上の探索を続
行するか否かを判定しているので、故障箇所の解析が高
速化する。
<Effects of the Embodiment> According to the above-described embodiment system, it is possible to perform simple and accurate fault detection by the step time over detection, the step hang-up detection, and the block hang-up detection, and the binary tree search. With this method, the failure location can be analyzed at high speed. Further, since the past failure analysis result is reflected in the "weight" of the node, the search for the failure location is further speeded up. In addition, the switch signal is classified into an "external signal" and an "internal signal", and it is determined whether or not to continue the search depending on which of the signals the failure search target belongs to. Speeds up the analysis of.

【0178】更に、前もって故障デバイスと故障の検出
される動作ステツプとを対応付けたデータベースを作成
し、このデータベースのなかを発生頻度順に故障デバイ
スの探索を行なうことにより故障解析が高速化する。 :過去の故障に対する復帰過程を記憶し、同一故障に
対しては、その過程を記憶から呼び戻してそのシーケン
スを再生するという復旧処理手法を採用することによ
り、難解な復旧処理が単純化され、操作の統一化が図れ
る。 :ラダープログラムの実際の稼動状態(または、シュ
ミレーション中の動作状態)を記憶し、故障のシュミレ
ーションあるいはラダープログラムの試行段階でのシュ
ミレーションにたいしては、この状態データをシュミレ
ーション条件として使用することにより、シュミレーシ
ョンが効率的に且つ正確に行なえるようになった。これ
は、状態データを示す信号名が名前によりシステム内で
特定されることによる効果が大きい。 :動作ブロックあるいは動作ステツプの起動条件中に
存在する無駄な論理を、過去に記憶した動作状態を示す
データファイルを調べることにより発見し、その無駄な
論理を含むラダープログラムあるいは生成ルールを変更
することにより、シーケンスラダープログラムが最適化
される。ラダープログラムに存在する不安定な信号を、
過去に記憶した動作状態を示すデータファイルを調べる
ことにより発見し、その不安定な信号を含むラダープロ
グラムあるいは生成ルールを変更することにより、シー
ケンスラダープログラムが最適化される。
Furthermore, a failure analysis is speeded up by creating a database in advance in which a failed device and an operation step in which a failure is detected are associated with each other, and searching for a failed device in this database in the order of occurrence frequency. : By adopting the recovery processing method of remembering the recovery process for past failures and recalling the process from the memory for the same failure and reproducing the sequence, difficult recovery processing can be simplified and operated. Can be unified. : The actual operating state of the ladder program (or the operating state during simulation) is stored, and for simulation of a failure or simulation at the trial stage of the ladder program, by using this state data as a simulation condition, the simulation can be performed. Now you can do it efficiently and accurately. This is highly effective because the signal name indicating the status data is specified in the system by the name. : Discovering useless logic existing in the start condition of the operation block or operation step by examining the data file indicating the operation state stored in the past, and changing the ladder program or the generation rule including the useless logic. This optimizes the sequence ladder program. The unstable signal existing in the ladder program
The sequence ladder program is optimized by discovering it by examining the data file indicating the operation state stored in the past and changing the ladder program including the unstable signal or the generation rule.

【0179】〈変形例〉本発明はその主旨を逸脱しない
範囲で種々変形が可能である。例えば、上記実施例は本
発明を自動車の生産ラインに適用したものであったが、
当然ながら本発明はそのような適用分野に限定されるも
のではない。少なくともシーケンス制御を行なうもので
あれば適用可能である。
<Modifications> The present invention can be variously modified without departing from the spirit thereof. For example, although the above-mentioned embodiment applied the present invention to the automobile production line,
Of course, the invention is not limited to such fields of application. It is applicable as long as it performs sequence control.

【0180】故障解析探索の変形例 第49図〜第52図,第57図〜第62図に関連して説
明した故障箇所の解析手法はバイナリサーチ(二分木探
索)に基づいたものであった。ここでは、故障解析の変
形手法を提案する。この変形手法は、過去に発生した故
障(発生動作ステツプ番号)と、解析して得た故障発生
箇所(故障した確認スイツチデバイスの名称)とを関連
付けてデータベースに記憶し、これらのデータをソート
する。ソートは、動作ステツプ番号を第1ソートキーと
し、故障デバイス名称を第2ソートキーとする。こうす
ると、第85図に示すと共に、故障した動作ステツプ番
号毎に故障箇所がソートされ、故障データは同一動作ス
テツプについては発生頻度の高いデバイス順に並べられ
る。従って、ある動作ステツプ(B )で故障
が検出されて、故障デバイスを特定する場合には、発生
頻度の高かったデバイスの順にサーチを実行すればよ
い。
Modification of Fault Analysis Search The fault location analysis method described with reference to FIGS. 49 to 52 and 57 to 62 was based on the binary search (binary tree search). .. Here, we propose a modified method of failure analysis. In this modification method, a failure that occurred in the past (occurrence operation step number) and a failure occurrence point obtained by analysis (name of the confirmation switch device that failed) are stored in a database in association with each other, and these data are sorted. .. For sorting, the operation step number is used as the first sort key and the faulty device name is used as the second sort key. As a result, as shown in FIG. 85, the failure locations are sorted by the failed operation step number, and the failure data are arranged in descending order of device frequency for the same operation step. Therefore, when a failure is detected at a certain operation step (B x S Y ) and the failed device is specified, the search may be performed in the order of the device having the highest occurrence frequency.

【0181】第86図はこの変形手法に係る制御手順を
示すフローチヤートである。ステップS510では、故
障が検出された動作ステツプの番号(B )を
知る。ステップS512では、その番号を有するレコー
ド群を第85図のデータベース中に探索し、さらに、ス
テップS514でそのレコード群のなかから、最大頻度
の故障デバイスを先ず故障している可能性が高いと推定
する。そして、ステップS516では、そのデバイスに
対応する確認信号のデータを記憶するメモリ番地を前述
のI/Oマップ(24図,第65図)から知る。ステッ
プS518ではそのメモリ番地からデバイスデータを読
み出してチェックし、その信号データが故障を示してい
るのであれば、ステップS524でそのデバイスを故障
とマークし、示していなければ、ステップS522で次
の発生頻度のデバイスについて調べる。
FIG. 86 is a flow chart showing the control procedure according to this modification. In step S510, the number (B x S Y ) of the operation step in which the failure is detected is known. In step S512, the record group having that number is searched for in the database of FIG. 85, and further, in step S514, it is estimated that there is a high possibility that the failure device with the maximum frequency has failed first. To do. Then, in step S516, the memory address for storing the data of the confirmation signal corresponding to the device is known from the I / O map (FIGS. 24 and 65). In step S518, the device data is read from the memory address and checked. If the signal data indicates a failure, the device is marked as a failure in step S524. If not, the next occurrence occurs in step S522. Find out about frequency devices.

【0182】第85図のデータベースをどのように作成
するかが問題である。第87図はその作成手順を示す。
ステップS530では対象とならシーケンスラダープロ
グラムのシュミレーションプログラム(前もって作成し
たもの)を起動する。ステップS532では人為的に故
障を設備中に設定する。ステップS534では、設定し
た故障により発生した故障を検出した動作ステツプ番号
を故障を設定したデバイス名称と関係付け
て記録する。この操作を充分なデータが得られるまで繰
り返す。尚、ステップS540に示すように、過去発生
した故障データをデータベースに組み込んでもよい。
The problem is how to create the database shown in FIG. FIG. 87 shows the procedure for making it.
In step S530, the simulation program of the sequence ladder program (created in advance) is started if the target. In step S532, the fault is artificially set in the equipment. In step S534, records associated with a device name which is set a fault operation step number B x S Y which detects a failure occurring due to a failure which has been set. This operation is repeated until sufficient data are obtained. It should be noted that, as shown in step S540, past failure data may be incorporated into the database.

【0183】第88図は、第85図のデータベース中の
データ間の関係を模式化したもので、動作ステツプB
に関連する集合である。同図の500〜504
は、A,,B,Cという3つのデバイスに起因する故障
のケースを集合として示したもので、領域510はデバ
イスAにのみ起因する故障を、領域500はデバイスA
にのみ起因する故障を、領域501はデバイスA,Bに
のみ起因する故障を、領域502はデバイスA,B,C
に共通して起因する故障を、領域503はデバイスB,
Cにのみ起因する故障を、領域504はデバイスCにの
み起因する故障を表示する。同図から明らかなように、
共通部分にある故障の原因となるデバイスほど、実際の
故障の原因である可能性が高い。従って、そのような確
率の高いデバイスを優先してチェックすれば、故障デバ
イスが発見される効率が向上する。尚、第88図中、5
05は常にオンであるデバイスの集合を示し、506は
オフである集合を示し、507は当該動作ステツプに関
係のない信号の集合である。上記データベースの作成過
程であるいはデータベースの探索過程で、集合505,
506,507に関連する集合はサーチ対象から除外す
ることによりサーチが高速化する。
FIG. 88 is a schematic representation of the relationship between the data in the database shown in FIG. 85. The operation step B x
It is a set related to S Y. 500 to 504 in the figure
Shows a case of failure caused by three devices A, B, and C as a set, and an area 510 indicates a failure caused only by the device A, and an area 500 indicates a device A.
In the area 501, a failure in the devices 501 and 502 in the area 501, and a failure in the areas 502 in the devices A, B, and C.
Area 503 is the device B,
Areas 504 display failures only due to C, and areas 504 only show failures due to device C. As is clear from the figure,
The more common the device causing the failure, the more likely it is the actual failure. Therefore, if the device with such a high probability is preferentially checked, the efficiency with which a failed device is found is improved. Incidentally, in FIG. 88, 5
Reference numeral 05 indicates a set of devices that are always on, 506 indicates a set that is off, and 507 is a set of signals irrelevant to the operation step. In the process of creating the database or in the process of searching the database, the set 505,
The search is speeded up by excluding the sets related to 506 and 507 from the search target.

【0184】復旧の他の手法 第70図に示した故障復旧方法は、システムがすべて自
動で復旧シーケンスファイルに従って復旧を行うという
ものである。これから説明する例は、セットされるべき
スイッチをシステムが色を変えて表示して操作者に復旧
シーケンスを提示する。第89図は、そのための制御手
順であって、第70図のステップS328〜S332ま
での手順と置きか得られるべきものである。即ち、シー
ケンスファイルに従って、ステップS560で、1つの
1つのデバイスをマニュアルでセットすべきものとする
意味で黄色で表示する。操作者が対応スイッチをセット
すれば、ステップS564で対応メモリ番地の内容を更
新し、ステップS566でラダープログラムを実行し、
実行の結果、変化があれば、表示をステップS568で
更新する。
Other Method of Restoration The failure restoration method shown in FIG. 70 is that the system automatically restores according to the restoration sequence file. In the example to be described below, the system displays the switch to be set in different colors to present the operator with a recovery sequence. FIG. 89 shows a control procedure therefor, which should be obtained instead of the procedure of steps S328 to S332 in FIG. That is, according to the sequence file, in step S560, one device is displayed in yellow in the sense that it should be set manually. If the operator sets the corresponding switch, the contents of the corresponding memory address are updated in step S564, and the ladder program is executed in step S566.
If there is a change as a result of the execution, the display is updated in step S568.

【0185】[0185]

【発明の効果】以上説明したように本発明にかかるシー
ケンスプログラムの生成方法及びその装置によれば、最
適化されていないプログラム部分は不合理な動作結果と
して抽出することができ、その不合理な部分を改良する
ことにより、最適化が果たせる。
As described above, according to the sequence program generating method and the apparatus therefor of the present invention, an unoptimized program portion can be extracted as an irrational operation result, and the irrational operation result can be extracted. Optimization can be achieved by improving the part.

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

【図1】,[Figure 1]

【図2】,[Fig. 2]

【図3】本発明が適用された自動車の生産ラインを説明
する図。
FIG. 3 is a diagram illustrating a production line of an automobile to which the present invention is applied.

【図4】,[Fig. 4]

【図5】,[Figure 5]

【図6】図1の生産ラインにおける動作をブロック化
し、動作ブロックフローチヤートと呼ばれるフローチヤ
ート図。
FIG. 6 is a flow chart showing an operation block flow chart by dividing the operation in the production line in FIG.

【図7】図4の1つのブロックにおける動作を表わし、
動作ステツプフローチヤートと呼ばれるフローチヤート
図。
FIG. 7 represents the operation in one block of FIG.
A flow chart diagram called a motion step flow chart.

【図8】,[FIG. 8]

【図9】,[FIG. 9]

【図10】図7のステツプの一部動作を表わすラダープ
ログラム図,
10 is a ladder program diagram showing a partial operation of the step of FIG.

【図11】生産ラインにおける設備をシンボル化した
図。
FIG. 11 is a symbolic view of equipment on a production line.

【図12】,FIG. 12

【図13】,FIG. 13

【図14】,FIG. 14

【図15】,[FIG. 15]

【図16】実施例システムで使われるラダー要素のパタ
ーン図。
FIG. 16 is a pattern diagram of a ladder element used in the example system.

【図17】生産ラインを管理するシステムを開発すると
きの手順を一般的に示す図。
FIG. 17 is a diagram generally showing a procedure for developing a system for managing a production line.

【図18】本実施例システムにおけるプログラム及びデ
ータの互いの関連を説明する図。
FIG. 18 is a view for explaining the mutual association of programs and data in the system of this embodiment.

【図19】本実施例システムの有する特徴的な機能を示
した図。
FIG. 19 is a diagram showing characteristic functions of the system according to the present embodiment.

【図20】,FIG. 20:

【図21】動作状態を表わすデータから動作状態の時間
変化を再生する手法を説明する図。
FIG. 21 is a diagram illustrating a method of reproducing a temporal change in an operating state from data representing the operating state.

【図22】実施例システムにおいてブロックフローマッ
プと呼ばれるマップの図。
FIG. 22 is a diagram of a map called a block flow map in the example system.

【図23】実施例システムにおいてステツプフローマッ
プと呼ばれるマップの図。
FIG. 23 is a diagram of a map called a step flow map in the embodiment system.

【図24】実施例システムにおいて実I/Oマップと呼
ばれるマップの図。
FIG. 24 is a diagram of a map called an actual I / O map in the example system.

【図25】実施例システムのハードウエア構成を説明す
る図。
FIG. 25 is a diagram illustrating a hardware configuration of an example system.

【図26】実施例システムの自動プログラミング/デー
タ入力部の構成を示す図。
FIG. 26 is a diagram showing a configuration of an automatic programming / data input unit of the example system.

【図27】デバイス名称と動作名称のライブラリ構造を
説明する図。
FIG. 27 is a diagram illustrating a library structure of device names and operation names.

【図28】データ入力プログラムの動作手順を説明する
図。
FIG. 28 is a diagram illustrating an operation procedure of a data input program.

【図29】,FIG. 29:

【図30】ラダープログラムコンパイラの手順を示すフ
ローチヤート図。
FIG. 30 is a flow chart showing a procedure of a ladder program compiler.

【図31】本実施例システムの概略を説明する図。FIG. 31 is a diagram for explaining the outline of the system of this embodiment.

【図32】タッチパネルと表示との関係を説明する図。FIG. 32 is a diagram illustrating a relationship between a touch panel and a display.

【図33】CRTにおける表示画面を制御するデータ構
造を説明する図。
FIG. 33 is a diagram illustrating a data structure for controlling a display screen on a CRT.

【図34】CRTにおける表示例を示す図。FIG. 34 is a view showing a display example on a CRT.

【図35】表示画面をセル分割した図。FIG. 35 is a diagram in which the display screen is divided into cells.

【図36】デバイス名称の各フィールドが各々意味付け
られていることを説明する図。
FIG. 36 is a diagram for explaining that each field of the device name has a meaning.

【図37】CRTにおける表示を制御するためにユーザ
が入力するデータの構造を説明する図。
FIG. 37 is a diagram illustrating a structure of data input by a user to control display on a CRT.

【図38】連続搬送動作のためのラダーパターンを説明
する図。
FIG. 38 is a diagram illustrating a ladder pattern for a continuous transport operation.

【図39】故障診断サブシステム106とシュミレーシ
ョンサブシステム105との関係を示す図。
FIG. 39 is a diagram showing a relationship between the failure diagnosis subsystem 106 and the simulation subsystem 105.

【図40】,FIG. 40,

【図41】実施例システムにおけるソフトウエア関係の
全体的に示す図。
FIG. 41 is a diagram showing an overall software relationship in the example system.

【図42】,FIG. 42

【図43】,FIG. 43:

【図44】,FIG. 44,

【図45】,FIG. 45:

【図46】,FIG. 46,

【図47】,FIG. 47:

【図48】ブロックハングアップ等の故障の検出原理を
説明する図。
FIG. 48 is a diagram illustrating a principle of detecting a failure such as block hang-up.

【図49】,FIG. 49

【図50】故障診断システムにおける二分木サーチの対
象となる設備の例を示すラダープログラム図,クロスリ
ファレンステーブル図。
FIG. 50 is a ladder program diagram and a cross reference table diagram showing an example of equipment to be subjected to a binary tree search in the failure diagnosis system.

【図51】,[FIG. 51]

【図52】故障診断システムにおける二分木サーチアル
ゴリズムにおいて、探索路に重みを付ける過程を説明す
る図。
FIG. 52 is a diagram illustrating a process of weighting a search path in a binary tree search algorithm in the fault diagnosis system.

【図53】マップ制御プログラムの制御手順を示すフロ
ーチヤート。
FIG. 53 is a flow chart showing a control procedure of a map control program.

【図54】動作監視プログラムの制御手順を示すフロー
チヤート。
FIG. 54 is a flow chart showing the control procedure of the operation monitoring program.

【図55】,FIG. 55:

【図56】故障診断解析プログラムの制御手順を示すフ
ローチヤート。
FIG. 56 is a flowchart showing the control procedure of the failure diagnosis analysis program.

【図57】,FIG. 57:

【図58】故障解析に適用される二分木サーチアルゴリ
ズムの手順を示すフローチヤート。
FIG. 58 is a flow chart showing the procedure of a binary tree search algorithm applied to failure analysis.

【図59】,FIG. 59]

【図60】,FIG. 60:

【図61】二分木サーチの手順で使われる各種データレ
ジスタを説明する図。
FIG. 61 is a view for explaining various data registers used in a binary tree search procedure.

【図62】二分木サーチが適用される他の例のラダープ
ログラム図。
FIG. 62 is a ladder program diagram of another example to which a binary tree search is applied.

【図63】,FIG. 63:

【図64】復旧プログラムが適用される設備の一例を示
す図。
FIG. 64 is a diagram showing an example of equipment to which a recovery program is applied.

【図65】復旧プログラムが適用される図63設備のI
/Oマップを示す図。
FIG. 65: I of FIG. 63 equipment to which the recovery program is applied
The figure which shows a / O map.

【図66】復旧プログラムが適用される図63設備の動
作ステツプフローチヤートマップ図。
FIG. 66 is an operation step flow chart map of the equipment of FIG. 63 to which the restoration program is applied.

【図67】復旧対象の設備のシーケンス動作を示すラダ
ープログラム図。
FIG. 67 is a ladder program diagram showing a sequence operation of equipment to be restored.

【図68】復旧プログラムが実行されるときのユーザイ
ンターフェースのための表示画面例を示す図。
FIG. 68 is a diagram showing an example of a display screen for the user interface when the recovery program is executed.

【図69】復旧プログラムの手動復帰モードにおける制
御手順を示すフローチヤート。
FIG. 69 is a flow chart showing a control procedure in a manual recovery mode of the recovery program.

【図70】復旧プログラムの自動復帰モードにおける制
御手順を示すフローチヤート。
FIG. 70 is a flow chart showing a control procedure in the automatic restoration mode of the restoration program.

【図71】シュミレーション対象のラダープログラム
図。
FIG. 71 is a ladder program diagram of a simulation target.

【図72】図71のプログラムをシュミレーションする
ためのラダープログラム図。
72 is a ladder program diagram for simulating the program of FIG. 71. FIG.

【図73】,FIG. 73,

【図74】シュミレーションのなされる原理を説明する
図。
FIG. 74 is a view for explaining the principle of simulation.

【図75】シュミレーションプログラム129の制御手
順を示すフローチヤート。
FIG. 75 is a flow chart showing the control procedure of the simulation program 129.

【図76】シュミレーションで使われるシーケンスファ
イルのフォーマツトを説明する図。
FIG. 76 is a diagram for explaining the format of a sequence file used in the simulation.

【図77】最適化対象の設備の一例を示す図。FIG. 77 is a diagram showing an example of equipment to be optimized.

【図78】図77設備の動作を記述する動作ブロックフ
ローチヤートマップの図。
78 is a motion block flow chart diagram describing the operation of the FIG. 77 facility.

【図79】図78設備の動作を記述するプログラムを最
適化するための原理を説明する図。
FIG. 79 is a view for explaining the principle for optimizing the program that describes the operation of the equipment.

【図80】最適化制御の制御手順を示すフローチヤー
ト。
FIG. 80 is a flow chart showing a control procedure of optimization control.

【図81】最適化対象の設備の他の例を示す図。FIG. 81 is a diagram showing another example of equipment to be optimized.

【図82】信号発生が不安定なために最適化が必要な理
由を説明する図。
FIG. 82 is a diagram for explaining the reason why optimization is required because signal generation is unstable.

【図83】最適化を行なった後のラダープログラム図。FIG. 83 is a ladder program diagram after optimization.

【図84】最適化制御の制御手順の他の例を示すフロー
チヤート。
FIG. 84 is a flow chart showing another example of the control procedure of the optimization control.

【図85】故障解析の他の手法に使われるデータベース
構造を説明する図。
FIG. 85 is a diagram illustrating a database structure used in another method of failure analysis.

【図86】故障解析の他の手法を説明するフローチヤー
ト。
FIG. 86 is a flowchart illustrating another method of failure analysis.

【図87】図85データベースを作成する手順を示すフ
ローチヤート。
FIG. 87 is a flow chart showing the procedure for creating a database.

【図88】図86の故障解析手法の原理を説明する図。88 is a view for explaining the principle of the failure analysis method of FIG. 86.

【図89】復旧の他の手法を説明するフローチャート。FIG. 89 is a flowchart illustrating another method of restoration.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 個々の設備の動作を起動しあるいは規制
しあるいはその動作を確認するための1つまたは複数の
デバイスの状態を記述する生成ルールを複数の設備につ
いて組み合わせてなるシーケンスプログラムを自動生成
する生成方法であって、 a:一度生成されたシーケンスプログラムを実際の設備
に対して動作させながら、これらの設備のデバイスの動
作状態を示すデータを記憶する工程と、 b:記憶されたデバイスの動作状態と、そのデバイスの
動作を記述する前記生成ルールとの不合理性を判断する
工程と、 c:bにおいて、デバイスの実際の動作状態がそのデバ
イスの前記生成ルールに対して不合理であると判断され
た場合に、所定の変更ルールに基づいて、その生成ルー
ルを変更する工程とを具備することにより、このシーケ
ンスプログラムを最適化することを特徴とするシーケン
スプログラムの生成方法。
1. A sequence program automatically generated by combining, for a plurality of facilities, generation rules that describe the state of one or a plurality of devices for activating, regulating, or confirming the operation of each facility. A: storing the data indicating the operating state of the devices of these equipments while operating the sequence program once generated on the actual equipments; and b: storing the stored device data. Determining an irrationality between an operating state and the generation rule describing the operation of the device, and in c: b, the actual operating state of the device is irrational to the generation rule of the device If it is determined that the sequence is changed, the generation rule is changed based on a predetermined change rule. A sequence program generation method characterized by optimizing a sequence program.
【請求項2】 請求項1のシーケンスプログラムの生成
方法において、前記生成ルールはデバイスの故障発生を
検出するプログラム要素を生成するルールを含み、 前記a工程は、 前記シーケンスプログラムの実行中において、設備の故
障が検出されるたび毎に、その故障に至るまでの複数の
シーケンスに亙る複数のデバイスの状態変化の故障履歴
データを、その故障がソリッドな故障である場合に、デ
ータベース内に記憶する工程を含み、 前記b工程は、前記シーケンスプログラムのある実行過
程で故障と疑われる状態が発生した場合に、その実行過
程での前記a工程で記憶された複数のデバイスについて
の実際の動作状態データと前記データベース内の故障履
歴データとを比較して、異なる状態を示すデバイスを検
出する工程と、 故障が検出された設備に対するシーケンスプログラム中
に、検出された前記異なる状態を示すデバイスの動作を
監視するプログラム要素を付加する工程とを副む。
2. The method for generating a sequence program according to claim 1, wherein the generation rule includes a rule for generating a program element that detects a device failure occurrence, and the step a includes the step of installing a facility during execution of the sequence program. Each time a failure is detected, a step of storing failure history data of state changes of a plurality of devices in a plurality of sequences leading to the failure in a database when the failure is a solid failure The step b, when a state suspected of failure occurs in a certain execution process of the sequence program, the actual operation state data of the plurality of devices stored in the step a in the execution process, Comparing the failure history data in the database to detect devices exhibiting different states; During sequence program for the issued equipment, including the step of adding a program element for monitoring the operation of the device shown the different conditions detected.
【請求項3】 請求項1のシーケンスプログラムの生成
方法において、前記生成ルールは、前記シーケンスプロ
グラムの全体若しくは一部を起動するための起動条件を
生成するルールを含み、 前記a工程は、 前記シーケンスプログラムを複数回実行し、その実行毎
に、特定の設備の起動条件を表わす複数のデバイスの状
態データを記憶し、 前記特定の設備について記憶された複数の状態データを
チェックして、異なる部分を抽出し、 前記c工程は、前記特定の設備についての生成ルールか
ら、前記抽出された異なる部分に関与するデバイスに対
応する起動条件の生成ルールを変更する。
3. The sequence program generation method according to claim 1, wherein the generation rule includes a rule that generates a start condition for starting all or a part of the sequence program, and the step a includes the sequence. The program is executed a plurality of times, and each time the program is executed, the status data of a plurality of devices representing the starting conditions of a specific equipment is stored, and the plurality of status data stored for the specific equipment is checked to identify different parts. In step c, the generation rule of the activation condition corresponding to the extracted device related to the different part is changed from the generation rule of the specific facility.
【請求項4】 請求項1のシーケンスプログラムの生成
方法において、このシーケンスプログラムが適用される
全体の設備の動作が、1つの前記設備の動作を含む1つ
の動作ステップを1単位とし、複数の動作ステツプから
なる動作ブロックであって、他の動作ブロックのいかな
る設備の動作とも干渉しない動作ステツプのみを集めた
動作ブロックの集合により表現される。ステップからな
り、
4. The sequence program generation method according to claim 1, wherein the operation of the entire equipment to which this sequence program is applied has one operation step including one operation of the equipment as one unit, and a plurality of operations. An operation block consisting of steps is represented by a set of operation blocks in which only operation steps that do not interfere with the operation of any equipment of other operation blocks are collected. Consists of steps,
【請求項5】 請求項1のシーケンスプログラムの生成
方法において、 前記複数の設備の各々の動作を記述する生成ルールは、
その各々の設備を操作者が意味上で特定することが可能
な名称データと、その各々の設備の動作を記述する動作
データとからなり、 これらの生成ルールからなる生成マスタデータベース
と、を作成し、 このマスタデータベースにアクセス可能な自動プログラ
ミングサブシステムと故障監視サブシステム部とからな
る前記システムを、前記複数の設備の管理に必要な一部
の機能を各々が実現する複数のサブシステムに分割し、 前記名称データをキーにして前記データベースをサーチ
することにより目的アクチュエータデバイスの動作デー
タを得、これにより、各々のサブシステムの機能を実現
することを特徴とする。
5. The generation method of a sequence program according to claim 1, wherein the generation rule that describes the operation of each of the plurality of equipment is
A generation master database consisting of name data that allows the operator to specify the respective facilities in terms of meaning and operation data that describes the operation of each of the facilities is created. The system consisting of an automatic programming subsystem accessible to the master database and a failure monitoring subsystem section is divided into a plurality of subsystems each of which realizes a part of the functions required for managing the plurality of facilities. The operation data of the target actuator device is obtained by searching the database using the name data as a key, and thereby the function of each subsystem is realized.
【請求項6】個々の設備の動作を起動しあるいは規制し
あるいはその動作を確認するための1つまたは複数のデ
バイスの状態を記述する生成ルールを複数の設備につい
て組み合わせるなるシーケンスプログラムを自動生成す
る生成装置であって、 a:前記生成ルールを記憶する第1の記憶部と、 b:一度生成されたシーケンスプログラムを実際の設備
に対して動作させながら、これらの設備のデバイスの動
作状態を監視する監視部と、 c:動作状態を示すデータを記憶する第2の記憶部と、 d:記憶されたデバイスの動作状態と、そのデバイスの
動作を記述する前記生成ルールとの不合理性を判断し、
デバイスの実際の動作状態がそのデバイスの前記生成ル
ールに対して不合理であると判断された場合に、所定の
変更ルールに基づいて、その生成ルールを変更するルー
ル変更部とを具備することを特徴とするシーケンスプロ
グラムの生成装置。
6. A sequence program that automatically combines, for a plurality of facilities, generation rules that describe the state of one or a plurality of devices for activating, regulating, or confirming the operation of each facility. A generation device, wherein: a: a first storage unit that stores the generation rule; and b: while operating a sequence program that has been generated once on actual equipment, monitoring the operating state of the devices of these equipment. A monitoring unit that performs: c: a second storage unit that stores data indicating an operating state; d: an irrationality of the stored operating state of the device and the generation rule that describes the operation of the device Then
And a rule changing unit that changes the generation rule based on a predetermined change rule when it is determined that the actual operating state of the device is unreasonable with respect to the generation rule of the device. Characteristic sequence program generation device.
JP23773891A 1991-09-18 1991-09-18 Method and device for generating sequence program Pending JPH0573109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23773891A JPH0573109A (en) 1991-09-18 1991-09-18 Method and device for generating sequence program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23773891A JPH0573109A (en) 1991-09-18 1991-09-18 Method and device for generating sequence program

Publications (1)

Publication Number Publication Date
JPH0573109A true JPH0573109A (en) 1993-03-26

Family

ID=17019745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23773891A Pending JPH0573109A (en) 1991-09-18 1991-09-18 Method and device for generating sequence program

Country Status (1)

Country Link
JP (1) JPH0573109A (en)

Similar Documents

Publication Publication Date Title
US7546232B2 (en) Mechanical-electrical template based method and apparatus
US7266476B2 (en) Simulation method and apparatus for use in enterprise controls
US6268853B1 (en) Data structure for use in enterprise controls
US6618856B2 (en) Simulation method and apparatus for use in enterprise controls
Benveniste et al. Diagnosis of asynchronous discrete-event systems: a net unfolding approach
JP3142595B2 (en) Production system control system design support and failure diagnosis method
US7779053B2 (en) Diagnosis of an automation system
CA1231422A (en) Method and apparatus for recovering normality in moving sequence of machinery
Miyagi et al. Modeling and analysis of fault-tolerant systems for machining operations based on Petri nets
US20050119843A1 (en) Semiconductor production system
US6363494B1 (en) System and method for characterizing and repairing intelligent systems
CN113515098A (en) Digital twin system of logistics robot
JP2022028619A (en) System and method for constructing failure extension system model for failure root cause analysis in manufacturing system
JPH0581009A (en) Fault diagnostic method for production facility
Moormann et al. Supervisory control synthesis for large-scale systems with isomorphisms
JP3195000B2 (en) Method and apparatus for returning production equipment
JPH0573110A (en) Method for generating simulation program
JPH0573109A (en) Method and device for generating sequence program
JPH06190692A (en) Return device for production facility
JP2918709B2 (en) Automatic generation of sequence program
Maier et al. Automated generation of timing models in distributed production plants
Shi et al. Domain modeling for scenario sensing and edge decision-making
Andersson et al. Restarting flexible manufacturing systems; Synthesis of restart states
Yamada et al. Construction of a consulting system from structural description of a mechanical object
Zhang et al. A reference architecture and functional model for monitoring and diagnosis of large automated systems