JPS62157907A - Forming method for ladder graphic - Google Patents

Forming method for ladder graphic

Info

Publication number
JPS62157907A
JPS62157907A JP60299021A JP29902185A JPS62157907A JP S62157907 A JPS62157907 A JP S62157907A JP 60299021 A JP60299021 A JP 60299021A JP 29902185 A JP29902185 A JP 29902185A JP S62157907 A JPS62157907 A JP S62157907A
Authority
JP
Japan
Prior art keywords
page
ladder diagram
write
operand
instruction
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
JP60299021A
Other languages
Japanese (ja)
Inventor
Kunio Tanaka
久仁夫 田中
Hirosuke Chiba
千葉 弘介
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP60299021A priority Critical patent/JPS62157907A/en
Publication of JPS62157907A publication Critical patent/JPS62157907A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To easily correct processing such as the debugging of a sequence program by describing which part on a graphic the operand of each instruction is used at. CONSTITUTION:A write instruction (coil 15) having an operand accompanying a non-write instruction (relay contact point 16) as its operand is found and the page and line on the graphic where the symbol of the coil 15 corresponding to the write instruction is described are found, thereby describing the page and line nearby 14 where the symbol of the relay contact point 16 corresponding to the non-write instruction is described. Further, a non-write instruction having an operand accompanying the write instruction as its operand is found and the page and line on the graphic where the symbol of the relay contact point 16 corresponding to the non-write instruction are found, thereby describing the page and line nearby 13 where the coil corresponding to the write instruction is described. Consequently, the correction processing of the sequence program is easily performed.

Description

【発明の詳細な説明】 〈産業上の利用分舒〉 本発明はラダー図作成方法にかかり、特にラダー図上で
使用されているコイルによりオン/オフするリレー接点
がどこで(第伺頁、第何行で)使用されているか、及び
ラダー図上のリレー接点をオン/オフさせるコイルがど
こにあるかを容易に認識できるようにしたラダー図作成
方法に関する。
[Detailed Description of the Invention] <Industrial Application> The present invention relates to a method for creating a ladder diagram, and in particular, where are the relay contacts that are turned on and off by the coils used on the ladder diagram (first page, second page)? This invention relates to a method for creating a ladder diagram that makes it possible to easily recognize in what rows the coils are used and where the coils that turn on/off relay contacts are located on the ladder diagram.

〈従来技術〉 数値制御システムにおいてはNC装置からの指令に基づ
いて工作機械の各機械要素が制御される。
<Prior Art> In a numerical control system, each mechanical element of a machine tool is controlled based on commands from an NC device.

そして、NC装置と工作機械間の信号の授受制御はシー
ケンスプログラムに基づいて行われる。
The transmission and reception of signals between the NC device and the machine tool is controlled based on a sequence program.

このシーケンスプログラムはNC装置と工作機械間のデ
ータ授受を司どる強電回路の機能を命令コードとオペラ
ンドで論理的にプログラムしたもので、たとえば第9図
に示す強電回路の一部であるラダー図は第10図に示す
ように二−モニックコードでプログラムされている。尚
、ラダー図中に)はコイル、11はメークリレー接点、
1/1はブレークリレー接点を示している。又、シーケ
ンスプログラム中におけるRD、OR,A、ND、WR
T、AND −NOT、OR−NOT・・・はそれぞれ
命令コードで、 RDは読出し命令(リード命令)、 ANDは論理積演算命令、 WRTは書き込み命令(ライト命令)、ORは論理和演
算命令、 AND −NOTは否定値との論理積演算命令、OR−
NOTは否定値との論理和演算命令である。
This sequence program is a logical program of the functions of the high-power circuit that controls data exchange between the NC device and the machine tool using instruction codes and operands.For example, the ladder diagram that is part of the high-power circuit shown in Figure 9 is As shown in FIG. 10, it is programmed with monic codes. In addition, in the ladder diagram) is the coil, 11 is the make relay contact,
1/1 indicates a break relay contact. Also, RD, OR, A, ND, WR in the sequence program
T, AND -NOT, OR-NOT... are each instruction codes, RD is a read instruction (read instruction), AND is an AND operation instruction, WRT is a write instruction (write instruction), OR is an OR operation instruction, AND -NOT is a logical product operation instruction with a negative value, OR-
NOT is an OR operation instruction with a negative value.

又、リレー接点及びコイルの上に英数字で表記したシン
ボルMF、M28.  ・・AUT、MO3゜・・・は
各命令コードのオペランドで、その論理値(11111
または”0″)はNC装置のワークメモリの所定番地、
所定ビットに記憶されている。
Also, the symbols MF, M28., written in alphanumeric characters above the relay contacts and coils. ...AUT, MO3゜... are operands of each instruction code, and their logical values (11111
or "0") is the specified location of the work memory of the NC device,
It is stored in a predetermined bit.

