JP2697074B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP2697074B2
JP2697074B2 JP1863689A JP1863689A JP2697074B2 JP 2697074 B2 JP2697074 B2 JP 2697074B2 JP 1863689 A JP1863689 A JP 1863689A JP 1863689 A JP1863689 A JP 1863689A JP 2697074 B2 JP2697074 B2 JP 2697074B2
Authority
JP
Japan
Prior art keywords
instruction
edge
input
type operation
operation 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.)
Expired - Fee Related
Application number
JP1863689A
Other languages
Japanese (ja)
Other versions
JPH02197903A (en
Inventor
隆 門脇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP1863689A priority Critical patent/JP2697074B2/en
Publication of JPH02197903A publication Critical patent/JPH02197903A/en
Application granted granted Critical
Publication of JP2697074B2 publication Critical patent/JP2697074B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 <産業上の利用分野> 本発明は、レベル型演算命令とエッジ型演算命令によ
りシーケンス制御処理等を実行するプログラマブル・コ
ントローラの改善に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement in a programmable controller that executes a sequence control process and the like by using a level operation instruction and an edge operation instruction.

<従来の技術> プログラマブル・コントローラが実行する演算命令に
は、現在の入力がオンであるかオフであるかによって実
行するかどうか決定されるレベル型演算命令と、前回サ
イクルと今回サイクルで入力が変化した場合(例えば前
回オフ、今回オンのような場合)に実行されるエッジ型
演算命令とがある。
<Prior Art> The operation instructions executed by the programmable controller include a level operation instruction which is determined whether to execute depending on whether a current input is on or off, and an input in a previous cycle and a current cycle. There is an edge-type operation instruction that is executed when it changes (for example, when it is turned off last time or when it is turned on this time).

通常、プログラマブル・コントローラには、これらの
レベル型演算命令、エッジ型演算命令とを用いてプログ
ラム回路が設定される。
Usually, a program circuit is set in the programmable controller using these level-type operation instructions and edge-type operation instructions.

<発明が解決しようとする課題> 以上のように、例えば同じ加算命令であってもレベル
型加算命令、エッジ型加算命令の2種類の命令が存在
し、同じ加算命令でもその命令数は2倍となり、命令サ
ポートの工数が増加し、メモリ領域も約2倍使うことに
なり、効率が良くなかった。
<Problems to be Solved by the Invention> As described above, for example, even if the same addition instruction is used, there are two types of instructions, that is, a level addition instruction and an edge addition instruction. As a result, the number of man-hours for instruction support increases and the memory area is used about twice, which is not efficient.

本発明は、レベル型演算命令、エッジ型演算命令を用
いた場合でも、これらの命令サポートの工数、メモリ領
域等を増加しないようにすることを課題とし、装置全体
の効率が落ちないようにすることを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to prevent a man-hour, a memory area, and the like of the instruction support from increasing even when a level-type operation instruction and an edge-type operation instruction are used, so that the efficiency of the entire apparatus does not decrease. The purpose is to:

<課題を解決するための手段> 本発明は、現在の入力状態を設定するアキュムレータ
と前回の入力状態を保持する微分リレーとを用いて演算
処理前に入力判定処理を追加したものであり、その概要
は次の通りである。
<Means for Solving the Problems> The present invention adds an input determination process before an arithmetic process by using an accumulator for setting a current input state and a differential relay for holding a previous input state. The outline is as follows.

即ち、本発明は、レベル型演算命令とエッジ型演算命
令とを入力処理する入力処理部を備えたプログラマブル
・コントローラにおいて、現在の入力状態が設定される
アキュムレータと前回の入力状態が保持される微分リレ
ーとをエッジ型演算命令が出現する数だけ設け、前記入
力処理部からエッジ型演算命令が与えられた際に、前記
アキュムレータと前記微分リレーの内容より入力の立ち
上がりを検出してレベル型演算命令をエッジ型演算命令
に代替することを特徴とするプログラマブル・コントロ
ーラである。
That is, the present invention provides a programmable controller having an input processing unit for inputting a level type operation instruction and an edge type operation instruction, wherein an accumulator in which a current input state is set and a differential in which a previous input state is held. The number of relays provided is equal to the number of occurrences of the edge type operation instruction. When the edge type operation instruction is given from the input processing unit, a rising edge of the input is detected from the contents of the accumulator and the differential relay, and the level type operation instruction Is replaced by an edge-type operation instruction.

<作用> 本発明のブログラマブル・コントローラは、エッジ型
演算命令が設定された際、現在の入力状態を設定するア
キュムレータと前回の入力状態を保持する微分リレーの
内容より、現在の入力の立ち上がりを検出した場合は、
エッジ型演算命令に代えてレベル型演算命令を用いて該
当する演算を実行する。
<Operation> When the edge type operation instruction is set, the programmable controller of the present invention uses the accumulator for setting the current input state and the differential relay for holding the previous input state to determine the rise of the current input. Is detected,
The corresponding operation is executed using a level operation instruction instead of the edge operation instruction.

<実施例> 本発明のプログラマブル・コントローラについて、次
に説明する。
<Example> A programmable controller of the present invention will be described below.

本発明のプログラマブル・コントローラは上述したよ
うに、現在の入力状態を設定するアキュムレータAcc
と、前回の入力状態を保持する微分リレーとを備えてい
る。
As described above, the programmable controller of the present invention uses the accumulator Acc for setting the current input state.
And a differential relay that holds the previous input state.

尚、この微分リレーはシステム内に用意された特殊リ
レーであり、エッジ型演算命令の出現数だけ設置する。
Note that this differential relay is a special relay prepared in the system, and is installed as many times as the number of occurrences of the edge type operation command.

オペレータが操作するプログラム回路入力処理部よ
り、例えばレベル型加算命令が与えられた場合は、入力
命令によってアキュムレータAccの内容を調べ、Acc=1
(オン)の時はレベル型加算命令を実行し、Acc=0
(オフ)の時はレベル型加算命令を実行しない。
When, for example, a level type addition instruction is given from a program circuit input processing unit operated by the operator, the contents of the accumulator Acc are checked by the input instruction, and Acc = 1.
At the time of (ON), the level type addition instruction is executed and Acc = 0.
When (OFF), the level type addition instruction is not executed.

一方、エッジ型演算命令が与えられた場合は、次のよ
うに動作する。
On the other hand, when the edge type operation instruction is given, the operation is performed as follows.

入力命令により、アキュムレータAccに現在の入力状
態(オン1またはオフ0)が設定される。
According to the input command, the current input state (ON 1 or OFF 0) is set in the accumulator Acc.

そして、この入力命令の次に、入力判定処理が行われ
る。この入力判定処理のフローを第1図に表わす。
After this input command, an input determination process is performed. FIG. 1 shows the flow of this input determination processing.

アキュムレータAccに設定された現在の入力状態と、
指定された、前回の入力状態を保持する微分リレーの内
容とを比較する。微分リレー=0、Acc=1の場合は、
現在の入力は立ち上がったものと判断され、直ちに演算
命令を実行する。
The current input status set in the accumulator Acc,
Compares the specified contents of the differential relay that holds the previous input state. When the differential relay = 0 and Acc = 1,
It is determined that the current input has started, and the arithmetic instruction is immediately executed.

この時の演算命令は、既に入力立ち上がりが検出され
ているため、エッジ型演算命令に代えてレベル型演算命
令を用いて演算を実行しても結果は同一である。
At this time, since the rising edge of the input has already been detected, the result is the same even if the operation is executed using the level-type operation instruction instead of the edge-type operation instruction.

微分リレー=0、Acc=1でない場合は、現在の入力
は立ち上がっていないものと判断され、演算命令は実行
されない。
If the differential relay is not 0 and Acc is not 1, it is determined that the current input has not risen, and the operation command is not executed.

以上の処理が終了すると、Acc内にある現在の入力状
態を微分リレーに格納し、微分リレーの内容を更新し、
入力判定処理を終了する。
When the above processing is completed, the current input state in Acc is stored in the differential relay, the content of the differential relay is updated,
The input determination processing ends.

次に、第2図(a),(b)を用いて本発明の動作概
念を詳しく説明する。
Next, the operation concept of the present invention will be described in detail with reference to FIGS. 2 (a) and 2 (b).

第2図(a)はレベル型加算命令を表わすものであ
る。
FIG. 2A shows a level type addition instruction.

入力X001に対する、演算処理Y001=X002+X003はレベ
ル型加算命令であり、このような命令は、コンパイラに
て入力命令(LD命令)及び加算命令(レベル型)として
オブジェクト・ファイルに変換される。
The operation processing Y001 = X002 + X003 for the input X001 is a level-type addition instruction. Such an instruction is converted into an object file as an input instruction (LD instruction) and an addition instruction (level type) by a compiler.

第2図(b)はエッジ型加算命令を表わすものであ
る。
FIG. 2B shows an edge-type addition instruction.

入力X001に対する、演算処理Y001=X002+X003はエッ
ジ型加算命令であり、このような命令は、コンパイラに
おいて、入力命令(LD命令)の後、第1図のフローチャ
ートに示す入力判定命令が設定され、その次に加算命令
(レベル型)が設定されてオブジェクト・ファイルが生
成される。
The operation processing Y001 = X002 + X003 for the input X001 is an edge-type addition instruction. For such an instruction, an input determination instruction shown in the flowchart of FIG. 1 is set in the compiler after the input instruction (LD instruction). Next, an addition instruction (level type) is set, and an object file is generated.

従って、コンパイル時においては、入力判定処理によ
って演算命令はただ一つの形式(レベル型)となり、実
行時にエッジ型演算命令、レベル型演算命令とに分けて
処理する必要はない。
Therefore, at the time of compiling, the operation instruction has only one form (level type) due to the input determination processing, and it is not necessary to separately process the edge type operation instruction and the level type operation instruction at the time of execution.

<発明の効果> 本発明のプログラマブル・コントローラによれば、次
の効果を得ることができる。
<Effects of the Invention> According to the programmable controller of the present invention, the following effects can be obtained.

プログラム回路入力処理部でレベル型演算命令、エッ
ジ型演算命令とを用いてプログラム回路を設定した場合
であっても、エッジ型演算命令はコンパイル時に入力判
定処理がなされてレベル型演算命令に代替されるので、
命令サポートの工数、メモリ領域を大幅に削減できる。
Even if a program circuit is set using a level type operation instruction and an edge type operation instruction in the program circuit input processing unit, the edge type operation instruction is subjected to input determination processing at the time of compilation and is replaced with a level type operation instruction. So
Instruction support man-hours and memory area can be significantly reduced.

また、従来、演算命令数がn個の時、レベル型演算命
令をn個、エッジ型演算命令をn個、計2n個の演算命令
を用意しなければならなかったが、本発明によれば、入
力判定命令1個にレベル型演算命令n個、計n+1個だ
け命令を用意すれば良い。
Conventionally, when the number of operation instructions is n, n level operation instructions and n edge type operation instructions have to be prepared, that is, a total of 2n operation instructions must be prepared. In this case, it is sufficient to prepare n level operation instructions for one input determination instruction, that is, n + 1 total instructions.

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

第1図は本発明のプログラマブル・コントローラにおけ
る入力判定処理のフローチャート、第2図(a),
(b)は本発明のプログラマブル・コントローラの動作
概念図である。
FIG. 1 is a flowchart of an input determination process in a programmable controller according to the present invention.
(B) is an operation conceptual diagram of the programmable controller of the present invention.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】レベル型演算命令とエッジ型演算命令とを
入力処理する入力処理部を備えたプログラマブル・コン
トローラにおいて、現在の入力状態が設定されるアキュ
ムレータと前回の入力状態が保持される微分リレーとを
エッジ型演算命令が出現する数だけ設け、前記入力処理
部からエッジ型演算命令が与えられた際に、前記アキュ
ムレータと前記微分リレーの内容より入力の立ち上がり
を検出してレベル型演算命令をエッジ型演算命令に代替
することを特徴とするプログラマブル・コントローラ。
An accumulator for setting a current input state and a differential relay for holding a previous input state in a programmable controller having an input processing unit for inputting a level-type operation instruction and an edge-type operation instruction. Are provided by the number of occurrences of the edge-type operation instruction, and when the edge-type operation instruction is given from the input processing unit, the rising of the input is detected from the contents of the accumulator and the differential relay, and the level-type operation instruction is detected. A programmable controller characterized by substituting edge type operation instructions.
JP1863689A 1989-01-27 1989-01-27 Programmable controller Expired - Fee Related JP2697074B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1863689A JP2697074B2 (en) 1989-01-27 1989-01-27 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1863689A JP2697074B2 (en) 1989-01-27 1989-01-27 Programmable controller

Publications (2)

Publication Number Publication Date
JPH02197903A JPH02197903A (en) 1990-08-06
JP2697074B2 true JP2697074B2 (en) 1998-01-14

Family

ID=11977096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1863689A Expired - Fee Related JP2697074B2 (en) 1989-01-27 1989-01-27 Programmable controller

Country Status (1)

Country Link
JP (1) JP2697074B2 (en)

Also Published As

Publication number Publication date
JPH02197903A (en) 1990-08-06

Similar Documents

Publication Publication Date Title
JP2697074B2 (en) Programmable controller
JP2002063045A (en) Changing method of operating program
JPH02220145A (en) Program tracing system
JP2753555B2 (en) Programmable controller
KR100423742B1 (en) Exclusive control system by sequential function chart
JPS605302A (en) Programming method of sequence controller
JPS63163543A (en) Information processor
JPS595370A (en) Processing time controlling system
JP3587644B2 (en) Method of creating test program for semiconductor device
JPH03233703A (en) Sequence controller
JP2564904B2 (en) Program optimization processing method
JPH0477840A (en) Collection system for fault analysis system
JPH0588860A (en) Automatic preparing system for procedure file for filing work
JPS61147335A (en) Parameter registration system of job
JP2000242524A (en) Software simulator for processor
JPH01279334A (en) Test system for software single body by means of pseudo monitor
JPH04320535A (en) Program forming device
JPH05204698A (en) Debugger processing system
JPH0244423A (en) Computer
JPS62235641A (en) Control system for executing program
JPH05334098A (en) Method and device for interruption control
JPS60123937A (en) Compile processing system
JPH0371229A (en) Program controller
JPS62279431A (en) Input/output emulator
JPS63308659A (en) Parallel processing method

Legal Events

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

Free format text: PAYMENT UNTIL: 20080919

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees