JPH08179812A - Programmable controller - Google Patents
Programmable controllerInfo
- Publication number
- JPH08179812A JPH08179812A JP32045194A JP32045194A JPH08179812A JP H08179812 A JPH08179812 A JP H08179812A JP 32045194 A JP32045194 A JP 32045194A JP 32045194 A JP32045194 A JP 32045194A JP H08179812 A JPH08179812 A JP H08179812A
- Authority
- JP
- Japan
- Prior art keywords
- delay
- timer
- arithmetic
- programmable controller
- cpu
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Programmable Controllers (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、プログラマブルコント
ローラに関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller.
【0002】[0002]
【従来の技術】従来のプログラマブルコントローラはユ
ーザープログラムの演算遅延検出時に、そのフラグとエ
ラーコードのみをメモリ部に書き込むようにしていた。2. Description of the Related Art In a conventional programmable controller, when a calculation delay of a user program is detected, only its flag and error code are written in a memory section.
【0003】[0003]
【発明が解決しようとする課題】上記のようなフラグと
エラーコードのみの書き込みだけでは、ユーザープログ
ラムの問題による演算遅延の原因追求が難しかった。本
発明は上記問題点に鑑みて為されたもので、その目的と
するところはユーザープログラムの問題による演算遅延
発生時にユーザーが容易にその原因を知ることを可能と
したプログラマブルコントローラを提供することにあ
る。However, it is difficult to find the cause of the operation delay due to the problem of the user program by only writing the flag and the error code as described above. The present invention has been made in view of the above problems, and an object of the present invention is to provide a programmable controller that allows a user to easily know the cause when an operation delay occurs due to a problem of a user program. is there.
【0004】[0004]
【課題を解決するための手段】上記目的を達成するため
に請求項1の発明では、CPUとROM、RAM等から
なるメモリ部と、I/Oインターフェイスと、演算の遅
延を監視するための演算遅延監視用タイマとにより基本
的に構成されるプログラマブルコントローラにおいて、
演算遅延監視用タイマのタイムアップ信号をCPUの割
り込み制御ポートに入力し、CPUはタイムアップ時に
は割り込み処理にて演算遅延監視プログラムを起動実行
し、割り込み発生時のユーザープログラムの実行アドレ
スを演算遅延記録用のメモリ部に書き込むものである。In order to achieve the above object, according to the invention of claim 1, a memory section including a CPU, a ROM, a RAM, an I / O interface, and an operation for monitoring an operation delay. In a programmable controller basically composed of a delay monitoring timer,
The time-up signal of the operation delay monitoring timer is input to the interrupt control port of the CPU. When the time is up, the CPU activates and executes the operation delay monitoring program by interrupt processing, and records the execution address of the user program when the interrupt occurs in the operation delay record. To be written in the memory section for use.
【0005】[0005]
【作用】請求項1の発明によれば、演算遅延監視用タイ
マのタイムアップがあればCPUが割り込み処理により
演算遅延監視プログラムを起動実行し、自動的に割り込
み発生時のユーザープログラムの実行アドレスを演算遅
延記録用のメモリ部に書き込むので、ユーザーが演算遅
延発生を知った後、上記RAMに設定してある演算遅延
発生アドレスの格納エリアに書き込まれたアドレスデー
タを読み出すことにより、ユーザープログラムの問題箇
所を容易に知ることができ、そのためユーザープログラ
ムのテストやデバックの際の参考となり、ユーザープロ
グラムの開発が容易なプログラマブルコントローラが実
現できる。According to the first aspect of the present invention, if the operation delay monitoring timer times out, the CPU activates and executes the operation delay monitoring program by interrupt processing, and automatically sets the execution address of the user program when the interrupt occurs. Since the data is written in the memory portion for the operation delay recording, the user program problem is caused by reading the address data written in the storage area of the operation delay occurrence address set in the RAM after the user knows the occurrence of the operation delay. Since the location can be easily known, it can be used as a reference when testing and debugging the user program, and a programmable controller that facilitates the development of the user program can be realized.
【0006】[0006]
【実施例】以下、本発明の実施例を図面を参照して説明
する。図1は本発明の一実施例のプログラマブルコント
ローラの基本的な構成を示すブロック図であり、図示す
るプログラマブルコントローラではCPU1と、固定的
なプログラム、データを書き込んだROM2及びユーザ
ープログラムの書き込みや、ワークエリアの確保、或い
はデータの一時的格納等に用いるRAM3からなるメモ
リ部と、外部機器との間で入出力データの授受を行うた
めのI/Oインターフェイス4と、演算遅延監視用タイ
マ5とで構成され、演算遅延監視用タイマ5のタイマ出
力をCPU1の割り込みポートに接続してある。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a basic configuration of a programmable controller according to an embodiment of the present invention. In the illustrated programmable controller, a CPU 1, a fixed program, a ROM 2 in which data is written, a user program, and a work are written. A memory unit including a RAM 3 used for securing an area or temporarily storing data, an I / O interface 4 for exchanging input / output data with an external device, and a calculation delay monitoring timer 5. The timer output of the operation delay monitoring timer 5 is connected to the interrupt port of the CPU 1.
【0007】図2はプログラマブルコントローラの基本
動作を示すフローチャートであり、このフローチャート
に示すように電源オン後、まずCPU1はROM2に格
納されている基本動作プログラムに基づいて初期化を行
い、その初期化が完了すると、ステップ(2−1)に演
算遅延監視用タイマ5に予め定まったタイマカウント値
或いは周辺ツール(図示せず)にて設定されたタイマカ
ウント値をプリセットして演算遅延監視用タイマ5を起
動する。FIG. 2 is a flow chart showing the basic operation of the programmable controller. After the power is turned on as shown in this flow chart, the CPU 1 first initializes based on the basic operation program stored in the ROM 2, and the initialization is performed. Is completed, the operation delay monitoring timer 5 is preset with a predetermined timer count value or a timer count value set by a peripheral tool (not shown) in the operation delay monitoring timer 5 in step (2-1). To start.
【0008】そしてステップ(2−2)において、プロ
グラマブルコントローラに設けられているモードスイッ
チ(図示せず)の状態を判定してプログラミングモード
(pROG)であればステップ(2−5)に飛びユーザ
ープログラムの設定や各種諸元データの入力設定のため
の周辺ツールサービス処理を行う。またランモード(R
UN)であればステップ(2−3)、(2−4)でI/
Oリフレッシュやユーザープログラムによる演算実行を
行った後、ステップ(2−5)の周辺ツールサービス処
理を行う。Then, in step (2-2), the state of a mode switch (not shown) provided in the programmable controller is judged, and if it is the programming mode (pROG), the program jumps to step (2-5). Performs peripheral tool service processing for setting and inputting various specifications. Run mode (R
If it is UN, I / I will be performed in steps (2-3) and (2-4).
After the O refresh and the calculation by the user program are executed, the peripheral tool service process of step (2-5) is executed.
【0009】以後ステップ(2−1)から(2−5)の
処理を繰り返して行うのである。つまり演算遅延監視用
タイマ5は毎スキャン毎にタイマカウント値がプリセッ
トされることになる。そしてこのタイマカウント値は通
常の演算速度では次のプリセットまでにタイムアップし
ない値に設定されている。従ってステップ(2−4)の
演算の時間がかかり過ぎて演算が遅延すると、演算遅延
監視用タイマ5がタイムアップしてタイマ出力を発生す
る。このタイマ出力が割り込み信号となって、CPU1
は割り込み処理を行い、ROM2に予め格納してある演
算遅延監視プログラムを起動実行する。Thereafter, the processes of steps (2-1) to (2-5) are repeated. That is, the calculation delay monitoring timer 5 is preset with a timer count value for each scan. The timer count value is set to a value that does not time up until the next preset at the normal calculation speed. Therefore, if the calculation of step (2-4) takes too long and the calculation is delayed, the calculation delay monitoring timer 5 times up and a timer output is generated. This timer output becomes an interrupt signal, and the CPU 1
Performs interrupt processing, and activates and executes a computation delay monitoring program stored in the ROM 2 in advance.
【0010】図3はこの演算遅延監視プログラムを実行
した時のフローチャートを示しており、CPU1はユー
ザープログラムの現在の演算実行アドレスの転送をステ
ップ(3−1)で行いRAM3に設定してある演算遅延
発生アドレスの格納エリアに書き込む。そして次のステ
ップ(3−2)で演算エラーフラグを設定する。この後
例えばディスプレイや表示装置等により演算エラーフラ
グに基づいて演算遅延発生を表示してユーザーに知らせ
る。FIG. 3 shows a flow chart when this operation delay monitoring program is executed. The CPU 1 transfers the present operation execution address of the user program in step (3-1) and executes the operation set in the RAM 3. Write to the storage area of the delay occurrence address. Then, in the next step (3-2), the calculation error flag is set. After this, for example, a display, a display device or the like is used to display a calculation delay occurrence based on the calculation error flag to inform the user.
【0011】ユーザーは演算遅延発生を知った後、上記
RAMに設定してある演算遅延発生アドレスの格納エリ
アに書き込まれたアドレスデータを読み出すことによ
り、ユーザープログラムの問題箇所を容易に知ることが
できる。従ってユーザープログラムのテストやデバック
の際の参考となり、ユーザープログラムの開発をし易く
する。After knowing the occurrence of the operation delay, the user can easily know the problematic part of the user program by reading the address data written in the storage area of the operation delay occurrence address set in the RAM. . Therefore, it can be used as a reference when testing or debugging the user program, and facilitates the development of the user program.
【0012】[0012]
【発明の効果】請求項1の発明は、演算遅延監視用タイ
マのタイムアップがあればCPUが割り込み処理により
演算遅延監視プログラムを起動実行し、自動的に割り込
み発生時のユーザープログラムの実行アドレスを演算遅
延記録用のメモリ部に書き込むので、ユーザーが演算遅
延発生を知った後、上記RAMに設定してある演算遅延
発生アドレスの格納エリアに書き込まれたアドレスデー
タを読み出すことにより、ユーザープログラムの問題箇
所を容易に知ることができ、そのためユーザープログラ
ムのテストやデバックの際の参考となり、ユーザープロ
グラムの開発が容易なプログラマブルコントローラが実
現できるという効果がある。According to the first aspect of the present invention, if the operation delay monitoring timer times out, the CPU activates and executes the operation delay monitoring program by interrupt processing, and automatically sets the execution address of the user program when the interrupt occurs. Since the data is written in the memory portion for the operation delay recording, the user program problem is caused by reading the address data written in the storage area of the operation delay occurrence address set in the RAM after the user knows the occurrence of the operation delay. Since the location can be easily known, there is an effect that it can be used as a reference when testing or debugging the user program, and a programmable controller that facilitates the development of the user program can be realized.
【図1】本発明の一実施例の基本的構成を示すブロック
図である。FIG. 1 is a block diagram showing a basic configuration of an embodiment of the present invention.
【図2】同上の基本的な動作を示すフローチャートであ
る。FIG. 2 is a flowchart showing a basic operation of the above.
【図3】同上の演算遅延発生時の動作を示すフローチャ
ートである。FIG. 3 is a flowchart showing an operation when a calculation delay occurs in the above.
1 CPU 2 ROM 3 RAM 4 I/Oインターフェイス 5 演算遅延監視用タイマ 1 CPU 2 ROM 3 RAM 4 I / O interface 5 Operation delay monitoring timer
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 11/34 H 7313−5B ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location G06F 11/34 H 7313-5B
Claims (1)
リ部と、I/Oインターフェイスと、演算時間の遅延を
監視するための演算遅延監視用タイマとにより基本的に
構成されるプログラマブルコントローラにおいて、演算
遅延監視用タイマのタイムアップ信号をCPUの割り込
み制御ポートに入力し、CPUはタイムアップ時には割
り込み処理にて演算遅延監視プログラムを起動実行し、
割り込み発生時のユーザープログラムの実行アドレスを
演算遅延記録用のメモリ部に書き込むことを特徴とする
プログラマブルコントローラ。1. A programmable controller basically comprising a CPU, a memory section including a ROM, a RAM, an I / O interface, and an operation delay monitoring timer for monitoring a delay in operation time. The time-up signal of the operation delay monitoring timer is input to the interrupt control port of the CPU, and when the time is up, the CPU starts and executes the operation delay monitoring program by interrupt processing.
A programmable controller characterized in that the execution address of a user program at the time of an interrupt is written in a memory section for computation delay recording.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP32045194A JPH08179812A (en) | 1994-12-22 | 1994-12-22 | Programmable controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP32045194A JPH08179812A (en) | 1994-12-22 | 1994-12-22 | Programmable controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH08179812A true JPH08179812A (en) | 1996-07-12 |
Family
ID=18121603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP32045194A Pending JPH08179812A (en) | 1994-12-22 | 1994-12-22 | Programmable controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH08179812A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006331130A (en) * | 2005-05-26 | 2006-12-07 | Matsushita Electric Works Ltd | Programmable controller |
-
1994
- 1994-12-22 JP JP32045194A patent/JPH08179812A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006331130A (en) * | 2005-05-26 | 2006-12-07 | Matsushita Electric Works Ltd | Programmable controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH03204737A (en) | Debug circuit of signal processing processor | |
JP3358759B2 (en) | Data trace method for programmable controller | |
JPH08179812A (en) | Programmable controller | |
JP3192229B2 (en) | Information processing device with diagnostic function for device peripherals | |
JP4061911B2 (en) | Memory check method, method, and memory check program | |
JP3543516B2 (en) | Sequencer data trace method | |
JP2001147863A (en) | Flash memory rewrite device | |
JPH082880Y2 (en) | EEPROM data writing device | |
JP2003099333A (en) | Management system for flash memory | |
JPH1011321A (en) | Microprocessor with execution tracing function | |
JPH04229302A (en) | Control processor | |
JPH02264339A (en) | Information processor | |
JPH02253305A (en) | Signal tracing system for programmable controller | |
JPS58181158A (en) | Storage device of state history | |
JPH11212945A (en) | Microcomputer and it memory | |
JPS61134850A (en) | Debugging method of subsequent processor | |
JP2000020498A (en) | Microcomputer and its restoring method | |
JPH0120778B2 (en) | ||
JPS5935257A (en) | Status history storage device | |
JPH04180130A (en) | Protection circuit for interruption vector table | |
JPS628829B2 (en) | ||
JPH06139116A (en) | Program tracing system | |
JPS5832299A (en) | Memory test device | |
JPS59177658A (en) | Debugging control system | |
JPH03156643A (en) | Collection system for fault information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20031028 |