JPH0772908A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0772908A
JPH0772908A JP5219299A JP21929993A JPH0772908A JP H0772908 A JPH0772908 A JP H0772908A JP 5219299 A JP5219299 A JP 5219299A JP 21929993 A JP21929993 A JP 21929993A JP H0772908 A JPH0772908 A JP H0772908A
Authority
JP
Japan
Prior art keywords
instruction
trace
register
address
pointer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5219299A
Other languages
Japanese (ja)
Inventor
Hiroyuki Kusakabe
宏之 日下部
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5219299A priority Critical patent/JPH0772908A/en
Publication of JPH0772908A publication Critical patent/JPH0772908A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the collection of trace data for the display of an on-line trace screen from being affected on the execution of an arithmetic operation. CONSTITUTION:This programmable controller equipped with an instruction pointer 2 which holds an instruction address and a trace buffer 8 which stores the computed result of an instruction, is provided with a first register 10 which holds a trace start instruction address, a second register 9 which holds a trace completion instruction address, a first coincidence detecting means 11 which detects the coincidence of the content of the second register 9 and that of the instruction pointer 2 and first register 10, a second coincidence detecting means 12 which detects the coincidence of the content of the instruction point 2 and that of the register 9, a trace flag holding means 13 set by the register 10 and reset by the register 9, an arithmetic means 6 which executes the instruction of a user program with an address designated by the instruction pointer 2, a trace buffer pointer 7 which designates the address of the buffer 8, and a control means 3 which stores the computed result of the means 6 in the trace buffer with the address designated by the pointer 7.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はプログラマブルコントロ
ーラの改良に係り、特にオンライントレース画面表示と
いうサービス処理のためのトレースデータ収集処理を行
うプログラマブルコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller, and more particularly to a programmable controller for performing trace data collection processing for service processing such as online trace screen display.

【0002】[0002]

【従来の技術】従来のプログラマブルコントローラのオ
ンライントレース画面表示のためのトレースデータ収集
処理の従来方式を図3に示す。図3において、命令ポイ
ンタ2にて示されたアドレスの命令をユーザプログラム
4から演算回路6に取込み、演算実行を行う。その結果
をユーザデータメモリ5に格納する。次に、演算部制御
回路3にて命令ポインタ2をインクリメントし、順次命
令実行を繰返す。同時に命令ポインタ2の内容とあらか
じめ設定されたトレース・スタートアドレス・レジスタ
10の内容を一致検出回路11にて常に比較を行う。一致検
出回路11にて、一致検出された場合、即ち、演算実行が
トレースを開始する命令アドレスになった場合に演算部
制御回路3にその情報を伝える。この情報より、1命令
実行の度に、トレースデータ収集用プロセッサ1にトレ
ースデータ収集処理要求を行い、ソフトウェアによって
トレースバッファ8に演算結果を格納する処理を行わせ
る。1命令分のトレースデータ収集処理が終了すると、
トレースデータ収集用プロセッサ1は、トレース・エン
ド・アドレスに達したかをチェックし、達していない場
合、演算部制御回路3に対して継続して次の1命令を実
行する様に指示を出す。これをトレース・エンド・アド
レスに達するまで繰返す。トレース・エンド・アドレス
に達した場合、トレースデータ収集用プロセッサ1は演
算部制御回路3に対して、トレース収集処理終了した事
を知らせ、通常の演算部の演算実行動作のみに戻す。
2. Description of the Related Art A conventional method of trace data collection processing for displaying an online trace screen of a conventional programmable controller is shown in FIG. In FIG. 3, the instruction at the address indicated by the instruction pointer 2 is fetched from the user program 4 into the arithmetic circuit 6 to execute the arithmetic operation. The result is stored in the user data memory 5. Next, the arithmetic unit control circuit 3 increments the instruction pointer 2 and repeats sequential instruction execution. At the same time, the contents of the instruction pointer 2 and the preset trace start address register
The contents of 10 are constantly compared by the coincidence detection circuit 11. When the coincidence detection circuit 11 detects a coincidence, that is, when the execution of the operation reaches the instruction address for starting the trace, the information is transmitted to the operation unit control circuit 3. Based on this information, every time one instruction is executed, a request for trace data collection processing is issued to the trace data collection processor 1 and software is caused to perform processing for storing the calculation result in the trace buffer 8. When the trace data collection process for one instruction is completed,
The trace data collection processor 1 checks whether or not the trace end address has been reached, and if it has not reached, it issues an instruction to the arithmetic unit control circuit 3 to continuously execute the next one instruction. This is repeated until the trace end address is reached. When the trace end address is reached, the trace data collection processor 1 informs the arithmetic unit control circuit 3 that the trace collection processing has been completed, and returns to the normal arithmetic execution operation of the arithmetic unit.

【0003】[0003]

【発明が解決しようとする課題】上述のように、従来の
プログラマブルコントローラでは、トレースデータ収集
処理を行う場合、図2(b)に示すように、1命令ごと
に演算部にて実行後、別のプロセッサ1に処理要求を行
い、ソフトウェア処理によりトレースデータ収集処理を
行っていた。このため、トレースデータ収集のために演
算実行時間が延びてしまうという問題があった。
As described above, in the conventional programmable controller, when performing the trace data collection processing, as shown in FIG. The processor 1 is requested to perform processing, and the trace data collection processing is performed by software processing. Therefore, there is a problem that the calculation execution time is extended for collecting the trace data.

【0004】本発明は上記の問題を解消しようとしてな
されたもので、その目的とするところは、オンライント
レース画面表示というサービス処理を提供し、かつこの
トレースデータ収集処理というロス時間をなくして演算
実行を行うことが可能なプログラマブルコントローラを
提供することにある。
The present invention has been made in order to solve the above problems, and an object of the present invention is to provide a service process of displaying an online trace screen, and to execute an operation by eliminating the loss time of the trace data collecting process. It is to provide a programmable controller capable of performing.

【0005】[0005]

【課題を解決するための手段】上記の目的を達成するた
めに本発明は、ユーザプログラムを実行するための命令
アドレスを保持する命令ポインタと、ユーザプログラム
の特定範囲の命令の演算結果を格納するトレースバッフ
ァを備えたプログラマブルコントローラにおいて、トレ
ースを開始する命令アドレスを保持する第1のレジスタ
と、トレースを終了する命令アドレスを保持する第2の
レジスタと、前記命令ポインタと前記第1のレジスタの
内容の一致を検出する第1の一致検出手段と、前記命令
ポインタと前記第2のレジスタの内容の一致を検出する
第2の一致検出手段と、前記第1の一致検出手段により
リセットされ前記第2の一致検出手段によりリセットさ
れるトレースフラグ保持手段と、前記命令ポインタで指
定されたアドレスのユーザプログラムの命令を実行する
演算手段と、前記トレースバッファのアドレスを指定す
るトレースバッファポインタと、前記トレースフラグが
セット状態のとき、前記演算手段の演算結果を前記トレ
ースバッファポインタで指定されたアドレスのトレース
バッファに格納する制御手段を設ける。
In order to achieve the above object, the present invention stores an instruction pointer for holding an instruction address for executing a user program and an operation result of an instruction in a specific range of the user program. In a programmable controller having a trace buffer, a first register holding an instruction address for starting a trace, a second register holding an instruction address for ending a trace, the instruction pointer and the contents of the first register Match detection means for detecting the match between the instruction pointer and the contents of the second register, and the second match reset means for resetting by the first match detection means. Trace flag holding means to be reset by the coincidence detecting means, and the address designated by the instruction pointer When the trace flag is in the set state, the calculation means for executing the instruction of the user program, the trace buffer pointer for designating the address of the trace buffer, and the calculation result of the calculation means for the address designated by the trace buffer pointer. A control means for storing in the trace buffer is provided.