尚、リレー接点及びコイルの下にワークメモリにおける
記憶番地(小数点以上の数値)とビット(小数点以下の
数値)が示されている。又、シンボルと記憶位置(アド
レス)との対応テーブル(第11図参照)がワークメモ
リに記憶されている。
Note that below the relay contacts and coils, storage addresses (numbers above the decimal point) and bits (numbers below the decimal point) in the work memory are shown. Further, a correspondence table (see FIG. 11) between symbols and storage locations (addresses) is stored in the work memory.

乙のシーケンスプログラムのPRA部分の命令群により
 MF・M2S・M24・M22・M21・Ml、8 
・Ml4  ・Ml2 ・Ml、1の論理演算が実行さ
れ、その演算結果(′1”または”Ol′)がライト命
令WRTに伴オ)れたAペランドMO3に対応するワー
クメモリの所定番地の所定ピッ1.(10番地第2ビッ
ト)に格納され、又PRB部分の命令群により AUT−MO3・5PCCW の演算が実行され、その演算結果がライト命令WRTに
伴われたオペランドspcwが指示するワークメモリの
所定番地の所定ビット(20番地第5ピッl−1に格納
される。
According to the command group of the PRA part of the sequence program of Party B, MF, M2S, M24, M22, M21, Ml, 8
・Ml4 ・Ml2 ・Ml, 1 logical operation is executed, and the result of the operation ('1' or "Ol') is specified at the specified location in the work memory corresponding to the A operand MO3 that is output in response to the write command WRT. Pi 1. (2nd bit of address 10), and the operation of AUT-MO3/5PCCW is executed by the instruction group of the PRB part, and the operation result is stored at the specified address in the work memory specified by the operand spcw accompanying the write instruction WRT. A predetermined bit (stored in address 20, fifth pin l-1).

尚、リード命令からライ■・命令名をネットと言い、ネ
ットに対応するラダー図をユニットと言う。
Note that the name of the read command to lie command is called a net, and the ladder diagram corresponding to the net is called a unit.

〈発明が解決しようとしている問題点〉さて、シーケン
スプログラムが作成されると、該シーケンスプログラム
を用いて複数頁にわたるラダー図を印刷出力し、該ラダ
ー図を用いてデパックを行い、誤りが存在すれば訂正し
て最終的に完全なシーケンスプログラムを作成する。
<Problem to be solved by the invention> Now, once a sequence program is created, a ladder diagram spanning multiple pages is printed out using the sequence program, and depacking is performed using the ladder diagram to check for errors. If necessary, make corrections and finally create a complete sequence program.

ところで、同一のシンボルは1箇所だけでなく、種々の
場所で用いられものである。しかし、従来のラダー図作
成方法では第9図に示すようにリレー接点及びコイル記
号と、シンボルと、記憶位置(アドレス)のみラダー図
に表記するものであった。このため、デパック時等にお
いてシーケンスを訂正したい場合、たとえばあるシンボ
ルを削除したり、あるいは別のシンボルで訂正したい場
合、従来のラダー図では該シンボルを容易に捜すことが
できずデパック等が面倒であり相当の時間を要している
。特に、何十頁にもおよぶラダー図では全頁にわたって
所定のシンボルを捜さなくてはならないため益々上記欠
点が顕著になる。
By the way, the same symbol is used not only in one place but in various places. However, in the conventional ladder diagram creation method, only the relay contact and coil symbols, symbols, and storage positions (addresses) are written on the ladder diagram, as shown in FIG. For this reason, if you want to correct the sequence during depacking, for example, if you want to delete a certain symbol or correct it with another symbol, you cannot easily search for the symbol using the conventional ladder diagram, making depacking difficult. Yes, it takes a considerable amount of time. In particular, in the case of a ladder diagram that spans dozens of pages, the above-mentioned drawback becomes even more noticeable because it is necessary to search for a predetermined symbol across all pages.

以上から本発明の目的は、各命令のオペランドであるシ
ンボルがラダー図上のどこで(第何頁、第何行で)用い
られているかを容易に認識できるラダー図作成方法を提
供することである。
From the above, an object of the present invention is to provide a ladder diagram creation method that allows easy recognition of where on the ladder diagram (in which page and in which line) a symbol that is an operand of each instruction is used. .

本発明の別の目的はシーケンスプログラムの訂正処理を
簡単に行うことができるラダー図作成方法を提供するこ
とである。
Another object of the present invention is to provide a ladder diagram creation method that allows easy correction of sequence programs.

く問題点を解決するための手段〉 第1図は本発明によるラダー図である。Means to solve problems〉 FIG. 1 is a ladder diagram according to the present invention.

11はリード命令からライト命令名の1つのネットに対
応するラダー図(ユニット)を表示するユニット表示欄
、 12はコメント欄、 13はライト命令のオペランド”5PSTOP’″がど
とで(第何頁、第何行で)使用されているかを示すクロ
スリファレンス表示部、 14はライト命令以外の命令(非うイト命令)のオペラ
ンド(ラダー図上ではリレー接点)に対応するライト命
令(ラダー上ではコイル)がどこに(第何頁、第何行に
)あるかを指示するクロスリファレンス表示部である。
11 is a unit display field that displays the ladder diagram (unit) corresponding to one net from the read command to the write command name, 12 is a comment field, and 13 is where the operand "5PSTOP'" of the write command is (which page). , in which line) is used. 14 is a write instruction (coil on the ladder) that corresponds to the operand (relay contact on the ladder diagram) of an instruction other than the write instruction (non-write instruction). ) is a cross-reference display section that indicates where (on what page and line) is it located.

15はコイル、16はリレーである。15 is a coil, and 16 is a relay.

〈作用〉 非うイト命令(ラダー図上ではリレー接点)に伴うオペ
ランド(ラダー図上ではシンボルおJ:びアドレス)を
オペランドとするライト命令(ラダー図」二ではコイル
)を求め、該ライト命令に対応するコイル記号が表記さ
れるラダー図上の頁と行を求め、該非ライト命令に対応
するリレー接点記号が表記される近傍(クロスリファレ
ンス表示部)14に該頁と行を表記する。
<Operation> Obtains a write command (coil in ladder diagram 2) whose operand is the operand (symbol J: and address in ladder diagram) accompanying a non-write command (relay contact on the ladder diagram), and executes the write command. The page and row on the ladder diagram where the coil symbol corresponding to the non-write command is written are determined, and the page and row are written in the vicinity (cross reference display section) 14 where the relay contact symbol corresponding to the non-write command is written.

又、ライ)−命令(ラダー図上ではコイル)に伴うオペ
ランド(シンボルあるいはアドレス)をオペランドとす
る非うイト命令(ラダー図上ではリレー接点)を求め、
該非うイト命令に対応するリレー接点記号が表記される
ラダー図上の頁と行を求め、ライト命令に対応するコイ
ルが表記される近傍(クロスリファレンス表示部)13
に該頁と行を表記する。
Also, find a non-waiting command (relay contact on the ladder diagram) whose operand is the operand (symbol or address) accompanying the command (coil on the ladder diagram).
Find the page and row on the ladder diagram where the relay contact symbol corresponding to the non-write command is displayed, and find the vicinity (cross reference display section) 13 where the coil corresponding to the write command is displayed.
Indicate the page and line.

〈実施例〉 第1図は本発明によるラダー図の一部拡大図である。尚
、第12頁のA行目(12A)からF行目(12Fl迄
の6行分が表示されている。
<Example> FIG. 1 is a partially enlarged view of a ladder diagram according to the present invention. Note that six lines from line A (12A) to line F (12Fl) on page 12 are displayed.

11はリード命令からライト命令化の1つのネットに対
応するラダー図(ユニッI−1を表示するユニッ■・表
示欄、12はコメント欄、13ばライト命令(ラダー図
−1二ではコイル)のオペランド” 5PSTOP”が
どこで(第何頁、第何行で)使用されているかを示すク
ロスリファl/レス表示部、14は非ライ1〜命令のオ
ペランド(ラダー図」二ではリレー接点)に対応するラ
イト命令(ラダー」−ではコイル)がどこに(第何頁、
第何行に)あるかを指示するクロスリファレンス表示部
である。
11 is a ladder diagram corresponding to one net from a read command to a write command (a unit display field that displays unit I-1, 12 is a comment field, and 13 is a write command (coil in ladder diagram-12). Cross reference/response display section that shows where the operand "5PSTOP" is used (on what page and line), 14 corresponds to the operands of non-write 1 to commands (relay contacts in ladder diagram 2) Where is the write command (ladder) - the coil) (what page,
This is a cross-reference display section that indicates what line (in which line) it is located.

換言すれば、クロスリファレンス表示欄13は、コイル
によりオン/オフするリレー接点がどこで(第何頁、第
何行で)使用されているかを指示する欄であり、クロス
リファレンス欄14はラダー図上のリレー接点をオン/
オフさせるコイルがどこにあるかを指示する欄である。
In other words, the cross-reference display column 13 is a column that indicates where (on which page and in which line) the relay contact that is turned on and off by the coil is used, and the cross-reference display column 14 is a column that indicates where on the ladder diagram the relay contact that is turned on and off by the coil is used. Turn on the relay contact of /
This column indicates where the coil to be turned off is located.

第1図において、ライト命令(ラダー図上ではコイル)
に伴うオペランド” 5PSTOP’″をオペランドと
する非ライト命令(ラダー図」−ではリレー接7一 点)は第12頁B行、D行、G行、14行及び5行で使
用されているから、コメント欄12のクロスリファレン
ス表示部12にはこれらの頁と行が表記される。
In Figure 1, write command (coil on the ladder diagram)
The non-write instruction (in the ladder diagram, one relay contact 7) whose operand is "5PSTOP'" is used in lines B, D, G, 14, and 5 of page 12, so These pages and lines are displayed in the cross-reference display section 12 of the comment field 12.

又、非ライト命令(ラダー図上ではリレー接点)に伴う
オペランド(リレー接点のシンボル名またはアドレス)
”5PSTOP”をオペランドとするライト命令は12
頁第1行目で使用されているから、該オペランドのクロ
スリファレンス欄14に該頁と行が表記される。
Also, the operand (symbol name or address of the relay contact) accompanying a non-write command (relay contact on the ladder diagram)
There are 12 write instructions with “5PSTOP” as the operand.
Since it is used in the first line of the page, the page and line are written in the cross-reference column 14 of the operand.

第2図はシーケンスプログラム作成装置のブロック図で
ある。11はマイコン構成の本体部であり、プロセッサ
11 a、 ROM 1 l b、 RAM11c1ワ
ーキングメモリ11. d %有している。
FIG. 2 is a block diagram of the sequence program creation device. Reference numeral 11 denotes a main unit composed of a microcomputer, which includes a processor 11 a, a ROM 1 l b, a RAM 11 c 1 and a working memory 11 . d%.

12はプリンタ、13はディスプレイ装置、]4ばキー
ボード、15はフロッピーディスク装置、15a、15
bはフロッピーディスクである。
12 is a printer, 13 is a display device,] 4 is a keyboard, 15 is a floppy disk device, 15a, 15
b is a floppy disk.

本体部11のROM11bにはローディングプログラム
が記憶されている。そして、シーケンスゴログラム作成
に先立って、該ローディングゴロダラムの制御により所
定のフロッピーディスクからシーケンスプログラム作成
用のシステムプログラムを読み取ってRAM11cに記
憶する。
A loading program is stored in the ROM 11b of the main body 11. Prior to creating a sequence program, a system program for creating a sequence program is read from a predetermined floppy disk under the control of the loading program and stored in the RAM 11c.

この結果、以後プロセッサllaば該システムプログラ
ムの制御に基づいて処理を実行し、処理結果や各種イン
ストラクションをディスプレイ装置13に表示すると共
に、キーボード14から入力されたデータ、コマンド等
に基づいて所定の処理を実行し、シーケンスプログラム
を作成してフロッピーディスク等の媒体に出力する。
As a result, the processor lla thereafter executes processing based on the control of the system program, displays processing results and various instructions on the display device 13, and performs predetermined processing based on data, commands, etc. input from the keyboard 14. , create a sequence program, and output it to a medium such as a floppy disk.

又、プロセッサllaは作成したシーケンスゴログラム
を用いてラダー図を作成してプリンタ12より印刷出力
する。以下、かかるラダー図の作成方法について第3図
の流れ図に従って説明ずろ。
Further, the processor lla creates a ladder diagram using the created sequence gologram and prints it out from the printer 12. The method for creating such a ladder diagram will be explained below according to the flowchart in FIG.

(alまず、1→1とする。(Al First, set 1→1.

(blついで、シーケンスゴログラムのmi番目のリー
ド命令からライト命令名の第1ネットのラダー図(ユニ
ット)を作成して該ユニットの行数YMoを求め、ライ
トアドレス(ライ)・命令のオペランドであり、ラダー
図においてコイルの下に表記されているアドレスである
)に対応させてワーキングメモリ11dに格納する。
(Next, create a ladder diagram (unit) of the first net of the write instruction name from the mi-th read instruction of the sequence gologram, find the number of rows YMo of the unit, and use the write address (rai) and the operand of the instruction. (the address written below the coil in the ladder diagram) is stored in the working memory 11d.

(c)シかる後、全ネットについて行数Y11Axを求
めたかどうかをチェックする。
(c) After calculating, check whether the number of lines Y11Ax has been calculated for all nets.

(dl全ネットについて行数が求まってぃなけ第1ばl
十ト1によりlを歩進して、ステップ(b)以降の処理
を繰り返す。
(If the number of lines has not been determined for all dl nets, the first step is
Increment l by 1 and repeat the process from step (b) onwards.

te1以上により、全ネットのライトアドレスと行数Y
、Axの対応テーブル(第4図参照)が求まれば、次に
各ライト命令のオペランド(ライトアドレス)毎に、該
ライトアドレスをオペランドとするライト命令以外の命
令(非ライト命令)の数(クロスリファレンス数)Nr
を求める。すなわち、全ライトアドレスのNrの初期値
を零にクリアし、この状態でシーケンスプログラムの先
頭からサーチし、非ライト命令が現われる毎に該非ライ
ト命令のオペランドと同一のライトアドレスのNrを1
カウントアツプすることで全ライトアドレスのクロスリ
ファレンス数Nrを求めてワーキングメモリに記憶する
(第4図参照)。
By te1 or more, write address and number of lines Y for all nets
, Ax (see Figure 4), then for each operand (write address) of each write instruction, calculate the number of instructions other than write instructions (non-write instructions) that use the write address as an operand ( Number of cross references) Nr
seek. That is, the initial value of Nr of all write addresses is cleared to zero, and in this state, the sequence program is searched from the beginning, and every time a non-write instruction appears, Nr of the write address that is the same as the operand of the non-write instruction is set to 1.
By counting up, the cross reference number Nr of all write addresses is determined and stored in the working memory (see FIG. 4).

(flついで、1→1とずろ。(Following it, it goes from 1 to 1.

(g)シかる後、各ユニットの縞幅とクロスリファl/
レスを表示するに必要なりロスリファレンス幅の大小を
比較する。尚、縞幅は1行の幅をWdとずわばY、1A
x−Wdとなり、クロスリファレンス幅はクロスリファ
レンスの行数をNc、クロスリファレンスの1行の幅を
WeとすればNc−Waとなる。たt!し、Ncは1行
に表示するクロスリファレンス数をnとずればN r 
/ nを切り上げた整数である。又、第1図に示すJ−
うにコメン)・欄12に”5PINDLE 5TOP 
COMMAND’”というように1行分のコメントを付
す時にはクロスリファレンスの行数Ncとしては1行増
加して考えろ。
(g) After marking, the stripe width and cross reference l/ of each unit
Compare the size of the loss reference width required to display the response. In addition, the stripe width is defined as the width of one line by Wd and Y, 1A.
x-Wd, and the cross-reference width is Nc-Wa, where the number of cross-reference lines is Nc and the width of one cross-reference line is We. Tat! Then, Nc is Nr if the number of cross-references displayed in one line is different from n.
/ is an integer obtained by rounding up n. In addition, J- shown in FIG.
sea urchin comment)・In column 12 “5PINDLE 5TOP
When adding a one-line comment such as "COMMAND'", consider increasing the number of cross-reference lines Nc by one line.

(hll輻幅クロスリファレンス幅であわば次式%式% により増加ライン数1. aを求めてラインアドレスに
対応させてワーキングメモリに記憶する。
(The number of increased lines 1.a is calculated using the following formula (% formula %) in the hll width cross reference width and is stored in the working memory in correspondence with the line address.

(1)ステップ(glにおいて縞幅≧クロスリファレン
ス幅の場合、あるいはステップfhlにおいて増加ライ
ン数Laを求めた場合には、全ネットについて(gl、
(hlの処理が終了したがどうがをチェックする。
(1) If stripe width ≧ cross-reference width in step (gl), or if the number of increased lines La is calculated in step fhl, for all nets (gl,
(Check what happens when the hl process is completed.

(it終了していなければi + 1→lとして1を1
歩進してステップ(g)以降の処理を繰り返す。
(If it has not finished, change 1 to 1 as i + 1 → l.
Step forward and repeat the process from step (g) onward.

ζk)終了していればライトアドレスと増加ライン数L
aの対応テーブルが第5図に示すようにワーキングメモ
リに作成されたことになり、以後1→Jとして以下の処
理を実行する。
ζk) If completed, write address and increased number of lines L
The correspondence table a has been created in the working memory as shown in FIG. 5, and the following processing is then executed as 1→J.

ill第jネットのユニットを作成し、該ユニットが1
頁分の余白におさまるがどぅがをチェックする。尚、ラ
イトアドレスと増加ライン数との対応テーブル(第5図
参照)から増加ライン数があるかどうかをチェックし、
あれば該増加ライン数をも考慮して1頁分の余白におさ
まるかどうかをチェックする。
ill create a unit of the jth net, and the unit is 1
Check if it fits in the page margin. In addition, check whether there is an increased number of lines from the correspondence table between the write address and the increased number of lines (see Figure 5),
If so, it is checked whether the increased number of lines can be taken into account and the margins for one page can be accommodated.

(ml余白に収まれば第」ネットのユニット画像を1頁
分のラダー画像を記憶するページバッファメモリ (図
示しないが、ワーキングメモリ1.1 dの所定の記憶
域を用いる)に記憶する。
(If it fits within the ml margin), the net unit image is stored in a page buffer memory (not shown, but a predetermined storage area of the working memory 1.1d is used) that stores one page's worth of ladder images.

又、該第Jネットにおける各非ライト命令のオペランド
(リレーアドレスという)と、該オペランドのクロスリ
ファレンス欄(第1図における14)を記憶するページ
バッファメモリにおけるアドレスとの対応テーブル(す
l)−アト1ノステーブルという)を作成する(第6図
参照)。
Also, a correspondence table (sul) between the operands (referred to as relay addresses) of each non-write instruction in the J-th net and the addresses in the page buffer memory that stores the cross reference column (14 in FIG. 1) of the operands. (See Figure 6).

更に、該第Jネットにおけるライト命令のオペランド(
ライトアドレスという)、と、該オペランドのクロスリ
ファレンス欄(第1図における13)を記憶するページ
バッファメモリにおけるアドレスとの対応テーブル(ラ
イトアドレステーブルという)を作成する(第7図参照
)。
Furthermore, the operand (
A correspondence table (referred to as a write address table) between the address (referred to as the write address) and the address in the page buffer memory that stores the cross-reference column (13 in FIG. 1) of the operand is created (see FIG. 7).

inlついで、第jネットに増加ライン数があるかをチ
ェックする。
inl, then check whether there is an increased number of lines in the j-th net.

(01増加ライン数があれば該増加ライン数に相当する
スペースを設ける。
(01 If there is an increased number of lines, provide a space corresponding to the increased number of lines.

(p)シかる後、あるいはステップ(n)において増加
ライン数がなければ全ネットについてステップ(1)以
降の処理が終了したかどうかをチェックする。
(p) After the net, or if there is no increase in the number of lines in step (n), it is checked whether the processing from step (1) onwards has been completed for all nets.

(ql終了していなければj+1→jにより1歩進して
ステップ(1)以降の処理を繰り返す。
(If ql is not completed, proceed one step by j+1→j and repeat the process from step (1).

jrl全ネソ1−について処理が終了しているか、ある
いはステップ(1)において第Jネッ1へのユニットを
収めるべき余白がなくなれば、1→rとする。
If the processing has been completed for all jrl nets 1-, or if there is no more space to accommodate the unit to the Jth net 1 in step (1), 1→r is set.

(s)ついで、1→pとする。(s) Next, set 1→p.

(t)シかる後、第1頁のライトアドレステーブル(第
7図参照)を作成する。
(t) After writing, create the first page write address table (see FIG. 7).

f、lステップ(m)で作成したリレーアドレステーブ
ルにおける第1番目のリレーアドレスと同一のライトア
ドレスが、第1頁のライトアドレステーブルに存在する
かどうかをチェックする。
f, l Check whether the same write address as the first relay address in the relay address table created in step (m) exists in the write address table on the first page.

(vl存在しなげねばp+1−pによりpを1歩進して
ステップ(11以降の処理を繰り返す。
(If vl does not exist, p is incremented by one step by p+1-p and the process from step 11 onward is repeated.

(wl存在すれば該ライトアドレスに対応するコイルが
描画されるラダー図における頁(第1頁)と行を、第r
リレーアドレスのクロスリファレンス欄に対応するペー
ジバッファの所定のアドレス(第(mlステップで求め
たリレーアドレステーブルから求まる)に書き込む。
(If wl exists, specify the page (first page) and row in the ladder diagram where the coil corresponding to the write address is drawn.
A predetermined address (determined from the relay address table obtained in the ml step) of the page buffer corresponding to the relay address cross-reference column is written.

(X)シかる後、第(m)ステップで求めた全リレーア
ドレスについてステップ(Sl以降の処理を終了したか
どうかをチェックする。
After (X), it is checked whether the processing after step (S1) has been completed for all the relay addresses obtained in step (m).

(yl終了していなければr + 1→rとしてステッ
プ(Sl以降の処理を繰り返す。
(If yl is not completed, step r + 1 → r (repeat the process from Sl onwards).

(Z)全リレーアドレスについてステップ(Sl以降の
処理を終了していれば、1→Wとする。
(Z) Step 1 for all relay addresses (if processing after Sl has been completed, change from 1 to W).

(a)′ついて、1→pとする。(a) For ', let 1→p.

(b) ’第pページのリレーアドレステーブル(第6
図参照)を作成する。
(b) 'Pth page relay address table (6th page
(see figure).

(C)′ ステップ(m)で作成したライl−アドレス
テーブルにおける第W番目のライトアドレスと同一のリ
レーアドレスが、第1頁のリレーアドレステーブルに存
在するかどうかをチェックする。
(C)' Check whether the same relay address as the W-th write address in the write address table created in step (m) exists in the relay address table on the first page.

(v)存在すれば該リレーアドレスに対応するリレー接
点が描画されるラダー図における頁(第1頁)と行を、
第Wライトアドレスのクロスリファレンス欄に対応する
ページバッファの所定のアトlメス(第(mlステップ
で求めたライトアドレステーブルから求まる)に書き込
む。
(v) If it exists, the page (first page) and row in the ladder diagram where the relay contact corresponding to the relay address is drawn,
Write to a predetermined address (determined from the write address table obtained in the ml step) of the page buffer corresponding to the cross-reference field of the W-th write address.

しかし、存在しなければ次のステップへ進む。However, if it does not exist, proceed to the next step.

(d)′全ページについて、ステップ(b)′、(C)
′の処理が終了したかどうかをチェックする。
(d)'For all pages, step (b)', (C)
Check whether processing of ' has finished.

(e)′処理が終了していなければ、p+1→pにより
pを1歩進してステップ(a)′以降の処理を繰り返す
(e) If the process is not completed, p is incremented by one step by p+1→p and the process from step (a)' is repeated.

(f)′全ページについてステップ(bl’ 、(cl
’の処理が終了すれば、ページバッファメモリに記憶さ
れている1ペ一ジ分のラダー図をプリンタ12で印刷出
力し、しかる後ページバッファメモリをクリアする。
(f) 'Steps (bl', (cl) for all pages
When the process ' is completed, the printer 12 prints out one page of the ladder diagram stored in the page buffer memory, and then the page buffer memory is cleared.

(g)′ついで、全ページのラダー図の印刷出力が完了
したかどうかをチェックする。終了していなければ次の
ページのラダー図を印刷すべくステップ(1)以降の処
理を繰り返し、終了していればラダー図作成処理が完了
する。
(g)'Then, check whether printing of all pages of the ladder diagram has been completed. If the process has not been completed, the process from step (1) onward is repeated to print the next page of the ladder diagram, and if it has been completed, the ladder diagram creation process is completed.

第8図は本発明により打ち出したラダー図の1ペ一ジ分
の例である。尚、第8図では第12ページが示されてお
り、1ページの行数はA−P迄の16行であす、コメン
ト欄12のクロスリファレンス欄には1行5個のクロス
リファレンスカ表記されるものとしている。
FIG. 8 is a one-page example of a ladder diagram created according to the present invention. In addition, the 12th page is shown in Figure 8, and the number of lines on one page is 16 lines from A to P. In the cross reference column of comment column 12, 5 cross references are written per line. It is assumed that

以上本発明の詳細な説明したが、本発明は実施例に限定
されるものではなく種々請求の範囲内で変更が可能であ
る。
Although the present invention has been described in detail above, the present invention is not limited to the embodiments and can be modified in various ways within the scope of the claims.

〈発明の効果〉 以上本発明によれば、各命令のオペランドであるシンボ
ル(コイル、リレー接点)がラダー図上のどこで(第何
頁、第何行で)用いられているかを表記するように構成
したから、シーケンスゴログラムのデパック等訂正処理
を簡単に行うことができる。
<Effects of the Invention> According to the present invention, the symbol (coil, relay contact) that is the operand of each instruction is indicated where on the ladder diagram (on which page, in which line) is used. With this configuration, correction processing such as depacking of sequence golograms can be easily performed.

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

第1図は本発明によるラダー図の拡大図、第2図は本発
明を実現するシーケンスプログラム作成装置のブロック
図、 第3図は本発明の処理の流れ図、 第4図はライトアドレスと行数Y11 A X及びクロ
スリファレンス数Nrの対応テーブル、 第5図はライ)・アドレスと増加ライン数L aの対応
テーブル、 第6図はリレーアドレステーブル、 第7図はライトアドレステーブル、 第8図は本発明にかかる1ペ一ジ分のラダー図、第9図
乃至第11図はシーケンスプログラム説明図であり、第
9図は従来のラダー図、第10図はシーケンスプログラ
ムの一部説明図、第11図はシンボルとアドレスの対応
表である。 11・・ユニット表示欄、 12・・コメント欄、 13・・ライト命令のクロスリファレンス表示部、14
・・非ライト命令のクロスリファレンス表示部、 15・・コイル、16・・リレー接点 特許出願人        ファナック株式会社代理人
          弁理士  齋藤千幹第3図(C) 第4居1     第5図 第6図 第7図
Figure 1 is an enlarged diagram of a ladder diagram according to the present invention, Figure 2 is a block diagram of a sequence program creation device that implements the present invention, Figure 3 is a flowchart of the process of the present invention, and Figure 4 is a write address and number of lines. Y11 A A correspondence table between X and the number of cross references Nr, Figure 5 is a correspondence table between the write address and the number of increased lines L a, Figure 6 is a relay address table, Figure 7 is a write address table, Figure 8 is a correspondence table between The one-page ladder diagram according to the present invention, FIGS. 9 to 11 are explanatory diagrams of a sequence program, FIG. 9 is a conventional ladder diagram, and FIG. 10 is a partial explanatory diagram of a sequence program. FIG. 11 is a correspondence table between symbols and addresses. 11...Unit display column, 12...Comment column, 13...Write instruction cross reference display section, 14
...Cross-reference display section for non-write commands, 15.. Coil, 16.. Relay contact Patent applicant Chiki Saito, agent, patent attorney, Fanuc Co., Ltd. Figure 3 (C) Figure 4 Room 1 Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】 ラダー図上のリレー接点記号、コイル記号等に対応する
オペランドを伴ったリード命令、論理和演算命令、論理
積演算命令、ライト命令等の命令コードで作成してなる
シーケンスプログラムを用いて複数頁からなるラダー図
を作成するラダー図作成方法において、 ライト命令以外の命令(非ライト命令)に伴うオペラン
ドをオペランドとするライト命令を求め、該ライト命令
に対応するコイル記号が表記されるラダー図上の頁と行
を求め、該非ライト命令に対応するリレー接点記号が表
記される近傍に該頁と行を表記すると共に、 ライト命令に伴うオペランドをオペランドとする非ライ
ト命令を求め、該非ライト命令に対応するリレー接点記
号が表記されるラダー図上の頁と行を求め、ライト命令
に対応するコイルが表記される近傍に該頁と行を表記す
ることを特徴とするラダー図作成方法。
[Scope of Claims] A sequence program created with instruction codes such as read instructions, logical sum operations instructions, logical product operations instructions, write instructions, etc. with operands corresponding to relay contact symbols, coil symbols, etc. on a ladder diagram. In the ladder diagram creation method of creating a ladder diagram consisting of multiple pages using Find the page and row on the ladder diagram to be written, write the page and row near where the relay contact symbol corresponding to the non-write instruction is written, and find the non-write instruction whose operand is the operand accompanying the write instruction. , a ladder diagram characterized in that the page and row on the ladder diagram in which the relay contact symbol corresponding to the non-write command is written are determined, and the page and row are written in the vicinity where the coil corresponding to the write command is written. How to make.
JP60299021A 1985-12-28 1985-12-28 Forming method for ladder graphic Pending JPS62157907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60299021A JPS62157907A (en) 1985-12-28 1985-12-28 Forming method for ladder graphic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60299021A JPS62157907A (en) 1985-12-28 1985-12-28 Forming method for ladder graphic

Publications (1)

Publication Number Publication Date
JPS62157907A true JPS62157907A (en) 1987-07-13

Family

ID=17867198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60299021A Pending JPS62157907A (en) 1985-12-28 1985-12-28 Forming method for ladder graphic

Country Status (1)

Country Link
JP (1) JPS62157907A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01273105A (en) * 1988-04-25 1989-11-01 Mitsubishi Electric Corp Programming method for digital controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01273105A (en) * 1988-04-25 1989-11-01 Mitsubishi Electric Corp Programming method for digital controller

Similar Documents

Publication Publication Date Title
KR860001071B1 (en) Method for editing document
US5104245A (en) Printing apparatus with form editor
US4707153A (en) Printer controller
JPS62157907A (en) Forming method for ladder graphic
US5288156A (en) Apparatus for generating character pattern for serial printer
JP2980732B2 (en) How to generate outline fonts
JPH02258364A (en) Printer
JPS62279405A (en) Cross reference data preparing method
JPS63116192A (en) Image data output device
JP2591021B2 (en) Character pattern generation method
JP2525333B2 (en) Output device
JPS63233465A (en) Input display system for numerical format code
JPH0218496B2 (en)
JPS5965339A (en) Document editing device
JPS6221567A (en) Printer
JPS61158384A (en) Character processor
JPS6219475A (en) Printer
JP3017363B2 (en) Printing equipment
JPS6042086A (en) Printer
JPH0746543Y2 (en) Printer
JPS6316787B2 (en)
JPH0370093A (en) Selective information input system
JPH049150B2 (en)
JPH06305197A (en) Electronic device having status register
JPH0481894A (en) Outline data processor