JPH0736201U - Output instruction double use check device - Google Patents

Output instruction double use check device

Info

Publication number
JPH0736201U
JPH0736201U JP014291U JP1429194U JPH0736201U JP H0736201 U JPH0736201 U JP H0736201U JP 014291 U JP014291 U JP 014291U JP 1429194 U JP1429194 U JP 1429194U JP H0736201 U JPH0736201 U JP H0736201U
Authority
JP
Japan
Prior art keywords
output
output instruction
program
instruction
address
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 - Lifetime
Application number
JP014291U
Other languages
Japanese (ja)
Inventor
進 松本
進 斉藤
哲男 角田
Original Assignee
富士電機株式会社
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 富士電機株式会社 filed Critical 富士電機株式会社
Priority to JP014291U priority Critical patent/JPH0736201U/en
Publication of JPH0736201U publication Critical patent/JPH0736201U/en
Expired - Lifetime legal-status Critical Current

Links

Abstract

(57)【要約】 【目的】プログラム命令の中から出力命令の二重使用を
チェックする時間を短縮する。 【構成】プログラム命令を記憶したプログラムメモリ2
から読み出された出力命令を、選別条件テーブル5に設
定(例えば出力命令の最下位アドレス)された出力命令
の選別条件に従って出力命令選別回路4で選別し、選別
された出力命令をスタック記憶回路7に記憶すると共に
このスタック記憶回路7に記憶された一群の出力命令に
対して二重使用のチェックをスタック検索回路6で実行
し、二重使用が有るときには警告回路20により警告し、
二重使用が無いときには選別条件を逐次変更して全ての
出力命令について二重使用をチェックする。選別条件を
設定して出力命令を選別することにより出力命令の読み
出し回数が減少し、チェック時間が短縮される。
(57) [Summary] [Purpose] To reduce the time to check the double use of output instructions among program instructions. [Structure] Program memory 2 storing program instructions
Output instructions read from the output instruction selection circuit 4 according to the selection conditions of the output instruction set in the selection condition table 5 (for example, the lowest address of the output instruction), and the selected output instructions are stored in the stack storage circuit. 7, the stack search circuit 6 executes a check for double use for a group of output instructions stored in the stack storage circuit 7, and when there is double use, a warning circuit 20 warns.
When there is no double use, the selection condition is sequentially changed and the double use is checked for all output instructions. By setting the selection condition and selecting the output instruction, the number of times the output instruction is read is reduced and the check time is shortened.

Description

【考案の詳細な説明】[Detailed description of the device]

【0001】[0001]

【産業上の利用分野】[Industrial applications]

本考案は、シーケンスコントローラのプログラムの命令チェック装置に関し、 特にプログラムにおける出力命令についての二重使用チェック装置に関する。 The present invention relates to a program instruction check device for a sequence controller, and more particularly to a dual use check device for output instructions in a program.

【0002】[0002]

【従来の技術】[Prior art]

一般に、プログラマブルコントローラが行うプログラム中に同一の出力アドレ スを持つ出力命令が二つ以上あると、プログラマブルコントローラの誤動作の原 因となるため、プログラマブルコントローラの作動に先立ってプログラム中の出 力命令が二重使用されているか否かをチェックすることが知られている。従来の この種の出力命令二重使用チェック装置については、種々知られている。 Generally, if there are two or more output instructions with the same output address in the program executed by the programmable controller, it causes the malfunction of the programmable controller.Therefore, the output instruction in the program is executed before the programmable controller operates. It is known to check for double usage. Various conventional output instruction double use checking devices of this type are known.

【0003】 この種の従来の出力命令の二重チェック装置の処理手順の一例を説明する。図 2はシーケンス回路を図式化したシーケンスプログラムを示す。図3は図2のシ ーケンスプログラムのリスト表現を示す。このようなプログラムにおいては、出 力命令の二重使用をチェックするためには、第1ステップとして、プログラムの 一番前にある出力命令を抽出する。図3のプログラム例では、出力命令1が抽出 されると、二重チェック装置は内部メモリのこの出力命令"OUT 0000"を記憶する 。次に、この出力命令を基点として、基点以後のプログラム命令と基点の出力命 令とを比較し、基点の出力命令と同一の命令があるか否かを二重チェック装置は 検出する。基点となっている出力命令と同一の命令がプログラム中にないときは 、二重使用チェック装置は基点を次の出力命令に移す。図3に示す例では出力命 令2の"OUT 0001"が基点となる。このように、順次出力命令の基点を移し、基点 がプログラムの終端に達するまで、二重チェック装置は出力命令の二重使用のチ ェックを繰り返す。An example of the processing procedure of this type of conventional output instruction double check device will be described. FIG. 2 shows a sequence program in which the sequence circuit is illustrated. FIG. 3 shows a list representation of the sequence program of FIG. In such a program, in order to check the double use of output instructions, the first step is to extract the output instruction at the front of the program. In the program example of FIG. 3, when the output instruction 1 is extracted, the double check device stores this output instruction "OUT 0000" in the internal memory. Next, using this output instruction as a base point, the program instruction after the base point is compared with the output instruction of the base point, and the double check device detects whether there is the same instruction as the output instruction of the base point. If the same instruction as the base output instruction is not in the program, the double-use checking device moves the base point to the next output instruction. In the example shown in Fig. 3, "OUT 0001" of output instruction 2 is the base point. In this way, the base points of the output instructions are sequentially moved, and the double check device repeatedly checks the double use of the output instructions until the base point reaches the end of the program.

【0004】[0004]

【考案が解決しようとする課題】[Problems to be solved by the device]

けれども、例えば、8192ステップあるシーケンスプログラムの中の4096個の出 力命令に対して二重使用のチェックを行うときプログラムからプログラム命令を 読み取る回数の平均は、読み取り回数=8192+4096×4096≒8192+16.8×106 ≒ 16.8×106 (回)と非常に大きなものとなり、出力命令の二重使用のチェックに 時間がかかるという問題点があった。However, for example, when checking the double use of 4096 output instructions in a sequence program with 8192 steps, the average number of read program instructions from the program is the number of read = 8192 + 4096 × 4096 ≈ 8192 + 16.8 There was a problem that it became very large as × 10 6 ≈ 16.8 × 10 6 (times), and it took time to check the double use of output instructions.

【0005】 そこで、本考案の目的は、このような問題点を解決し、出力命令の二重使用の チェック時間を短縮することができる出力命令の二重使用チェック装置を提供す ることにある。Therefore, an object of the present invention is to solve the above problems and to provide an output instruction double use check device capable of shortening the check time for double use of output instructions. .

【0006】[0006]

【課題を解決するための手段】[Means for Solving the Problems]

上述の目的を達成するため本考案は、シーケンスプログラムを記憶するプログ ラムメモリと、前記プログラムメモリから読み出された命令の中から出力命令を 検出する出力命令検出手段と、出力命令の中から一群の出力命令を選別するため の選別条件を予め定められた一定の順序で逐次設定する条件設定手段と、前記条 件設定手段による選別条件が切り換わる毎に更新され、前記選別条件で選別され た出力命令の使用状態を記憶するスタック手段と、前記選別条件で選別された出 力命令を前記スタック手段に記憶された出力命令と比較することにより出力命令 の二重使用を検出する検出手段とを備えたことを特徴とする。 In order to achieve the above-mentioned object, the present invention provides a program memory for storing a sequence program, an output instruction detecting means for detecting an output instruction from the instructions read from the program memory, and a group of output instructions. The condition setting means for sequentially setting the selection conditions for selecting the output command in a predetermined fixed order, and the output updated every time the selection conditions by the condition setting means are switched, and the output selected by the selection conditions A stacking means for storing a usage state of the instruction; and a detecting means for detecting the double use of the output instruction by comparing the output instruction selected by the selection condition with the output instruction stored in the stacking means. It is characterized by that.

【0007】[0007]

【作用】[Action]

本考案では、出力命令を選別条件に従ってプログラム命令の中から選別し、選 別された一群の出力命令に対して二重使用のチェックを検出手段により行い、選 別された出力命令の中に二重使用されている出力命令がないときには選別条件を 逐次変更して全ての出力命令について二重使用チェックを行うようにしたので、 メモリからの出力命令の読み取り回数が減少し、以てチェック時間を短縮するこ とができる。 In the present invention, the output instruction is selected from the program instructions according to the selection condition, and the detection means checks the use of the selected group of output instructions for double use. When there are no output instructions that are heavily used, the selection conditions are changed sequentially and a double usage check is performed for all output instructions, so the number of times the output instructions are read from the memory is reduced, thus reducing the check time. It can be shortened.

【0008】[0008]

【実施例】【Example】

以下、本考案の一実施例を図面に基づいて詳細かつ具体的に説明する。本実施 例において、出力命令の指示するアドレス"0000"〜"7777"(8進数)の領域を割 り当てている。本実施例はこのように、割り当てたアドレスの最下位アドレスに 着目して予め定めた最下位アドレスの番号を持つ出力命令に対して二重使用チェ ックを行うことによりプログラム命令の読み取り回数を減らすものである。 An embodiment of the present invention will be described below in detail and specifically with reference to the drawings. In this embodiment, the area of addresses "0000" to "7777" (octal number) designated by the output instruction is allocated. In this embodiment, the number of read times of the program instruction can be determined by checking the output instruction having the predetermined lowest address number by paying attention to the lowest address of the assigned address. To reduce.

【0009】 図1は本考案実施例の構成の一例を示す。図1において、2はシーケンスプロ グラムを記憶するプログラムメモリである。1はプログラムメモリ2の読み取り アドレスを設定するプログラムカウンタである。プログラムカウンタ1の計数値 はアドレスバスaを会してプログラムメモリ2に送られる。プログラムメモリ2 はアドレス設定されたプログラム命令をデータバスbに出力する。3はプログラ ム命令が出力命令であるか否かを検出する出力命令検出回路である。出力命令検 出回路3はプログラム命令が出力命令であることを検出すると、信号線cに出力 命令有りを示すレベル"H" の信号を出力する。4は出力命令選別回路であり、信 号線cを介して出力命令有りの信号を受け取ると、このときの出力命令が、選別 条件テーブル5により指示された選別条件に合致するか否かを判定し、選別条件 に合致した出力命令をバスgに出力する。さらに、出力命令選別回路4は、出力 命令が選別条件に合致していないときは、信号線fに選別対象無しを意味するレ ベル"H" の信号を 出力する。出力命令が選別条件に合致したときには信号線e に選別対象有りを示すレベル"H" の信号を出力する。FIG. 1 shows an example of the configuration of an embodiment of the present invention. In FIG. 1, reference numeral 2 is a program memory for storing a sequence program. A program counter 1 sets a read address of the program memory 2. The count value of the program counter 1 is sent to the program memory 2 by meeting the address bus a. The program memory 2 outputs the addressed program command to the data bus b. Reference numeral 3 is an output instruction detection circuit for detecting whether or not the program instruction is an output instruction. When the output command detection circuit 3 detects that the program command is an output command, it outputs a signal of level "H" indicating that there is an output command to the signal line c. An output instruction selection circuit 4 receives an output instruction signal through the signal line c and determines whether the output instruction at this time matches the selection condition indicated by the selection condition table 5. , Outputs an output command matching the selection condition to the bus g. Further, when the output instruction does not meet the selection condition, the output instruction selection circuit 4 outputs a signal of level "H", which means that there is no selection target, to the signal line f. When the output command matches the selection condition, a signal of level "H" indicating that there is a selection target is output to the signal line e 1.

【0010】 5は選別条件テーブルであり、テーブルポインタが指示する番号を選別条件と して出力命令選別回路へ出力する。テーブルポインタが指示する番号と、出力命 令の指示アドレスの最下位番号とが合致する出力命令が出力命令選別回路4によ り選別される。ただし、出力命令選別回路4は選別した出力命令のアドレス番号 のみを出力する。このため後述のスタック記憶回路7のメモリ容量を小さくでき る。7はスタック記憶回路であり、出力命令選別回路4により選別された出力命 令におけるアドレス部分を記憶する。6はスタック検索回路であり、スタック検 索回路6はスタック記憶回路7に記憶されているアドレス部分をスタックエリア 8(スタック手段)を用いて検索し、現在、出力命令選別回路7から送られてき たアドレス部分と同一のものがスタックエリア8内に有るか否かをチェックする 。ここで、同一アドレス部分が有るときは出力命令が二重に使用されているとし て、信号線iにレベル"H" の信号を出力する。この信号に基づいて警告回路20は 警告音を鳴らしたり、メッセージを表示することにより警告を行う。9はアドレ ス上限チェック部であり、プログラムカウンタ1の値がプログラムの最終アドレ スに達したときには信号線qを介してプログラムリセット信号を送り、プログラ ムカウンタ1をリセットする。プログラムカウンタ1が最終アドレスに達してい ないときにはアドレス上限チェック部9は信号線pにプログラムカウンタ1をイ ンクリメントするためのレベル"H" の信号を出力する。10はテーブルポインタ上 限チェック部であり、テーブルポインタ5'が予め定めた上限に達したか否かを検 出し、テーブルポインタ5'が上限に達したときに信号線rにレベル"H" の信号を 出力する。テーブルポインタ5'が上限に達していないときは信号線sにレベル"H " の信号を出力する。11はアドレス読み出し変換回路であり、プログラムアドレ スを対応する表示パターンに変換する回路である。12は表示パターンに変換され たプログラムアドレスを表示する表示部である。Reference numeral 5 is a selection condition table, which outputs the number designated by the table pointer as a selection condition to the output instruction selection circuit. The output instruction selection circuit 4 selects an output instruction in which the number designated by the table pointer matches the lowest number of the instruction address of the output instruction. However, the output instruction selection circuit 4 outputs only the address number of the selected output instruction. Therefore, the memory capacity of the stack storage circuit 7 described later can be reduced. A stack storage circuit 7 stores the address portion in the output instruction selected by the output instruction selection circuit 4. A stack search circuit 6 searches the address portion stored in the stack storage circuit 7 using the stack area 8 (stack means), and is currently sent from the output instruction selection circuit 7. Then, it is checked whether or not the same address part exists in the stack area 8. Here, when there is the same address portion, it is assumed that the output instruction is used twice, and the signal of level "H" is output to the signal line i. Based on this signal, the warning circuit 20 gives a warning by sounding a warning sound or displaying a message. An address upper limit check unit 9 sends a program reset signal via the signal line q to reset the program counter 1 when the value of the program counter 1 reaches the final address of the program. When the program counter 1 has not reached the final address, the address upper limit check unit 9 outputs a signal of level "H" for incrementing the program counter 1 to the signal line p. Reference numeral 10 is a table pointer upper limit check unit, which detects whether or not the table pointer 5'has reached a predetermined upper limit, and when the table pointer 5'has reached the upper limit, a signal of level "H" is output to the signal line r. Output a signal. When the table pointer 5'has not reached the upper limit, a signal of level "H" is output to the signal line s. Reference numeral 11 is an address read conversion circuit, which is a circuit for converting a program address into a corresponding display pattern. A display unit 12 displays the program address converted into a display pattern.

【0011】 次に、このような構成における出力命令の二重使用のチェック動作を説明する 。図1において、プログラムカウンタ1により設定されたアドレスに相当するシ ーケンスプログラム命令はデータバスbに出力される。出力命令検出回路3では データバスbの中から命令コード部分b'を取り出し、出力命令か否かを判定し、 出力命令のときは信号線cにレベル"H" の信号を出力し、否のときには信号線d にレベル"H" の信号を出力する。出力命令選別回路4は、cの信号を受けたとき にデータバスbの中からi/o アドレス部分(アドレス番号)b"を取り出す。さら に、選別条件テーブル5からデータバスhを介してテーブルポインタ5'の示す選 別条件(アドレス最下位番号)を取り込み、出力命令のi/o アドレス部分b"が選 別の対象となるか否かを判定する。出力命令のi/o アドレス部分b"が選別の対象 となる場合は信号線eにレベル"H" の信号を出力すると共に、データバスgにi/ アドレス部分b"から選別条件部分hを除いたものを出力する。また、否のときは 信号線fにレベル"H" の信号を出力する。Next, a check operation for double use of output instructions in such a configuration will be described. In FIG. 1, the sequence program instruction corresponding to the address set by the program counter 1 is output to the data bus b. The output command detection circuit 3 takes out the command code portion b'from the data bus b, judges whether it is an output command, and outputs a signal of level "H" to the signal line c when it is an output command, Sometimes, a signal of level "H" is output to the signal line d. When the output instruction selection circuit 4 receives the signal of c, it takes out the i / o address part (address number) b "from the data bus b. Furthermore, the selection condition table 5 outputs the table via the data bus h. The selection condition (the lowest address number) indicated by the pointer 5'is fetched, and it is determined whether or not the i / o address part b "of the output instruction is the selection target. When the i / o address part b "of the output command is to be selected, a signal of level" H "is output to the signal line e, and the selection condition part h is excluded from the i / address part b" on the data bus g. Output If the result is no, a signal of level "H" is output to the signal line f.

【0012】 スタック検索回路6は、選別対象蟻の信号eを受けたときデータバスgのデー タと、スタックエリア8の先頭からスタックポインタ8'までのデータを順次デー タバスkを介して取り込み、データバスのデータとスタックエリア8'に記憶され たデータとの両者を比較し、一致するデータが有れば信号線iに二重使用有りの 信号を出力し、否のときは信号線jに二重使用無しの信号を出力する。スタック 記憶回路7は、二重使用無しの信号jを受けたときデータバスgのデータをデー タバスlに出力し、信号線mに送出信号を出力する。その後に、さらに信号線n にも送出信号を出力する。スタックエリア8では、送出信号mを受けたときデー タバスlのデータをスタックポインタ8'の示す記憶領域に格納し、スタックポイ ンタ8'をインクリメントする。また、アドレス上限チェック9からの信号qによ りスタックポインタ8'がゼロにクリアされる。オア回路G1では信号線d,f,n のい ずれかの信号"H" を受けたとき信号線oに信号"H" が出力される。アドレス上限 チェック部9では、信号oを受けたときアドレスバスaのアドレスがプログラム メモリ2中のシーケンスプログラムの終わりに達しているかを判定し、達してい るときは信号線qに"H" 信号を出力し、否のときには信号線pに"H" 信号を出力 する。The stack search circuit 6, when receiving the signal e of the selection target ant, sequentially fetches the data of the data bus g and the data from the top of the stack area 8 to the stack pointer 8 ′ via the data bus k, The data on the data bus is compared with the data stored in the stack area 8 ', and if there is matching data, a signal indicating the double use is output to the signal line i. If not, to the signal line j. Output the signal without double use. The stack memory circuit 7 outputs the data of the data bus g to the data bus 1 and the transmission signal to the signal line m when receiving the signal j indicating that the double use is not used. After that, the transmission signal is further output to the signal line n 1. In the stack area 8, when the send signal m is received, the data of the data bus 1 is stored in the storage area indicated by the stack pointer 8'and the stack pointer 8'is incremented. Further, the stack pointer 8'is cleared to zero by the signal q from the address upper limit check 9. The OR circuit G1 outputs the signal "H" to the signal line o when it receives the signal "H" on any of the signal lines d, f, n. The address upper limit check unit 9 judges whether the address of the address bus a has reached the end of the sequence program in the program memory 2 when receiving the signal o, and when it has reached the end, it outputs a "H" signal to the signal line q. When it is not output, when it is not output, the "H" signal is output to the signal line p.

【0013】 選別条件テーブルポインタ上限チェック部10では、信号qを受けたときにテー ブルポインタ5'が選別条件テーブル5の上限に達しているか否かを判定し、達し ているときは信号線rにレベル"H" の信号を出力し、否のときには信号線sにレ ベル"H" の信号を出力する。選別条件テーブル5が信号sを受けたときテーブル ポインタ5'をインクリメントする。プログラムカウンタ1は信号pを受けたとき アドレスバスaのアドレスをインクリメントする。プログラムカウンタ1は信号 qを受けたときアドレスバスaにプログラムメモリ2の先頭のアドレスを出力す る。アドレス変換回路11を介して表示部12では常時アドレスバスaのアドレスを 取り込み、表示部12にプログラムアドレスを表示するようにしているので、出力 命令のチェック状況を把握することができる。The selection condition table pointer upper limit check unit 10 determines whether the table pointer 5 ′ has reached the upper limit of the selection condition table 5 when receiving the signal q, and when it has reached the signal line r. The signal of level "H" is output to, and when not, the signal of level "H" is output to the signal line s. When the selection condition table 5 receives the signal s, the table pointer 5'is incremented. When receiving the signal p, the program counter 1 increments the address of the address bus a. When the program counter 1 receives the signal q, it outputs the head address of the program memory 2 to the address bus a. Since the display unit 12 always takes in the address of the address bus a via the address conversion circuit 11 and displays the program address on the display unit 12, the check status of the output instruction can be grasped.

【0014】 次に、図3 ん3のプログラム例について二重チェックがどのように行われるか を簡単に説明する。ここで、選別条件テーブル5には"0" 〜"7" の選別条件が記 憶されているものとする。プログラムカウンタ1が"0" を計数すると、プログラ ムメモリ2からプログラム命令"STR 0000"(図3参照)がデータバスbに出力さ れる。出力命令検出回路3によりこのプログラム命令は出力命令ではないことが 確認されて、信号線d,オア回路G1, アドレス上限チェック部9および信号線p を介してレベル"H" の信号がプログラムカウンタ1に送られる。すると、プログ ラムカウンタ1の計数値が"1" となり、プログラムメモリ2から出力命令"OUT 0 000"(図3参照)がデータバスbに出力される。出力命令検出回路3によりこの プログラム命令が出力命令であることが確認されると、出力命令選別回路4はこ の出力命令の最下位アドレス"0" とテーブルポインタ5'の指示する選別条件とを 比較し、この出力命令のアドレス部分"000" をスタック記憶回路7に記憶する。 スタック検索回路6はスタックエリア8の記憶内容(現時点では何も記憶されて いない)を参照し、アドレス部分"000" と同一のアドレス番号が有るか否かを検 索する。この検索の結果、アドレス部分"000" と同一のアドレス番号がスタック エリア8の中には記憶されていないことが判明するので、信号線jに否信号が出 力され、スタック記憶回路7に一時記憶されたアドレス部分"000" がスタックエ リア8に記憶される。同様の手順で図3のアドレス3の出力命令"OUT 0001"が出 力命令検出回路3により検出されるが、現在の選別条件は最下位アドレス番号が "0" なので、出力命令選別回路4ではこの出力命令"OUT 0001"は選別されず、ス タックエリア8には記憶されない。このように、最下位アドレス番号"0" を持つ 出力命令のみが選別され、スタックエリア8に記憶された出力番号と比較されて 二重使用についてのチェックが行われる。次に、プログラムカウンタ1がプログ ラムメモリ2の最終アドレスを計数すると、アドレス上限チェック部9によりプ ログラムカウンタ1はリセットされ、テーブルポインタ5'がインクリメントされ 、選別条件が"1" に設定される。さらには、スタックエリア8の内容がクリアさ れる。このようにして次はアドレス最下位番号"1" を持つ出力命令の二重使用が チェックされる。以下同様に、アドレス最下位番号"7" までについての出力命令 の二重使用のチェックが終了すると、テーブルポインタ上限チェック部10により チェックの終了が確認される。Next, how the double check is performed for the program example of FIGS. 3 and 3 will be briefly described. Here, it is assumed that the selection condition table 5 stores the selection conditions of "0" to "7". When the program counter 1 counts "0", the program instruction "STR 0000" (see FIG. 3) is output from the program memory 2 to the data bus b. It is confirmed by the output command detection circuit 3 that this program command is not an output command, and a signal of level "H" is sent to the program counter 1 via the signal line d, the OR circuit G1, the address upper limit check unit 9 and the signal line p. Sent to. Then, the count value of the program counter 1 becomes "1", and the output instruction "OUT 0 000" (see FIG. 3) is output from the program memory 2 to the data bus b. When the output instruction detection circuit 3 confirms that this program instruction is an output instruction, the output instruction selection circuit 4 determines the lowest address "0" of this output instruction and the selection condition designated by the table pointer 5 '. The address portion "000" of this output instruction is compared and stored in the stack storage circuit 7. The stack search circuit 6 refers to the contents stored in the stack area 8 (nothing is stored at this time) and searches for the same address number as the address portion "000". As a result of this search, it is found that the same address number as that of the address portion "000" is not stored in the stack area 8. Therefore, a no signal is output to the signal line j and the stack storage circuit 7 is temporarily stopped. The stored address portion “000” is stored in the stack area 8. In the same procedure, the output instruction "OUT 0001" at the address 3 in FIG. 3 is detected by the output instruction detection circuit 3, but the current selection condition is that the lowest address number is "0". This output command "OUT 0001" is not sorted and is not stored in the stack area 8. In this way, only the output instruction having the lowest address number "0" is selected and compared with the output number stored in the stack area 8 to check the double use. Next, when the program counter 1 counts the final address of the program memory 2, the address upper limit check unit 9 resets the program counter 1, the table pointer 5'is incremented, and the selection condition is set to "1". Furthermore, the contents of the stack area 8 are cleared. In this way, the double use of the output instruction with the lowest address "1" is checked next. Similarly, when the check for double use of the output instructions up to the lowest address "7" is completed, the table pointer upper limit check unit 10 confirms the end of the check.

【0015】 このようにして出力命令の二重使用チェックが行われるが、もしも同一の出力 命令が二重使用されていた場合にはスタック検索回路6によりこの二重使用が検 出され、警告回路20が警告を発する。このとき、表示部12には該当する出力命令 のプログラムアドレスが表示されているので、操作者は二重使用されている出力 命令を知ることができる。さらには、本実施例選別条件が切り換わる毎にスタッ クエリア8の内容を更新するようにしているので、スタックエリア8のメモリ容 量をも節約できる。In this way, the double use check of the output instruction is performed. If the same output instruction is double used, the stack search circuit 6 detects the double use, and the warning circuit. 20 issues a warning. At this time, since the program address of the corresponding output command is displayed on the display unit 12, the operator can know the output command that is being used twice. Furthermore, since the contents of the stack area 8 are updated every time the selection conditions of this embodiment are switched, the memory capacity of the stack area 8 can also be saved.

【0016】 本実施例においては、プログラム命令,出力命令の数を従来例と対応させると プログラム命令の読み出し回数の平均は、読み出し回数=S(8192+M ×M/2)とな る。 S=選別種類の数、例えば出力 n=1 命令のi/o アドレスが8進表現で0000 (8) 〜7777(8) のとき、下1桁を選別条件としたとするとその種類の数は0〜7 の8種類としたときS=8となる。M=スタックエリア8の大きさであり、選別 種類1種に対する出力命令の最大個数である。この結果、M=全出力命令の最大 個数÷S=4096÷8=512 となる。したがって、本実施例の読み出し回数の平均 は、8×(8192 +512 ×512/2)≒1.1 ×106 回となる。従来例における出力命令 の読み出し回数は16.8×106 回であったので、本実施例は出力命令の読み出し回 数において従来例の1.1 ×106/16.8×106 ≒1/15となっており、出力命令の二重 使用のチェックに要する時間が大幅に短縮されることは明らかである。In the present embodiment, when the numbers of program instructions and output instructions are made to correspond to those of the conventional example, the average number of read times of program instructions is read number = S (8192 + M × M / 2). S = number of sorts, for example, if output n = 1 instruction i / o address is 0000 (8) to 7777 (8) in octal notation, the number of sorts is When eight kinds of 0 to 7 are set, S = 8. M = size of the stack area 8 and the maximum number of output instructions for one sort type. As a result, M = the maximum number of all output instructions / S = 4096/8 = 512. Therefore, the average number of times of reading in this embodiment is 8 × (8192 + 512 × 512/2) ≈1.1 × 10 6 times. Since the output instruction read count in the conventional example was 16.8 × 10 6, the output instruction read count in this example is 1.1 × 10 6 / 16.8 × 10 6 ≈ 1/15 in the conventional example. Clearly, the time required to check for double use of output instructions is significantly reduced.

【0017】[0017]

【考案の効果】[Effect of device]

以上説明したように本考案によれば、シーケンスプログラムを記憶するプログ ラムメモリと、前記プログラムメモリから読み出された命令の中から出力命令を 検出する出力命令検出手段と、出力命令の中から一群の出力命令を選別するため の選別条件を予め定められた一定の順序で逐次設定する条件設定手段と、前記条 件設定手段による選別条件が切り換わる毎に更新され、前記選別条件で選別され た出力命令の使用状態を記憶するスタック手段と、前記選別条件で選別された出 力命令を前記スタック手段に記憶された出力命令と比較することにより出力命令 の二重使用を検出する検出手段とを備え、プログラム命令の中から選別条件とし て例えば最下位番号の共通した出力命令を選別し、この選別した出力命令に対し て二重使用のチェックを行うようにしたので、出力命令の読み出し回数が減少し 、以て出力命令の二重使用チェック時間を大幅に短縮することができ、また選別 条件で選別された出力命令の使用状態を記憶するスタック手段は条件設定手段に よる選別条件が切り換わる毎に更新されることから、そのメモリ容量を削減でき るという効果が得られる。 As described above, according to the present invention, a program memory for storing a sequence program, an output instruction detecting means for detecting an output instruction from the instructions read from the program memory, and a group of output instructions. The condition setting means for sequentially setting the selection conditions for selecting the output command in a predetermined fixed order, and the output that is updated each time the selection conditions by the condition setting means are switched and is selected by the selection conditions. A stacking means for storing a usage state of the instruction; and a detecting means for detecting the double use of the output instruction by comparing the output instruction selected by the selection condition with the output instruction stored in the stacking means. , The output instruction with the lowest number in common is selected from the program instructions as the selection condition, and the double use check is performed for the selected output instruction. Since the number of times the output instructions are read is reduced, the double-use check time for output instructions can be significantly shortened, and the usage status of the output instructions selected by the selection conditions can be reduced. Since the stack means to be stored is updated every time the selection condition by the condition setting means is switched, there is an effect that the memory capacity can be reduced.

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

【図1】この考案実施例の構成の一例を示すブロック図FIG. 1 is a block diagram showing an example of the configuration of an embodiment of the present invention.

【図2】従来例のプログラムラダー図を示す説明図FIG. 2 is an explanatory diagram showing a program ladder diagram of a conventional example.

【図3】従来例のプログラムを示す説明図FIG. 3 is an explanatory diagram showing a program of a conventional example.

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

1 プログラムカウンタ 2 プログラムメモリ 3 出力命令検出回路 4 出力命令選別回路 5 選別条件テーブル 5' テーブルポインタ 6 スタック検索回路 7 スタック記憶回路 8 スタックエリア 8' スタックポインタ 9 アドレス上限チェック部 10 テーブルポインタ上限チェック部 11 アドレス読み出し表示変換回路 12 表示部 1 Program counter 2 Program memory 3 Output instruction detection circuit 4 Output instruction selection circuit 5 Selection condition table 5'Table pointer 6 Stack search circuit 7 Stack storage circuit 8 Stack area 8'Stack pointer 9 Address upper limit check unit 10 Table pointer upper limit check unit 11 Address read / display conversion circuit 12 Display unit

Claims (2)

【実用新案登録請求の範囲】[Scope of utility model registration request] 【請求項1】シーケンスプログラムを記憶するプログラ
ムメモリと、前記プログラムメモリから読み出された命
令の中から出力命令を検出する出力命令検出手段と、出
力命令の中から一群の出力命令を選別するための選別条
件を予め定められた一定の順序で逐次設定する条件設定
手段と、前記条件設定手段による選別条件が切り換わる
毎に更新され、前記選別条件で選別された出力命令の使
用状態を記憶するスタック手段と、前記選別条件で選別
された出力命令を前記スタック手段に記憶された出力命
令と比較することにより出力命令の二重使用を検出する
検出手段とを備えたことを特徴とする出力命令二重使用
チェック装置。
1. A program memory for storing a sequence program, an output command detecting means for detecting an output command from the commands read from the program memory, and a group of output commands from the output commands. Condition setting means for sequentially setting the sorting conditions in a predetermined fixed order, and is updated each time the sorting conditions by the condition setting means are switched, and the use state of the output command sorted by the sorting conditions is stored. An output instruction comprising stack means and detection means for detecting double use of the output instruction by comparing the output instruction selected by the selection condition with the output instruction stored in the stack means. Double-use check device.
【請求項2】請求項1に記載の装置において、選別条件
は、前記出力命令の最下位出力番号が前記条件設定手段
が設定した番号と合致することとしたことを特徴とする
出力命令二重使用チェック装置。
2. The apparatus according to claim 1, wherein the selection condition is that the lowest output number of the output command matches the number set by the condition setting means. Usage check device.
JP014291U 1994-11-18 1994-11-18 Output instruction double use check device Expired - Lifetime JPH0736201U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP014291U JPH0736201U (en) 1994-11-18 1994-11-18 Output instruction double use check device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP014291U JPH0736201U (en) 1994-11-18 1994-11-18 Output instruction double use check device

Publications (1)

Publication Number Publication Date
JPH0736201U true JPH0736201U (en) 1995-07-04

Family

ID=11856996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP014291U Expired - Lifetime JPH0736201U (en) 1994-11-18 1994-11-18 Output instruction double use check device

Country Status (1)

Country Link
JP (1) JPH0736201U (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55166757A (en) * 1979-06-15 1980-12-26 Sharp Corp Check unit for overlapping use of output instruction
JPS56153445A (en) * 1980-04-28 1981-11-27 Fujitsu Ltd Data sorting system by assignment of permissible error range
JPS59121537A (en) * 1982-12-28 1984-07-13 Nec Corp Bit pattern collating circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55166757A (en) * 1979-06-15 1980-12-26 Sharp Corp Check unit for overlapping use of output instruction
JPS56153445A (en) * 1980-04-28 1981-11-27 Fujitsu Ltd Data sorting system by assignment of permissible error range
JPS59121537A (en) * 1982-12-28 1984-07-13 Nec Corp Bit pattern collating circuit

Similar Documents

Publication Publication Date Title
CA1060121A (en) Sort apparatus and data processing system
US4704703A (en) Dynamic input processing system
US5987234A (en) Console apparatus for information processing system
JPH0642137B2 (en) Display information processing device
JPH0671952A (en) Printing device
JPH0736201U (en) Output instruction double use check device
JP2653346B2 (en) Programmable controller
JPS6055402B2 (en) Item storage location search device
JPH03177975A (en) Menu sequence changing system for cad device system
JPH01199212A (en) Control system for operating procedure of interactive display device
JPS61240289A (en) Pick processor for graphic display unit
JPH0698003A (en) Inter-station data transfer control system
JPS62285126A (en) Picture output system
JPH0444767B2 (en)
JPH021014A (en) Portable computer
JPS5816186B2 (en) character pattern generator
JP2503032Y2 (en) Programmable controller programming device
JPH0766032B2 (en) Test system
CN110910570A (en) Goods channel configuration method, vending machine and mobile terminal
JPH0724028B2 (en) Control device with test function
JPH06259289A (en) Character pattern cancel control system
JPH0272449A (en) Automatic invalidation control circuit for cache memory
JPH03116204A (en) Sequence display device
JPH02165243A (en) Data area managing system
JPS61177556A (en) Memory switching circuit

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term