【0006】更に、前記演算手段は、ビット命令を実行
するビット演算手段と数値命令を実行する数値演算手段
とで成り、前記ビット演算手段の演算結果を順次保持し
前記トレースバッファのビット幅に達したとき、ビット
演算手段の演算結果として出力するシフトレジスタを設
ける。
Further, the arithmetic means comprises a bit arithmetic means for executing a bit instruction and a numerical arithmetic means for executing a numerical instruction. The arithmetic results of the bit arithmetic means are sequentially held and the bit width of the trace buffer is reached. At this time, a shift register for outputting the result of the operation of the bit operation means is provided.

【0007】[0007]

【作用】上記構成において、命令ポインタで指定された
アドレスのユーザプログラムの命令が演算手段によって
順次実行される際に、第1の一致検出手段によりトレー
スフラグがセット状態になると、制御手段は演算手段の
演算結果をトレースバッファポインタで指定されたアド
レスのトレースバッファに格納し、命令ポインタが更新
する度にこの動作を行い、第2の一致検出手段によりト
レースフラグがリセット状態になるまで繰り返される。
これによって、トレースデータ収集処理は演算実行に影
響を与えることなく演算実行と同時に行うことが可能に
なる。
In the above arrangement, when the trace flag is set by the first coincidence detecting means when the instruction of the user program at the address designated by the instruction pointer is sequentially executed by the arithmetic means, the control means causes the arithmetic means to operate. The calculation result of is stored in the trace buffer at the address designated by the trace buffer pointer, this operation is performed every time the instruction pointer is updated, and the operation is repeated until the trace flag is reset by the second coincidence detecting means.
This allows the trace data collection process to be performed at the same time as the calculation execution without affecting the calculation execution.

【0008】[0008]

【実施例】本発明の実施例の構成を図1に示す。図1に
おいて、ユーザプログラムメモリ4にはビット演算命令
と数値演算命令とが混在した命令群が格納される。命令
ポインタ2は上記メモリ4のどの命令を実行するかを指
定する命令アドレスが保持される。命令レジスタ6−1
は指定されたユーザプログラムメモリ4の命令を保持す
る。デコーダ6−2は命令レジスタ6−1にラッチされ
た内容を解読し、どの様なタイプの命令かどのオペラン
ドにて命令を実行するかを判別する。ユーザデータメモ
リ5はオペランドが格納され、また演算結果を格納す
る。ビット演算回路6−3は、命令レジスタ6−1にラ
ッチされた命令がビット演算命令のときビット演算を実
行する。数値演算回路6−4は数値演算命令のとき数値
演算を行う。トレーススタートアドレスレジスタ10はト
レースを開始する命令アドレスを格納する。トレースエ
ンドアドレスレジスタ9はトレースを終了する命令アド
レスを格納する。一致検出回路11は命令ポインタ2とト
レーススタートアドレスレジスタ10の内容を比較して一
致状態の検出を行う。一致検出回路12は命令ポインタ2
とトレースエンドアドレスレジスタ9の内容を比較して
一致状態の検出を行う。トレースフラグF/F13は一致
検出回路11でセットされ一致検出回路12でリセットされ
る。トレースバッファ8はトレースデータを格納するも
ので、トレースバッファポインタ7はその格納アドレス
を指定するものである。シフトレジスタ14とシフトレジ
スタ制御回路15はビット演算結果をトレースバッファ8
のビット幅に合せ効率良く格納する為のもので、演算部
制御回路3はこれら全体を制御するものである。
FIG. 1 shows the configuration of an embodiment of the present invention. In FIG. 1, the user program memory 4 stores an instruction group in which bit operation instructions and numerical operation instructions are mixed. The instruction pointer 2 holds an instruction address that specifies which instruction in the memory 4 is to be executed. Instruction register 6-1
Holds instructions of the specified user program memory 4. The decoder 6-2 decodes the content latched in the instruction register 6-1 and determines what type of instruction and which operand is used to execute the instruction. The user data memory 5 stores operands and also stores calculation results. The bit operation circuit 6-3 executes a bit operation when the instruction latched in the instruction register 6-1 is a bit operation instruction. The numerical operation circuit 6-4 performs a numerical operation when it is a numerical operation instruction. The trace start address register 10 stores the instruction address for starting the trace. The trace end address register 9 stores the instruction address for ending the trace. The coincidence detection circuit 11 compares the contents of the instruction pointer 2 and the contents of the trace start address register 10 to detect the coincidence state. The match detection circuit 12 has an instruction pointer 2
The contents of the trace end address register 9 are compared with each other to detect the coincidence state. The trace flag F / F13 is set by the coincidence detection circuit 11 and reset by the coincidence detection circuit 12. The trace buffer 8 stores the trace data, and the trace buffer pointer 7 specifies the storage address. The shift register 14 and the shift register control circuit 15 store the bit operation result in the trace buffer 8
In order to store the data efficiently according to the bit width of, the arithmetic unit control circuit 3 controls all of them.

【0009】上記構成において、ユーザプログラムを実
行する際に、命令ポインタ2にて示されたアドレスのユ
ーザプログラム4の命令を命令レジスタ6−1に取込
む。取込まれた命令がビット演算命令か数値演算命令
か、またどの様な実行形式かをデコーダ6−2が判断
し、ビット演算命令であればビット演算回路6−3が、
数値演算命令であれば数値演算回路6−4が演算処理を
行う。この演算結果をユーザデータメモリ5に格納す
る。次に、演算部制御回路3にて命令ポインタ2をイン
クリメントし、順次命令実行を繰り返す。
In the above configuration, when executing the user program, the instruction of the user program 4 at the address indicated by the instruction pointer 2 is fetched into the instruction register 6-1. The decoder 6-2 determines whether the fetched instruction is a bit operation instruction or a numerical operation instruction, and what kind of execution form it is. If it is a bit operation instruction, the bit operation circuit 6-3
If it is a numerical operation command, the numerical operation circuit 6-4 performs an arithmetic process. The calculation result is stored in the user data memory 5. Next, the arithmetic unit control circuit 3 increments the instruction pointer 2 and sequentially repeats instruction execution.

【0010】一方、上述の処理と同時に、命令ポインタ
2の内容と、あらかじめ設定されたトレーススタートア
ドレスレジスタ10とトレースエンドアドレスレジスタ9
の内容を一致検出回路11と12にてそれぞれ比較を行い、
一致検出回路11にて一致検出されたとき、即ち、トレー
スを開始する命令アドレスになったときにトレースフラ
グF/F13をセットする。本フラグがセット状態になる
と演算部制御回路3はトレースバッファ8を書込み許可
状態としてトレースバッファポインタ7で指定したアド
レスのトレースバッファに演算結果のデータを格納す
る。命令レジスタ6−1に取込まれた命令がビット演算
命令のとき、演算結果は1ビットとなるのでこれを順次
シフトレジスタ14に保持しトレースバッファ8のビット
幅と等しくなるまでバッファリングし、その後トレース
バッファ8に書込む。シフトレジスタ制御回路15はその
シフトレジスタ14の制御を行うものである。これにより
ビット演算結果をトレースバッファ8に効率良く格納す
ることができる。一致検出回路12にて一致検出されたと
き、即ち、トレースを終了する命令アドレスになったと
きトレースフラグF/F13をリセットする。本フラグが
リセット状態になると、トレースバッファ8の書込みは
禁止状態となり、トレースデータの収集は終了する。
On the other hand, simultaneously with the above processing, the contents of the instruction pointer 2 and the preset trace start address register 10 and trace end address register 9 are set.
The contents of are compared by the match detection circuits 11 and 12, respectively,
The trace flag F / F13 is set when the coincidence detection circuit 11 detects a coincidence, that is, when the instruction address for starting the trace is reached. When this flag is set, the arithmetic unit control circuit 3 puts the trace buffer 8 into the write enable state and stores the arithmetic result data in the trace buffer at the address designated by the trace buffer pointer 7. When the instruction fetched in the instruction register 6-1 is a bit operation instruction, the operation result becomes 1 bit, so this is sequentially held in the shift register 14 and buffered until the bit width becomes equal to the bit width of the trace buffer 8. Write to the trace buffer 8. The shift register control circuit 15 controls the shift register 14. As a result, the bit operation result can be efficiently stored in the trace buffer 8. The trace flag F / F13 is reset when the coincidence detection circuit 12 detects a coincidence, that is, when the instruction address for terminating the trace is reached. When this flag is reset, writing of the trace buffer 8 is prohibited and the collection of trace data is completed.

【0011】本実施例によれば、図2(a)に示すよう
に、演算実行時間とは無関係に、トレースデータ収集を
行う事が可能となり、また、ビット演算命令とワード演
算命令が混在する場合でも効率良くトレースデータを格
納することができる。
According to the present embodiment, as shown in FIG. 2A, it is possible to collect trace data regardless of the operation execution time, and bit operation instructions and word operation instructions are mixed. Even in the case, the trace data can be efficiently stored.

【0012】[0012]

【発明の効果】本発明によれば、オンライントレース画
面表示を行う場合に、トレースデータ収集処理により演
算実行に影響を与えることがなくなり通常の状態でトレ
ースデータ収集を行うことの可能なプログラマブルコン
トローラを提供することができる。
According to the present invention, when an online trace screen is displayed, a programmable controller capable of collecting trace data in a normal state without affecting the execution of calculation by the trace data collecting process is provided. Can be provided.

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

【図1】本発明のプログラマブルコントローラ実施例の
構成図
FIG. 1 is a configuration diagram of a programmable controller embodiment of the present invention.

【図2】本発明と従来方式の作用を対比したタイムチャ
ート
FIG. 2 is a time chart comparing the operation of the present invention and the conventional method.

【図3】従来のプログラマブルコントローラの構成図FIG. 3 is a block diagram of a conventional programmable controller

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

2…命令ポインタ 3…演算部制御回路 4…ユーザプログラムメモリ 5…ユーザデータメモリ 6−1…命令レジスタ 6−2…デコーダ 6−3…ビット演算回路 6−4…数値演算回路 7…トレースバッファポインタ 8…トレースバッファ 9…トレースエンドアドレスレジスタ 10…トレーススタートアドレスレジスタ 11,12…一致検出回路 13…トレースフラグF/F 2 ... Instruction pointer 3 ... Arithmetic unit control circuit 4 ... User program memory 5 ... User data memory 6-1 ... Instruction register 6-2 ... Decoder 6-3 ... Bit arithmetic circuit 6-4 ... Numerical arithmetic circuit 7 ... Trace buffer pointer 8 ... Trace buffer 9 ... Trace end address register 10 ... Trace start address register 11, 12 ... Match detection circuit 13 ... Trace flag F / F

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 ユーザプログラムを実行するための命令
アドレスを保持する命令ポインタと、ユーザプログラム
の特定範囲の命令の演算結果を格納するトレースバッフ
ァを備えたプログラマブルコントローラにおいて、トレ
ースを開始する命令アドレスを保持する第1のレジスタ
と、トレースを終了する命令アドレスを保持する第2の
レジスタと、前記命令ポインタと前記第1のレジスタの
内容の一致を検出する第1の一致検出手段と、前記命令
ポインタと前記第2のレジスタの内容の一致を検出する
第2の一致検出手段と、前記第1の一致検出手段により
セットされ前記第2の一致検出手段によりリセットされ
るトレースフラグ保持手段と、前記命令ポインタで指定
されたアドレスのユーザプログラムの命令を実行する演
算手段と、前記トレースバッファのアドレスを指定する
トレースバッファポインタと、前記トレースフラグがセ
ット状態のとき、前記演算手段の演算結果を前記トレー
スバッファポインタで指定されたアドレスのトレースバ
ッファに格納する制御手段を設けたことを特徴とするプ
ログラマブルコントローラ。
1. A programmable controller having an instruction pointer for holding an instruction address for executing a user program and a trace buffer for storing an operation result of an instruction in a specific range of the user program, wherein an instruction address for starting a trace is set. A first register for holding, a second register for holding an instruction address for ending the trace, a first match detecting means for detecting a match between the contents of the instruction pointer and the contents of the first register, and the instruction pointer And a second match detecting means for detecting a match between the contents of the second register, a trace flag holding means set by the first match detecting means and reset by the second match detecting means, and the instruction. Arithmetic means for executing the instruction of the user program at the address designated by the pointer; A trace buffer pointer for designating the address of the source buffer, and a control means for storing the calculation result of the calculation means in the trace buffer at the address designated by the trace buffer pointer when the trace flag is set. And programmable controller.
【請求項2】 請求項1に記載のプログラマブルコント
ローラにおいて、前記演算手段は、ビット命令を実行す
るビット演算手段と数値命令を実行する数値演算手段と
で成り、前記ビット演算手段の演算結果を順次保持し前
記トレースバッファのビット幅に達したとき、ビット演
算手段の演算結果として出力するシフトレジスタを設け
たことを特徴とするプログラマブルコントローラ。
2. The programmable controller according to claim 1, wherein the arithmetic means comprises a bit arithmetic means for executing a bit instruction and a numerical arithmetic means for executing a numerical instruction, and the arithmetic results of the bit arithmetic means are sequentially obtained. A programmable controller provided with a shift register which holds and outputs as a calculation result of a bit calculation means when the bit width of the trace buffer is reached.
JP5219299A 1993-09-03 1993-09-03 Programmable controller Pending JPH0772908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5219299A JPH0772908A (en) 1993-09-03 1993-09-03 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5219299A JPH0772908A (en) 1993-09-03 1993-09-03 Programmable controller

Publications (1)

Publication Number Publication Date
JPH0772908A true JPH0772908A (en) 1995-03-17

Family

ID=16733325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5219299A Pending JPH0772908A (en) 1993-09-03 1993-09-03 Programmable controller

Country Status (1)

Country Link
JP (1) JPH0772908A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1131004A (en) * 1997-07-09 1999-02-02 Howa Mach Ltd Programmable controller
JP2005115969A (en) * 2005-01-11 2005-04-28 Toshiba Corp Programmable controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1131004A (en) * 1997-07-09 1999-02-02 Howa Mach Ltd Programmable controller
JP2005115969A (en) * 2005-01-11 2005-04-28 Toshiba Corp Programmable controller

Similar Documents

Publication Publication Date Title
JPS6355119B2 (en)
JPH0772908A (en) Programmable controller
JP2504151B2 (en) Data processing device
JPH0193812A (en) System for displaying help screen
JP2674873B2 (en) Step execution operation method of program development support device
JPH0628133A (en) Information processor and its operation supporting method
JP3358113B2 (en) Program creation device for programmable controller
JPS60193046A (en) Detecting system for instruction exception
JPS6210831Y2 (en)
JPH06309283A (en) Electronic computer
JPS59167760A (en) Information processing device
JPH0325674A (en) Information processor
JPH0282318A (en) Floating-point arithmetic unit
JP2000056991A (en) Micro computer programmable controller provided with multi-task function and its control method
JPS58195271A (en) Electronic register device
JPH04195341A (en) Information processor
JPH06301628A (en) Electronic computer
JPS6215636A (en) Extending function support control system
JPH0192803A (en) Monitor display system for programmable controller
JP2002333993A (en) System simulation device and simulation control method
JPH08249024A (en) Programmable controller
JPS58189769A (en) Changed program setting system of electronic register
JPH01321523A (en) Data processor
JPS58189766A (en) Electronic register device
JPH01232446A (en) Program development assisting device for computer