JPH09120307A - Sequencer - Google Patents

Sequencer

Info

Publication number
JPH09120307A
JPH09120307A JP27536495A JP27536495A JPH09120307A JP H09120307 A JPH09120307 A JP H09120307A JP 27536495 A JP27536495 A JP 27536495A JP 27536495 A JP27536495 A JP 27536495A JP H09120307 A JPH09120307 A JP H09120307A
Authority
JP
Japan
Prior art keywords
lock
data
instruction
data memory
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP27536495A
Other languages
Japanese (ja)
Other versions
JP3428253B2 (en
Inventor
Teruhisa Anpo
輝久 安保
Masato Fujii
正人 藤井
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP27536495A priority Critical patent/JP3428253B2/en
Publication of JPH09120307A publication Critical patent/JPH09120307A/en
Application granted granted Critical
Publication of JP3428253B2 publication Critical patent/JP3428253B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To decrease the number of lock designation check items of a coil instruction by preparing the check/non-check instruction processing for a lock designation data memory and switching the instruction processing according to the presence or absence of the lock designation. SOLUTION: A lock designation data memory 8 designates to individually and compulsively lock the contact data stored in a data memory 2 in an ON or OFF state. When a ladder program is carried out, the ladder program is debugged based on the data of the memory 2. Then the processing where the memory 8 is checked and an instruction is carried out if the lock designation is confirmed is prepared together with the processing where the instruction is carried out without checking the memory 8 if no lock designation is confirmed. In addition, a lock flag is prepared to show whether the lock designation is given to the memory 2 in an on/off state. Thus two types of coil instruction processing are carried out with switching according to the on/off state of the lock flag when the coil instruction of the ladder program is carried out.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ラダーシーケンス
を演算するシーケンサに係り、特に、ラダープログラム
のデバッグ機能を実現するための接点ロック処理に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequencer for calculating a ladder sequence, and more particularly to contact lock processing for realizing a debug function of a ladder program.

【0002】[0002]

【従来の技術】図3はラダー回路例を示したもので、複
数のメモリに対応する接点からなる。また、この回路は
図4のプログラムメモリに展開され、更に図5のような
データメモリに展開される。図5中、各数字はメモリロ
ケーションのアドレスを示している。
2. Description of the Related Art FIG. 3 shows an example of a ladder circuit, which is composed of contacts corresponding to a plurality of memories. Further, this circuit is expanded in the program memory of FIG. 4 and further expanded in the data memory as shown in FIG. In FIG. 5, each number indicates the address of the memory location.

【0003】これらプログラムメモリ及びデータメモリ
は、図1にシーケンサをハードウェア構成で示すブロッ
クのメモリ1、2として用意され、ラダー回路を構築す
るためのプログラムとデータが格納される。
The program memory and the data memory are prepared as the memories 1 and 2 of a block whose sequencer is shown in FIG. 1 in a hardware configuration, and stores programs and data for constructing a ladder circuit.

【0004】図1に示すブロック図において、命令フェ
ッチ部3は、プログラムカウンタ3Aの値をアドレスと
してプログラムメモリ1から1つの命令をデータとして
インストラクションレジスタ3Bに読出す。
In the block diagram shown in FIG. 1, the instruction fetch unit 3 reads one instruction from the program memory 1 as data to the instruction register 3B using the value of the program counter 3A as an address.

【0005】解析部4は、インストラクションレジスタ
3Bのオペコード部をデコーダ4Aで解読し、さらには
パイプラインレジスタ4Bに順次格納する。
The analysis section 4 decodes the operation code section of the instruction register 3B by the decoder 4A and stores it in the pipeline register 4B sequentially.

【0006】オペランドデータアクセス部5は、インス
トラクションレジスタ3Bのオペランド部を取り込み、
オペランドに対応するアドレスをデータポインタ5Aに
得、これをデータメモリ2のアドレスとする。このアド
レス指定によりデータメモリ2から読出したデータをデ
ータバッファ5Bからデータレジスタ6に転送する。ま
た、データバッファ5Cのデータをデータメモリ2に書
込む。
The operand data access section 5 fetches the operand section of the instruction register 3B,
The address corresponding to the operand is obtained in the data pointer 5A and is used as the address of the data memory 2. By this address designation, the data read from the data memory 2 is transferred from the data buffer 5B to the data register 6. Further, the data in the data buffer 5C is written in the data memory 2.

【0007】演算部7は、パイプラインレジスタ4Bか
らの命令コードの解析結果にしたがってデータレジスタ
6のデータを使って演算を実行する。
The operation unit 7 executes an operation using the data in the data register 6 according to the analysis result of the instruction code from the pipeline register 4B.

【0008】パイプラインレジスタ4Bは、演算速度を
向上するため、命令の実行にパイプライン処理を行うも
のであり、下記表にはパイプライン処理の例を示す。
The pipeline register 4B performs pipeline processing for instruction execution in order to improve the operation speed. The following table shows an example of pipeline processing.

【0009】[0009]

【表1】 [Table 1]

【0010】パイプライン処理は、命令フェッチ部3と
命令解析部4とオペランドデータアクセス部5と演算部
7を効率良く使用するのに有効である。上記の表におい
て、n+2のステップに着目すると、命令Cのフェッチ
と命令Bの解析とオペランドデータリード及び命令Aの
演算を並列に処理していることになる。
The pipeline processing is effective in efficiently using the instruction fetch unit 3, the instruction analysis unit 4, the operand data access unit 5, and the operation unit 7. Focusing on the step of n + 2 in the above table, it means that the fetch of the instruction C, the analysis of the instruction B, the operand data read, and the operation of the instruction A are processed in parallel.

【0011】すなわち、マイクロコード方式又はハード
ウェア処理方式の何れにも、現在の実行(演算)より先
の命令の実行のために、予め前処理を行っておく。
That is, in either the microcode method or the hardware processing method, preprocessing is performed in advance in order to execute an instruction prior to the current execution (operation).

【0012】このとき、パイプラインレジスタ4Bは、
前記の表1に示すように、ステップに応じて演算部7に
は例えば命令Aによる演算を指令し、同時にプログラム
カウンタ3Aには命令Cのフェッチのためインクリメン
トを指令し、データポインタ5Aには命令Bのポインタ
指定を行う。
At this time, the pipeline register 4B is
As shown in Table 1, according to the step, the arithmetic unit 7 is instructed to perform an operation by, for example, the instruction A, at the same time, the program counter 3A is instructed to increment for fetching the instruction C, and the data pointer 5A is instructed. Pointer B is designated.

【0013】以上のようなシーケンサにおいて、ラダー
シーケンスを作成してシーケンサに入力し、所定の演算
を行うとき、そのデバッグ機能を実現するために、シー
ケンサのデータメモリ2のデータに対するロック、又は
プログラムメモリ1の命令に対するロックを行う機能が
用意されている場合が多い。このデータに対するロック
は、接点(メモリデータ)や命令を強制的にONロック
したり、OFFロックする。
In the sequencer as described above, when a ladder sequence is created and input to the sequencer and a predetermined operation is performed, in order to realize a debugging function, lock on the data in the data memory 2 of the sequencer or program memory is performed. In many cases, a function for locking one instruction is prepared. As for the lock for this data, a contact (memory data) or a command is forcibly ON-locked or OFF-locked.

【0014】いま、データメモリの接点に対するロック
として、図3のラダー回路で「M40」の接点をONロ
ックする場合について考えると、「M40」のメモリ内
容は例えば「0」から「1」に書き換えられる。したが
って、「M40」の接点を使用している命令もその演算
内容を変える必要がある。例えば図4のプログラムメモ
リでは、ST M40,AND M40,LD M40の三つの命令のオペラ
ンドデータとして「1」を使用する必要がある。
Now, considering the case where the contact of "M40" is ON-locked by the ladder circuit of FIG. 3 as a lock for the contact of the data memory, the memory content of "M40" is rewritten from "0" to "1", for example. To be Therefore, it is necessary to change the operation content of the instruction using the "M40" contact. For example, in the program memory of FIG. 4, it is necessary to use "1" as the operand data of the three instructions ST M40, AND M40, LD M40.

【0015】従来は、この機能を実現するため、図4に
示すようなプログラムメモリ1の中からM40をオペラ
ンドにしている命令を全て検索し、別コードに変えるな
どして演算内容を変更していたため、大容量の命令コー
ドを操作するには処理に相当の時間を要し、演算スキャ
ンを乱す等の弊害を生じていた。
Conventionally, in order to realize this function, all the instructions having M40 as an operand are searched from the program memory 1 as shown in FIG. 4, and the operation contents are changed by changing to another code. Therefore, it takes a considerable amount of time to process a large-capacity instruction code, which causes an adverse effect such as disturbing the operation scan.

【0016】この課題を解消する方式として、データメ
モリ1と同一メモリ容量を持ち、且つメモリロケーショ
ンも1対1に対応させたロック指定データメモリ8を別
途に設け、接点ロックを行うときにはロック指定データ
メモリの該等メモリロケーションのデータを書き換え、
ラダープログラムを実行するときにロック指定データメ
モリを参照することでロック指定の有無及びロック指定
の種類を識別する方式としたものがある。
As a method for solving this problem, a lock designation data memory 8 having the same memory capacity as the data memory 1 and corresponding memory locations on a one-to-one basis is additionally provided, and the lock designation data is used when contact locking is performed. Rewrite the data in the memory at the same memory location,
There is a method in which the presence or absence of lock designation and the type of lock designation are identified by referring to the lock designation data memory when executing a ladder program.

【0017】この方式では、接点ロック又はその解除を
行うときにはロック指定データメモリの該等メモリロケ
ーションのデータをデバッグ機能が持つエディタ等で書
き換えることで済み、従来のように命令を検索してその
コードを操作する必要がなくなり、接点ロックと解除の
処理が極めて簡略化される。
In this method, when the contact lock or unlock is performed, the data at the equal memory location of the lock designation data memory need only be rewritten by an editor or the like having a debug function. The operation of contact locking and unlocking is greatly simplified.

【0018】なお、演算結果をデータメモリ2に書込む
命令のときは、ロック指定データメモリの当該メモリロ
ケーションを参照することでロック指定があるか否かの
チェックを行い、演算結果をデータメモリ2に書込む際
にその可否を識別する。
In the case of an instruction to write the operation result to the data memory 2, it is checked whether or not the lock is specified by referring to the memory location of the lock-specified data memory, and the operation result is stored in the data memory 2. When writing to, identify whether it is possible.

【0019】[0019]

【発明が解決しようとする課題】[Problems to be solved by the invention]

(第1の課題)ロック指定データメモリを設けた従来方
式において、ラダープログラムを実行させるには、プロ
グラムメモリ1から実行する命令のコードを読出し、そ
の命令の処理を行うハードウェアあるいはファームウェ
アに処理権を移す。処理権を受けたハードウェアあるい
はファームウェアは、当該命令の処理を行い、次に実行
すべき命令コードの読出しへと、逐次実行が進んで行
く。
(First Problem) In the conventional method having the lock designation data memory, in order to execute the ladder program, the code of the instruction to be executed is read from the program memory 1 and the processing right is given to the hardware or the firmware that processes the instruction. Transfer. The hardware or firmware that has received the processing right processes the instruction, and the sequential execution proceeds to read the instruction code to be executed next.

【0020】最終的な演算は、コイル接点を駆動するコ
イル命令になる。コイル命令の処理を行うハードウェア
あるいはファームウェアに処理権が移ると、接点がロッ
クされているか否かをロック指定データメモリ8の該等
ビットのチェックが必要となる。すなわち、シーケンサ
がデバッグを終えて運転状態又は試運転状態に入り、全
てのロックが外された状態でも、コイル命令については
ロック指定データ8のチェックが行なわれる。
The final operation is a coil command that drives the coil contacts. When the processing right is transferred to the hardware or the firmware that processes the coil command, it is necessary to check the corresponding bits of the lock designation data memory 8 to determine whether the contact is locked. That is, even if the sequencer finishes debugging and enters the operation state or the trial operation state and all the locks are released, the lock designation data 8 is checked for the coil command.

【0021】このため、コイル命令自身の処理は、シー
ケンサの運転状態にもロック指定データメモリ8のチェ
ック時間が加わり、処理時間を増してしまう。コイル命
令はラダープログラムの中でも使用比率が高く、スキャ
ン時間が大きくなる。このロックされているか否かのチ
ェックは、コイル命令の処理毎に行われ、ロックされて
いないときは無駄な処理となる。
For this reason, the processing of the coil instruction itself adds a check time of the lock designation data memory 8 to the operating state of the sequencer, which increases the processing time. The coil command has a high usage ratio in the ladder program, and the scan time becomes long. The check as to whether or not this is locked is performed every time the coil command is processed, and when it is not locked, it is a wasteful process.

【0022】本発明の目的は、コイル命令のロック指定
のチェックを少なくして処理時間を短縮するシーケンサ
を提供することにある。
An object of the present invention is to provide a sequencer that reduces the check time of the lock designation of the coil instruction and shortens the processing time.

【0023】(第2の課題)ロック指定データメモリを
設けた従来方式において、演算部7が演算結果をデータ
メモリ2に書込む命令での処理は、ロック指定データメ
モリを参照してロック指定のチェックを行い、演算結果
をデータメモリに書込むか否かを決定するため、演算速
度が落ちる。
(Second Problem) In the conventional system provided with the lock designation data memory, the processing by the instruction for the arithmetic unit 7 to write the calculation result to the data memory 2 is performed by referring to the lock designation data memory. Since the check is performed and it is determined whether or not the calculation result is written in the data memory, the calculation speed decreases.

【0024】例えば、下記表のパイプライン処理におい
て、書込み命令Cは、処理内容が多いため、複数ステッ
プに渡り実行される。この命令Cにおいて、ステップb
では命令Cのオペランド部をオペランドデータアクセス
部5にリードし(読出し)、ステップcではロック指定
データc’をリードし、ステップc+1ではロック指定
有無の解析と命令Cのオペランド部の再リードを行い、
ステップc+2で演算結果をライトする(書込む)。こ
の再リードが必要な理由は、一般にメモリ素子が複数ビ
ット幅をもつものが多く、演算結果1ビットのみのライ
トができないため、リードモディファイライトすること
による。
For example, in the pipeline processing shown in the table below, the write instruction C is executed over a plurality of steps because the processing content is large. In this command C, step b
Then, the operand part of the instruction C is read (read) to the operand data access part 5, the lock specification data c ′ is read in step c, the presence or absence of lock specification is analyzed and the operand part of the instruction C is reread in step c + 1. ,
At step c + 2, the calculation result is written (written). The reason why this re-reading is necessary is that the memory element generally has a plurality of bit widths, and it is not possible to write only 1 bit of the operation result, so read modify write is performed.

【0025】[0025]

【表2】 [Table 2]

【0026】したがって、演算結果をデータメモリ2に
書込む命令では、予めリードしているオペランドデータ
がそのままリードモディファイライトに利用できないた
め、ロック指定データをリードし、そのデータを解析
し、ロック指定されていないことを確認した後、演算結
果をライトするため、処理に要するステップ数が増加
し、演算速度が落ちる。
Therefore, in the instruction for writing the operation result to the data memory 2, since the operand data read in advance cannot be directly used for the read modify write, the lock specifying data is read, the data is analyzed, and the lock is specified. Since it is confirmed that the calculation result is not written, the number of steps required for the processing is increased and the calculation speed is reduced.

【0027】本発明の他の目的は、演算結果をデータメ
モリに書込む場合の処理ステップ数を減らして演算速度
を向上させるシーケンサを提供することにある。
Another object of the present invention is to provide a sequencer which reduces the number of processing steps when writing the operation result in the data memory and improves the operation speed.

【0028】[0028]

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

(第1の発明)本発明は、データメモリの接点データを
個別に強制的にオン又はオフにロック指定するロック指
定データメモリを設け、ラダープログラムの実行時に前
記メモリのデータを使用してラダープログラムのデバッ
グを行うシーケンサにおいて、前記ロック指定が1つで
も有るときに前記ロック指定データメモリをチェックし
て命令を実行するコイル命令処理と、前記ロック指定が
全く無いときに前記ロック指定データメモリをチェック
することなく命令を実行するコイル命令処理との2種類
のコイル命令処理を用意し、前記データメモリにロック
指定が1つでも有るか、全く無いかをオン・オフで示す
ロックフラグを用意し、ラダープログラムのコイル命令
の処理には前記ロックフラグのオン・オフに応じて前記
2種類のコイル命令処理を切り替えて実行することを特
徴とする。
(First invention) The present invention provides a lock designation data memory for forcibly individually turning on or off the contact data of a data memory, and uses the data in the memory when executing the ladder program. In a sequencer for debugging the above, a coil instruction process for checking the lock designation data memory and executing an instruction when there is even one lock designation, and a check for the lock designation data memory when there is no lock designation at all There are two types of coil command processing, namely, a coil command processing that executes a command without performing a lock command, and a lock flag that indicates on / off whether or not there is even one lock designation in the data memory. In order to process the coil command of the ladder program, the two types of coil commands are selected depending on whether the lock flag is turned on or off. And executes switch processing.

【0029】(第2の発明)本発明は、データメモリの
接点データを個別に強制的にオン又はオフにロック指定
するロック指定データメモリを設け、ラダープログラム
をパイプライン処理で実行するシーケンサにおいて、前
記パイプライン処理は、命令フェッチ後の解析結果が演
算データをデータメモリに書込む命令か否かを判定し、
データメモリに書込む命令のときは次のステップで前記
データメモリからのデータ読出しに代えてロック指定デ
ータメモリからのロック指定データの読出しに切り替え
ることを特徴とする。
(Second Aspect) The present invention provides a sequencer for executing a ladder program by pipeline processing by providing a lock designation data memory for individually forcibly turning on or off the contact data of the data memory. The pipeline processing determines whether or not the analysis result after instruction fetch is an instruction for writing operation data in a data memory,
In the case of an instruction to write to the data memory, in the next step, instead of reading data from the data memory, switching to reading lock designating data from the lock designating data memory is performed.

【0030】[0030]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第1の実施形態)本実施形態では、ハードウェア処理
方式やファームウェア処理方式あるいはマイクロコード
処理方式によるコイル命令の処理として、ロック指定が
1つでも有るときにロック指定データメモリをチェック
して命令を実行するコイル命令処理と、ロック指定が全
く無いときにロック指定データメモリをチェックするこ
となく命令を実行するコイル命令処理との2種類のコイ
ル命令処理を用意する。
(First Embodiment) In the present embodiment, as the processing of the coil instruction by the hardware processing method, the firmware processing method, or the microcode processing method, when there is even one lock specification, the lock specification data memory is checked and the instruction is issued. There are two types of coil command processing, that is, a coil command processing for executing the command and a coil command processing for executing the command without checking the lock specification data memory when there is no lock specification.

【0031】そして、データメモリ2にロック指定が1
つでも有るか、全く無いかをオン・オフで示すロックフ
ラグを用意し、このロックフラグをコイル命令に処理権
を移すときの命令デコードに使用する。なお、ロックフ
ラグは、ハードウェアレジスタとして確保するか、又は
ファームウェアフラグとして確保し、シーケンサが持つ
マンマシンインタフェース部やそれから指示を受けたも
のにより、オン・オフが切り替えられる。
The lock designation in the data memory 2 is 1
A lock flag indicating whether or not there is even one or not at all is prepared, and this lock flag is used for instruction decoding when the processing right is transferred to the coil instruction. The lock flag is secured as a hardware register or as a firmware flag, and can be switched between on and off depending on the man-machine interface section of the sequencer or an instruction from the man-machine interface section.

【0032】以上の構成において、コイル命令の処理に
は、処理権を受けたハードウェア等は、ロックフラグが
オンかオフかにより、ロック指定データメモリをチェッ
クするコイル命令処理とチェックしないコイル命令処理
とを切り替えて実行する。
In the above-described configuration, the coil command is processed by the hardware or the like which has received the processing right, depending on whether the lock flag is on or off. Switch and execute.

【0033】例えば、図1のハードウェア処理方式で
は、命令コードをデコードするときのデコーダ4Aの入
力に、命令コードに加えてロックフラグの出力信号を入
力し、このロックフラグのオン・オフに応じて解析部4
及び演算部7の動作を切り替える。すなわち、ロックフ
ラグに応じてロック指定データメモリ8をチェックした
実行とチェックしない実行に切り替える。
For example, in the hardware processing system shown in FIG. 1, an output signal of a lock flag is input to the input of the decoder 4A when the instruction code is decoded, in addition to the instruction code, and the lock flag is turned on / off. And analysis unit 4
And the operation of the calculation unit 7 is switched. That is, depending on the lock flag, the lock designated data memory 8 is switched between checked execution and unchecked execution.

【0034】また、ファームウェア処理方式では、命令
コードから命令コードの処理コードのエントリに変換す
るとき、一般的にソフトウェアテーブルを用いるが、こ
のテーブルの入力コードにロックフラグを加え、このロ
ックフラグのオン・オフに応じてロック命令の処理ファ
ームウェアに用意した2種類のエントリ(ロック指定デ
ータをチェックするものと、しないもの)を切り替え
る。
In the firmware processing method, a software table is generally used when converting an instruction code into an instruction code processing code entry. A lock flag is added to the input code of this table and the lock flag is turned on. -Switching between two types of entries (one that checks the lock designation data and one that does not check the lock designation data) prepared in the firmware for processing the lock instruction depending on whether it is off.

【0035】また、マイクロコード処理方式では、命令
コードをデコードするときのデコーダ回路の入力に、命
令コードに加えてロックフラグの出力信号を入力し、こ
のロックフラグのオン・オフによりロック命令の処理マ
イクロコードのエントリを2種類用意し、ロック指定デ
ータのチェックとチェック無しで実行する。
Further, in the microcode processing system, the output signal of the lock flag is input to the input of the decoder circuit for decoding the instruction code in addition to the instruction code, and the lock instruction is processed by turning the lock flag on and off. Two types of microcode entries are prepared, and the lock designation data is checked and unchecked.

【0036】したがって、本実施形態によれば、ラダー
プログラムを作成してプラントの試運転を行うためにデ
バッグを行うときは、ロックフラグによりロック指定メ
モリをチェックできる。
Therefore, according to the present embodiment, when the ladder program is created and debugging is performed for the trial run of the plant, the lock designation memory can be checked by the lock flag.

【0037】そして、プラントが運用状態になって、デ
バッグ時にロックした接点(メモリ)のロックが外され
た状態でのコイル命令では、ロック指定メモリをチェッ
クしないため、無駄な処理がなくなり、高速化できる。
When the plant is in the operating state and the coil instruction in the state where the contact (memory) locked during debugging is unlocked, the lock designation memory is not checked, so that there is no wasteful processing, and the speed is increased. it can.

【0038】なお、本実施形態は、接点命令でのメモリ
ロックに限らず、数値演算命令でのメモリロックにも適
用できる。数値演算命令では、接点命令時のコイル命令
ではなく、ライト命令を2種類(ロック指定メモリをチ
ェックする命令とチェックしない命令)用意して使い分
けることになる。
The present embodiment can be applied not only to the memory lock by the contact instruction but also the memory lock by the numerical operation instruction. In the numerical operation command, two types of write commands (commands that check the lock-specified memory and commands that do not check) are prepared and used, instead of the coil command at the time of the contact command.

【0039】(第2の実施形態)下記表3は、本実施形
態になるパイプライン処理を示す。
(Second Embodiment) Table 3 below shows the pipeline processing according to the present embodiment.

【0040】[0040]

【表3】 [Table 3]

【0041】この表3及び前記表2にも示されるよう
に、ステップaにおいて解析部4は命令Cの解析を実行
している。この解析により、命令Cが演算結果をデータ
メモリ2に書込む命令であることが解析できる。
As shown in Table 3 and Table 2, the analysis unit 4 is executing the analysis of the instruction C in step a. By this analysis, it can be analyzed that the instruction C is an instruction to write the operation result to the data memory 2.

【0042】そこで、本実施形態では、表3に示すよう
に、解析部4がステップaで命令Cが書込み命令である
と解析したときに、次のステップbでは命令Cのオペラ
ンドデータのリード(従来)に代えてロック指定データ
メモリ8のデータC’をリードするようオペランドデー
タアクセス部5に指示する。
Therefore, in this embodiment, as shown in Table 3, when the analysis unit 4 analyzes that the instruction C is a write instruction in step a, in the next step b, the operand data of the instruction C is read ( The operand data access unit 5 is instructed to read the data C ′ in the lock designation data memory 8 instead of the conventional method.

【0043】この指示により、解析部4ではデータバッ
ファ5Bから読み出したロック指定データC’をデータ
レジスタ6から読み出すことができ、次のステップcで
は解析部4ではロック指定データC’の解析を行い、こ
れに並行してオペランドデータアクセス部5では命令C
のリードを行うことができる。
By this instruction, the analysis unit 4 can read the lock designation data C ′ read from the data buffer 5B from the data register 6, and in the next step c, the analysis unit 4 analyzes the lock designation data C ′. In parallel with this, the operand data access unit 5 executes the instruction C
Can lead.

【0044】そして、解析部4による解析結果がロック
指定でなければ、次のステップc+1で演算結果をデー
タメモリ2にライトする。
If the analysis result by the analysis unit 4 is not the lock designation, the calculation result is written in the data memory 2 in the next step c + 1.

【0045】したがって、本実施形態では、演算結果を
データメモリ2に書込む命令であるときは、従来のパイ
プライン処理に比べて1ステップ減らした実行になり、
演算速度を向上させることができる。
Therefore, in the present embodiment, when the operation result is an instruction for writing the result in the data memory 2, the execution is reduced by one step as compared with the conventional pipeline processing.
The calculation speed can be improved.

【0046】図2は、本実施形態をハードウェア構成で
実現するためのブロック図を示す。同図が図1と異なる
部分は、命令フェッチ部3Bからオペランド部のオペラ
ンドデータアクセス部5のデータポインタ5Aに与える
データの上位桁を加算器5Dを介して行い、この加算器
5Dには解析部4の解析結果がデータメモリ2への書込
み命令であるときにロック指定アドレス加算値をバイア
ス加算する点にある。
FIG. 2 shows a block diagram for realizing the present embodiment with a hardware configuration. 1 is different from FIG. 1 in that the upper digit of the data given from the instruction fetch section 3B to the data pointer 5A of the operand data access section 5 of the operand section is performed via the adder 5D. When the analysis result of 4 is a write command to the data memory 2, the lock designation address addition value is bias-added.

【0047】解析部4は、命令がデータメモリ2への書
込みであるときに、ロック指定アドレスの加算により、
ロック指定データメモリ8から読み出したロック指定デ
ータをデータレジスタ6から取り込む。
The analysis unit 4 adds the lock designation address when the instruction is writing to the data memory 2,
The lock designation data read from the lock designation data memory 8 is fetched from the data register 6.

【0048】なお、加算器5Dに代えて、命令フェッチ
後の解析でデータポインタ5Aの出力をロック指定デー
タメモリ8に切り替える構成にもできる。
Instead of the adder 5D, the output of the data pointer 5A may be switched to the lock designation data memory 8 in the analysis after the instruction fetch.

【0049】[0049]

【発明の効果】以上のとおり、本発明によれば、データ
メモリの接点データを個別に強制的にオン又はオフにロ
ック指定するロック指定データメモリを設け、ラダープ
ログラムの実行時に前記メモリのデータを使用してラダ
ープログラムのデバッグを行うにおいて、ロック指定デ
ータメモリをチェックする命令処理とチェックしない命
令処理を用意し、データメモリにロック指定が有るか無
いかにより命令処理を切り換えるようにしたため、運転
状態でのコイル命令はロック指定データメモリのチェッ
クを省略して無駄な処理が無くなり、高速化処理でき
る。
As described above, according to the present invention, the lock designation data memory for individually and forcefully designating the contact data of the data memory to be turned on or off is provided, and the data in the memory is stored when the ladder program is executed. When debugging a ladder program using it, the instruction processing that checks the lock specified data memory and the instruction processing that does not check it are prepared, and the instruction processing is switched depending on whether the data memory has a lock specification. In the coil command in, the check of the lock designation data memory is omitted and unnecessary processing is eliminated, so that the processing can be speeded up.

【0050】また、本発明によれば、ロック指定データ
メモリを設け、ラダープログラムをパイプライン処理で
実行するにおいて、パイプライン処理は、命令フェッチ
後の解析結果が演算データをデータメモリに書込む命令
か否かを判定し、データメモリに書込む命令のときは次
のステップで前記データメモリからのデータ読出しに代
えてロック指定データメモリからのロック指定データの
読出しに切り替えるようにしたため、パイプライン処理
の実行ステップ数を減らして演算速度を向上させること
ができる。
Further, according to the present invention, when the lock designation data memory is provided and the ladder program is executed by pipeline processing, the pipeline processing is an instruction in which the analysis result after the instruction fetch writes the operation data in the data memory. If it is an instruction to write to the data memory, the next step is to switch to reading lock designation data from the lock designation data memory instead of reading data from the data memory. It is possible to improve the calculation speed by reducing the number of execution steps of.

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

【図1】本発明に係るシーケンサのブロック図。FIG. 1 is a block diagram of a sequencer according to the present invention.

【図2】本発明に係るシーケンサのブロック図。FIG. 2 is a block diagram of a sequencer according to the present invention.

【図3】シーケンサのラダー回路の例。FIG. 3 is an example of a ladder circuit of a sequencer.

【図4】シーケンサのプログラムメモリの例。FIG. 4 is an example of a program memory of a sequencer.

【図5】シーケンサのデータメモリの例。FIG. 5 shows an example of a data memory of a sequencer.

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

1…プログラムメモリ 2…データメモリ 3…命令フェッチ部 4…解析部 5…オペランドデータアクセス部 6…データレジスタ 7…演算部 1 ... Program memory 2 ... Data memory 3 ... Instruction fetch unit 4 ... Analysis unit 5 ... Operand data access unit 6 ... Data register 7 ... Arithmetic unit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データメモリの接点データを個別に強制
的にオン又はオフにロック指定するロック指定データメ
モリを設け、ラダープログラムの実行時に前記メモリの
データを使用してラダープログラムのデバッグを行うシ
ーケンサにおいて、 前記ロック指定が1つでも有るときに前記ロック指定デ
ータメモリをチェックして命令を実行するコイル命令処
理と、前記ロック指定が全く無いときに前記ロック指定
データメモリをチェックすることなく命令を実行するコ
イル命令処理との2種類のコイル命令処理を用意し、 前記データメモリにロック指定が1つでも有るか、全く
無いかをオン・オフで示すロックフラグを用意し、 ラダープログラムのコイル命令の処理には前記ロックフ
ラグのオン・オフに応じて前記2種類のコイル命令処理
を切り替えて実行することを特徴とするシーケンサ。
1. A sequencer provided with a lock designation data memory for individually forcibly turning on or off the contact data of the data memory, and debugging the ladder program by using the data in the memory when executing the ladder program. In the coil command processing for checking the lock specified data memory and executing the command when there is even one lock specified, and for executing the command without checking the lock specified data memory when the lock is not specified at all. Two types of coil command processing, which are the coil command processing to be executed, are prepared, and a lock flag that indicates whether or not there is even one lock designation in the data memory is provided by turning it on and off. For the processing of, the two types of coil command processing are turned off depending on whether the lock flag is turned on or off. A sequencer characterized by being replaced.
【請求項2】 データメモリの接点データを個別に強制
的にオン又はオフにロック指定するロック指定データメ
モリを設け、ラダープログラムをパイプライン処理で実
行するシーケンサにおいて、 前記パイプライン処理は、命令フェッチ後の解析結果が
演算データをデータメモリに書込む命令か否かを判定
し、データメモリに書込む命令のときは次のステップで
前記データメモリからのデータ読出しに代えてロック指
定データメモリからのロック指定データの読出しに切り
替えることを特徴とするシーケンサ。
2. A sequencer for providing a lock designation data memory for forcibly individually turning on or off the contact data of a data memory and executing a ladder program by pipeline processing, wherein the pipeline processing is instruction fetch It is determined whether the subsequent analysis result is an instruction to write the operation data to the data memory, and if it is an instruction to write to the data memory, in the next step, instead of reading the data from the data memory, the lock specified data memory A sequencer characterized by switching to reading lock specification data.
JP27536495A 1995-10-24 1995-10-24 Sequencer Expired - Fee Related JP3428253B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27536495A JP3428253B2 (en) 1995-10-24 1995-10-24 Sequencer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27536495A JP3428253B2 (en) 1995-10-24 1995-10-24 Sequencer

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2002333131A Division JP3705263B2 (en) 2002-11-18 2002-11-18 Sequencer

Publications (2)

Publication Number Publication Date
JPH09120307A true JPH09120307A (en) 1997-05-06
JP3428253B2 JP3428253B2 (en) 2003-07-22

Family

ID=17554457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27536495A Expired - Fee Related JP3428253B2 (en) 1995-10-24 1995-10-24 Sequencer

Country Status (1)

Country Link
JP (1) JP3428253B2 (en)

Also Published As

Publication number Publication date
JP3428253B2 (en) 2003-07-22

Similar Documents

Publication Publication Date Title
US4679140A (en) Data processor with control of the significant bit lengths of general purpose registers
US6081887A (en) System for passing an index value with each prediction in forward direction to enable truth predictor to associate truth value with particular branch instruction
US5446849A (en) Electronic computer which executes squash branching
US5689694A (en) Data processing apparatus providing bus attribute information for system debugging
US5761467A (en) System for committing execution results when branch conditions coincide with predetermined commit conditions specified in the instruction field
JPH03286332A (en) Digital data processor
KR920004279B1 (en) Microprocessor with pointer register
US6931518B1 (en) Branching around conditional processing if states of all single instruction multiple datapaths are disabled and the computer program is non-deterministic
JPS6212529B2 (en)
US5481705A (en) Method for executing a program with branch-to modifying instructions
US20080282071A1 (en) Microprocessor and register saving method
JP3490005B2 (en) Instruction control apparatus and method
JPH09120307A (en) Sequencer
JPH0222413B2 (en)
JP3705263B2 (en) Sequencer
JPH0954694A (en) Pipeline processor and its processing method
JPH04338825A (en) Arithmetic processor
KR100515039B1 (en) Pipeline status indicating circuit for conditional instruction
JPH0922307A (en) Sequencer
JP2987281B2 (en) Processor
JP3012618B1 (en) Debugging method of inspected program and its debugging method
JPH0128965B2 (en)
JPH0535499A (en) Data processing device and method
JPH09231073A (en) Programmable controller
JPH0319570B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees