JPH0433003A - Method for preparing cross reference in sequence program - Google Patents

Method for preparing cross reference in sequence program

Info

Publication number
JPH0433003A
JPH0433003A JP13373290A JP13373290A JPH0433003A JP H0433003 A JPH0433003 A JP H0433003A JP 13373290 A JP13373290 A JP 13373290A JP 13373290 A JP13373290 A JP 13373290A JP H0433003 A JPH0433003 A JP H0433003A
Authority
JP
Japan
Prior art keywords
coil
cross
contact
sequence program
elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP13373290A
Other languages
Japanese (ja)
Other versions
JP2611494B2 (en
Inventor
Masaru Baba
馬場 賢
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 JP2133732A priority Critical patent/JP2611494B2/en
Publication of JPH0433003A publication Critical patent/JPH0433003A/en
Application granted granted Critical
Publication of JP2611494B2 publication Critical patent/JP2611494B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To reduce required memory capacity and time for processing by scanning a sequence program, preparing a cross reference information table by storing the description block numbers of coil elements corresponding to respective contact elements, and fitting a cross reference to all the elements after scanning the program again. CONSTITUTION:The sequence program is scanned, and a cross reference information table 32 is prepared by storing the description block numbers of the coil elements corresponding to the respective contact elements. Then, the block numbers of the coil elements stored in this table 32 are respectively attached to the correspondent contact elements. Afterwards, the sequence program is scanned again, and the description block numbers of all the contact elements are attached to the coil elements so as to fit the cross reference to all the contact elements and the coil elements. Thus, when preparing the cross reference, the memory with much capacity is not required and further, the time for the processing can be comparatively shortened. Then, the processing can be easily executed by a computer 10 at the level of a personal computer.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、シーケンスプログラムをラダー図として表示
する場合に、そのラダー図の構成要素にクロスリファレ
ンスを自動的に付するようにしたシーケンスプログラム
におけるクロスリファレンスの作成方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Field) The present invention relates to a sequence program in which, when a sequence program is displayed as a ladder diagram, cross-references are automatically attached to the constituent elements of the ladder diagram. Regarding how to create cross-references.

(従来の技術) 従来から、生産工場などで使用される比較的大型の機械
には、その動作を制御させるためのシーケンサが用いら
れている。このシーケンサは、機械の制御を行わせるた
めに開発された専用のコンピュータである。シーケンサ
によって制御させる機械に動作プログラムを人力する場
合には、通常はCRT上にラダー図を描かせながら行う
ことが多い。動作プログラムを人力する場合、非常に動
作の単純な機械であればその入力すべきプログラムの量
、換言すれば、使用接点数及び使用コイル数はさほど多
くはなく、人力の際に使用したオリジナルのラダーシー
ケンス図があれば、プログラムの変更なとの要求に対し
ても、比較的容易に対処できる。ところが、例えば自動
車の生産設備の1ライン分の機械の動作を制御させるよ
うなコントローラのプログラムとなると、その必要とす
る接点数及びコイル数は想像を絶するほどの数となり、
簡単な仕様変更であってもその変更箇所を捜すことすら
ままならない状態となる。
(Prior Art) Conventionally, relatively large machines used in production factories and the like have used sequencers to control their operations. This sequencer is a dedicated computer developed to control machines. When manually writing an operating program to a machine controlled by a sequencer, it is usually done while drawing a ladder diagram on a CRT. When creating an operating program manually, if the machine has a very simple operation, the amount of program that needs to be input, in other words, the number of contacts and coils used, is not very large, and the original If you have a ladder sequence diagram, you can respond to requests for program changes relatively easily. However, when it comes to programming a controller that controls the operation of one line of machinery in automobile production equipment, for example, the number of contacts and coils required is unimaginably large.
Even if there is a simple specification change, it becomes difficult to even search for the changed part.

従来、このようなステップ数の非常に多いプログラムに
おいてCRT上に写し出されたラダー図から該当箇所が
簡単に捜せるようにするために、クロスリファレンスと
称される指標を付すようにしている。このクロスリファ
レンスとは、その接点を駆動するコイルか何ブロックロ
に存在するのか、あるいはそのコイルによって作動され
る接点は何ブロックロに存在するのかを、ラダー図によ
ってすぐに認識できるようにするために、接点やコイル
の下に付されるものである。
Conventionally, in a program having a large number of steps, an index called a cross-reference has been attached in order to easily find the relevant part from the ladder diagram displayed on the CRT. This cross reference is a ladder diagram that allows you to quickly recognize in how many blocks there is a coil that drives a contact, or in how many blocks a contact operated by that coil exists. It is attached below the contacts and coils.

従来このクロスリファレンスは次のようにして作成して
いる。
Conventionally, this cross reference is created as follows.

例えば、第5図に示すようなラダー図の各構成要素に図
示のようなりロスリファレンスを付す場合を例示する。
For example, a case where a loss reference as shown in the diagram is attached to each component of a ladder diagram as shown in FIG. 5 will be exemplified.

第1の方法としては、第6図に示すような方法が挙げら
れる。この方法は、回路作成時に登場する接点やコイル
のアドレスに対してその都度シーケンスプログラムを全
て調べるようにしたものである。
The first method includes a method as shown in FIG. In this method, the entire sequence program is checked each time the addresses of contacts and coils appear when creating a circuit.

まず、カウンタnの値を1に設定し、R1のコイルを有
するブロックの検索を開始する(ステップ1,2)。該
当するコイルが検索されたら、検索したブロック番号を
R1の接点の下に記載する(ステップ3,4)。次に、
カウンタnの値を1だけインクリメントし、R2のコイ
ルを有するブロックを検索する。以1−の処理は、ブロ
クラム中に百している全てのコイルについての検索が完
了するまで行われる(ステップ5.6)。」−記のよう
な処理か行われると、例えは第5図のラダー図において
は、ます、全てのブロックを検索し、リレーR1か存在
するブロックか検索されると、そのブロックの番−じ゛
をそのコイルによって作動される全ての接点にf・1す
。同図においては、コイルR1は1000ブロツク目に
存在するので、そのコイルによって作動される1ブロツ
ク目に存在する接点R1の下に1000を付す。また、
リレーR2は2ブロツク目に存在するので、そのコイル
によって作動される1ブロツク目に存在する接点R2の
下に2を付す。さらに、リレーR4は1ブロツクロに存
在するので、2ブロツクロと1000ブロツクロとに存
在するR4の接点の下に1を付す。このように、該当の
コイルを全てのプログラムを検索することで見付は出し
、再度プログラムを検索してそのフィルによって駆動さ
れる接点の下にそのコイルの存在するブロック番号を記
している。以上の処理によって全ての接点にコイルの存
在しているフロック番号か付されることになる。
First, the value of the counter n is set to 1, and a search for a block having the R1 coil is started (steps 1 and 2). When the corresponding coil is searched, the searched block number is written under the contact point of R1 (steps 3 and 4). next,
The value of the counter n is incremented by 1, and a block having a coil of R2 is searched. The above process 1- is performed until the search for all the coils in the block diagram is completed (step 5.6). For example, in the ladder diagram shown in Figure 5, all blocks are searched, and when relay R1 is found, the number of that block is determined. 1 to all contacts actuated by that coil. In the figure, since the coil R1 exists in the 1000th block, 1000 is added below the contact R1 in the 1st block which is operated by the coil. Also,
Since relay R2 is present in the second block, 2 is attached below the contact R2, which is operated by the coil and is present in the first block. Furthermore, since relay R4 is present in the 1st block, 1 is added below the contact point of R4, which is present in the 2nd block and the 1000th block. In this way, the corresponding coil is found by searching all the programs, and then the program is searched again and the block number where the coil exists is written under the contact driven by the fill. Through the above processing, the flock number in which the coil is present is assigned to all the contacts.

次に、カウンタnの値を1に設定し、R1の接点を何し
ているブロックの検索を開始する(ステップ7.8)。
Next, the value of the counter n is set to 1, and a search for a block having a contact point of R1 is started (step 7.8).

該当する接点か検索されたら、検索したフロック番号を
R1のコイルの下に記載する。以上の処理は全てのフロ
ックについての検索か完了するまで行われる(ステップ
9〜11)。
When the corresponding contact is found, write the found flock number under the R1 coil. The above processing is performed until the search for all flocks is completed (steps 9 to 11).

次に、カウンタnの値を1tこけインクリメントし、R
2の接点を有しているフロックを検索する。以上の処理
は、プロクラム中に有している全ての接点についての検
索が完了するまで行われる(ステップ12.13)。上
記のような処理が行われると、第5図のラダー図におい
ては、ます、ブロックが順次検索され、接点R1が存在
するブロックが検索されると、そのブロックの番号をそ
の接点を作動するコイルR1の下に付す。同図において
は、接点R1は1ブロツク目に存在するので、その接点
を作動するR1のコイルの下に1を付す。
Next, the value of counter n is incremented by 1t, and R
Search for flocks that have 2 contacts. The above processing is performed until the search for all contacts in the program is completed (step 12.13). When the above process is performed, in the ladder diagram of Fig. 5, the blocks are searched sequentially, and when the block in which the contact R1 is found is found, the number of that block is assigned to the coil that operates the contact. It is attached under R1. In the figure, since contact R1 is present in the first block, 1 is attached below the coil of R1 that operates the contact.

また、接点R2は1ブロツクロに存在するので、その接
点を作動するR2のコイルの下に2を付す。
Also, since the contact R2 exists in one block, 2 is attached below the coil of R2 that operates the contact.

さらに、接点R4の場合には、2ブロツクロと1000
ブロツクロとに存在するので、ブロック番号が付される
順番としては、2の次に1000が付されることになる
Furthermore, in the case of contact R4, 2 blocks and 1000
Since it exists in the block diagram, the order in which block numbers are assigned is 2 followed by 1000.

このような処理がされることによって、プログラムが有
する全ての接点要素とコイル要素とにクロスリファレン
スが付されることになる。
By performing such processing, cross-references are attached to all contact elements and coil elements included in the program.

次に、第2の方法としては、第7図に示すような方法が
挙げられる。この方法は、回路の作成前に全シーケンス
中−回でも登場した接点及びコイルのクロスリファレン
スデータをメモリに作成しておくようにしたものである
Next, as a second method, there is a method as shown in FIG. In this method, cross-reference data for contacts and coils that appear even in the entire sequence is created in memory before the circuit is created.

まず、シーケンスプログラムにおける人力データはコイ
ルに関するものであるどうかが判断される(ステップ2
1)。入力されたデータがコイルに関するものであれば
、その入力したコイルに対応させてブロック番号を記憶
させる。例えば、第5図に示したようなシーケンスプロ
グラムを入力するに際し、R1のコイルを1000ブロ
ツクロに入力したときには、第8図に示すようにコイル
リファレンステーブルにR1のコイルか1000ブロツ
クロに存在することが記憶される(ステップ22)。
First, it is determined whether the manual data in the sequence program is related to the coil (step 2
1). If the input data relates to a coil, a block number is stored in association with the input coil. For example, when inputting the sequence program shown in Fig. 5, if the R1 coil is input in the 1000th block, the coil reference table shows that the R1 coil exists in the 1000th block as shown in Fig. 8. Stored (step 22).

次に、人力されたデータかコイルに関するものではなく
接点に関するものであると判断されると(ステップ23
)、その入力した接点番号に対応させてブロック番号を
記憶させる。例えば第5図に示したように接点R1を1
ブロツク目に人力したときには、第8図に示すように接
点リファレンステーブルにR1の接点か1ブロツク目に
存在することが記憶される(ステップ24)。このよう
な処理は全ての入力が終了するまで行われ、記憶される
データとしては第8図に示すようなものとなる(ステッ
プ25)。そして、ラダーシーケンス図のプリント時な
どには、第8図のリファレンステーブルに記憶されてい
るデータに基づいて、接点やコイルにクロスリファレン
スか記されることになる(ステップ26)。
Next, if it is determined that the manually entered data is related to contacts rather than coils (step 23
), the block number is stored in correspondence with the input contact number. For example, as shown in FIG.
When the first block is entered manually, the presence of the contact R1 in the first block is stored in the contact reference table as shown in FIG. 8 (step 24). Such processing is continued until all inputs are completed, and the stored data is as shown in FIG. 8 (step 25). When printing a ladder sequence diagram, cross-references are written on the contacts and coils based on the data stored in the reference table shown in FIG. 8 (step 26).

(発明が解決しようとする課題) 以上のような方法によれば、クロスリファレンスの作成
をすることはできるか、上記した従来の2つの方法では
次のような欠点を有している。
(Problems to be Solved by the Invention) Is it possible to create cross-references according to the methods described above?The two conventional methods described above have the following drawbacks.

まず、第1に例示した方法においては、クロスリファレ
ンスの作成時、接点やコイルの登場回数たけシーケンス
プログラムを全て検索する必要があり、多大な処理時間
を要する。また、第2に例示した方法においては、シー
ケンスプログラムの検索は一回で済み、処理時間も短時
間で済むが、反面、クロスリファレンスを作成するため
に記憶させるデータ量が膨大であるために大規模なメモ
リ容量を要するという欠点かある。したがって、このよ
うな従来の方法でクロスリファレンスを作成する場合に
は、パソコンレベルのコンピュータでは実用にならず、
大型コンピュータが必要であるために、このような処理
を手軽に行うことができないという問題がある。
First, in the first example method, when creating a cross reference, it is necessary to search all sequence programs for the number of times contacts and coils appear, which requires a large amount of processing time. In addition, in the second example method, the sequence program search is only required once and the processing time is short, but on the other hand, the amount of data to be stored to create the cross-reference is enormous. The drawback is that it requires a large amount of memory capacity. Therefore, when creating cross-references using this conventional method, it is not practical on a personal computer level computer;
There is a problem in that such processing cannot be easily performed because a large-sized computer is required.

本発明は、このような従来の問題点に鑑みて成されたも
のであり、」二記のようなりロスリファレンスの作成に
当たって、大量のメモリを要することなく、しかも処理
に要する時間も比較的少なくて済み、パソコンレベルの
コンピュータで手軽に処理させることができるようにし
たマイクロコンピュータにおけるクロスリファレンスの
作成方法の提供を目的とする。
The present invention has been made in view of these conventional problems, and it is possible to create a loss reference as described in Section 2 without requiring a large amount of memory, and in addition, the time required for processing is relatively short. The purpose of this invention is to provide a method for creating cross-references in a microcomputer, which can be easily processed by a personal computer level computer.

(3題を解決するための手段) ユ記目的を連成するための本発明においては、シーケン
スプロゲラ1、の山谷をラダー図で表現した場合そのラ
ダー図を読み易くするために、ラダー図を構成するリレ
ー接点、タイマー接点、カウンター接点などの接点要素
及びそれらの接点要素を駆動するコイル要素にクロスリ
ファレンスを付する場合のシーケンスプログラムにおけ
るクロスリファレンスの作成方法において、前記シーケ
ンスプログラムをスキャンしてそれぞれの接点要素に対
応するコイル要素のその記載ブロック番号を記憶してク
ロスリファレンス情報チーフルをf[し、当該クロスリ
ファレンス情報テーブルに記憶されているコイル要素の
記載フロック番号を対応する接点要素にそれぞれ付し、
前記シーケンスプログラムを再度スキャンして、同一記
載ブロック番号を有するコイル要素に対応する全ての接
点要素の記載ブロック番号を当該コイル要素に付し、全
ての接点要素及びコイル要素にクロスリファレンスを付
するようにしたことを特徴とする。
(Means for Solving the Three Problems) In the present invention for coupling the objectives of the sequence progera 1, when the peaks and valleys of sequence progera 1 are expressed in a ladder diagram, in order to make the ladder diagram easier to read, a ladder diagram is used. In a method for creating a cross reference in a sequence program when attaching a cross reference to contact elements such as relay contacts, timer contacts, and counter contacts constituting a relay contact, and a coil element that drives these contact elements, the sequence program is scanned. The written block number of the coil element corresponding to each contact element is stored, the cross-reference information is set to f[, and the written block number of the coil element stored in the cross-reference information table is written to each corresponding contact element. Attached,
Scan the sequence program again, add the description block numbers of all contact elements corresponding to coil elements having the same description block number to the coil elements, and add cross references to all contact elements and coil elements. It is characterized by the following.

(作用) 以上のような方法によってクロスリファレンスを作成す
ると、シーケンスプログラムを一度だけスキャンするこ
とによってクロスリファレンス情報テーブルを作成する
ことができ、しかもそのクロスリファレンス情報テーブ
ルを記憶するメモリの容量は大きなものを必要としない
。そして、全ての接点要素及びコイル要素にクロスリフ
ァレンスを付す場合には、作成されたクロスリファレン
ス情報テーブルをスキャンし、その記憶内容を取り出し
て、該当する接点あるいはコイルの下に記憶内容を付す
のみで良い。したがって、クロスリファレンスの作成を
普通に用いられているコンピュータによって行うことが
できる。
(Function) By creating a cross-reference using the method described above, a cross-reference information table can be created by scanning the sequence program only once, and the memory capacity for storing the cross-reference information table is large. does not require. If you want to attach cross-references to all contact elements and coil elements, simply scan the created cross-reference information table, extract the memory contents, and attach the memory contents under the corresponding contacts or coils. good. Therefore, cross-references can be created using commonly used computers.

(実施例) 以下、本発明の一実施例を図面に基づいて評細に説明す
る。
(Example) Hereinafter, an example of the present invention will be described in detail based on the drawings.

第1図は、本発明に係るシーケンスプログラムにおける
クロスリファレンスの作成方法を実行する装置の概略構
成図、第2図は、第1図に示した装置においてクロスリ
ファレンスを作成する場合の処理を示すフローチャート
、第3図は、第2図のフローチャートが実行された場合
に作成されるクロスリファレンス情報テーブル、第4図
は、第3図に示したクロスリファレンス情報テーブルに
基づいてクロスリファレンスを各接点やコイルに付する
場合の処理を示すフローチャートである。
FIG. 1 is a schematic configuration diagram of an apparatus that executes a cross-reference creation method in a sequence program according to the present invention, and FIG. 2 is a flowchart showing a process for creating a cross-reference in the apparatus shown in FIG. 1. , Fig. 3 shows a cross-reference information table created when the flowchart shown in Fig. 2 is executed, and Fig. 4 shows a cross-reference for each contact and coil based on the cross-reference information table shown in Fig. 3. FIG.

本発明のクロスリファレンスの作成方法を実行する装置
は第1図に示すような構成を有している。
An apparatus for carrying out the cross-reference creation method of the present invention has a configuration as shown in FIG.

装置における全ての演算、制御を行うCPUl0には、
制御プログラム部12.メモリ部14゜モニタ16及び
プリンタ18がそれぞれ接続されている。制御プログラ
ム部12には、シーケンス回路作成部25と、クロスリ
ファレンス作成部27とが設けられている。また、メモ
リ部14には、シーケンス回路作成部25においてシー
ケンス回路を作成させるためのシーケンスデータを格納
しているシーケンスデータテーブル30と、クロスリフ
ァレンス作成部27においてクロスリファレンスを作成
させるためのクロスリファレンス情報を格納するクロス
リファレンス情報テーブル32とを有している。モニタ
16は、CRTデイプレイや液晶デイスプレィのような
ものであり、シーケンス回路作成部25で作成されたシ
ーケンス回路をラダー図として表示するものである。ま
た、プリンタ18は、モニタに表示されたラダー図。
The CPU10 that performs all calculations and controls in the device includes
Control program section 12. The memory unit 14 is connected to a monitor 16 and a printer 18, respectively. The control program section 12 is provided with a sequence circuit creation section 25 and a cross reference creation section 27. The memory unit 14 also includes a sequence data table 30 storing sequence data for creating a sequence circuit in the sequence circuit creation unit 25, and cross reference information for creating a cross reference in the cross reference creation unit 27. It has a cross-reference information table 32 that stores. The monitor 16 is a CRT display or a liquid crystal display, and displays the sequence circuit created by the sequence circuit creation section 25 as a ladder diagram. Further, the printer 18 displays a ladder diagram displayed on a monitor.

制御プロクラム部12及びメモリ部14に記憶されてい
るプロクラムやデータなとをプリントアウトする場合に
使用される。
It is used when printing out programs and data stored in the control program section 12 and memory section 14.

クロスリファレンス情報テーブルは、このように構成さ
れた装置により第2図に示したフローチャートか実行さ
れることによって次のように作成される。
The cross-reference information table is created as follows by executing the flowchart shown in FIG. 2 using the apparatus configured as described above.

まず、クロスリファレンス作成部27は、シーケンスデ
ータテーブル30に記憶されているシーケンスデータ、
すなわち情報を入力しくステップ30)、その人力した
情報か接点情報かどうかを判断する(ステップ31)。
First, the cross-reference creation unit 27 generates sequence data stored in the sequence data table 30,
That is, information is input (step 30), and it is determined whether the information is manually input or contact information (step 31).

この人力した情報が接点情報であれば、接点フラグを1
に設定して、人力した接点情報と接点フラグとをメモリ
部14に記憶させる(ステップ32.33)。ステップ
31において、人力した情報か接点情報てないと判断さ
れた場合には、その情報かコイル情報であるかどうかの
判断がされる(ステップ34)。この情報がコイル情報
であれは、このコイルに関連して作動する接点情報に、
コイルフラグとそのコイルが記載されているブロック番
号を付してメモリ部14に記憶させ、同時にそのコイル
の現時点における出現回数をもメモリ部14に記憶させ
る(ステップ35.36)。そして、以上のような処理
がシーケンスデータテーブル30に格納されている全て
の情報に対して行われたかどうかが判断され、全ての情
報に対して行われていなければ、上記のような処理が全
情報について行われる。このような処理を経て作成され
たクロスリファレンス情報テーブルは、メモリ部14に
記憶されることになる(ステップ37)。
If this manually generated information is contact information, set the contact flag to 1.
The contact point information and the contact point flag manually entered are stored in the memory unit 14 (steps 32 and 33). If it is determined in step 31 that the information is not manually input or contact information, it is determined whether the information is coil information or not (step 34). If this information is coil information, the contact information that operates in relation to this coil,
The coil flag and the block number in which the coil is written are stored in the memory unit 14, and at the same time, the number of appearances of the coil at the current time is also stored in the memory unit 14 (steps 35 and 36). Then, it is determined whether the above-mentioned processing has been performed on all the information stored in the sequence data table 30, and if the above-mentioned processing has not been performed on all the information, the above-mentioned processing has been performed on all the information. It is done about information. The cross reference information table created through such processing is stored in the memory unit 14 (step 37).

以上のような処理が、例えば第5図に示したようなシー
ケンスプロクラムに対して行われると、第3図に示しで
あるようなリファレンス情報テーブルが作成されること
になる。
When the above processing is performed on a sequence program as shown in FIG. 5, for example, a reference information table as shown in FIG. 3 is created.

例えば前記した処理において、人力した情報かR1の接
点情報であった場合には、まず接点の符号がR1で接点
フラグが1であることがメモリ部14に記憶される。次
に入力した情報がコイルR1であった場合には、先に記
憶されている接点R1に関するリファレンス情報テーブ
ルのコイルフラグが1に、そして、そのコイルR1が記
載されているブロック番号が1000に、さらに現在ま
での検索においてコイルR1の出現回数が1であること
がそれぞれ設定されて、R1に関する新たなリファレン
ス情報テーブルが作成されることになる。
For example, in the above-described process, if the information is manually input or contact information of R1, first, it is stored in the memory unit 14 that the code of the contact is R1 and the contact flag is 1. If the next input information is the coil R1, the coil flag in the reference information table for the previously stored contact R1 will be set to 1, and the block number in which the coil R1 is written will be set to 1000. Furthermore, it is set that the number of appearances of coil R1 in the searches up to now is 1, and a new reference information table regarding R1 is created.

以上のような処理が各接点、各コイルに関して行なわれ
ると、第5図に示したようなシーケンスプログラムから
は第2図に示したようなりロスリファレンス情報テーブ
ルが得られることになる。
When the above processing is performed for each contact and each coil, a loss reference information table as shown in FIG. 2 will be obtained from the sequence program shown in FIG.

第4図は、上記のようにして作成されたクロスリファレ
ンス情報テーブルの内容に基づいて、シーケンスプログ
ラムの構成要素である接点及びコイルにクロスリファレ
ンスを付す場合の処理を示すフローチャートである。
FIG. 4 is a flowchart showing a process for attaching cross-references to contacts and coils that are components of a sequence program based on the contents of the cross-reference information table created as described above.

クロスリファレンス作成部27は、クロスリファレンス
情報テーブル32から情報を取り出し、その取り出した
情報が接点情報であるかどうかの判断を行う(ステップ
41.42)。その情lが接点情報であれば、さらに、
その接点に関するコイルの出現回数が1回であるかどう
かが判断され、1回であれば、そのコイルのブロック番
号をその接点の下に記入する(ステップ43.44)。
The cross-reference creation unit 27 extracts information from the cross-reference information table 32, and determines whether the extracted information is contact information (steps 41 and 42). If the information is contact information, furthermore,
It is determined whether the number of occurrences of the coil related to the contact is once, and if it is once, the block number of the coil is written under the contact (steps 43 and 44).

コイルの出現数が2回以上であれば、シーケンスデータ
テーブル30に記憶されている全てのシーケンスプログ
ラムをもう一度検索し、そのコイルが記載されている全
てのブロック番号をその接点の下に記入する(ステップ
45)。一方、入力した情報が接点情報ではなかった場
合には、コイル情報であるかどうかが判断されるが、コ
イル情報であれば、シーケンスデータテーブル30に記
憶されている全てのシーケンスプロクラムをもう一度検
索し、そのコイルが記載されているブロック番号をその
コイルの下に記載する(ステップ46゜47)。以上の
処理か全ての接点、コイルについて行われたら処理を終
了する(ステップ48)。
If the number of occurrences of the coil is two or more, search all the sequence programs stored in the sequence data table 30 again, and write all the block numbers in which the coil is written under the contact ( Step 45). On the other hand, if the input information is not contact information, it is determined whether it is coil information, but if it is coil information, all sequence programs stored in the sequence data table 30 are searched again. , the block number in which the coil is written is written below the coil (steps 46 and 47). Once the above processing has been carried out for all contacts and coils, the processing ends (step 48).

以上のようにしてクロスリファレンスが作成されるが、
その作成過程においてコイルにクロスリファレンスを付
す場合には、従来と同様に全てのシーケンスプログラム
をスキャンしている。しかしながら、シーケンスプログ
ラムは通常、その構成要素である接点要素とコイル要素
との比は10対1程度であると考えられるので、このよ
うな処理を行っても全体的には処理が高速化されること
になる。また、クロスリファレンスf青報テーブルの作
成の際に必要とされるメモリの容量も非常に小さなもの
で十分となる。
A cross-reference is created as described above, but
When attaching a cross reference to a coil during the creation process, all sequence programs are scanned as in the past. However, in a sequence program, the ratio of the contact elements to the coil elements, which are its constituent elements, is usually considered to be about 10:1, so even if such processing is performed, the overall processing speed will be increased. It turns out. Further, the memory capacity required for creating the cross-reference f-report table is also very small.

(発明の効果) 以上の説明により明らかなように、本発明によれば、ク
ロスリファレンスを作成するにあたって、必要とするメ
モリの容量が最低限で済み、また、その処理に多大な時
間を要することもなくなる。
(Effects of the Invention) As is clear from the above explanation, according to the present invention, when creating a cross reference, the required memory capacity is minimal, and the processing requires a large amount of time. It also disappears.

したがって、処理能力及び記憶容量の比較的劣るパソコ
ンレベルのコンピュータでクロスリファレンスの作成を
させることかできることになる。
Therefore, cross-references can be created using a personal computer level computer with relatively low processing power and storage capacity.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明に係るシーケンスプログラムにおける
クロスリファレンスの作成方法を実行する装置の概略椙
成図、 第2図は、第1図に示した装置においてクロスリファレ
ンスを作成する場合の処理を示すフローチャート、 第3図は、第2図のフローチャートが実行された場合に
作成されるクロスリファレンス情報テーブル、 第4図は、第3図に示したクロスリファレンス情報テー
ブルに基づいてクロスリファレンスを各接点やコイルに
付する場合の処理を示すフローチャート、 第5図は、従来及び本発明においてクロスリファレンス
の作成方法の説明の一例として例示したラダーシーケン
ス図、 第6図は、従来におけるクロスリファレンスの作成方法
を示すフローチャート、 第7図及び第8図は、従来におけるクロスリファレンス
の他の作成方法を示すフローチャートとそのフローチャ
ートの処理によって作成されるテーブル内容の一例を示
す図である。 10・・・CPU、   12・・・制御プログラム部
、14・・・メモリ部、  16・・・モニタ、18・
・・プリンタ。
FIG. 1 is a schematic diagram of an apparatus for executing the cross-reference creation method in a sequence program according to the present invention, and FIG. 2 shows a process for creating a cross-reference in the apparatus shown in FIG. 1. Flowchart, Figure 3 shows a cross-reference information table created when the flowchart in Figure 2 is executed, and Figure 4 shows cross-references for each contact and each point based on the cross-reference information table shown in Figure 3. FIG. 5 is a ladder sequence diagram illustrating an example of how to create a cross reference in the conventional method and the present invention. FIG. FIGS. 7 and 8 are flowcharts illustrating other conventional cross-reference creation methods and diagrams illustrating an example of table contents created by the process of the flowchart. DESCRIPTION OF SYMBOLS 10... CPU, 12... Control program section, 14... Memory section, 16... Monitor, 18...
...Printer.

Claims (1)

【特許請求の範囲】 シーケンスプログラムの内容をラダー図で表現した場合
そのラダー図を読み易くするために、ラダー図を構成す
るリレー接点、タイマー接点、カウンター接点などの接
点要素及びそれらの接点要素を駆動するコイル要素にク
ロスリファレンスを付する場合のシーケンスプログラム
におけるクロスリファレンスの作成方法において、 前記シーケンスプログラムをスキャンしてそれぞれの接
点要素に対応するコイル要素のその記載ブロック番号を
記憶してクロスリファレンス情報テーブルを作成し、 当該クロスリファレンス情報テーブルに記憶されている
コイル要素の記載ブロック番号を対応する接点要素にそ
れぞれ付し、 前記シーケンスプログラムを再度スキャンして、同一記
載ブロック番号を有するコイル要素に対応する全ての接
点要素の記載ブロック番号を当該コイル要素に付し、 全ての接点要素及びコイル要素にクロスリファレンスを
付するようにしたことを特徴とするシーケンスプログラ
ムにおけるクロスリファレンスの作成方法。
[Claims] When the contents of a sequence program are expressed in a ladder diagram, in order to make the ladder diagram easier to read, contact elements such as relay contacts, timer contacts, counter contacts, etc. that make up the ladder diagram, and their contact elements are In a method for creating a cross reference in a sequence program when attaching a cross reference to a coil element to be driven, the sequence program is scanned and the written block number of the coil element corresponding to each contact element is memorized to create cross reference information. Create a table, add the block numbers of the coil elements stored in the cross-reference information table to the corresponding contact elements, and scan the sequence program again to correspond to coil elements with the same block numbers. 1. A method for creating a cross-reference in a sequence program, characterized in that a description block number of all contact elements to be processed is attached to the coil element, and a cross-reference is attached to all contact elements and coil elements.
JP2133732A 1990-05-25 1990-05-25 Creating a cross reference in a sequence program Expired - Fee Related JP2611494B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2133732A JP2611494B2 (en) 1990-05-25 1990-05-25 Creating a cross reference in a sequence program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2133732A JP2611494B2 (en) 1990-05-25 1990-05-25 Creating a cross reference in a sequence program

Publications (2)

Publication Number Publication Date
JPH0433003A true JPH0433003A (en) 1992-02-04
JP2611494B2 JP2611494B2 (en) 1997-05-21

Family

ID=15111621

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2133732A Expired - Fee Related JP2611494B2 (en) 1990-05-25 1990-05-25 Creating a cross reference in a sequence program

Country Status (1)

Country Link
JP (1) JP2611494B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007041761A (en) * 2005-08-02 2007-02-15 Jtekt Corp Plc for distributed control and distributed control system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62279405A (en) * 1986-05-28 1987-12-04 Fanuc Ltd Cross reference data preparing method
JPS62284403A (en) * 1986-06-03 1987-12-10 Fanuc Ltd Preparing method for cross reference data
JPH0216603A (en) * 1988-07-05 1990-01-19 Fanuc Ltd Sequence program editing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62279405A (en) * 1986-05-28 1987-12-04 Fanuc Ltd Cross reference data preparing method
JPS62284403A (en) * 1986-06-03 1987-12-10 Fanuc Ltd Preparing method for cross reference data
JPH0216603A (en) * 1988-07-05 1990-01-19 Fanuc Ltd Sequence program editing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007041761A (en) * 2005-08-02 2007-02-15 Jtekt Corp Plc for distributed control and distributed control system

Also Published As

Publication number Publication date
JP2611494B2 (en) 1997-05-21

Similar Documents

Publication Publication Date Title
JPH0433003A (en) Method for preparing cross reference in sequence program
JPH10214171A (en) Information processor
JPH0322014A (en) Menu selecting method
EP0146631A1 (en) Data input system for numerically-controlled apparatus
JPH01199212A (en) Control system for operating procedure of interactive display device
JPH02140866A (en) Facility control processor
JPH077839U (en) Numerical control device
JP2971251B2 (en) SFC programming device
JP3278215B2 (en) Data creation support device for display control device
JPS61279906A (en) Programmable controller
JPH06318031A (en) Electronic learning machine
JP3408073B2 (en) Display screen creation device for display control device
JPH0371207A (en) Numerical controller
JPH0670001U (en) Peripheral device of programmable controller
JPS6149211A (en) Automatic advance method of display picture
JPH0756716A (en) Program processor
JPS60220407A (en) Cursor shift controller of display for numerical controller
JPH05158752A (en) Method and device for displaying processing state
JPH01273102A (en) General purpose optimizing device
JPH03161803A (en) Process controller
JPH09101812A (en) Numerical controller
JPH04367029A (en) Programming device for programmable controller
JPH07281718A (en) Cross reference preparing method for sequence data
JPH05224800A (en) Automatic input system
JPH0498454A (en) Screen state continuing control system

Legal Events

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

Free format text: PAYMENT UNTIL: 20080227

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090227

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20090227

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100227

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees