JP3111796B2 - How to generate sequence data - Google Patents

How to generate sequence data

Info

Publication number
JP3111796B2
JP3111796B2 JP06062867A JP6286794A JP3111796B2 JP 3111796 B2 JP3111796 B2 JP 3111796B2 JP 06062867 A JP06062867 A JP 06062867A JP 6286794 A JP6286794 A JP 6286794A JP 3111796 B2 JP3111796 B2 JP 3111796B2
Authority
JP
Japan
Prior art keywords
input
numbers
component
connection
assigned
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP06062867A
Other languages
Japanese (ja)
Other versions
JPH0793008A (en
Inventor
剛 榎田
英典 椎葉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP06062867A priority Critical patent/JP3111796B2/en
Publication of JPH0793008A publication Critical patent/JPH0793008A/en
Application granted granted Critical
Publication of JP3111796B2 publication Critical patent/JP3111796B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、シーケンスプログラム
作成時の入力を制約なく行えるようにすると同時に、処
理速度を早くすることができるシーケンスデータの生成
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for generating sequence data which enables input at the time of creating a sequence program without restriction and at the same time increases processing speed.

【0002】[0002]

【従来の技術】現在では、工場内において使用されてい
るほとんどの生産機械の動作はプログラマブルコントロ
ーラで制御されている。このプログラマブルコントロー
ラは一種のコンピュータであるから、これを動作させる
ためにはプログラムを入力する必要がある。このプログ
ラムの入力は、入力装置によってラダーシーケンスを描
きながら行う。
2. Description of the Related Art At present, the operation of most production machines used in a factory is controlled by a programmable controller. Since this programmable controller is a kind of computer, it is necessary to input a program to operate it. The input of this program is performed while drawing a ladder sequence using an input device.

【0003】たとえば、図8に示してあるようなラダー
プログラムを入力する場合には、この図の通りのラダー
図となるように入力装置によって入力を行えば良い。具
体的には、R1 のA接点を入力し、次にこの接点と直列
になるようにR2 のA接点を入力し、さらにこのR1 ,
R2 の両A接点に並列となるように両A接点R4 ,R5
の直列接続された回路を入力する。このような入力を順
次行いながら図のような回路を構成させていく。
For example, when a ladder program as shown in FIG. 8 is input, the input may be performed by an input device so as to obtain a ladder diagram as shown in FIG. Specifically, the A contact of R1 is inputted, and then the A contact of R2 is inputted in series with this contact.
Both A contacts R4, R5 are arranged in parallel with both A contacts of R2.
The circuit connected in series is input. A circuit as shown in the figure is formed while sequentially performing such input.

【0004】このようにして入力されたラダー図は、プ
ログラマブルコントローラが解釈できるような,たとえ
ば機械語などの言語に翻訳されてその記憶装置にストア
されることになるが、この翻訳は通常は次のような手順
で行われている。
The ladder diagram input in this way is translated into a language such as a machine language, which can be interpreted by a programmable controller, and stored in a storage device. The procedure is as follows.

【0005】まず、シーケンスブロックの左上より右上
へと接点やノードを解釈していく。図8に示すラダー図
においては、R1 のA接点からR2 のA接点へと順次解
釈していき、ノード3に達した時にはその下の段の回路
の解釈を行う。つまり、R4 のA接点からR5 のA接点
へと順次解釈していくことになる。また、ノード6に達
したときには、その下の段の回路の解釈を前述したと同
様にして行う。次に、R8 のA接点とこれに直列接続さ
れたR9 のB接点の回路の解釈がされ、さらにR11とR
12との直列回路の解釈がされ、最後にR13の回路の解釈
がされて図8に示した回路の全ての解釈が完了する。
First, contacts and nodes are interpreted from the upper left to the upper right of the sequence block. In the ladder diagram shown in FIG. 8, the interpretation is performed sequentially from the A contact of R1 to the A contact of R2, and when the node 3 is reached, the circuit in the lower stage is interpreted. That is, the A contact of R4 is sequentially interpreted as the A contact of R5. When the signal reaches the node 6, the circuit in the lower stage is interpreted in the same manner as described above. Next, the circuit of the A contact of R8 and the B contact of R9 connected in series to this is interpreted.
The series circuit of 12 is interpreted, and finally the circuit of R13 is interpreted to complete all the interpretations of the circuit shown in FIG.

【0006】このように、従来の解釈処理の方法によれ
ば、あるノードに突き当たるまでには1つの直列回路に
ついての解釈が連続して行われ、ノードに突き当たった
場合にはこの直列回路に並列に接続されている回路の解
釈を同様にして行い、全ての並列回路についての解釈が
終了したら次のノードに突き当たるまでの直列回路につ
いての解釈を行っていくという処理が順次行われる。
As described above, according to the conventional interpretation processing method, the interpretation of one serial circuit is continuously performed until the node hits a certain node. Is performed in a similar manner, and after the interpretation of all the parallel circuits is completed, the interpretation of the series circuit until the next node is hit is performed.

【0007】このために、たとえば図9(A)に示して
あるように、あるノードを跨がないようにラダー回路の
入力が行われているものについては従来通りの翻訳が可
能であるが、図9(B)に示してあるようにノードを跨
ぐようなラダー回路である場合には、翻訳ができなくな
ることになる。また、図10に示すようなラダー回路で
あれば入力に対する出力の結果が同一でなければならな
いのに対して、従来の2レジスタ方式では接点と出力の
上下関係が異なるだけでも、翻訳が行われた場合には結
果が異なることになるので、このような不具合を解消す
るために、入力エディタを用いてラダープログラムの誤
入力の発生を回避するようにしている。そして、このよ
うにして正確な入力が行われたシーケンスプログラム
は、所定の翻訳ルールにしたがって機械語に翻訳され、
記憶装置に記憶されることになる。
For this reason, as shown in, for example, FIG. 9A, a conventional ladder circuit can be translated as long as it does not cross a certain node. In the case of a ladder circuit that straddles nodes as shown in FIG. 9B, translation cannot be performed. In the case of a ladder circuit as shown in FIG. 10, the output result with respect to the input must be the same, whereas in the conventional two-register system, translation is performed even if only the vertical relationship between the contact and the output is different. In such a case, the result will be different. In order to solve such a problem, an input editor is used to avoid occurrence of erroneous input of the ladder program. Then, the sequence program in which the correct input is performed in this way is translated into a machine language according to a predetermined translation rule,
It will be stored in the storage device.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、このよ
うな入力エディタを使用していても、複雑なラダー図に
おいては必ずしも完全な誤入力の回避をすることはでき
ず、万が一誤入力の発見がされないままに翻訳がされて
しまった場合には、当初予定していた通りの動作状態を
実現することができず、バグの解消に多くの時間を要し
てしまうという問題がある。
However, even if such an input editor is used, it is not always possible to completely avoid erroneous input in a complicated ladder diagram, and no erroneous input is detected by any chance. If the translation is performed as it is, the operation state as originally planned cannot be realized, and there is a problem that it takes much time to resolve the bug.

【0009】また、入力されたプログラムを機械語に翻
訳して記憶する場合、従来のシーケンスデータの生成方
法においては、たとえば図13に示したようなラダー回
路を入力すると、次の表1に示すような論理式展開がさ
れ、あたかも図14に示したような回路を入力したかの
ような翻訳が行われることから、重複した解釈を行わな
ければならない部分を生じ、実行時にはこの重複部分を
その都度処理する必要があるので、解釈の対象となるデ
ータ量が増加し、その分処理速度が遅くなってしまうと
いう問題がある。
When the input program is translated into a machine language and stored, in a conventional method of generating sequence data, when a ladder circuit as shown in FIG. Such logical expression expansion is performed, and translation is performed as if a circuit as shown in FIG. 14 is input, so that a part that must be interpreted redundantly occurs. Since it is necessary to process each time, there is a problem that the amount of data to be interpreted increases, and the processing speed decreases accordingly.

【0010】[0010]

【表1】 [Table 1]

【0011】本発明は、このような従来の不具合を解消
するためになされたものであり、その第1の目的は、翻
訳に先だって、入力されたラダー図において使用されて
いる部品表を作成し、その部品表に基づいて翻訳を行う
ようにして、入力するラダー図のパターンに制限がなく
なりまたバグの発生を完全に解消できるシーケンスデー
タの生成方法の提供を目的とするものである。
The present invention has been made to solve such a conventional problem. A first object of the present invention is to prepare a parts table used in an input ladder diagram prior to translation. It is another object of the present invention to provide a method of generating sequence data in which translation is performed based on the parts table so that the pattern of the input ladder diagram is not limited and the occurrence of a bug can be completely eliminated.

【0012】そして、その第2の目的は、入力されたデ
ータが入力時のラダー図と同様のラダー図として記憶さ
れるようにしたシーケンスデータの生成方法の提供を目
的とするものである。
A second object of the present invention is to provide a method of generating sequence data in which input data is stored as a ladder diagram similar to the ladder diagram at the time of input.

【0013】[0013]

【課題を解決するための手段】上記目的を達成するため
の本発明の第1の構成は、入力されたラダープログラム
に基づいてラダー図を展開し、当該ラダー図の各構成部
品の接続線または当該接続線同士の接続点にそれぞれ番
号を付し、当該各構成部品の入力側の接続線あるいは接
続点の番号順に、前記構成部品を配列した部品表を当該
構成部品の種類ごとに作成し、当該部品表に基づいて、
シーケンス制御のためのプログラムを作成することを特
徴とするものである。
According to a first configuration of the present invention for achieving the above object, a ladder diagram is developed based on an input ladder program, and connection lines of respective components of the ladder diagram or A number is assigned to each connection point between the connection lines, and in order of the numbers of the connection lines or connection points on the input side of each component, a parts table in which the components are arranged is created for each type of the component, Based on the bill of materials,
It is characterized in that a program for sequence control is created.

【0014】第2の構成は、入力されたラダープログラ
ムに基づいてラダー図を展開し、当該ラダー図の各構成
部品の接続線または当該接続線同士の接続点にそれぞれ
番号を付し、当該各構成部品の入力側の接続線あるいは
接続点の番号順に、前記構成部品を配列した部品表を当
該構成部品の種類ごとに作成し、当該構成部品の種類ご
とに作成された部品表のうち、各構成部品に付された入
力および出力の番号を他の構成部品のそれらの番号と比
較して同一番号に整理できるか否かを判断し、同一番号
に整理することができる場合には同一番号に整理する処
理をし、当該処理結果に基づいてシーケンス制御のため
のプログラムを作成することを特徴とするものである。
In the second configuration, a ladder diagram is developed based on an input ladder program, and a number is assigned to a connection line of each component of the ladder diagram or a connection point between the connection lines. In the order of the number of connection lines or connection points on the input side of the component, a component table in which the components are arranged is created for each type of component, and among the component tables created for each type of component, each The input and output numbers assigned to components are compared with those of other components to determine whether they can be sorted into the same number.If they can be sorted into the same number, they are assigned the same number. It is characterized by performing a process of organizing and creating a program for sequence control based on the processing result.

【0015】第3の構成は、入力されたラダープログラ
ムに基づいてラダー図を展開し、当該ラダー図の各構成
部品の接続線または当該接続線同士の接続点にそれぞれ
番号を付し、当該各構成部品の入力側の接続線あるいは
接続点の番号順に、前記構成部品を配列した部品表を当
該構成部品の種類ごとに作成し、当該構成部品の種類ご
とに作成された部品表のうち、入力側に複数回出現する
番号をノード番号として割り付けると共に、当該ノード
番号にビット番号を割り付けて前記ノード番号の整理を
行い、当該割り付けられたビット番号に対して論理式を
生成し、当該ビット番号ごとに生成された論理式にブロ
ック番号を割り付け、当該割り付けられたブロック番号
相互間の依存関係を求め、当該依存関係に基づいてシー
ケンス制御のためのプログラムを作成することを特徴と
するものである。
In a third configuration, a ladder diagram is developed based on an input ladder program, and connection lines of each component of the ladder diagram or connection points between the connection lines are numbered. In the order of the number of connection lines or connection points on the input side of the component, a component table in which the components are arranged is created for each type of component, and among the component tables created for each type of component, input A number that appears multiple times on the side is assigned as a node number, a bit number is assigned to the node number, the node number is sorted, a logical expression is generated for the assigned bit number, and Assigns block numbers to the generated logical expressions, finds dependencies between the assigned block numbers, and performs sequence control based on the dependencies. It is characterized in that to create a program.

【0016】第4の構成は、入力されたラダープログラ
ムに基づいてラダー図を展開し、当該ラダー図の各構成
部品の接続線または当該接続線同士の接続点にそれぞれ
番号を付し、当該各構成部品の入力側および出力側の接
続線あるいは接続点の番号順に、前記構成部品を配列し
た部品表を当該構成部品の種類ごとに作成し、当該構成
部品の種類ごとに作成された部品表のうち、入力側に複
数回出現する番号をノード番号として割り付けると共
に、当該ノード番号にビット番号を割り付けて前記ノー
ド番号の整理を行い、当該割り付けられたビット番号に
対して論理式を生成し、当該ビット番号ごとに生成され
た論理式にブロック番号を割り付け、当該割り付けられ
たブロック番号相互間の依存関係を求め、当該依存関係
に基づいてブロック番号を並び替え、当該並べ替えられ
たブロック番号に基づいて前記ビット番号ごとに生成さ
れた論理式を結合し、前記出力側の接続点に対する論理
式を前記ビット番号ごとに結合された論理式に結合する
ことによってシーケンス制御のためのプログラムを作成
することを特徴とするものである。
In a fourth configuration, a ladder diagram is developed based on an input ladder program, a number is given to a connection line of each component of the ladder diagram or a connection point between the connection lines, and the respective ladder diagram is numbered. In the order of the number of connection lines or connection points on the input side and output side of the component, a component table in which the components are arranged is created for each type of the component, and a component table created for each type of the component is created. Of these, a number that appears multiple times on the input side is assigned as a node number, a bit number is assigned to the node number, the node number is sorted, and a logical expression is generated for the assigned bit number. A block number is assigned to a logical expression generated for each bit number, a dependency between the assigned block numbers is obtained, and blocks are determined based on the dependency. And rearranging the logical expressions generated for each of the bit numbers based on the rearranged block numbers, and converting the logical expression for the connection point on the output side into a logical expression for each of the bit numbers. A program for sequence control is created by the combination.

【0017】[0017]

【作用】このように構成した本発明は、次のように作用
することになる。
The present invention thus constructed operates as follows.

【0018】第1の構成にあっては、まず、入力された
ラダープログラムに基づいてラダー図を展開し、当該ラ
ダー図の各構成部品の接続線または当該接続線同士の接
続点にそれぞれ番号を付し、当該各構成部品の入力側の
接続線あるいは接続点の番号順に前記構成部品を配列し
た部品表を当該構成部品の種類ごとに作成しているの
で、入力されたラダープログラムは構成部品の接続関係
のみでシーケンスコードが生成されることから、ラダー
回路の入力パターンに制限がなくなり、これにともなっ
てバグの発生も完全に解消されることになる。
In the first configuration, first, a ladder diagram is developed based on an input ladder program, and numbers are assigned to connection lines of each component of the ladder diagram or connection points between the connection lines. In addition, since a parts table in which the components are arranged in the order of the numbers of the connection lines or connection points on the input side of each component is created for each type of the components, the input ladder program is Since the sequence code is generated only by the connection relation, there is no restriction on the input pattern of the ladder circuit, and accordingly, the occurrence of the bug is completely eliminated.

【0019】具体的には、ラダー回路の接点と接点のつ
なぎ目の全てに左上から右下に向けて番号を付す。シー
ケンス回路を構成している接点やコイル名称をすべてリ
ストアップし、さらにその接点の左側についている番号
を入力番号、右側についている番号を出力番号としてリ
ストを作成する。これらの入出力番号をワイヤーという
部品群の関係を使ってできるだけ簡略化して部品表を作
成する。
More specifically, all of the contacts of the ladder circuit and the joints of the contacts are numbered from upper left to lower right. The names of all the contacts and coils constituting the sequence circuit are listed, and the numbers on the left side of the contacts are input numbers, and the numbers on the right side are output numbers. These input / output numbers are simplified as much as possible using the relationship between the parts groups called wires to create a parts table.

【0020】このように、どのようなパターンのシーケ
ンス回路でも、上記のような処理をすることで、部品だ
けのデータに変換することができる。
As described above, the sequence circuit of any pattern can be converted into data of only parts by performing the above-described processing.

【0021】第2の構成にあっては、第1の構成に加え
て、構成部品の種類ごとに作成された部品表のうち、各
構成部品に付された入力および出力の番号を他の構成部
品のそれらの番号と比較して同一番号に整理できるか否
かを判断し、同一番号に整理することができる場合には
同一番号に整理する処理をし、当該処理結果に基づいて
シーケンス制御のためのプログラムを作成するようにし
ている。
In the second configuration, in addition to the first configuration, in the parts table created for each type of component, the input and output numbers assigned to each component are changed to other components. The part numbers are compared with those numbers to determine whether they can be arranged into the same number, and if they can be arranged into the same number, processing is performed to arrange them into the same number, and sequence control based on the processing result is performed. To make a program for it.

【0022】具体的には、できあがった部品表の入力番
号の項を見て、この中で複数回出現する番号をリストア
ップする。つまり、このリストアップした番号が付され
た列に複数個の接点が存在することを意味する。これら
の接点の出力値というのは、その接点の入力値と接点と
のアンドデータである。このため、全ての接点の出力値
を求めるためには、その都度入力側の値を求めなければ
ならない。しかし、この入力側の値はどの行に位置して
いようが同じである。したがって、入力側の値を出力す
るブロックを登録する必要がある。
More specifically, looking at the input number section of the completed parts table, the numbers appearing a plurality of times are listed. In other words, this means that there are a plurality of contacts in the column with the number listed. The output values of these contacts are the input values of the contacts and AND data of the contacts. Therefore, in order to obtain the output values of all the contacts, the values on the input side must be obtained each time. However, the value on the input side is the same regardless of which row is located. Therefore, it is necessary to register a block that outputs an input value.

【0023】第3の構成にあっては、第1の構成に加え
て、構成部品の種類ごとに作成された部品表のうち、入
力側に複数回出現する番号をノード番号として割り付け
ると共に、当該ノード番号にビット番号を割り付けて前
記ノード番号の整理を行い、当該割り付けられたビット
番号に対して論理式を生成し、当該ビット番号ごとに生
成された論理式にブロック番号を割り付け、当該割り付
けられたブロック番号相互間の依存関係を求め、当該依
存関係に基づいてシーケンス制御のためのプログラムを
作成するようにしている。
In the third configuration, in addition to the first configuration, a number that appears a plurality of times on the input side in a parts table created for each type of component is assigned as a node number. A bit number is assigned to the node number, the node number is rearranged, a logical expression is generated for the allocated bit number, and a block number is allocated to the logical expression generated for each of the bit numbers. A dependency relationship between the block numbers is obtained, and a program for sequence control is created based on the dependency relationship.

【0024】このようにすれば、リストアップした番号
を出力とするブロックをそれぞれ求めた時に、そのブロ
ックをある特定の番号で登録して分かり易く見やすくす
るための手段である。
This is a means for registering a block with a specific number and making it easy to understand and to see when a block whose output number is listed is obtained.

【0025】第4の構成にあっては、第3の構成に加え
て、依存関係に基づいてブロック番号を並び替え、当該
並べ替えられたブロック番号に基づいて前記ビット番号
ごとに生成された論理式を結合し、前記出力側の接続点
に対する論理式を前記ビット番号ごとに結合された論理
式に結合することによってシーケンス制御のためのプロ
グラムを作成するようにしている。
In the fourth configuration, in addition to the third configuration, the block numbers are rearranged based on the dependency, and the logical numbers generated for each of the bit numbers are rearranged based on the rearranged block numbers. A program for sequence control is created by combining expressions and combining a logical expression for the connection point on the output side with a logical expression combined for each of the bit numbers.

【0026】このため、生成されるプログラムは入力し
たラダー図に一致したものとすることができ、実行時の
無駄な処理を排除することができるようになるから、実
行速度を向上させることができるようになる。
Therefore, the generated program can be made to match the input ladder diagram, and unnecessary processing at the time of execution can be eliminated, so that the execution speed can be improved. Become like

【0027】具体的には、複数回出現する(処理され
る)ブロックをある特定のビット番号で登録することが
できる。また、そのブロックの出力値を求める処理をす
る場合そのブロックに割り付いているビット番号を呼び
出して、ブロックの出力値を与えるというデータ構成を
もった論理式ができる。論理式内でのブロックの依存関
係も分かりやすくまた見やすくなる。
Specifically, a block appearing (processed) a plurality of times can be registered with a specific bit number. In addition, when performing processing for obtaining the output value of the block, a logical expression having a data configuration in which the bit number assigned to the block is called and the output value of the block is given can be obtained. Dependencies of blocks in logical expressions are also easy to understand and understand.

【0028】[0028]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図1は、本発明にかかるシーケンスデータの生
成方法を実施する装置の概略構成を示したものである。
図中のシーケンス編集機10は、シーケンスプログラム
を作成するにあたって、オペレータがラダー図として入
力することができるようになっているものである。ま
た、シーケンスコード生成器12は、本発明の生成方法
を実行して、CPU依存性の少ない中間コードを出力す
るように構成されているものである。シーケンス実行器
14は、シーケンスコード生成器12からの中間コード
をCPU依存の機械語に変換してシーケンス処理を実行
するものである。入出力部16は、このシーケンスコー
ド実行器14による実行結果を外部に出力するものであ
る。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows a schematic configuration of an apparatus for implementing a method of generating sequence data according to the present invention.
The sequence editing machine 10 in the figure is designed so that an operator can input a ladder diagram when creating a sequence program. Further, the sequence code generator 12 is configured to execute the generation method of the present invention and output an intermediate code with little dependence on the CPU. The sequence executor 14 converts the intermediate code from the sequence code generator 12 into a CPU-dependent machine language and executes a sequence process. The input / output unit 16 outputs the execution result of the sequence code execution unit 14 to the outside.

【0029】図2は、本発明の生成方法の概略の手順を
示した図である。
FIG. 2 is a diagram showing a schematic procedure of the generation method of the present invention.

【0030】本発明のシーケンスデータの生成方法の概
略の手順を説明すると次のようになる。
The general procedure of the sequence data generating method of the present invention will be described as follows.

【0031】まず第1段階では、シーケンス編集機10
によって入力されたラダープログラムの内のノードに相
当する部分の全てに番号を付ける処理を行なう。これ
は、次の処理において行われる部品表の作成に必要とな
るからである。
First, in the first stage, the sequence editing machine 10
A process is performed to number all of the parts corresponding to the nodes in the ladder program input by the above. This is because it is necessary to create a parts table performed in the next process.

【0032】次に第2段階では、ノードに付された番号
に基いて、入力されたラダープログラムを構成する全て
の部品を番号順に並べて部品表を作成する。この部品表
には、リレーのコイル、リレーの接点、接点間を接続す
るワイヤ等の部品が含まれている。
Next, in the second stage, a parts table is created by arranging all parts constituting the input ladder program in numerical order based on the numbers assigned to the nodes. This parts list includes components such as coils of the relay, contacts of the relay, and wires connecting the contacts.

【0033】そして第3段階では、作成された部品表を
ノードの番号に基づいて整理する処理が行われる。この
処理によって各部品間の接続関係が明確にされることに
なる。
In the third stage, a process for organizing the created parts table based on the node numbers is performed. This process clarifies the connection relationship between the components.

【0034】第4段階では、整理された部品表を基にシ
ーケンスコードを生成する処理を行い、第5段階ではこ
の生成されたシーケンスコードの冗長分を整理する処理
を行う。この第5段階の処理が行われた後には、CPU
の依存性の少ない中間コードが出力されることになる。
In the fourth stage, a process of generating a sequence code based on the organized parts table is performed, and in the fifth stage, a process of rearranging the generated sequence code is performed. After the processing of the fifth stage is performed, the CPU
Will be output.

【0035】以上第1段階から第4段階までの処理は、
シーケンスコード生成器12によって処理される。
The processing from the first stage to the fourth stage is as follows.
Processed by the sequence code generator 12.

【0036】そして最後に、各種の実行器専用の機械語
を生成する処理を行う。この処理はシーケンス実行器1
4によって行われ、入出力部16を介して外部の装置に
出力される。
Finally, a process for generating machine language dedicated to various execution units is performed. This processing is performed by the sequence executor 1
4 and output to an external device via the input / output unit 16.

【0037】次に上述のそれぞれの段階の処理を図面を
参照しながら詳細に説明する。
Next, the processing in each of the above steps will be described in detail with reference to the drawings.

【0038】まず第1段階において、オペレータがシー
ケンス編集器10を用いて図3に示したようなラダープ
ログラムを入力した場合には、これがシーケンスコード
生成器12に送られて、図4に示すような部分に番号が
付されることになる。つまり、このラダープログラム中
に存在する全てのノード、バーテックスに番号が付され
る。この番号を付す場合のルールは次のように取り決め
てある。
First, in the first stage, when the operator inputs a ladder program as shown in FIG. 3 using the sequence editor 10, the ladder program is sent to the sequence code generator 12, as shown in FIG. Parts will be numbered. That is, numbers are assigned to all nodes and vertices existing in this ladder program. The rules for assigning this number are as follows.

【0039】1.番号を付す順番は、左上から右下とす
る。
1. The numbering order is from upper left to lower right.

【0040】2.接点やコイルなどの部品同士が接して
いる場所をノードと称する。
2. A place where parts such as contacts and coils are in contact with each other is called a node.

【0041】3.線の折れている部分をバーテックスと
称する。
3. The broken portion of the line is called a vertex.

【0042】4.基線に接しているノードは全てゼロ番
である。
4. All nodes in contact with the baseline are numbered zero.

【0043】以上のルールにしたがって図3のラダープ
ログラムのノード等に番号を付していくと、図4に示し
てあるようになる。
When the nodes and the like of the ladder program in FIG. 3 are numbered according to the above rules, they are as shown in FIG.

【0044】以上のように番号が付された後には、第2
段階の処理が行われ、図5に示すような部品一覧表が作
成される。
After the numbers are assigned as described above, the second
Step processing is performed, and a parts list as shown in FIG. 5 is created.

【0045】たとえば部品であるA接点のR1 について
は、入力NOが0,出力NOが1と記される。また、W
1 は単にノード間を接続するワイヤであるが、これも入
力側と出力側とが存在するので部品として登録する。こ
のW1 については入力NOが5,出力NOが11と記さ
れる。このようにシーケンス編集機10によって入力さ
れたラダープログラム中に存在する全ての部品について
付された入力NOおよび出力NOを勘案した図5のよう
な部品表を作成する。
For example, as for R1 of the A contact, which is a component, the input NO is described as 0 and the output NO is described as 1. Also, W
Reference numeral 1 denotes a wire simply connecting nodes, which is also registered as a component because there are input and output sides. As for this W1, the input NO is described as 5 and the output NO is described as 11. In this way, a parts table as shown in FIG. 5 is created in consideration of the input numbers and output numbers assigned to all the parts existing in the ladder program input by the sequence editor 10.

【0046】図5のように作成された部品表は部品の種
類ごとでも入力NO毎でもないので、第3段階では、こ
れを部品ごとに整理する処理を行う。また、部品に付さ
れている番号の整理も同時に行う。
Since the parts table created as shown in FIG. 5 is not for each type of parts or for each input number, in the third stage, a process for organizing the parts for each part is performed. Also, the numbers assigned to the parts are arranged at the same time.

【0047】この第3段階の処理を行うにあたって整理
のためのルールは次のように設定してある。
In performing the processing of the third stage, rules for organizing are set as follows.

【0048】1.ワイヤの両端のノード番号は等価であ
るものとする。
1. The node numbers at both ends of the wire are assumed to be equivalent.

【0049】2.接点の両端のノード番号は入れ替える
ことができないものとする。
2. The node numbers at both ends of the contact cannot be interchanged.

【0050】3.ノード番号は小さい順に整理する。3. Sort the node numbers in ascending order.

【0051】4.L形および逆L形(┘)バーテックス
のノード番号は全て消去する。
4. All the node numbers of the L type and the inverted L type (┘) vertex are deleted.

【0052】5.終了条件は全てのワイヤが消去できた
時である。
5. The termination condition is when all the wires have been erased.

【0053】したがって、この第3段階は全てのワイヤ
が消去できるまで繰り返し行われることになる。
Therefore, this third step is repeated until all the wires can be erased.

【0054】まず、図5に示した部品表を種別毎に分け
て、図6に示したような種別毎の部品表を作成する。次
に、この部品表をルールにしたがって整理する。つま
り、ワイヤのノード番号は等価であるので、ワイヤW1
の入力NO5と出力NO11とは置換可能であると言う
ことになり、同様にワイヤW2 の入力NO11と出力N
O13についても同様である。この関係を勘案して図6
の部品表の整理をすると、A接点のR5 については、ワ
イヤW9 の入力NO1と5とが等価であるので、その入
力NOを5から1に変更する。A接点のR7 の入力NO
8はワイヤW6 を参照してそのNOを8から6に変更す
る。このようにしてリレー接点の入力NOと出力NOと
を置き換えができなくなるまでワイヤの入出力NOを参
照して繰り返し変更する処理を行う。この処理の結果、
最終的に得られるそれぞれのリレー接点,出力端子,ワ
イヤの部品表は図7のようなものとなる。このようにし
て作成された部品表は次の段階においてシーケンスコー
ドを作成するための基礎とされる。
First, the parts table shown in FIG. 5 is divided for each type, and a parts table for each type as shown in FIG. 6 is created. Next, the parts list is arranged according to the rules. That is, since the node numbers of the wires are equivalent, the wire W1
Can be replaced with the input NO5 and the output NO11 of the wire W2.
The same applies to O13. In consideration of this relationship, FIG.
When the parts table is arranged, the input No. of the wire W9 is equivalent to the input No. 5 for the R5 of the A contact, so the input No. is changed from 5 to 1. R7 input NO of A contact
8 changes the NO from 8 to 6 with reference to the wire W6. In this manner, a process of repeatedly changing the input NO and the output NO of the relay contact with reference to the input / output NO of the wire until the input NO and the output NO cannot be replaced is performed. As a result of this process,
The parts list of each relay contact, output terminal, and wire finally obtained is as shown in FIG. The parts table created in this way is used as a basis for creating a sequence code in the next stage.

【0055】第4段階の処理においては、第3段階まで
の処理で作成された部品表に基づいてシーケンスコード
が作成される。この処理においても次のようなルールが
設定されている。
In the process of the fourth stage, a sequence code is created based on the parts table created by the processes up to the third stage. The following rules are also set in this processing.

【0056】1.接点と入力ノードのAND値を出力す
る。
1. The AND value of the contact and the input node is output.

【0057】2.入力ノード番号が0になったところで
PUSHする。
2. When the input node number becomes 0, PUSH is performed.

【0058】3.PUSHした回数はカウントしてお
く。
3. The number of times of PUSH is counted.

【0059】4.全ての回路をPUSHし終えたら、カ
ウント回数POP_ORを繰り返す。
4. When all the circuits have been pushed, the count POP_OR is repeated.

【0060】5.POP_OR終了後、所定のコイル,
ファンクションに出力する。
5. After the end of POP_OR, a predetermined coil,
Output to function.

【0061】以上のルールを踏まえてこの段階の処理は
たとえば次のようにして行われることになる。
Based on the above rules, the processing at this stage is performed as follows, for example.

【0062】まず出力端子の番号であるO1 について見
る。この出力端子O1 は4を入力としているので、出力
NOが4である部品を検索することになる。この部品が
捜せたら、その部品が入力としているノードの番号を書
いてその下の行に所定のコードを書く。次に、ノード番
号を表の出力項から捜して、対応する接点項(部品)の
入力項に書かれているノード番号を書く。このノード番
号と接点とをANDする。この処理は出力項が1つだけ
の場合と出力項が複数の場合との2つの場合がある。
First, the output terminal number O1 will be described. Since the output terminal O1 receives 4 as an input, a component whose output NO is 4 is searched. If this part can be found, write the number of the node as the input of the part and write a predetermined code in the line below it. Next, the node number is searched from the output item of the table, and the node number written in the input item of the corresponding contact item (part) is written. The node number and the contact are ANDed. This processing has two cases, that is, a case where there is only one output term and a case where there are a plurality of output terms.

【0063】たとえば出力項が1つだけの場合には、ノ
ード番号/ANDのみが記され、次のように処理され
る。
For example, when there is only one output term, only the node number / AND is described, and the processing is performed as follows.

【0064】 4 OUT 01 についての変換は、 3 AND R4 OUT 01 となる。The conversion for 4 OUT 01 is 3 AND R 4 OUT 01.

【0065】一方、出力項が複数ある場合には、ノード
番号/ANDの後にPUSHを付け、全ての出力効を記
述した後にPUSHの数だけPOP_ORを書く。たと
えば、 3 AND R4 OUT 01の変換は、 2 AND R3 PUSH 6 AND R6 PUSH 6 AND R7 PUSH POP_OR POP_OR POP_OR AND R4 OUT O1 となる。
On the other hand, when there are a plurality of output terms, PUSH is added after the node number / AND, and POP_OR is written by the number of PUSH after describing all output effects. For example, the conversion of 3 AND R4 OUT 01 is 2 AND R3 PUSH 6 AND R6 PUSH 6 AND R7 PUSH POP_OR POP_OR POP_OR AND R4 OUT O1.

【0066】さらに、入力ノード番号が0の場合には、
LD 部品とし、全てのノード番号が消えたところで終
了する。
Further, when the input node number is 0,
The process ends when all node numbers have disappeared as LD components.

【0067】そして、このような処理がされた以降は次
のようにして論理式への展開が行われることになる。
After such processing is performed, expansion into a logical expression is performed as follows.

【0068】[0068]

【表2】 [Table 2]

【0069】そして、次に第5段階の処理が行われるこ
とになる。まず第1のルールとしてはPUSH/POP
_ORは省略する。第2のルールとしては、PUSH/
LD/POP_ORはORに変換する。このルールの基
づいて表1の論理式を変換すると表2のようになる。
Then, the fifth stage processing is performed. The first rule is PUSH / POP
_OR is omitted. The second rule is that PUSH /
LD / POP_OR is converted to OR. Table 2 is obtained by converting the logical expression of Table 1 based on this rule.

【0070】[0070]

【表3】 [Table 3]

【0071】以上のようにして整理された論理式の中間
言語を機械語に翻訳する。この変換は変換表に基づいて
行われるが、この変換はターゲットとなるCPUの種類
によって異なる。以下の実施例では、68020のCP
Uを用いた場合について示す。この68020のCPU
はアドレスモードでインデックス付きメモリ間接モード
を使用してビットのアクセスを行うようになっている。
The intermediate language of the logical expression arranged as described above is translated into a machine language. This conversion is performed based on the conversion table, and this conversion differs depending on the type of the target CPU. In the following example, the CP of 68020
The case where U is used is shown. This 68020 CPU
In the address mode, bit access is performed using the memory indirect mode with an index.

【0072】この処理を行うにあたっては、次のような
接点テーブルサイズを設定しておく。
In performing this processing, the following contact table size is set.

【0073】[0073]

【表4】 [Table 4]

【0074】また、次のようにイニシャルベースアドレ
ス,ベースアドレスからオフセット値、レジスタ番号も
設定しておく。
Also, an initial base address, an offset value from the base address, and a register number are set as follows.

【0075】[0075]

【表5】 [Table 5]

【0076】[0076]

【表6】 [Table 6]

【0077】以上のようにして変換された機械語は、入
出力部4から外部に出力されることになる。なお、以上
の実施例においては上記の処理をシーケンスコード生成
器12及びシーケンス実行器14によって行うようにし
てあるが、この処理を全てシーケンスコード生成器12
のみのによって行うようにしてもよい。この場合には、
シーケンス実行器14へはCPU依存性の高い機械語が
出力されることになる。 このように、本発明では、入
力されたシーケンスラダー図の逐次変換は行わず、一
度、出力に関連する全ての接点を洗いだし、あらためて
論理的にシーケンスコードを生成するようにしたため
に、ラダーの書式に制限がなくなり、シーケンスエディ
ター等による入力パターンのチェックを行う必要もなく
なる。また、論理的に接点の接続関係のみでシーケンス
コードを生成するために画面上の位置の相違による実行
結果の相違がなくなることになる。
The machine language converted as described above is output from the input / output unit 4 to the outside. In the above embodiment, the above-described processing is performed by the sequence code generator 12 and the sequence executor 14.
It may be performed only by the user. In this case,
A machine language highly dependent on the CPU is output to the sequence executor 14. As described above, in the present invention, the sequential conversion of the input sequence ladder diagram is not performed, and all the contacts related to the output are once washed out, and the sequence code is logically generated again. There is no restriction on the format, and there is no need to check the input pattern using a sequence editor or the like. Further, since the sequence code is logically generated only by the connection relation of the contacts, the difference in the execution result due to the difference in the position on the screen is eliminated.

【0078】次に、実行速度を高速化することができる
ようにしたシーケンスデータの生成方法について説明す
る。
Next, a description will be given of a method of generating sequence data capable of increasing the execution speed.

【0079】本実施例で使用する装置は、前述の実施例
で例示した図1に示した装置と全く同一の装置である。
また、本実施例のシーケンスデータの制御方法の内、図
2に示したフローチャートの第3段階までの処理は前述
の実施例と全く同様の処理を行うようになっているの
で、その処理の詳細な説明は省略する。つまり、図3に
示したラダー図に対して図4から図7に示したと同様の
処理が行われることになる。
The apparatus used in this embodiment is exactly the same as the apparatus shown in FIG. 1 exemplified in the above embodiment.
In the sequence data control method according to the present embodiment, the processing up to the third stage of the flowchart shown in FIG. 2 is exactly the same as that in the above-described embodiment. Detailed description is omitted. That is, the same processing as that shown in FIGS. 4 to 7 is performed on the ladder diagram shown in FIG.

【0080】図7のようにして得られた部品表に基づい
て、それぞれの部品の入力番号として複数回出現するノ
ード番号があるかをチェックし、複数回出現するノード
番号を抽出し、抽出したノード番号に対してビット番号
を付する処理を行う。具体的には、図11に示してある
ように、まず、入力番号として1が与えられている部品
が複数あるので、この入力番号1を抽出し、次に入力番
号3も複数出現しているのでこの番号3を抽出するとい
う処理を行い、この抽出した番号を順番に並べると、
1,3,6,10となる。そして、この並べた順番にビ
ット番号をそれぞれ0,1,2,3という具合に付す。
この処理を行うことは、図12に示したように、同一の
ラインに付した異なるノード番号を同一のビット番号と
して統一することを意味する。つまり、接点R1,R
2,R5,R9,R10,R11のそれぞれはビット0
という番号を付されたラインに繋がれていることを意味
する。この処理が終了したら、次に、各ビット番号を最
終出力とする論理式を生成する処理を行う。
Based on the parts table obtained as shown in FIG. 7, it is checked whether there is a node number that appears multiple times as the input number of each part, and the node numbers that appear multiple times are extracted and extracted. A process of assigning a bit number to the node number is performed. Specifically, as shown in FIG. 11, first, since there are a plurality of parts to which 1 is given as the input number, this input number 1 is extracted, and then a plurality of input numbers 3 also appear. Therefore, a process of extracting the number 3 is performed, and the extracted numbers are arranged in order.
1, 3, 6, and 10. Then, the bit numbers are assigned in the order of arrangement such as 0, 1, 2, and 3, respectively.
Performing this process means that different node numbers assigned to the same line are unified as the same bit number, as shown in FIG. That is, the contact points R1, R
2, R5, R9, R10, and R11 each have bit 0
Means that they are connected to the numbered line. When this process is completed, next, a process of generating a logical expression having each bit number as a final output is performed.

【0081】この論理式を生成する場合は次のルールに
したがって行うようにしてある。
The generation of this logical expression is performed according to the following rules.

【0082】1.各ブロックの最終出力はSTEB#
(#はビット番号である)とする。
1. The final output of each block is STEB #
(# Is a bit number).

【0083】2.接点(部品)と入力番号をアンドした
値を出力する。
2. Outputs the value obtained by ANDing the contact (part) and the input number.

【0084】3.入力ノードに一致する出力ノードが複
数個存在する場合には、それぞれについて論理式を生成
し、PUSHを用いて接合する。最後にPUSHした数
だけ、POP_ORを繰り返す。
3. If there are a plurality of output nodes that match the input node, a logical expression is generated for each of them and joined using PUSH. POP_OR is repeated by the number of times of last PUSH.

【0085】4.入力ノードが0の場合に限ってLDを
用いる。
4. The LD is used only when the input node is 0.

【0086】5.ビット番号を割り付けたノード番号が
出現したら、それをGETB#(#はビット番号)に置
き換える。6.論理式生成の終了はノード番号がなくな
るまでとする。
5. When a node number to which a bit number is assigned appears, it is replaced with GETB # (# is a bit number). 6. The logical expression generation ends until there is no more node number.

【0087】ここで、SETBとは、Accの内容をビ
ットスコアテーブルの該当するビット番号に入れること
を意味し、GETBとは、ビットスコアテーブルの該当
するビット内容をAccにロードすることを意味する。
Here, SETB means putting the contents of Acc into the corresponding bit number of the bit score table, and GETB means loading the corresponding bit contents of the bit score table into Acc. .

【0088】以上のようなルールにしたがって論理式は
次のようにして生成されることになる。この論理式の生
成手順を図12の回路に基づいて説明する。
According to the above rules, a logical expression is generated as follows. The procedure for generating the logical expression will be described based on the circuit of FIG.

【0089】まず、ビット番号0(ノード番号1)につ
いての生成手順は次のように行われる。ノード番号1が
最終出力となるので、1を置き、その後にSETB 0
を置く。そして、ノード番号1を出力している部品を図
11に示した部品一覧表から捜し出し、上記のルールの
3,4にしたがって生成した論理式は次のようになる。
First, the generation procedure for bit number 0 (node number 1) is performed as follows. Since node number 1 is the final output, set 1 and then SETB 0
Put. Then, the component outputting the node number 1 is searched from the component list shown in FIG. 11, and the logical expression generated according to the above rules 3 and 4 is as follows.

【0090】 LD R1 PUSH LD R9 PUSH POP_OR POP_OR SETB 0 同様にビット番号1(ノード番号3)の場合も上記のル
ールにしたがって論理式展開すると次のようになる。
LD R1 PUSH LD R9 PUSH POP_OR POP_OR SETB 0 Similarly, in the case of bit number 1 (node number 3), the following logical expression is developed according to the above rule.

【0091】[0091]

【表7】 [Table 7]

【0092】このようにして全てのビット番号、すなわ
ち、ビット0からビット3までについての各ビットにつ
いての論理式展開をし、この論理式展開後の名称をブロ
ックとする。具体的には、下記の表に示すような論理式
展開が行われることになる。
In this way, logical expressions are developed for all the bit numbers, that is, for each bit from bit 0 to bit 3, and the name after the logical expression is developed is referred to as a block. Specifically, logical expression expansion as shown in the following table is performed.

【0093】[0093]

【表8】 [Table 8]

【0094】このようなブロックが生成された後に、ブ
ロック同士の依存関係を求める処理を行う。つまり、各
ブロックごとに、各ブロック内に存在するGETB#を
対応づけた下記のような表を作成する。
After such a block is generated, a process for obtaining the dependency between the blocks is performed. That is, for each block, the following table is created in which the GETB # existing in each block is associated.

【0095】 ブロック GETB# 0 なし 1 0,2 2 0 3 0,1 つぎに、上記の処理において求めた依存関係を元にブロ
ックを並べ替える処理を行う。この並び替えの順番はつ
ぎのルールに基づいて行われる。
Block GETB # 0 None 1 0,2 2 0 3 0,1 Next, a process of rearranging blocks based on the dependency obtained in the above process is performed. This sorting order is performed based on the following rules.

【0096】1.どのビット番号にも依存しないブロッ
クを置く。
1. Put a block that does not depend on any bit numbers.

【0097】2.つぎに、1のブロックのみに依存する
ブロックを置く。
2. Next, a block that depends on only one block is placed.

【0098】3.順次置いたブロックに依存するブロッ
クを置く。
3. Put blocks that depend on the blocks you put in order.

【0099】このルールに基づいて上記のブロックの並
べ替えを行うと下記の表に示したようになる。
When the above blocks are rearranged based on this rule, the following table is obtained.

【0100】 ブロック GETB# 0 なし 2 0 3 0,2 1 0,1 つぎに、上記のようにして並べ替えられたブロックにし
たがって、各ブロック毎に分けられた上記の論理式を順
番に並べる処理を行う。この処理を行なうとつぎのよう
になる。
Block GETB # 0 None 2 0 3 0,2 1 0,1 Next, according to the blocks rearranged as described above, the above-described logical expressions divided for each block are arranged in order. I do. This processing is as follows.

【0101】[0101]

【表9】 [Table 9]

【0102】つぎに、出力端子に対する論理式展開を行
なう。この場合には、上述のSETB#に替えてOUT
#を設定するようにしてある。したがって、それぞれの
出力に対する論理式展開は次のようになる。
Next, a logical expression is developed for the output terminal. In this case, OUT instead of SETB #
# Is set. Therefore, the logical expression expansion for each output is as follows.

【0103】[0103]

【表10】 [Table 10]

【0104】そして最後に、各ブロック毎に分けられた
論理式と、上記の出力端子に対する論理式とを結合して
次のような論理式を得る。
Finally, the logical formula divided for each block is combined with the logical formula for the output terminal to obtain the following logical formula.

【0105】[0105]

【表11】 [Table 11]

【0106】以上のような処理を経て生成されたシーケ
ンスデータは、入力したラダーシーケンス図に一致した
ものとして記憶されることになるから、この記憶された
シーケンスプログラムを実行した場合には、無駄な処理
が行なわれなくなる。このため、このプログラムを記憶
する記憶装置の容量を必要最小限とすることができ、処
理速度の向上を図ることができるようになる。
Since the sequence data generated through the above-described processing is stored as the data corresponding to the input ladder sequence diagram, if the stored sequence program is executed, it is useless. No processing is performed. Therefore, the capacity of the storage device for storing this program can be minimized, and the processing speed can be improved.

【0107】これは、図12のラダー図に対して記憶さ
れるプログラムの論理式展開を示す表1と、同ラダー図
を本発明を用いて論理式展開した場合の表11とのデー
タ量を比較すれば明らかである。
This is because the data amount of Table 1 showing the logical expression expansion of the program stored with respect to the ladder diagram of FIG. 12 and Table 11 when the same ladder diagram is logically expanded by using the present invention are shown in FIG. It is clear from comparison.

【0108】[0108]

【発明の効果】以上述べたように本発明によれば次のよ
うな効果を生ずることになる。
As described above, according to the present invention, the following effects are produced.

【0109】第1の構成においては、入力されたシーケ
ンスプログラムに基づいて部品表を作成し、この部品表
に基づいて、シーケンス制御のためのプログラムを作成
するようにしたので、シーケンスプログラム作成時の入
力が制約なく行えることになる。また、どのようなパタ
ーンのシーケンス回路も変換できることから、何の制約
もなしにシーケンス回路を組むことができる。
In the first configuration, a parts table is created based on the input sequence program, and a program for sequence control is created based on the parts table. Input can be performed without restriction. Further, since a sequence circuit of any pattern can be converted, a sequence circuit can be assembled without any restrictions.

【0110】第2の構成においては、複数回出現するブ
ロックの位置が明確になり、また、どのような回路構成
であるかも理解できるようになる。
In the second configuration, the positions of blocks appearing a plurality of times can be clarified, and the circuit configuration can be understood.

【0111】第3の構成においては、ある特定の番号で
登録することにより、複数回出現するブロックがどのよ
うな形で、どこに位置しているか明確にでき、また、ブ
ロック同士の依存関係も非常に分かりやすくなる。
In the third configuration, by registering with a specific number, it is possible to clarify how and where blocks appearing a plurality of times are located, and the dependency between the blocks is extremely high. It becomes easy to understand.

【0112】第4の構成においては、非常に簡潔なデー
タ構成となっていることから、データ上からどのような
シーケンス回路であるかを予測することが可能である。
実際にこのデータを基に復元を行った場合、最初にかか
れたシーケンス回路に忠実に変換することができる。ま
た、データ量も少なくなっているので、通信の際のデー
タの送受信が非常に速くなり、ファイルとしてセーブす
る際には、その容量の縮小化を図ることができる。ま
た、入力ラダー図に一致したシーケンスデータが記憶さ
れるようにし、データの処理もビット番号を呼び出して
ブロックの出力値を与えるという形を採っているので、
処理の高速化を図ることができるようになる。
Since the fourth configuration has a very simple data configuration, it is possible to predict what kind of sequence circuit is from the data.
When restoration is actually performed on the basis of this data, the data can be faithfully converted to the sequence circuit that was initially written. In addition, since the amount of data is small, transmission / reception of data at the time of communication becomes very fast, and when saving as a file, the capacity can be reduced. Also, the sequence data that matches the input ladder diagram is stored, and the data processing also adopts the form of calling the bit number and giving the output value of the block.
The processing can be speeded up.

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

【図1】 本発明にかかるシーケンスデータの生成方法
を実施する装置の概略構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of an apparatus for executing a sequence data generation method according to the present invention.

【図2】 本発明の生成方法の概略の手順を示した図で
ある。
FIG. 2 is a diagram showing a schematic procedure of a generation method of the present invention.

【図3】 入力されたラダープログラムに基づいて展開
されたラダー図の一例を示す図である。
FIG. 3 is a diagram illustrating an example of a ladder diagram developed based on an input ladder program.

【図4】 図3のラダー図のノードに付される番号の一
例を示す図である。
FIG. 4 is a diagram showing an example of a number assigned to a node in the ladder diagram of FIG. 3;

【図5】 本発明の方法の実施過程において得られる部
品一覧表を示す図である。
FIG. 5 is a diagram showing a parts list obtained in the course of carrying out the method of the present invention.

【図6】 本発明の方法の実施過程において得られる部
品一覧表を示す図である。
FIG. 6 is a diagram showing a parts list obtained in the course of carrying out the method of the present invention.

【図7】 本発明の方法の実施過程において得られる部
品一覧表を示す図である。
FIG. 7 is a diagram showing a parts list obtained in the course of carrying out the method of the present invention.

【図8】 従来の変換方法の説明に供する図である。FIG. 8 is a diagram provided for explanation of a conventional conversion method.

【図9】 従来の変換方法の説明に供する図である。FIG. 9 is a diagram provided for explanation of a conventional conversion method.

【図10】 従来の変換方法の説明に供する図である。FIG. 10 is a diagram provided for explanation of a conventional conversion method.

【図11】 本発明の方法の実施過程において得られる
部品一覧表およびこの部品表から作成されるノード番号
とビット番号との関係を示す図である。
FIG. 11 is a diagram showing a parts list obtained in the course of implementing the method of the present invention and a relationship between node numbers and bit numbers created from the parts table.

【図12】 本発明の生成方法の処理内容の説明に供す
る図である。
FIG. 12 is a diagram provided for describing processing contents of a generation method according to the present invention.

【図13】 従来の変換方法の説明に供する図である。FIG. 13 is a diagram provided for explanation of a conventional conversion method.

【図14】 従来の変換方法の説明に供する図である。FIG. 14 is a diagram provided for explanation of a conventional conversion method.

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

10…シーケンス編集器、 12…シーケンスコード生成器、 14…シーケンス実行器、 16…入出力部。 10: Sequence editor, 12: Sequence code generator, 14: Sequence executor, 16: Input / output unit

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G05B 19/04 - 19/05 Continuation of front page (58) Field surveyed (Int.Cl. 7 , DB name) G05B 19/04-19/05

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力されたラダープログラムに基づいて
ラダー図を展開し、 当該ラダー図の各構成部品の接続線または当該接続線同
士の接続点にそれぞれ番号を付し、 当該各構成部品の入力側の接続線あるいは接続点の番号
順に、前記構成部品を配列した部品表を当該構成部品の
種類ごとに作成し、 当該部品表に基づいて、シーケンス制御のためのプログ
ラムを作成するシーケンスデータの生成方法。
1. A ladder diagram is developed based on an input ladder program, a connection line of each component of the ladder diagram or a connection point between the connection lines is numbered, and an input of each component is input. Creates a parts table in which the component parts are arranged for each type of the component parts in the order of the number of connection lines or connection points on the side, and generates a sequence data for creating a program for sequence control based on the part list. Method.
【請求項2】 入力されたラダープログラムに基づいて
ラダー図を展開し、 当該ラダー図の各構成部品の接続線または当該接続線同
士の接続点にそれぞれ番号を付し、 当該各構成部品の入力側の接続線あるいは接続点の番号
順に、前記構成部品を配列した部品表を当該構成部品の
種類ごとに作成し、 当該構成部品の種類ごとに作成された部品表のうち、各
構成部品に付された入力および出力の番号を他の構成部
品のそれらの番号と比較して同一番号に整理できるか否
かを判断し、同一番号に整理することができる場合には
同一番号に整理する処理をし、 当該処理結果に基づいてシーケンス制御のためのプログ
ラムを作成するシーケンスデータの生成方法。
2. Ladder diagram is developed based on the input ladder program, connection numbers of the respective components of the ladder diagram or connection points of the respective connection lines are respectively numbered, and input of the respective components is performed. A component list in which the components are arranged is created for each type of component in the order of the number of connection lines or connection points on the side, and a component list is created for each type of component. The input and output numbers are compared with those of other components to determine whether they can be sorted into the same number, and if they can be sorted into the same number, a process to sort them into the same number is performed. And generating a sequence control program based on the processing result.
【請求項3】 入力されたラダープログラムに基づいて
ラダー図を展開し、 当該ラダー図の各構成部品の接続線または当該接続線同
士の接続点にそれぞれ番号を付し、 当該各構成部品の入力側の接続線あるいは接続点の番号
順に、前記構成部品を配列した部品表を当該構成部品の
種類ごとに作成し、 当該構成部品の種類ごとに作成された部品表のうち、入
力側に複数回出現する番号をノード番号として割り付け
ると共に、当該ノード番号にビット番号を割り付けて前
記ノード番号の整理を行い、 当該割り付けられたビット番号に対して論理式を生成
し、当該ビット番号ごとに生成された論理式にブロック
番号を割り付け、 当該割り付けられたブロック番号相互間の依存関係を求
め、当該依存関係に基づいてシーケンス制御のためのプ
ログラムを作成するシーケンスデータの生成方法。
3. A ladder diagram is developed based on the input ladder program, connection numbers of the respective components of the ladder diagram or connection points of the respective connection lines are numbered, and input of the respective components is performed. A component table in which the component parts are arranged in the order of the number of connection lines or connection points on the side is created for each type of the component part. In addition to assigning the appearing number as a node number, assigning a bit number to the node number and rearranging the node number, a logical expression is generated for the assigned bit number, and a logical expression is generated for each bit number. A block number is assigned to a logical expression, a dependency between the assigned block numbers is obtained, and a program for sequence control is determined based on the dependency. The method of generating the sequence data to create.
【請求項4】 入力されたラダープログラムに基づいて
ラダー図を展開し、 当該ラダー図の各構成部品の接続線または当該接続線同
士の接続点にそれぞれ番号を付し、 当該各構成部品の入力側および出力側の接続線あるいは
接続点の番号順に、前記構成部品を配列した部品表を当
該構成部品の種類ごとに作成し、 当該構成部品の種類ごとに作成された部品表のうち、入
力側に複数回出現する番号をノード番号として割り付け
ると共に、当該ノード番号にビット番号を割り付けて前
記ノード番号の整理を行い、 当該割り付けられたビット番号に対して論理式を生成
し、当該ビット番号ごとに生成された論理式にブロック
番号を割り付け、 当該割り付けられたブロック番号相互間の依存関係を求
め、当該依存関係に基づいてブロック番号を並び替え、
当該並べ替えられたブロック番号に基づいて前記ビット
番号ごとに生成された論理式を結合し、 前記出力側の接続点に対する論理式を前記ビット番号ご
とに結合された論理式に結合することによってシーケン
ス制御のためのプログラムを作成するシーケンスデータ
の生成方法。
4. A ladder diagram is developed based on the input ladder program, connection numbers of the respective components of the ladder diagram or connection points between the connection lines are numbered, and input of the respective components is performed. A component table in which the components are arranged is created for each type of component in the order of the number of connection lines or connection points on the output side and the output side. Is assigned as a node number, a bit number is assigned to the node number, the node number is arranged, a logical expression is generated for the assigned bit number, and Assign block numbers to the generated logical expressions, find dependencies between the assigned block numbers, and arrange the block numbers based on the dependencies. For example,
A sequence is performed by combining the logical expressions generated for each of the bit numbers based on the rearranged block numbers, and combining the logical expression for the connection point on the output side with the logical expression for each of the bit numbers. A method of generating sequence data for creating a control program.
JP06062867A 1993-06-29 1994-03-31 How to generate sequence data Expired - Fee Related JP3111796B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06062867A JP3111796B2 (en) 1993-06-29 1994-03-31 How to generate sequence data

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP15977693 1993-06-29
JP5-159776 1993-06-29
JP06062867A JP3111796B2 (en) 1993-06-29 1994-03-31 How to generate sequence data

Publications (2)

Publication Number Publication Date
JPH0793008A JPH0793008A (en) 1995-04-07
JP3111796B2 true JP3111796B2 (en) 2000-11-27

Family

ID=26403926

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06062867A Expired - Fee Related JP3111796B2 (en) 1993-06-29 1994-03-31 How to generate sequence data

Country Status (1)

Country Link
JP (1) JP3111796B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018200731A (en) * 2018-10-01 2018-12-20 オムロン株式会社 Support device and support program

Also Published As

Publication number Publication date
JPH0793008A (en) 1995-04-07

Similar Documents

Publication Publication Date Title
US4758953A (en) Method for generating logic circuit data
US6826432B2 (en) Process for programming an automation application
JP2606460B2 (en) Data generation method for CAD / CAM device
CN109934507A (en) A kind of method and device of operation flow scheduling
JP3111796B2 (en) How to generate sequence data
JP3905951B2 (en) Logic conversion method to increase simulation / emulation efficiency
JP2010049489A (en) Debugging support device and program
EP0440553B1 (en) Gate addressing system for logic simulation machine
WO2020213129A1 (en) Debugging assistance device, debugging assistance method and debugging assistance program
Crews et al. Controller optimization for protocol intensive applications
JP3376693B2 (en) Sequence data compression method
EP0592076B1 (en) Compilation mechanism for a simulation model
JP2002312167A (en) Program for making computer calculate value of variable, compile program, variable value determining method, and program generating method
JPS59189471A (en) Wiring route searching system
JPH087761B2 (en) Gate addressing method for logic simulation machine
JPH1063675A (en) Data retrieving method and data retrieving device applying the method
JPH0695890A (en) Name replacement system in compiler
JPS60242731A (en) Digital pattern compressing method
JP2692141B2 (en) Sequence controller
JP2724241B2 (en) Automatic program generator with block diagram parts processing function
JPH06301742A (en) Automatic register allocating device
JPH0721013A (en) System generating system
JPH01136235A (en) Automatic generating device for program
JPH01106265A (en) Method for specifying ordering of automatic wiring network
JPH10260709A (en) Programming device for programmable controller

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070922

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20080922

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees