JPH08272411A - Ladder instruction processor - Google Patents

Ladder instruction processor

Info

Publication number
JPH08272411A
JPH08272411A JP7111895A JP7111895A JPH08272411A JP H08272411 A JPH08272411 A JP H08272411A JP 7111895 A JP7111895 A JP 7111895A JP 7111895 A JP7111895 A JP 7111895A JP H08272411 A JPH08272411 A JP H08272411A
Authority
JP
Japan
Prior art keywords
input
ladder
processing
instruction
ladder 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.)
Withdrawn
Application number
JP7111895A
Other languages
Japanese (ja)
Inventor
Yumitsuka Shigemori
弓束 重森
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP7111895A priority Critical patent/JPH08272411A/en
Publication of JPH08272411A publication Critical patent/JPH08272411A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE: To speed up processing by completing ladder instruction processing without performing arithmetic processing in accordance with a ladder instruction when an input/output value relating to ladder instruction processing is equal to the one stored in an input/output data table. CONSTITUTION: A comparison part 27, when input data 1, 2 and output data being fetched from a variable area (memory) 23 corresponding to the ladder instruction 21, takes out data 1-3 in accordance with the previous ladder instruction based on a table address stored in an input/output data table position information storage part 25, and compares the input data 1, 2 and the output data taken out from the variable area (memory) 23 with the data 1-3 in accordance with the previous ladder instruction taken out from the input/output data table 26. When coincidence between them is obtained, it is assumed that the processing this time by the ladder instruction 21 is the same one by the previous ladder instruction, and a processing completion part 28 completes the processing relating to the ladder instruction 21.

Description

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

【0001】[0001]

【産業上の利用分野】この発明はプログラマブルコント
ローラに搭載されるラダー命令を実行するラダー命令処
理装置に関し、特に、ラダー命令処理を高速化するよう
に改善したラダー命令処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ladder instruction processing device mounted on a programmable controller for executing a ladder instruction, and more particularly to a ladder instruction processing device improved to speed up ladder instruction processing.

【0002】[0002]

【従来の技術】一般に、プログラマブルコントローラに
搭載されるラダー命令は、変数エリアの値を入力値とし
て読み込み、各命令に固有な演算を行い、この演算結果
を変数エリアに書き出す処理を実行する。ここで、この
ラダー命令には、簡素なビット演算を行う基本命令と複
雑な演算を行う応用命令とがある。
2. Description of the Related Art Generally, a ladder instruction installed in a programmable controller reads a value in a variable area as an input value, performs an operation unique to each instruction, and writes the operation result in the variable area. Here, the ladder instruction includes a basic instruction that performs a simple bit operation and an application instruction that performs a complicated operation.

【0003】図4は、プログラマブルコントローラに搭
載されるラダー命令を実行する従来のラダー命令処理装
置の処理システム構成をブロック図で示したものであ
る。図4において、プログラムエリア20には、複数の
ラダー命令を含むプログラムが格納されている。そし
て、このプログラムエリア20からラダー命令21が順
次取り出され、所望のラダー命令が実行される。
FIG. 4 is a block diagram showing a processing system configuration of a conventional ladder instruction processing device for executing a ladder instruction mounted on a programmable controller. In FIG. 4, a program area 20 stores a program including a plurality of ladder instructions. Then, the ladder instructions 21 are sequentially fetched from the program area 20 and the desired ladder instructions are executed.

【0004】ラダー命令21は、オペコード、オペラン
ド1、オペランド2、オペランド3からなる。ここで、
オペコードは、そのラダー命令の動作を指定するもので
あり、オペランド1、オペランド2、オペランド3は、
オペコードにより指定される動作の対象となるデータを
指定するものである。
The ladder instruction 21 is composed of an operation code, an operand 1, an operand 2 and an operand 3. here,
The operation code specifies the operation of the ladder instruction, and operand 1, operand 2, and operand 3 are
It specifies the data to be the target of the operation specified by the operation code.

【0005】プログラムエリア20から取り出されたラ
ダー命令21のオペランド1、オペランド2、オペラン
ド3はアドレス変換部22でその対象となるデータを格
納する変数エリア(メモリ)23のアドレスに変換され
る。
The operand 1, operand 2, and operand 3 of the ladder instruction 21 fetched from the program area 20 are converted into addresses in a variable area (memory) 23 for storing the target data in the address conversion section 22.

【0006】ここで、ラダー命令21のオペランド1お
よびオペランド2が変数エリア(メモリ)23に格納さ
れた入力データ1および入力データ2を指定し、オペラ
ンド3が変数エリア(メモリ)23に格納された出力デ
ータを指定するものであるとすると、演算処理部24
は、アドレス変換部22で変換されたアドレスに対応し
て変数エリア(メモリ)23に格納された入力データ1
および入力データ2を入力値として読み込み、この入力
データ1および入力データ2に基づき上記ラダー命令2
1のオペコードで指定される所定の演算を実行するとと
もに、その演算結果を出力値として変数エリア(メモ
リ)23の出力データに書き込む処理を実行する。
Here, the operand 1 and the operand 2 of the ladder instruction 21 specify the input data 1 and the input data 2 stored in the variable area (memory) 23, and the operand 3 is stored in the variable area (memory) 23. If the output data is specified, the arithmetic processing unit 24
Is the input data 1 stored in the variable area (memory) 23 corresponding to the address converted by the address conversion unit 22.
And the input data 2 are read as input values, and the ladder instruction 2 based on the input data 1 and the input data 2 is read.
The predetermined operation designated by the operation code 1 is executed, and the operation result is written as an output value in the output data of the variable area (memory) 23.

【0007】図5は、図4に示した従来のラダー命令処
理装置におけるラダー命令処理アルゴリスムをフローチ
ャートで示したものである。なお、上記基本命令および
応用命令はともに図4に示す処理アルゴリスムで処理さ
れる。
FIG. 5 is a flow chart showing a ladder instruction processing algorithm in the conventional ladder instruction processing apparatus shown in FIG. Both the basic instruction and the application instruction are processed by the processing algorithm shown in FIG.

【0008】図5において、まず、プログラムエリア2
0からラダー命令21を構成するオペコードおよびオペ
ランドを読み込み(ステップ11)、オペランドに対応
するオペランドアドレスの解決を行う(ステップ1
2)。
In FIG. 5, first, the program area 2
The operation code and the operand that compose the ladder instruction 21 are read from 0 (step 11), and the operand address corresponding to the operand is resolved (step 1).
2).

【0009】そして、上記ステップ12の処理により変
数エリア(メモリ)23から解決されたソースアドレス
のデータ(入力データ)をロードし(ステップ13)、
この入力データにより命令固有の演算を処理することに
より、出力データを生成する(ステップ14)。
Then, the data (input data) of the source address resolved from the variable area (memory) 23 by the processing of the above step 12 is loaded (step 13),
Output data is generated by processing the operation peculiar to the instruction with this input data (step 14).

【0010】その後、変数エリア(メモリ)23の解決
されたディスティネーションアドレスにステップ14で
生成した出力データをストアする(ステップ15)。
After that, the output data generated in step 14 is stored in the resolved destination address of the variable area (memory) 23 (step 15).

【0011】[0011]

【発明が解決しようとする課題】ところで、上記従来の
ラダー命令処理装置において、ラダー命令処理の高速化
が求められている。
By the way, in the conventional ladder instruction processing apparatus described above, it is required to speed up the ladder instruction processing.

【0012】ラダー命令処理を高速化する手法としては
次の2つの手法、すなわち、 1)ハードウエアロジックの実装による高速化 2)アルゴリズムの改善による高速化が考えられる。
The following two methods can be considered as methods for speeding up the ladder instruction processing: 1) speeding up by mounting hardware logics 2) speeding up by improving algorithms.

【0013】ここで、1)のハードウエアロジックの実
装による手法は、現状のアルゴリズムを変更することな
く高速化が図れるという利点があるが、その反面、処理
が複雑になるに従い実装が難しくなり、また、処理内容
を変更することが困難であるという欠点を持つ。
Here, the method 1) by implementing the hardware logic has an advantage that the speed can be increased without changing the current algorithm, but on the other hand, the implementation becomes difficult as the processing becomes complicated, In addition, it has a drawback that it is difficult to change the processing content.

【0014】つまり、この1)のハードウエアロジック
の実装による手法では、処理が複雑な応用命令には適用
が困難である。
In other words, the method of implementing the hardware logic of 1) is difficult to apply to application instructions whose processing is complicated.

【0015】したがって、応用命令にも適用することが
できるようにするには2)のアルゴリズムの改善による
手法を採用するのが好ましい。
Therefore, in order to be applicable to the application instruction, it is preferable to adopt the method of improving the algorithm of 2).

【0016】ところで、従来のラダー命令処理において
は、各ラダー命令が発生される毎にそのラダー命令が必
ず実行されるように構成されている。ここで、もし、実
行する必要がないラダー命令の処理が存在するならば、
その処理を省くことによりラダー命令処理の高速化が期
待できるはずである。
By the way, in the conventional ladder instruction processing, each ladder instruction is executed every time it is generated. Here, if there is a ladder instruction process that does not need to be executed,
It can be expected that the ladder command processing can be speeded up by omitting the processing.

【0017】そこで、従来のラダー命令処理について検
討してみると、あるラダー命令で入出力データとして使
用する変数エリアの値が前回のラダー命令の実行時と変
化しなければ、このラダー命令に対する処理を行うのは
無駄である。何故ならば、この処理による演算結果は前
回の実行時と変わらないので、変数エリアの出力データ
には同じ値が上書きされる結果になるからである。
Therefore, considering the conventional ladder instruction processing, if the value of the variable area used as the input / output data in a certain ladder instruction does not change from the previous execution of the ladder instruction, the processing for this ladder instruction is executed. It is useless to do. This is because the calculation result of this process is the same as that of the previous execution, and the same value is overwritten on the output data of the variable area.

【0018】しかしながら、従来のラダー命令処理にお
いては、変数エリアの入出力データの値にかかわらず、
各ラダー命令が発生される毎にそのラダー命令が必ず実
行されるように構成されているので、上記無駄な処理も
実行されることになり、この結果、ラダー命令処理の十
分な高速化が図れないことになる。
However, in the conventional ladder instruction processing, regardless of the value of the input / output data in the variable area,
Since the ladder instruction is configured to be executed every time each ladder instruction is generated, the above wasteful processing is also executed, and as a result, the ladder instruction processing can be sufficiently speeded up. There will be no.

【0019】そこで、この発明は、ラダー命令処理の高
速化を図るように改善したラダー命令処理装置を提供す
ることを目的とする。
Therefore, an object of the present invention is to provide an improved ladder instruction processing device so as to speed up the ladder instruction processing.

【0020】[0020]

【課題を解決するための手段】上記目的を達成するた
め、この発明は、ラダー命令に対応して変数エリアの値
を入力値として読み込み、該入力値に基づき上記ラダー
命令に対応する演算処理を行った後、該演算結果を出力
値として上記変数エリアに書き込むラダー命令処理を実
行するラダー命令処理装置において、上記入力値および
該入力値に対応する上記出力値を格納する入出力データ
テーブルと、上記ラダー命令処理の実行に際して、該ラ
ダー命令処理に係わる入出力値と上記入出力データテー
ブルに格納された入出力値とを比較する比較手段と、上
記比較手段により上記ラダー命令処理に係わる入出力値
と上記入出力データテーブルに格納された入出力値とが
一致した場合は、上記演算処理を行うことなく該ラダー
命令処理を終了する処理手段と、を具備することを特徴
とする。
In order to achieve the above object, the present invention reads the value of a variable area as an input value in response to a ladder instruction, and based on the input value, performs arithmetic processing corresponding to the ladder instruction. A ladder command processing device for executing a ladder command process for writing the calculation result as an output value in the variable area after performing an input / output data table storing the input value and the output value corresponding to the input value, When executing the ladder command processing, comparing means for comparing the input / output value related to the ladder command processing with the input / output value stored in the input / output data table, and the input / output related to the ladder command processing by the comparing means. When the value matches the input / output value stored in the input / output data table, the ladder instruction processing is ended without performing the arithmetic processing. Characterized by comprising a physical means.

【0021】また、この発明は、上記構成に加えて、上
記ラダー命令に対応するラダー命令処理の実行毎に上記
入出力データテーブルの上記入力値および該入力値に対
応する上記出力値の格納位置を示す位置情報を更新する
位置情報更新手段を更に具備することを特徴とする。
According to the present invention, in addition to the above configuration, the storage position of the input value of the input / output data table and the output value corresponding to the input value every time the ladder command processing corresponding to the ladder command is executed. Is further provided with position information updating means for updating the position information indicating.

【0022】[0022]

【作用】この発明のラダー命令処理装置においては、ラ
ダー命令に対応して読み込んだ入力値および該入力値に
ラダー命令に対応する演算処理を行った演算結果である
出力値を入出力データテーブルに格納し、ラダー命令処
理の実行に際して、該ラダー命令処理に係わる入出力値
と入出力データテーブルに格納された入出力値とを比較
手段で比較し、その比較により両者が一致した場合は、
処理手段により、ラダー命令に対応する演算処理を行う
ことなく該ラダー命令処理を終了する。
In the ladder instruction processing device of the present invention, the input value read corresponding to the ladder instruction and the output value which is the operation result obtained by performing the arithmetic processing corresponding to the ladder instruction on the input value are stored in the input / output data table. When storing and executing the ladder instruction processing, the comparing means compares the input / output value related to the ladder instruction processing with the input / output value stored in the input / output data table, and if the two match by the comparison,
The processing means terminates the ladder instruction processing without performing arithmetic processing corresponding to the ladder instruction.

【0023】また、上記ラダー命令に対応するラダー命
令処理の実行毎に上記入出力データテーブルの上記入力
値および該入力値に対応する上記出力値の格納位置を示
す位置情報を更新する位置情報更新手段を更に具備して
構成することができる。
Further, every time the ladder command processing corresponding to the ladder command is executed, the position information updating for updating the position information indicating the storage position of the input value and the output value corresponding to the input value in the input / output data table is updated. It can be configured by further including means.

【0024】また、上記比較手段は、上記ラダー命令処
理に係わる入出力値と上記位置情報に対応する上記入出
力データテーブルの入出力値とを比較するように構成す
ることができる。
Further, the comparing means can be configured to compare the input / output value relating to the ladder command processing with the input / output value of the input / output data table corresponding to the position information.

【0025】また、上記処理手段は、上記ラダー命令に
対応する固有の演算時間が上記比較手段により比較時間
より長い場合にのみ動作するようにすることができる。
Further, the processing means can be operated only when the specific operation time corresponding to the ladder instruction is longer than the comparison time by the comparison means.

【0026】ここで、上記処理手段は、上記ラダー命令
が複雑な演算を行う応用命令の場合のみ動作するように
することができる。
Here, the processing means can operate only when the ladder instruction is an application instruction that performs a complicated operation.

【0027】[0027]

【実施例】以下、この発明に係わるラダー命令処理装置
の実施例を添付図面に基づいて詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of a ladder instruction processing device according to the present invention will be described below in detail with reference to the accompanying drawings.

【0028】図1は、この発明に係わるラダー命令処理
装置の一実施例の概略システム構成を示すブロック図で
ある。なお、図1において、図4に示した従来のラダー
命令処理装置と同一の機能を果たす部分に説明の便宜上
図4で用いた符号と同一の符号を付する。
FIG. 1 is a block diagram showing a schematic system configuration of an embodiment of a ladder instruction processing device according to the present invention. In FIG. 1, the same reference numerals as those used in FIG. 4 are given to the portions having the same functions as those of the conventional ladder instruction processing device shown in FIG.

【0029】図1において、プログラムエリア20に
は、複数のラダー命令を含むプログラムが格納されてい
る。そして、このプログラムエリア20からラダー命令
21が順次取り出され、所望のラダー命令が実行され
る。
In FIG. 1, a program area 20 stores a program including a plurality of ladder instructions. Then, the ladder instructions 21 are sequentially fetched from the program area 20 and the desired ladder instructions are executed.

【0030】ラダー命令21は、オペコード、オペラン
ド1、オペランド2、オペランド3からなる。ここで、
オペコードは、そのラダー命令の動作を指定するもので
あり、オペランド1、オペランド2、オペランド3は、
オペコードにより指定される動作の対象となるデータを
指定するものである。
The ladder instruction 21 is composed of an operation code, operand 1, operand 2 and operand 3. here,
The operation code specifies the operation of the ladder instruction, and operand 1, operand 2, and operand 3 are
It specifies the data to be the target of the operation specified by the operation code.

【0031】プログラムエリア20から取り出されたラ
ダー命令21のオペランド1、オペランド2、オペラン
ド3はアドレス変換部22でその対象となるデータを格
納する変数エリア(メモリ)23のアドレスに変換され
る。
The operand 1, operand 2, and operand 3 of the ladder instruction 21 fetched from the program area 20 are converted into addresses in the variable area (memory) 23 for storing the target data in the address conversion section 22.

【0032】ここで、ラダー命令21のオペランド1お
よびオペランド2が変数エリア(メモリ)23に格納さ
れた入力データ1および入力データ2を指定し、オペラ
ンド3が変数エリア(メモリ)23に格納された出力デ
ータを指定するものであるとすると、上記ラダー命令2
1に対応して変換されたアドレスに対応して入力データ
1および入力データ2および出力データが変数エリア
(メモリ)23から取り出される。
Here, the operand 1 and the operand 2 of the ladder instruction 21 designate the input data 1 and the input data 2 stored in the variable area (memory) 23, and the operand 3 is stored in the variable area (memory) 23. If the output data is specified, the ladder command 2
Input data 1 and input data 2 and output data corresponding to the address converted corresponding to 1 are taken out from the variable area (memory) 23.

【0033】一方、入出力データテーブル26には、前
回のラダー命令にかかわる入力データ1に対応するデー
タ1、入力データ2に対応するデータ2、出力データに
対応するデータ3が格納されている。
On the other hand, the input / output data table 26 stores data 1 corresponding to the input data 1 relating to the previous ladder instruction, data 2 corresponding to the input data 2 and data 3 corresponding to the output data.

【0034】また、入出力データテーブル位置情報記憶
部25には、入出力データテーブル26における前回の
ラダー命令に対応するデータ1、データ2、データ3の
格納位置を示す位置情報、すなわちテーブルアドレスが
格納されている。
The input / output data table position information storage unit 25 stores position information indicating the storage positions of data 1, data 2 and data 3 corresponding to the previous ladder instruction in the input / output data table 26, that is, table addresses. It is stored.

【0035】比較部27は、ラダー命令21に対応して
変数エリア(メモリ)23から入力データ1、入力デー
タ2、出力データが取り出されると、上記入出力データ
テーブル位置情報記憶部25に格納されているテーブル
アドレスに基づき前回のラダー命令に対応するデータ
1、データ2、データ3を取り出し、上記変数エリア
(メモリ)23から取り出された入力データ1、入力デ
ータ2、出力データと入出力データテーブル26から取
り出された前回のラダー命令に対応するデータ1、デー
タ2、データ3とを比較する。
When the input data 1, the input data 2, and the output data are taken out from the variable area (memory) 23 in response to the ladder instruction 21, the comparison unit 27 stores them in the input / output data table position information storage unit 25. Input data 1, input data 2, output data and input / output data table extracted from the variable area (memory) 23 based on the table address The data 1, data 2, and data 3 corresponding to the previous ladder instruction extracted from 26 are compared.

【0036】この比較部27における比較において、変
数エリア(メモリ)23から取り出された入力データ
1、入力データ2、出力データと入出力データテーブル
26に格納されている前回のラダー命令に対応するデー
タ1、データ2、データ3とが一致すると、今回のラダ
ー命令21による処理は前回のラダー命令による処理と
同一であるとして、処理終了部28で、このラダー命令
21にかかわる処理を終了する。
In the comparison in the comparison unit 27, the input data 1 and the input data 2 and the output data extracted from the variable area (memory) 23 and the data corresponding to the previous ladder instruction stored in the input / output data table 26 are stored. If 1, data 2 and data 3 match, it is determined that the processing by the ladder instruction 21 this time is the same as the processing by the previous ladder instruction, and the processing termination unit 28 terminates the processing related to this ladder instruction 21.

【0037】また、比較部27における比較において、
変数エリア(メモリ)23から取り出された入力データ
1、入力データ2、出力データと入出力データテーブル
26に格納されている前回のラダー命令に対応するデー
タ1、データ2、データ3とが一致しないと、今回のラ
ダー命令21による処理は前回のラダー命令による処理
とは異なるとして、従来と同様の演算処理を実行する。
In the comparison in the comparison unit 27,
Input data 1, input data 2 and output data fetched from the variable area (memory) 23 do not match data 1, data 2 and data 3 corresponding to the previous ladder instruction stored in the input / output data table 26. Then, assuming that the processing by the ladder instruction 21 this time is different from the processing by the previous ladder instruction, the same arithmetic processing as the conventional one is executed.

【0038】すなわち、演算処理部24は、比較部27
を介して変数エリア(メモリ)23から取り出された入
力データ1および入力データ2を入力値として読み込
み、この入力データ1および入力データ2に基づき上記
ラダー命令21のオペコードで指定される所定の演算を
実行するとともに、その演算結果を出力値として変数エ
リア(メモリ)23の出力データに書き込む処理を実行
する。
That is, the arithmetic processing section 24 has a comparison section 27.
The input data 1 and the input data 2 fetched from the variable area (memory) 23 are read as input values via the, and a predetermined operation designated by the operation code of the ladder instruction 21 is performed based on the input data 1 and the input data 2. Along with the execution, a process of writing the operation result as an output value into the output data of the variable area (memory) 23 is executed.

【0039】また、演算処理部24は、上記演算処理を
実行すると、上記演算結果に対応して上記入出力データ
テーブル26に新たなデータ1、データ2、データ3を
書き込む入出力データテーブル更新処理を実行する。
When the arithmetic processing section 24 executes the arithmetic processing, the input / output data table updating processing for writing new data 1, data 2 and data 3 in the input / output data table 26 in accordance with the arithmetic result. To execute.

【0040】また、入出力データテーブル位置情報記憶
部25に格納されたテーブルアドレスは1つの命令が実
行される毎に更新される。
The table address stored in the input / output data table position information storage unit 25 is updated every time one instruction is executed.

【0041】図2は、図1に示したラダー命令処理装置
におけるラダー命令処理アルゴリスムをフローチャート
で示したものである。
FIG. 2 is a flow chart showing a ladder instruction processing algorithm in the ladder instruction processing device shown in FIG.

【0042】図2において、まず、プログラムエリア2
0からラダー命令21を構成するオペコードおよびオペ
ランドを読み込み(ステップ101)、オペランドに対
応するオペランドアドレス(オペランド1およびオペラ
ンド2に対応するソースアドレスおよびオペランド3に
対応するディスティネーションアドレス)の解決を行う
(ステップ102)。
In FIG. 2, first, the program area 2
The operation code and the operand that form the ladder instruction 21 are read from 0 (step 101), and the operand address corresponding to the operand (source address corresponding to operand 1 and operand 2 and destination address corresponding to operand 3) is resolved ( Step 102).

【0043】そして、上記ステップ102の処理により
変数エリア(メモリ)23から解決されたソースアドレ
ス/ディスティネーションアドレスよりデータ(入力デ
ータ1、入力データ2、出力データ)をロードする(ス
テップ103)。
Then, data (input data 1, input data 2, output data) is loaded from the source address / destination address resolved from the variable area (memory) 23 by the processing of step 102 (step 103).

【0044】次に、比較部27で、ステップ103でロ
ードしたロードデータ(入力データ1、入力データ2、
出力データ)を、入出力データテーブル位置情報記憶部
25の位置情報(テーブルアドレス)より得た入出力デ
ータテーブル26の値(データ1、データ2、データ
3)と比較する(ステップ104)。
Next, in the comparison unit 27, the load data (input data 1, input data 2,
The output data) is compared with the values (data 1, data 2, data 3) of the input / output data table 26 obtained from the position information (table address) of the input / output data table position information storage unit 25 (step 104).

【0045】そして、ステップ104の比較において、
入力データ1、入力データ2、出力データとデータ1、
データ2、データ3とが一致したか否かを判断する。
Then, in the comparison of step 104,
Input data 1, input data 2, output data and data 1,
It is determined whether or not the data 2 and the data 3 match.

【0046】ステップ105の判断において、入力デー
タ1、入力データ2、出力データとデータ1、データ
2、データ3とが一致したと判断されると(ステップ1
05でYES)、今回のラダー命令21による処理は前
回のラダー命令による処理と同一であるとして、ステッ
プ109に進み、入出力データテーブル更新処理を実行
して、このラダー命令処理を終了する(ステップ11
0)。
When it is determined in step 105 that the input data 1, input data 2 and output data match the data 1, data 2 and data 3 (step 1
(YES in 05), assuming that the process by the ladder command 21 this time is the same as the process by the previous ladder command, the process proceeds to step 109, the input / output data table update process is executed, and this ladder command process is ended (step 11
0).

【0047】また、ステップ105の判断において、入
力データ1、入力データ2、出力データとデータ1、デ
ータ2、データ3とが一致しないと判断されると(ステ
ップ105でNO)、今回のラダー命令21による処理
は前回のラダー命令による処理とは異なるとして、従来
と同様の演算処理を実行する。
If it is determined in step 105 that the input data 1, input data 2, and output data do not match data 1, data 2, and data 3 (NO in step 105), the current ladder command Assuming that the processing by 21 is different from the processing by the previous ladder instruction, the same arithmetic processing as the conventional one is executed.

【0048】すなわち、演算処理部24で、変数エリア
(メモリ)23から取り出された入力データ1および入
力データ2を入力値として読み込み、この入力データ1
および入力データ2により上記ラダー命令21のオペコ
ードで指定される命令固有の演算を処理して出力データ
の生成を行い(ステップ106)、ステップ102で解
決されたディスティネーションアドレスに上記生成した
出力データをストアする(ステップ108)。
That is, the arithmetic processing unit 24 reads the input data 1 and the input data 2 fetched from the variable area (memory) 23 as input values, and the input data 1
And the input data 2 is used to process an operation peculiar to the instruction specified by the operation code of the ladder instruction 21 to generate output data (step 106), and the generated output data is stored in the destination address resolved in step 102. Store (step 108).

【0049】その後、上記ステップ106の演算にかか
わ入出力データを入出力データテーブル26に格納し
(ステップ108)、ステップ109に進み、入出力デ
ータテーブル更新処理を実行して、このラダー命令処理
を終了する(ステップ110)。
Thereafter, the input / output data related to the operation of the above step 106 is stored in the input / output data table 26 (step 108), and the process proceeds to step 109 to execute the input / output data table update process to execute this ladder command process. The process ends (step 110).

【0050】図3は、上記入出力データテーブル26の
フォーマット例を示したものである。入出力データテー
ブル26は、図3に示すように、固定長のテーブルであ
り、テーブル使用総命令分に対応する記憶エリアを有
し、入出力データテーブル26は、各命令毎に1つづつ
存在する。すなわち、1命令分に対応して1つづつ入出
力データテーブル26−1〜26−nが存在する。
FIG. 3 shows a format example of the input / output data table 26. As shown in FIG. 3, the input / output data table 26 is a fixed-length table, and has a storage area corresponding to the total number of commands used in the table. There is one input / output data table 26 for each command. To do. That is, one input / output data table 26-1 to 26-n exists corresponding to one instruction.

【0051】したがって、この入出力データテーブル2
6は、位置情報(テーブルアドレス)を有しており、こ
のテーブルアドレスは命令が1つ実行される毎に更新さ
れる。このテーブルアドレスは入出力データテーブル位
置情報記憶部25に格納される。
Therefore, this input / output data table 2
6 has position information (table address), and this table address is updated every time one instruction is executed. This table address is stored in the input / output data table position information storage unit 25.

【0052】なお、上記実施例の処理でラダー命令処理
の高速化に寄与するのは、各命令固有の演算時間が長い
応用命令の場合で、命令固有の演算時間が短い基本命令
に対してはほとんど寄与しないか、かえって処理時間が
長くなる場合がある。
It should be noted that, in the processing of the above-described embodiment, it is in the case of the application instruction that the operation time peculiar to each instruction is long that contributes to the speedup of the ladder instruction processing, and for the basic instruction where the operation time peculiar to the instruction is short, It may make little contribution or may rather increase the processing time.

【0053】また、応用命令の中には、単純なデータ転
送など比較的演算処理が簡単なものが存在する。これら
の命令では、この実施例によるアルゴリズムの付加処理
である入出力データの比較時間が各命令固有の演算時間
よりも長くなり、この結果実行時間の短縮にはならな
い。
Among the application instructions, there are some that are relatively simple in arithmetic processing such as simple data transfer. With these instructions, the comparison time of the input / output data, which is the additional processing of the algorithm according to this embodiment, becomes longer than the operation time unique to each instruction, and as a result, the execution time cannot be shortened.

【0054】したがって、上記実施例の処理は 各命令固有の演算時間>各命令に対応する入出力データ
の比較時間 の関係が成立する場合のみ実行するように構成すればよ
い。
Therefore, the processing of the above embodiment may be executed only when the relation of the operation time peculiar to each instruction> the comparison time of input / output data corresponding to each instruction is satisfied.

【0055】なお、命令の中には、入出力データが変数
エリアのテーブルになっているものがあるが、この場合
は入出力データテーブルの長さが不定になるので、上記
実施例のアルゴリズムは適用することができない。
Some instructions have input / output data in a variable area table. In this case, however, the length of the input / output data table becomes indefinite. Not applicable.

【0056】また、入出力データテーブルの位置情報の
更新はラダー命令の内部で行うように構成した方が好ま
しい。なぜならば、この位置情報の更新をラダー命令の
外部で行わせると、命令毎に入出力データテーブルの使
用/不使用の情報が必要となるからである。
Further, it is preferable that the position information of the input / output data table is updated inside the ladder instruction. This is because if the position information is updated outside the ladder instruction, information on the use / non-use of the input / output data table is required for each instruction.

【0057】[0057]

【発明の効果】以上説明したように、この発明のラダー
命令処理装置によれば、ラダー命令に対応して読み込ん
だ入力値および該入力値にラダー命令に対応する演算処
理を行った演算結果である出力値を入出力データテーブ
ルに格納し、ラダー命令処理の実行に際して、該ラダー
命令処理に係わる入出力値と入出力データテーブルに格
納された入出力値とを比較手段で比較し、その比較によ
り両者が一致した場合は、ラダー命令に対応する演算処
理を行うことなく該ラダー命令処理を終了するように構
成したので、ラダー命令処理の高速化を図るように改善
したラダー命令処理装置および方法を提供することがで
きるともに、更に以下に示すような種々の効果を奏す
る。
As described above, according to the ladder instruction processing device of the present invention, the input value read in correspondence with the ladder instruction and the operation result obtained by performing the arithmetic processing corresponding to the ladder instruction on the input value. A certain output value is stored in the input / output data table, and at the time of executing the ladder instruction processing, the input / output value related to the ladder instruction processing is compared with the input / output value stored in the input / output data table by the comparing means, and the comparison is made. Therefore, when the two match, the ladder instruction processing is configured to be terminated without performing the arithmetic processing corresponding to the ladder instruction. Therefore, the ladder instruction processing device and method improved so as to speed up the ladder instruction processing. Can be provided, and further various effects as described below can be obtained.

【0058】1)応用命令の処理時間を短縮することが
できる。 2)ラダー命令処理時間の短縮によりラダー命令処理を
実行するMPUの処理能力を他の処理に割り当てること
ができ、資源割り当ての効率化が図れる。 3)ソフトウエア上で高速化することにより、MPU、
メモリ等の高速化に容易に追従できる。
1) The processing time of application instructions can be shortened. 2) By reducing the ladder instruction processing time, the processing capacity of the MPU that executes the ladder instruction processing can be allocated to other processing, and the efficiency of resource allocation can be improved. 3) By speeding up on software, MPU,
It is possible to easily follow the increase in the speed of memory etc.

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

【図1】この発明に係わるラダー命令処理装置の一実施
例の概略システム構成を示すブロック図。
FIG. 1 is a block diagram showing a schematic system configuration of an embodiment of a ladder instruction processing device according to the present invention.

【図2】図1に示したラダー命令処理装置におけるラダ
ー命令処理アルゴリスムを示すフローチャート。
FIG. 2 is a flowchart showing a ladder instruction processing algorithm in the ladder instruction processing device shown in FIG.

【図3】図1に示した入出力データテーブルのフォーマ
ット例を示したフォーマット図。
FIG. 3 is a format diagram showing a format example of the input / output data table shown in FIG.

【図4】プログラマブルコントローラに搭載されるラダ
ー命令を実行する従来のラダー命令処理装置の処理シス
テム構成を示すブロック図。
FIG. 4 is a block diagram showing a processing system configuration of a conventional ladder instruction processing device that executes a ladder instruction installed in a programmable controller.

【図5】図4に示した従来のラダー命令処理装置におけ
るラダー命令処理アルゴリスムを示すフローチャート。
5 is a flowchart showing a ladder instruction processing algorithm in the conventional ladder instruction processing device shown in FIG.

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

20 プログラムエリア 21 ラダー命令 22 アドレス変換部 23 変数エリア(メモリ) 24 演算処理部 25 入出力データテーブル位置情報記憶部 26 入出力データテーブル 27 比較部 20 Program Area 21 Ladder Command 22 Address Conversion Unit 23 Variable Area (Memory) 24 Arithmetic Processing Unit 25 Input / Output Data Table Position Information Storage Unit 26 Input / Output Data Table 27 Comparison Unit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ラダー命令に対応して変数エリアの値を
入力値として読み込み、該入力値に基づき上記ラダー命
令に対応する演算処理を行った後、該演算結果を出力値
として上記変数エリアに書き込むラダー命令処理を実行
するラダー命令処理装置において、 上記入力値および該入力値に対応する上記出力値を格納
する入出力データテーブルと、 上記ラダー命令処理の実行に際して、該ラダー命令処理
に係わる入出力値と上記入出力データテーブルに格納さ
れた入出力値とを比較する比較手段と、 上記比較手段により上記ラダー命令処理に係わる入出力
値と上記入出力データテーブルに格納された入出力値と
が一致した場合は、上記演算処理を行うことなく該ラダ
ー命令処理を終了する処理手段と、 を具備することを特徴とするラダー命令処理装置。
1. A variable area value corresponding to a ladder instruction is read as an input value, arithmetic processing corresponding to the ladder instruction is performed based on the input value, and then the arithmetic result is output to the variable area as an output value. In a ladder command processing device that executes a ladder command process to write, an input / output data table that stores the input value and the output value corresponding to the input value, and an input / output table related to the ladder command process when executing the ladder command process. Comparing means for comparing the output value with the input / output value stored in the input / output data table; and input / output values related to the ladder instruction processing by the comparing means and the input / output values stored in the input / output data table. And a processing unit that terminates the ladder instruction processing without performing the above arithmetic processing, the ladder instruction. Management apparatus.
【請求項2】 上記ラダー命令に対応するラダー命令処
理の実行毎に上記入出力データテーブルの上記入力値お
よび該入力値に対応する上記出力値の格納位置を示す位
置情報を更新する位置情報更新手段を更に具備すること
を特徴とする請求項1記載のラダー命令処理装置。
2. A position information update that updates position information indicating a storage position of the input value and the output value corresponding to the input value in the input / output data table each time the ladder command processing corresponding to the ladder command is executed. The ladder instruction processing device according to claim 1, further comprising means.
【請求項3】 上記比較手段は、 上記ラダー命令処理に係わる入出力値と上記位置情報に
対応する上記入出力データテーブルの入出力値とを比較
することを特徴とする請求項2記載のラダー命令処理装
置。
3. The ladder according to claim 2, wherein the comparing means compares an input / output value related to the ladder command processing with an input / output value of the input / output data table corresponding to the position information. Instruction processor.
【請求項4】 上記処理手段は、 上記ラダー命令に対応する固有の演算時間が上記比較手
段により比較時間より長い場合にのみ動作することを特
徴とする請求項1記載のラダー命令処理装置。
4. The ladder instruction processing device according to claim 1, wherein the processing means operates only when a specific operation time corresponding to the ladder instruction is longer than the comparison time by the comparison means.
【請求項5】 上記処理手段は、 上記ラダー命令が複雑な演算を行う応用命令の場合のみ
動作することを特徴とする請求項4記載のラダー命令処
理装置。
5. The ladder instruction processing device according to claim 4, wherein the processing means operates only when the ladder instruction is an application instruction that performs a complicated operation.
JP7111895A 1995-03-29 1995-03-29 Ladder instruction processor Withdrawn JPH08272411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7111895A JPH08272411A (en) 1995-03-29 1995-03-29 Ladder instruction processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7111895A JPH08272411A (en) 1995-03-29 1995-03-29 Ladder instruction processor

Publications (1)

Publication Number Publication Date
JPH08272411A true JPH08272411A (en) 1996-10-18

Family

ID=13451339

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7111895A Withdrawn JPH08272411A (en) 1995-03-29 1995-03-29 Ladder instruction processor

Country Status (1)

Country Link
JP (1) JPH08272411A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6952811B1 (en) 1998-07-30 2005-10-04 Mitsubishi Denki Kabushiki Kaisha Ladder circuit editing system
US9491228B2 (en) 2011-03-10 2016-11-08 Mitsubishi Electric Corporation Redundancy device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6952811B1 (en) 1998-07-30 2005-10-04 Mitsubishi Denki Kabushiki Kaisha Ladder circuit editing system
US9491228B2 (en) 2011-03-10 2016-11-08 Mitsubishi Electric Corporation Redundancy device

Similar Documents

Publication Publication Date Title
JP2665111B2 (en) Vector processing equipment
JPH06309177A (en) Microcomputer
US20130036426A1 (en) Information processing device and task switching method
JP2560988B2 (en) Information processing apparatus and processing method
US20100325083A1 (en) Skip list generation
JPS6055849B2 (en) Command control method
JPH08272411A (en) Ladder instruction processor
JPH08272606A (en) Ladder instruction processor
JPH086797A (en) Constant reference optimizing processor
JP2003196087A (en) Memory addressing system of microcontroller and page mapping device
JP3441262B2 (en) Data processing device
JP2927102B2 (en) Instruction string switching method and arithmetic processor using the same
JPH07152652A (en) Virtual storage control method and information processor
JPS603656B2 (en) Computer memory expansion method
JPH0512107A (en) Program execution system
JP2003150575A (en) Data driving type information processor and information processing method
JPH0535499A (en) Data processing device and method
JPS58121405A (en) Sequence controller
JPH04253239A (en) Virtual memory system
JPH0337726A (en) Case statement optimizing system
JPH11249961A (en) Data transfer device and data transfer control method therefor
JPH08297583A (en) Processor and method for interruption processing
JP2000056991A (en) Micro computer programmable controller provided with multi-task function and its control method
JPH02201541A (en) Compiling system
JPH0667982A (en) Address conversion system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020604