Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4558376B2 - controller - Google Patents
[go: Go Back, main page]

JP4558376B2 - controller - Google Patents

controller Download PDF

Info

Publication number
JP4558376B2
JP4558376B2 JP2004147534A JP2004147534A JP4558376B2 JP 4558376 B2 JP4558376 B2 JP 4558376B2 JP 2004147534 A JP2004147534 A JP 2004147534A JP 2004147534 A JP2004147534 A JP 2004147534A JP 4558376 B2 JP4558376 B2 JP 4558376B2
Authority
JP
Japan
Prior art keywords
program
error
information
address
trace
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
JP2004147534A
Other languages
Japanese (ja)
Other versions
JP2005332030A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004147534A priority Critical patent/JP4558376B2/en
Publication of JP2005332030A publication Critical patent/JP2005332030A/en
Application granted granted Critical
Publication of JP4558376B2 publication Critical patent/JP4558376B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、高級言語プログラムで記述されたプログラムのトレースを実行するコントローラに関するものである。 The present invention relates to a controller that executes tracing of a program described in a high-level language program .

プログラマブルコントローラ等の組み込み機器のプログラム開発(組込み型のプログラムの開発)は、クロス開発環境で行われる。クロス開発環境は、プログラムを組み込んで動作させる装置である開発ターゲットと組み込むプログラムを開発する開発ホストシステムをRS−232C(Recommended Standard 232 version C)等によって通信させた状態で開発を行っている。   Program development of an embedded device such as a programmable controller (development of an embedded program) is performed in a cross development environment. The cross-development environment is developed in a state in which a development host system that develops a program to be incorporated and a development target that is an apparatus that incorporates and operates the program is communicated by RS-232C (Recommended Standard 232 version C) or the like.

クロス開発環境においてデバッグを行う場合、デバッグ時に必要となるデータを開発ホストシステムに保有しておき、開発ターゲット側のシンボル情報や変数に格納されている値などの情報は通信によって開発ターゲットに渡している。この場合、開発ターゲットに対応した専用の通信が必要となり、クロス開発環境時には開発ホストシステムに専用のデバッグツールが必要となる。   When debugging in a cross-development environment, data necessary for debugging is held in the development host system, and information such as symbol information on the development target side and values stored in variables is passed to the development target via communication. Yes. In this case, dedicated communication corresponding to the development target is required, and a dedicated debug tool is required in the development host system in the cross development environment.

また、開発ターゲットにOS(オペレーティングシステム)となるシステムプログラムが存在しない場合にデバッグを行う手段として、開発ターゲットのマイクロプロセッサをエミュレートするICEとその専用ツールを使用する方法がある。この方法では、デバッグ情報をICEに保有し、クロス開発環境であるホスト・ターゲットとICEの間の通信を確立したうえでデバッグ情報を収集する。   As a means for performing debugging when there is no OS (operating system) system program in the development target, there is a method of using an ICE that emulates the development target microprocessor and its dedicated tool. In this method, debug information is collected in the ICE and communication is established between the host target and the ICE, which are a cross development environment, and the ICE is collected.

特許文献1に記載のマイクロコンピュータ用プログラムのデバッグ方法は、ICEに対し高級言語コンパイラで生成されてプログラムメモリに記憶されたプログラムにデバッグモジュールを埋め込み、このデバッグモジュールを評価用CPUで実行することにより、関数に渡された引数の値、又は特定の引数の値が許容範囲を越えている場合にトレースメモリ装置に記録している。このICEにより、プログラムの実行をブレークさせることなく、関数へ渡される引数の値、又は許容範囲を越える引数を渡したモジュール又は引数に関するエラー処理を評価している。   The method for debugging a microcomputer program described in Patent Document 1 embeds a debug module in a program generated by a high-level language compiler for ICE and stored in a program memory, and executes the debug module by an evaluation CPU. When the value of an argument passed to the function or the value of a specific argument exceeds an allowable range, it is recorded in the trace memory device. By this ICE, error processing related to a module or an argument that has passed an argument value passed to a function or an argument exceeding an allowable range is evaluated without breaking the execution of the program.

特開平10−124350号公報JP-A-10-124350

しかしながら、上記従来の技術では、デバッグを行うためにICEが必要とるため、デバッグを行うための装置構成が複雑になるといった問題があった。また、デバッグを行うために動作させるICEにおいて、クロック等に制限が課されるといった問題があった。また、PLC(Programmable Logic Controller)等の長時間動作させて制御を行うようなコントローラにおいて不具合が発生した場合、発生時点でデバッグ情報を収集していなければデバッグを行うことができない。このような場合、不具合が再発生する環境を整えた後に、デバッグツールを使用して動作情報を確認しながら不具合箇所を探さなければならないため、デバッグ情報の収集に多大な時間を要するという問題点があった。また、PLC等の生産ラインに組込まれて長時間動作を行うようなコントローラにおいては、常にデバッグ情報を取得するためにホスト・ターゲット通信を行うことは、経由するサーバのダウンや回線の切断などの恐れがあるためデバッグ情報を取得することが困難になるといった問題があった。   However, the above-described conventional technique has a problem that the configuration of the apparatus for performing debugging is complicated because ICE is required for performing debugging. In addition, there is a problem that a clock or the like is restricted in the ICE operated for debugging. Further, when a failure occurs in a controller that performs control for a long time such as a PLC (Programmable Logic Controller), debugging cannot be performed unless debug information is collected at the time of occurrence. In such a case, after preparing the environment where the problem reoccurs, it is necessary to search for the defect part while checking the operation information using the debug tool, so it takes a lot of time to collect the debug information. was there. In addition, in a controller that is built in a production line such as a PLC and operates for a long time, host / target communication is always performed in order to obtain debug information. There is a problem that it is difficult to obtain debug information because of fear.

本発明は、上記に鑑みてなされたものであって、プログラムに不具合が発生した際、簡易な装置構成で不具合の調査を短時間で行うことが可能なコントローラを得ることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to obtain a controller capable of investigating a failure in a short time with a simple device configuration when a failure occurs in a program.

上述した課題を解決し、目的を達成するために、本発明は、オペレーティングシステムであるシステムプログラムによって自らの動作制御を行うとともに、高級言語プログラムで記述されたユーザプログラムによって外部機器を動作させるユニットの制御を行なうコントローラにおいて、前記システムプログラムおよび前記ユーザプログラムを実行する際に、前記システムプログラムおよび前記ユーザプログラムが格納されるデータ格納部と、前記システムプログラムおよび前記ユーザプログラムを前記データ格納部に展開することによって前記システムプログラムおよび前記ユーザプログラムを実行するCPUと、を備え、前記CPUは、前記システムプログラムを実行することによって、前記データ格納部内で前記システムプログラムが使用している領域のアドレス範囲であるプログラム領域情報と、前記システムプログラムおよび前記ユーザプログラムの実行中に用いられた情報としてアクセスアドレス、アクセスデータおよびプログラムカウンタが対応付けされた動作情報と、前記システムプログラムおよび前記ユーザプログラムの実行中に発生したエラーのエラーアドレスと、を取得するプログラム情報取得処理と、前記システムプログラムを実行することによって、前記プログラム領域情報、前記動作情報および前記エラーアドレスに基づいて、前記システムプログラムおよび前記ユーザプログラムのエラー解析を行うプログラム解析処理と、を行ない、前記プログラム領域情報は、前記ユーザプログラムが開始される前に前記CPUによって取得され、且つ前記動作情報は、自らのコントローラが動作している間、前記CPUによって取得され、前記プログラム解析処理の際には、前記CPUが、前記プログラム領域情報、前記動作情報および前記エラーアドレスの取得を停止し、その後、前記エラーアドレスの有無に基づいてアドレスエラーが発生しているか否かを判断し、アドレスエラーが発生している場合には前記エラーアドレスからエラーが発生したアクセスアドレスを取得するとともに、エラーが発生したアクセスアドレスと同一のアクセスアドレスを持つ動作情報を取得し、この取得した動作情報のアクセスアドレスが前記プログラム領域情報の範囲内であるか否かに基づいてエラー発生要因が前記ユーザプログラムであるか前記システムプログラムであるかを判断することを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a unit that controls its own operation by a system program that is an operating system and operates an external device by a user program described by a high-level language program. When executing the system program and the user program in a controller that performs control, a data storage unit that stores the system program and the user program, and the system program and the user program are expanded in the data storage unit and a CPU for executing the system program and the user program by the CPU by executing the system program, the system program in the data storage portion is A program area information is the address range of the area that use the access address, the operation information accessed data and program counter is associated as information used during execution of the system program and the user program, said system Based on the program area information, the operation information, and the error address by executing a program information acquisition process for acquiring an error address of an error that occurred during execution of the program and the user program, and the system program performs a program analysis processing for error analysis of the system program and the user program, the program area information is acquired by the CPU before the user program is started, and the operation Broadcast while the own controller is operating, acquired by the CPU, when the program analysis processing, the CPU is the program area information, the acquisition of the operation information and the error address is stopped, Thereafter, it is determined whether an address error has occurred based on the presence or absence of the error address. If an address error has occurred, an access address where the error has occurred is acquired from the error address, and the error is The operation information having the same access address as the generated access address is acquired, and the cause of error is the user program based on whether the access address of the acquired operation information is within the range of the program area information. Or whether it is the system program.

この発明によれば、データ格納部内でシステムプログラムが格納される領域に関するプログラム領域情報、ユーザプログラムの実行中の動作情報およびユーザプログラムの実行中に発生したエラーに関するエラー情報を取得し、システムプログラムがプログラム領域情報、動作情報およびエラー情報に基づいて、ユーザプログラムのエラー解析を行うので、ユーザプログラムの動作状況のトレースおよびユーザプログラムのエラー時の要因判別を容易に確認することが可能になる。   According to this invention, the program area information relating to the area where the system program is stored in the data storage unit, the operation information during execution of the user program, and the error information relating to errors occurring during the execution of the user program are obtained, Since the error analysis of the user program is performed based on the program area information, the operation information, and the error information, it is possible to easily confirm the trace of the operation status of the user program and the factor determination at the time of the error of the user program.

この発明によれば、コントローラが組み込み型の高級言語プログラムで記述されたユーザプログラムを動作させながらユーザプログラムの動作状況のトレースおよびユーザプログラムのエラー時の要因判別を容易に確認することが可能になる。したがって、コントローラにおいてユーザプログラムの不具合発生時のデータを確認することができるため、デバッグの再発生を防止する環境を整える時間を短縮することが可能になるという効果を奏する。

According to the present invention, the controller can easily confirm the trace of the operation status of the user program and the determination of the cause of the error of the user program while operating the user program described in the embedded high-level language program. . Therefore, since data at the time of occurrence of a malfunction of the user program can be confirmed in the controller, it is possible to shorten the time for preparing an environment for preventing the reoccurrence of debugging.

以下に、本発明にかかるコントローラの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a controller according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

実施の形態1.
図1は、本発明の実施の形態1に係るコントローラを備えたデバッグシステムのシステム構成図である。デバッグシステムは、C言語等の高級言語で記述されたプログラム(以下、高級言語プログラムという)の不具合を一時診断するシステムである。図1に示すように、デバッグシステムは生産ライン内の装置の実行等を行う生産システム3と、生産システム3にインターネット2などの通信ネットワークによって接続されたネットワーク機器1からなる。
Embodiment 1 FIG.
FIG. 1 is a system configuration diagram of a debugging system including a controller according to Embodiment 1 of the present invention. The debug system is a system for temporarily diagnosing a problem in a program written in a high-level language such as C language (hereinafter referred to as a high-level language program). As shown in FIG. 1, the debug system includes a production system 3 that executes devices in a production line, and a network device 1 that is connected to the production system 3 via a communication network such as the Internet 2.

生産システム3は、PLC(Programmable Logic Controller)バス45に接続された、電源41、コントローラ10、複数のユニット42からなる。コントローラ10は、PLCバス45を介して各ユニット42の制御を行う。   The production system 3 includes a power supply 41, a controller 10, and a plurality of units 42 connected to a PLC (Programmable Logic Controller) bus 45. The controller 10 controls each unit 42 via the PLC bus 45.

ネットワーク機器1は、液晶ディスプレイ等の表示機能を備えており、例えばパーソナルコンピュータ等からなる。ネットワーク機器1は、生産システム3内のコントローラ10において取得した、高級言語プログラムの動作情報や高級言語プログラムのエラー要因(エラー要因の候補)等を取得する。   The network device 1 has a display function such as a liquid crystal display, and is composed of, for example, a personal computer. The network device 1 acquires high-level language program operation information, high-level language program error factors (error factor candidates), and the like acquired by the controller 10 in the production system 3.

図2は、実施の形態1に係るコントローラの構成を示すブロック図である。コントローラ10は、PLCバス45に接続されたユニット42を制御するとともに、組み込み型の高級言語プログラムで作成されたユニット42を制御するためのユーザプログラムの不具合を一時診断する。   FIG. 2 is a block diagram illustrating a configuration of the controller according to the first embodiment. The controller 10 controls the unit 42 connected to the PLC bus 45 and temporarily diagnoses a malfunction of the user program for controlling the unit 42 created by the built-in high-level language program.

コントローラ10は、例えばPLC(Programmable Logic Controller)等の生産システムの制御装置であり、パーソナルコンピュータ等からなる。コントローラ10は、CPU(Central Processing Unit)バス9、CPU11、周辺機器接続部12、送受信部13、データ格納部14、トレース情報記憶部15、プログラム記憶部16、データ変換部18、記憶媒体接続部19を備える。   The controller 10 is a control device of a production system such as a PLC (Programmable Logic Controller), and includes a personal computer or the like. The controller 10 includes a CPU (Central Processing Unit) bus 9, a CPU 11, a peripheral device connection unit 12, a transmission / reception unit 13, a data storage unit 14, a trace information storage unit 15, a program storage unit 16, a data conversion unit 18, and a storage medium connection unit. 19 is provided.

CPUバス9は、CPU11と送受信部13、データ格納部14、トレース情報記憶部15、プログラム記憶部16、データ変換部18、記憶媒体接続部19を接続するバス(データのやり取りを行う伝送路)である。CPU11は、プログラムを実行するマイクロプロセッサである。   The CPU bus 9 is a bus (transmission path for exchanging data) connecting the CPU 11 to the transmission / reception unit 13, the data storage unit 14, the trace information storage unit 15, the program storage unit 16, the data conversion unit 18, and the storage medium connection unit 19. It is. The CPU 11 is a microprocessor that executes a program.

周辺機器接続部12は、例えばRS−232C(Recommended Standard 232 version C)等を備えて構成され、プリンタ、モデム、スキャナ等の外部装置とシリアル通信を行う。周辺機器接続部12は、コントローラ10のOS(Operating System)(オペレーティングシステム)となるシステムプログラム等によって取得された後述するエラー発生要因判別ファイルやトレースデータファイルを、必要に応じてプリンタ等の周辺機器に送信する。   The peripheral device connection unit 12 includes, for example, RS-232C (Recommended Standard 232 version C), and performs serial communication with external devices such as a printer, a modem, and a scanner. The peripheral device connection unit 12 receives an error factor determination file and a trace data file, which will be described later, acquired by a system program or the like serving as an OS (Operating System) of the controller 10 as necessary, such as a peripheral device such as a printer. Send to.

送受信部13は、100Base−TX/100Base−Tによって接続を行うPHYチップ等を備え、Ethernet(登録商標)等によって外部機器と接続し、情報の送受信を行う。送受信部13はネットワーク機器1からの要求に対してエラー発生要因判別ファイルやトレースデータファイルをインターネット2を介して送信する。また、送受信部13は必要に応じてエラー発生要因判別ファイルやトレースデータファイルを、例えば液晶モニタ等の表示機能を備えた外部機器(図示せず)に送信する。   The transmission / reception unit 13 includes a PHY chip or the like that is connected by 100Base-TX / 100Base-T, and is connected to an external device by Ethernet (registered trademark) or the like to transmit and receive information. The transmission / reception unit 13 transmits an error factor determination file and a trace data file via the Internet 2 in response to a request from the network device 1. In addition, the transmission / reception unit 13 transmits an error factor determination file and a trace data file to an external device (not shown) having a display function such as a liquid crystal monitor as necessary.

データ格納部14は、ワークRAM(Random Access Memory)等を備え、CPU11が実行するプログラム(ユーザプログラム、システムプログラム)やこのプログラムが使用するデータを格納する。プログラム記憶部16に格納してあるシステムプログラムやユーザプログラムをデータ格納部14に展開することによってCPU11はシステムプログラムやユーザプログラムを実行する。ここでは、システムプログラムをデータ格納部14に展開することによってCPU11がシステムプログラムを実行する処理が、特許請求の範囲に記載のプログラム情報取得部の処理に対応する。   The data storage unit 14 includes a work RAM (Random Access Memory) and the like, and stores programs (user programs and system programs) executed by the CPU 11 and data used by the programs. The CPU 11 executes the system program and the user program by expanding the system program and the user program stored in the program storage unit 16 in the data storage unit 14. Here, the process in which the CPU 11 executes the system program by developing the system program in the data storage unit 14 corresponds to the process of the program information acquisition unit described in the claims.

トレース情報記憶部15は、SRAM(Static RAM)等の内部電源を備えたバックアップRAM等からなり、コントローラ10のリセット後もデータを保持することが可能な記憶機能を備えている。   The trace information storage unit 15 includes a backup RAM having an internal power source such as an SRAM (Static RAM) and the like, and has a storage function capable of holding data even after the controller 10 is reset.

データ変換部18は、PLCバス45用のASIC(Application Specific Integrated Circuit)等を備え、PLCバス45を介してユニット42にアクセスする際のデータを変換する。記憶媒体接続部19は、CF(Compact Flash)カードやフレキシブルディスク等の記憶媒体等と接続を行う。   The data converter 18 includes an ASIC (Application Specific Integrated Circuit) for the PLC bus 45 and the like, and converts data when accessing the unit 42 via the PLC bus 45. The storage medium connection unit 19 connects to a storage medium such as a CF (Compact Flash) card or a flexible disk.

プログラム記憶部16は、FLASHメモリ等のROM(Read Only Memory)等を備え、コントローラ10のOSとなるシステムプログラム、C言語等の高級言語で作成したユーザプログラム、後述のエラー発生要因候補D6等を記憶(保存)する。本実施の形態1においては、OSとなるシステムプログラムがユーザプログラムの不具合を一時診断(エラー解析)する。   The program storage unit 16 includes a ROM (Read Only Memory) such as a FLASH memory and the like, and stores a system program serving as the OS of the controller 10, a user program created in a high-level language such as C language, an error factor candidate D6 described later Remember (save). In the first embodiment, a system program serving as an OS performs a temporary diagnosis (error analysis) for a user program failure.

ここで、コントローラ10のOSとなるシステムプログラムについて説明する。図3は、実施の形態1に係るシステムプログラムの機能ブロックの一例を示す図である。システムプログラムは、記憶媒体I/F機能ブロック20、スクリプト機能ブロック21、エラー要因診断機能ブロック22、サーバ機能ブロック23、トレース機能ブロック24、システムエリア記憶機能ブロック25、外部機器I/F機能ブロック27を備えている。   Here, a system program serving as the OS of the controller 10 will be described. FIG. 3 is a diagram illustrating an example of functional blocks of the system program according to the first embodiment. The system program includes a storage medium I / F function block 20, a script function block 21, an error factor diagnosis function block 22, a server function block 23, a trace function block 24, a system area storage function block 25, and an external device I / F function block 27. It has.

スクリプト機能ブロック21は、ユーザプログラムを起動するためファイルに記述された内容を実行する機能ブロックである。エラー要因診断機能ブロック22は、ユーザプログラムのエラーが発生した際にユーザプログラムのトレースに関する情報(後述するトレース情報100)からエラー要因を判別する機能ブロックである。エラー要因診断機能ブロック22は、エラー発生時に保有するトレース情報100を使用してエラー発生箇所からのバックトレースやタスク情報のチェックを行うことにより、エラー発生箇所の要因となりえる候補を列挙してファイルに保存する。   The script function block 21 is a function block that executes the contents described in the file to start the user program. The error factor diagnosing function block 22 is a functional block for determining an error factor from information (trace information 100 to be described later) regarding user program trace when an error of the user program occurs. The error cause diagnosis function block 22 uses the trace information 100 held when an error occurs to check the back trace and task information from the error occurrence location, and lists candidates that can cause the error occurrence location. Save to.

サーバ機能ブロック23は、コントローラ10が取得したトレースに関する情報の取得要求情報を外部機器から受け付けるとともに、トレースに関する情報の取得要求情報に対する応答情報を外部機器(ネットワーク機器1)に送信する機能ブロックである。トレース機能ブロック24は、ユーザプログラムの動作をリアルタイムトレースし、トレースした情報をトレース情報100としてトレース情報記憶部15に格納させる機能ブロックである。システムエリア記憶機能ブロック25は、システムプログラムが使用するデータ格納部14の領域を記憶させる機能ブロックである。   The server function block 23 is a functional block that accepts the acquisition request information of the information related to the trace acquired by the controller 10 from the external device and transmits response information to the acquisition request information of the information related to the trace to the external device (network device 1). . The trace function block 24 is a functional block that performs real-time trace of the operation of the user program and stores the traced information in the trace information storage unit 15 as the trace information 100. The system area storage functional block 25 is a functional block for storing an area of the data storage unit 14 used by the system program.

また、記憶媒体I/F機能ブロック20は記憶媒体接続部19に装着した記憶可能な記憶媒体にアクセスする機能ブロックである。外部機器I/F機能ブロック27は、インターネット、シリアル、モデム、PLCバス45と接続できるI/Fドライバ機能を有する機能ブロックである。サーバ機能ブロック23が、トレースに関する情報の取得要求情報を外部機器から受け付けた場合、外部機器I/F機能ブロック27がインターネット2などを介してトレースに関する情報を外部機器に送信する。   The storage medium I / F functional block 20 is a functional block for accessing a storable storage medium attached to the storage medium connection unit 19. The external device I / F function block 27 is a function block having an I / F driver function that can be connected to the Internet, serial, modem, and PLC bus 45. When the server function block 23 receives the acquisition request information on the trace information from the external device, the external device I / F function block 27 transmits the trace information to the external device via the Internet 2 or the like.

CPU11は、システムプログラムをデータ格納部14に展開して動作させることによって、これらの記憶媒体I/F機能、スクリプト機能、エラー要因診断機能、サーバ機能、トレース機能、システムエリア記憶機能、外部機器I/F機能を達成する。本実施の形態1においては、CPU11がシステムプログラムをデータ格納部14に展開して動作させることによって特許請求の範囲に記載のプログラム解析部の処理を行う。   The CPU 11 expands and operates the system program in the data storage unit 14 to thereby operate the storage medium I / F function, script function, error factor diagnosis function, server function, trace function, system area storage function, and external device I. / F function is achieved. In the first embodiment, the CPU 11 develops the system program in the data storage unit 14 and operates it to perform the processing of the program analysis unit described in the claims.

つぎに、コントローラ10の動作について説明する。図4−1は、コントローラの動作手順を示すフローチャートであり、図4−2はエラーアドレスを登録する手順を示すフローチャートである。   Next, the operation of the controller 10 will be described. FIG. 4A is a flowchart illustrating an operation procedure of the controller, and FIG. 4B is a flowchart illustrating a procedure for registering an error address.

プログラム記憶部16に記憶しているOSとなるシステムプログラムやユーザプログラムを、コントローラ10の起動時にデータ格納部14に展開してシステムプログラムやユーザプログラム(高級言語プログラム)に基づく所定の動作を開始する。システムプログラムを起動すると、システムプログラムのトレース機能は、トレース情報記憶部15へのトレース情報100の格納を開始する   A system program or user program serving as an OS stored in the program storage unit 16 is expanded in the data storage unit 14 when the controller 10 is started, and a predetermined operation based on the system program or user program (high-level language program) is started. . When the system program is activated, the trace function of the system program starts storing the trace information 100 in the trace information storage unit 15.

図5は、トレース情報記憶部に記憶するトレース情報の構成を示す図である。トレース情報100には、エラーが発生したアドレスを格納したエラー発生アドレスD1、トレース機能によりコントローラ10が動作している間常に収集されているアクセスアドレス、アクセスデータ、プログラムカウンタを格納したS/W(ソフトウェア)トレース情報D2、OSとなるシステムプログラムを含む高級言語プログラムの関数コールの履歴(プログラムカウンタ、関数名、引数)を格納した関数コール履歴情報D3、OSとなるシステムプログラムが使用しているデータ格納部14のRAM領域を記憶したシステムプログラム使用エリア情報D4の各エリアに格納されている情報が含まれている。   FIG. 5 is a diagram illustrating a configuration of trace information stored in the trace information storage unit. The trace information 100 includes an error occurrence address D1 that stores an address where an error has occurred, an access address that is always collected while the controller 10 is operating by the trace function, access data, and an S / W that stores a program counter ( Software) Trace information D2, function call history information D3 storing function call history (program counter, function name, argument) of high-level language program including system program to be OS, data used by system program to be OS The information stored in each area of the system program use area information D4 storing the RAM area of the storage unit 14 is included.

エラー発生アドレスD1は特許請求の範囲に記載のエラー情報に対応し、S/Wトレース情報D2、関数コール履歴情報D3は特許請求の範囲に記載の動作情報に対応し、システムプログラム使用エリア情報D4は、特許請求の範囲に記載のプログラム領域情報に対応する。これらエラー発生アドレスD1、S/Wトレース情報D2、関数コール履歴情報D3、システムプログラム使用エリア情報D4は、トレース情報100としてトレース情報記憶部15に格納される。トレース情報100は、エラー要因の候補をシステムプログラムによって自動的にリストアップする際に用いられる。   The error occurrence address D1 corresponds to the error information described in the claims, the S / W trace information D2 and the function call history information D3 correspond to the operation information described in the claims, and the system program use area information D4 Corresponds to the program area information described in the claims. The error occurrence address D1, S / W trace information D2, function call history information D3, and system program use area information D4 are stored in the trace information storage unit 15 as trace information 100. The trace information 100 is used when automatically listing error factor candidates by the system program.

ここで、S/Wトレース情報D2、関数コール履歴情報D3、システムプログラム使用エリア情報D4について説明する。図6−1は、S/Wトレース情報を説明するための図であり、図6−2は、関数コール履歴情報を説明するための図であり、図6−3は、システムプログラム使用エリア情報を説明するための図である。   Here, the S / W trace information D2, the function call history information D3, and the system program use area information D4 will be described. FIG. 6A is a diagram for explaining the S / W trace information, FIG. 6B is a diagram for explaining the function call history information, and FIG. 6C is the system program use area information. It is a figure for demonstrating.

図6−1に示すように、S/Wトレース情報D2は、1つのプログラムカウンタ(PrgCounter)、1つのアクセスアドレス(Address)、1つのアクセスデータ(Data)からなる1つのフレームを複数個含んでおり、各フレームにはフレームNo.が含まれている。S/Wトレース情報D2は、データ格納部14とCPU11の間でやりとりされる情報に基づいてシステムプログラムのトレース機能によって取得される。   As shown in FIG. 6A, the S / W trace information D2 includes a plurality of one frame composed of one program counter (PrgCounter), one access address (Address), and one access data (Data). Each frame has a frame number. It is included. The S / W trace information D2 is acquired by the trace function of the system program based on information exchanged between the data storage unit 14 and the CPU 11.

図6−2に示すように、関数コール履歴情報D3は、1つのプログラムカウンタ、関数名(シンボル情報(Symbol))、第1引数(Data「0」)〜第n(nは自然数)引数(Data「n−1」)からなる1つの関数コールデータを複数含んでいる。関数コール履歴情報D3は、ユーザプログラムの関数コール時にプログラムカウンタ、関数名、関数に渡された引数がシステムプログラムによって収集される。   As shown in FIG. 6B, the function call history information D3 includes one program counter, a function name (symbol information (Symbol)), a first argument (Data “0”) to an nth (n is a natural number) argument ( A plurality of function call data consisting of Data “n−1”) is included. In the function call history information D3, the program counter, the function name, and the arguments passed to the function are collected by the system program when the user program calls the function.

関数コール履歴情報D3は、データ登録時にスタックに格納できるデータが一杯(満杯)である場合は最も古いデータから削除して新しいデータを登録し(FIFO(Fast In Fast Out))、データ参照時には最も新しいデータをスタックから取り出して参照する(FILO(Fast In Last Out))。   In the function call history information D3, when the data that can be stored in the stack at the time of data registration is full (full), the oldest data is deleted and new data is registered (FIFO (Fast In Fast Out)), and at the time of data reference New data is taken out of the stack and referenced (FILO (Fast In Last Out)).

図6−3に示すように、システムプログラム使用エリア情報D4のデータ構造は、システムプログラムが使用しているシステム使用エリア数と、システムプログラムが使用しているデータ格納部14のRAM領域を示す情報としてシステム使用エリアデータを含んでいる。システム使用エリアデータは、1つの先頭アドレス(StartAddr)と1つの最終アドレス(EndAddr)からなるアドレスに関する情報を複数組含んでいる。   As shown in FIG. 6C, the data structure of the system program use area information D4 is information indicating the number of system use areas used by the system program and the RAM area of the data storage unit 14 used by the system program. As system usage area data. The system use area data includes a plurality of sets of information related to an address including one start address (StartAddr) and one last address (EndAddr).

CPU11がシステムプログラムを起動すると、ユーザプログラムが開始される前に、システムプログラムが使用しているデータ格納部14のRAM領域に関する情報を、データ格納部14から取得し、システムプログラム使用エリア情報D4へ格納する。   When the CPU 11 activates the system program, before the user program is started, information on the RAM area of the data storage unit 14 used by the system program is acquired from the data storage unit 14 and the system program use area information D4 is obtained. Store.

CPU11がユーザプログラムによる処理を開始すると、コントローラ10が動作している間、アクセスアドレス、アクセスデータ、プログラムカウンタをS/Wトレース情報D2として収集する。また、CPU11がユーザプログラムによる処理を開始すると、コントローラ10が動作している間、高級言語プログラムの関数コールの履歴を収集する。そして、収集されたS/Wトレース情報D2と関数コール履歴情報D3は、トレース情報100としてトレース情報記憶部15に格納する。   When the CPU 11 starts processing by the user program, the access address, access data, and program counter are collected as S / W trace information D2 while the controller 10 is operating. When the CPU 11 starts processing by the user program, the function call history of the high-level language program is collected while the controller 10 is operating. The collected S / W trace information D2 and function call history information D3 are stored in the trace information storage unit 15 as trace information 100.

CPU11によってプログラム処理が実行されている時に、アドレスの不正アクセス(アドレスエラー)やシステムWDT(Watch dog timer)発生などのエラーが発生すると、システムプログラムがこのアドレスの不正アクセスやシステムWDT発生などのエラーをシステムプログラムが正常に動作しなくなる可能性のある致命的なエラーとして検出する。このとき、アドレスの不正アクセスやシステムWDT発生などが発生するとイベントを発生させ、このイベントをシステムプログラムが検出することによってエラーを検出する。そして、エラーが発生したアドレスをエラー発生アドレスD1としてトレース情報記憶部15のトレース情報100に格納する。   When an error such as an illegal address access (address error) or system WDT (watch dog timer) occurs while the program processing is being executed by the CPU 11, the system program will cause an error such as an illegal access to this address or a system WDT occurrence. Is detected as a fatal error that may cause the system program to malfunction. At this time, when an illegal address access or system WDT occurs, an event is generated, and an error is detected by the system program detecting this event. The address where the error has occurred is stored in the trace information 100 of the trace information storage unit 15 as the error occurrence address D1.

この後、アドレスの不正アクセス等の発生によってイベントが発生してトレース情報記憶部15のトレース情報100が更新されると、エラー要因の判別を正確に行えなくなる。このため、一旦イベントが発生するとトレース情報記憶部15へのトレース情報100の更新を停止(トレース情報100の収集を終了)させるために、システムプログラムはプログラム記憶部16に記憶しているトレース実行フラグをOFFに設定する(ステップS100)。これにより、システムプログラムによるトレース情報100の収集が一旦終了(停止)し、トレース情報100が更新されることがなくなる。   Thereafter, when an event occurs due to an illegal access of the address and the like and the trace information 100 of the trace information storage unit 15 is updated, the error factor cannot be determined accurately. Therefore, once an event occurs, the system program stores the trace execution flag stored in the program storage unit 16 in order to stop updating the trace information 100 to the trace information storage unit 15 (end collection of the trace information 100). Is set to OFF (step S100). Thereby, collection of the trace information 100 by the system program is once ended (stopped), and the trace information 100 is not updated.

ここで、プログラム記憶部16内の構成およびデータ格納部14の構成について説明する。図7−1は実施の形態1に係るプログラム記憶部のメモリマップを示す図であり、図7−2は実施の形態1に係るデータ格納部のメモリマップを示す図である。   Here, the configuration in the program storage unit 16 and the configuration of the data storage unit 14 will be described. FIG. 7A is a diagram illustrating a memory map of the program storage unit according to the first embodiment, and FIG. 7B is a diagram illustrating a memory map of the data storage unit according to the first embodiment.

プログラム記憶部16は、システムプログラムを格納するエリア(システムプログラム格納エリア28)、ユーザプログラムを格納するエリア(ユーザプログラム格納エリア30)、トレース実行フラグを格納するエリア(トレース実行フラグ39)を含んで構成されている。   The program storage unit 16 includes an area for storing system programs (system program storage area 28), an area for storing user programs (user program storage area 30), and an area for storing trace execution flags (trace execution flag 39). It is configured.

システムプログラム格納エリア28、ユーザプログラム格納エリア30は、標準ROM37のエリアに記憶され、トレース実行フラグ39は標準ROM37以外のエリアに記憶されている。   The system program storage area 28 and the user program storage area 30 are stored in an area of the standard ROM 37, and the trace execution flag 39 is stored in an area other than the standard ROM 37.

トレース実行フラグ39は、トレース情報100の収集を行うか否かを示す情報であり、OSであるシステムプログラムの実行時にONする。トレース実行フラグがONに設定されている場合は、CPU11はデータ格納部14のシステムプログラムによってトレース情報100の収集を行い、トレース実行フラグがOFFに設定されている場合は、データ格納部14のシステムプログラムによるトレース情報の収集を行わない。   The trace execution flag 39 is information indicating whether or not to collect the trace information 100, and is turned on when the system program as the OS is executed. When the trace execution flag is set to ON, the CPU 11 collects the trace information 100 by the system program of the data storage unit 14, and when the trace execution flag is set to OFF, the system of the data storage unit 14 is collected. Trace information is not collected by the program.

図7−2に示すように、データ格納部14は、システムプログラムの実行に使用するデータを格納するエリアであるシステムプログラムデータエリア32、システムプログラム格納エリア33、ユーザプログラム使用エリア34、システムメモリ/スタック確保エリア36を含んで構成されている。   As shown in FIG. 7-2, the data storage unit 14 includes a system program data area 32, a system program storage area 33, a user program use area 34, a system memory / data storage area for storing data used for system program execution. The stack securing area 36 is included.

システムプログラムデータエリア32、システムプログラム格納エリア33、ユーザプログラムの使用エリア34、システムメモリ/スタック確保エリア36はデータ格納部14のワークRAM38のエリアに記憶されている。   A system program data area 32, a system program storage area 33, a user program use area 34, and a system memory / stack securing area 36 are stored in the work RAM 38 area of the data storage unit 14.

システムメモリ/スタック確保エリアは、システムプログラムの動作時に使用されるエリアである。システムプログラムは起動時にワークRAM38に展開され、システムプログラムデータエリア32、システムプログラム格納エリア33、システムメモリ/スタック確保エリア36を使用して動作する。   The system memory / stack securing area is an area used when the system program operates. The system program is expanded in the work RAM 38 at the time of activation, and operates using the system program data area 32, the system program storage area 33, and the system memory / stack securing area 36.

イベントの発生がRAM領域のデータの破壊によるエラーに基づくものである場合は、アドレスエラーが発生している場合が多いため、データ格納部14のシステムプログラムは不正なアクセスを行ったアドレスを格納したトレース情報記憶部15内のエリアのエラー発生アドレスD1から値を取得する。そして、システムプログラムは、エラー発生アドレスD1に0x00000000(NULL)以外のアドレスが格納されているか否かに基づいて、アドレスエラーが発生しているかを判別する(ステップS110)。   If the occurrence of an event is based on an error due to the destruction of data in the RAM area, an address error often occurs. Therefore, the system program of the data storage unit 14 stores the address at which illegal access was made. A value is acquired from the error occurrence address D1 of the area in the trace information storage unit 15. Then, the system program determines whether an address error has occurred based on whether an address other than 0x00000000 (NULL) is stored in the error occurrence address D1 (step S110).

システムプログラムが、アドレスエラーが発生していると判断した場合には(ステップS110、Yes)、エラーアドレスの登録処理を行う(ステップS120)。   If the system program determines that an address error has occurred (step S110, Yes), an error address registration process is performed (step S120).

ここで、図4−2のフローチャートに従ってエラーアドレスの登録処理の手順について説明する。CPU11は、システムプログラムに基づいてトレース情報記憶部15のエラー発生アドレスD1からエラーが発生したアクセスアドレスを取得するとともに、S/Wトレース情報D2からエラーが発生したアドレスと同一のアクセスアドレスを持つ最新の情報(データ)を取得する(ステップS300)。このS/Wトレース情報D2から取得したデータ(アクセスアドレス、アクセスデータ、プログラムカウンタ)がアドレスエラー発生時のデータとなり、デバッグ時に参照される。アドレスエラー発生時のデータを取得すると、過去のアドレスエラー発生場所へのアクセスを記憶するための過去アクセスアドレス情報D5に格納する。過去アクセスアドレス情報D5は、例えばデータ格納部14に格納しておく。システムプログラムは、エラーが発生したアドレスと同一アドレスへのアクセスがエラー発生前に存在するか否かを調べる(ステップS310)。 Here, the procedure of error address registration processing will be described with reference to the flowchart of FIG. The CPU 11 acquires the access address where the error has occurred from the error occurrence address D1 of the trace information storage unit 15 based on the system program, and has the latest access address having the same access address as the address where the error has occurred from the S / W trace information D2. Information (data) is acquired (step S300). Data (access address, access data, program counter) acquired from this S / W trace information D2 becomes data when an address error occurs, and is referred to during debugging. When the data at the time of the address error occurrence is acquired, it is stored in the past access address information D5 for storing the access to the past address error occurrence place. The past access address information D5 is stored in the data storage unit 14, for example. The system program checks whether there is an access to the same address as the address where the error occurred before the error occurs (step S310).

S/Wトレース情報D2に格納されている各情報のアクセスアドレスを検索し、エラーが発生したアドレスと同一アドレスへのアクセスがエラー発生前に存在する場合(ステップS310、Yes)、エラー発生アドレスD1に格納されているアドレスと同一のアドレスを持つデータをそれぞれ過去アクセスアドレス情報D5に追加していく(ステップS320)。   The access address of each piece of information stored in the S / W trace information D2 is searched, and if an access to the same address as the address where the error has occurred exists before the error occurs (Yes in step S310), the error occurrence address D1 The data having the same address as the address stored in is added to the past access address information D5 (step S320).

S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしたか否かを確認する(ステップ330)。そして、S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしていないと判断すると(S/Wトレース情報D2に格納されている各情報のアクセスアドレスが最後のものでないと判断すると)(ステップS330、No)、ステップ310およびステップS320の処理を繰り返す。   It is confirmed whether or not all access addresses existing in the S / W trace information D2 have been checked (step 330). When it is determined that all access addresses existing in the S / W trace information D2 are not checked (when it is determined that the access address of each information stored in the S / W trace information D2 is not the last one) (step (S330, No), the process of step 310 and step S320 is repeated.

一方、S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしたと判断すると(ステップS330、Yes)、トレース情報記憶部15に登録した過去アクセスアドレス情報D5のデータのプログラムカウンタからS/Wトレース情報D2に基づいてバックトレースを行う。そして、エラーが発生したアドレスに移動(エラーアドレスへ移動)した、関数名とタスク名を取得する。すなわち、まず過去アクセスアドレス情報D5に登録されているプログラムカウンタを取得し、このプログラムカウンタ以前のプログラムカウンタを示す動作情報(アクセスアドレス、アクセスデータ、プログラムデータ)をS/Wトレース情報D2から取得する(ステップS340)。   On the other hand, if it is determined that all access addresses existing in the S / W trace information D2 have been checked (step S330, Yes), the S / W trace is determined from the program counter of the data of the past access address information D5 registered in the trace information storage unit 15. A back trace is performed based on the information D2. Then, the function name and task name moved to the address where the error occurred (moved to the error address) are acquired. That is, first, a program counter registered in the past access address information D5 is acquired, and operation information (access address, access data, program data) indicating the program counter before the program counter is acquired from the S / W trace information D2. (Step S340).

システムプログラムは、S/Wトレース情報D2から取得したプログラムカウンタと同一のプログラムカウンタをトレース情報記憶部15の関数コール履歴情報D3から検索する。そして、関数コール履歴情報D3にS/Wトレース情報D2から取得したプログラムカウンタと同一のプログラムカウンタがある場合、検索したプログラムカウンタに対応するタスク名と関数名を関数コール履歴情報D3から取得する(ステップS350)。   The system program searches the function call history information D3 in the trace information storage unit 15 for the same program counter as the program counter acquired from the S / W trace information D2. Then, when the function call history information D3 includes the same program counter as the program counter acquired from the S / W trace information D2, the task name and function name corresponding to the searched program counter are acquired from the function call history information D3 ( Step S350).

システムプログラムは、関数コール履歴情報D3から関数情報(プログラムカウンタ、関数名、引数)を取得できたか否かの判断を行う(ステップS360)。システムプログラムが、関数コール履歴情報D3から関数情報を取得できたと判断した(エラーの発生した関数を発見した)場合(ステップS360、Yes)、アクセスアドレスの情報に関数情報を付加したものを取得情報として、エラー要因を識別するための情報(アドレスエラー)とともにトレース情報記憶部15のエラー発生要因候補D6に登録する(ステップS370)。ステップS370においてエラー要因を登録する際には、新しい動作ほどエラーに対する直接の原因になりやすいと考えられるため、動作が新しい順にエラー発生要因候補D6の上位に位置付けて登録する。   The system program determines whether function information (program counter, function name, argument) has been acquired from the function call history information D3 (step S360). When the system program determines that the function information has been acquired from the function call history information D3 (the function in which the error has occurred is found) (Yes in step S360), the information obtained by adding the function information to the access address information is acquired information Are registered in the error cause candidate D6 of the trace information storage unit 15 together with information (address error) for identifying the error cause (step S370). When registering error factors in step S370, it is considered that new operations are more likely to be a direct cause of errors. Therefore, the operations are registered in the higher order of error occurrence factor candidates D6 in order of newest operations.

一方、システムプログラムが、関数コール履歴情報D3から関数情報を取得できなかったと判断した場合(ステップS360、No)、エラー発生要因候補D6への登録は行わない。   On the other hand, when the system program determines that the function information cannot be acquired from the function call history information D3 (No in step S360), the registration to the error occurrence factor candidate D6 is not performed.

S/Wトレース情報D2から取得したプログラムカウンタと同一のプログラムカウンタを関数コール履歴情報D3から発見するか、又はS/Wトレース情報D2に格納された最古のデータをチェックするまでプログラムカウンタの検索を実施する(プログラムカウンタの検索を繰り返す)。すなわち、S/Wトレース情報D2から取得したプログラムカウンタと同一のプログラムカウンタを関数コール履歴情報D3から発見できない場合は、S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしたか否かを確認する(ステップ380)。そして、S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしていないと判断すると(S/Wトレース情報D2に格納されている各情報のアクセスアドレスが最後のものでないと判断すると)(ステップS380、No)、ステップ350〜ステップS370の処理を繰り返す。   Search the program counter until the same program counter as the program counter acquired from the S / W trace information D2 is found from the function call history information D3 or the oldest data stored in the S / W trace information D2 is checked. (Repeat search of the program counter). That is, if the same program counter as the program counter acquired from the S / W trace information D2 cannot be found from the function call history information D3, it is confirmed whether all access addresses existing in the S / W trace information D2 have been checked. (Step 380). When it is determined that all access addresses existing in the S / W trace information D2 are not checked (when it is determined that the access address of each information stored in the S / W trace information D2 is not the last one) (step (S380, No), the processing of step 350 to step S370 is repeated.

一方、S/Wトレース情報D2に存在するアクセスアドレスを全てチェックしたと判断すると(ステップS380、Yes)、過去アクセスアドレス情報D5に登録されている全てのプログラムカウンタに対し、このプログラムカウンタ以前のプログラムカウンタを示す動作情報をS/Wトレース情報D2からチェックしたか否かを確認する(ステップS390)。そして、過去アクセスアドレス情報D5に登録されている全てのプログラムカウンタに対して動作情報をチェックしていないと判断すると(過去アクセスアドレス情報D5に登録されているプログラムカウンタが最後のものでないと判断すると)(ステップS390、No)、ステップ340〜ステップS380の処理を繰り返す。過去アクセスアドレス情報D5に登録されているプログラムカウンタを全てチェックしたと判断すると(ステップS390、Yes)、エラーアドレスの登録処理を終了する。   On the other hand, if it is determined that all the access addresses existing in the S / W trace information D2 have been checked (step S380, Yes), all the program counters registered in the past access address information D5 are programmed before this program counter. It is confirmed whether or not the operation information indicating the counter is checked from the S / W trace information D2 (step S390). When it is determined that the operation information is not checked for all program counters registered in the past access address information D5 (when it is determined that the program counter registered in the past access address information D5 is not the last one). (Step S390, No), the processing of Step 340 to Step S380 is repeated. If it is determined that all program counters registered in the past access address information D5 have been checked (step S390, Yes), the error address registration process is terminated.

図4−1のステップS110において、システムプログラムによってアドレスエラーが発生していないと判断された場合(ステップS110、No)、またはエラーアドレスの登録処理(ステップS120)が終了すると、動作中のシステムプログラムから現存する全タスクのスタック情報を取得し、スタックオーバフローが発生していないかをチェックする。このスタックオーバフローによりRAM領域のデータを破壊しているか否かを調べる。   In step S110 of FIG. 4-1, when it is determined by the system program that no address error has occurred (step S110, No), or when the error address registration process (step S120) is completed, the system program in operation The stack information of all existing tasks is acquired from, and it is checked whether stack overflow has occurred. It is checked whether or not the data in the RAM area is destroyed by this stack overflow.

スタックオーバフローが発生している場合は、スタックオーバフローによってRAM領域のデータを破壊したことがエラー要因であると明確であるので、エラー発生要因候補D6の最上位に位置付けて、システムプログラムが取得したタスク名、最終実行関数名を記憶する(ステップS130)。   If a stack overflow has occurred, it is clear that the data in the RAM area has been destroyed due to the stack overflow, which is the cause of the error. Therefore, the task acquired by the system program is positioned at the top of the error cause candidate D6. Name and final execution function name are stored (step S130).

そして、スタックオーバフローが発生していないかのチェックをシステムプログラムの全タスクに対して行ったか否かを確認する(ステップS140)。スタックオーバフローを全てのタスクに対してチェックしていない場合は、ステップS130の処理を繰り返す。一方、スタックオーバフローを全てのタスクに対してチェックした場合は、スタックオーバフローが発生しているタスクが存在するか否かを確認する(ステップS150)。   Then, it is confirmed whether or not a check for stack overflow has been performed for all tasks of the system program (step S140). If the stack overflow is not checked for all tasks, the process of step S130 is repeated. On the other hand, when the stack overflow is checked for all tasks, it is confirmed whether there is a task in which the stack overflow has occurred (step S150).

スタックオーバフローのチェックを行った結果、スタックオーバフローが発生しているタスクが存在しないと判断された場合(ステップS150、No)、無限ループしているタスクが存在するという原因でWDTエラーなどが発生している場合があるので、サスペンド(一時停止)しているタスクがあるか否かの確認を行う(ステップS160)。   As a result of checking the stack overflow, if it is determined that there is no task in which a stack overflow has occurred (No in step S150), a WDT error or the like occurs due to the existence of an infinite loop task. Therefore, it is confirmed whether or not there is a suspended task (step S160).

サスペンドしているタスクがあるか否かの確認を行うため、OSであるシステムプログラムからタスク情報を取得し、サスペンド状態となっているタスクが存在するかを判断する。そして、サスペンド状態のタスクが存在すると判断された場合には(ステップS160、Yes)、無限ループが発生している可能性があるので、無限ループが発生している箇所がないかを調べる。   In order to check whether there is a suspended task, task information is obtained from the system program that is the OS, and it is determined whether there is a suspended task. If it is determined that there is a suspended task (step S160, Yes), there is a possibility that an infinite loop has occurred, so it is checked whether there is a place where an infinite loop has occurred.

具体的には、OSであるシステムプログラムからサスペンド状態のタスクのプライオリティ(優先度)を取得(サスペンド状態のタスクが複数存在する場合は一番高いプライオリティを取得)し、取得したプライオリティ以上で動作しているタスクの中で一番プライオリティの低いタスクで無限ループが発生している可能性が高いため、OSであるシステムプログラムによって例えばこのプライオリティの低いタスクの現在の実行位置を取得する。   Specifically, it obtains the priority (priority) of the suspended task from the system program that is the OS (obtains the highest priority when there are multiple suspended tasks), and operates at the above priority or higher. Since there is a high possibility that an infinite loop has occurred in the task with the lowest priority among the tasks being executed, for example, the current execution position of the task with the lower priority is acquired by the system program that is the OS.

無限ループしている可能性のあるタスク実行位置を取得した後、S/Wトレース情報D2のプログラムカウンタから無限ループしている可能性のあるタスク実行位置と同一の値が存在するか否かを調べる。S/Wトレース情報D2に同一の値のプログラムカウンタが多数(例えば100以上)存在する場合は無限ループが発生していると判断し、エラー要因(サスペンド)、タスク名およびプログラムカウンタをエラー発生要因候補D6に登録する(ステップS170)。   After acquiring the task execution position that may be in an infinite loop, whether or not the same value as the task execution position that may be in an infinite loop exists from the program counter of the S / W trace information D2 Investigate. If there are many (for example, 100 or more) program counters with the same value in the S / W trace information D2, it is determined that an infinite loop has occurred, and the error cause (suspend), task name, and program counter are the cause of the error. The candidate D6 is registered (step S170).

ここでは、エラー発生の要因(サスペンド)が明確であり、アドレスエラーやスタックオーバフローが検出されていない時にのみ検出すると考えられるため、エラー発生要因候補D6の最上位に位置付けて記憶する。   Here, since the cause (suspend) of the error occurrence is clear and is considered to be detected only when no address error or stack overflow is detected, the error occurrence factor candidate D6 is positioned and stored.

エラー発生要因候補D6に記憶した全情報のアクセスアドレス、プログラムカウンタに対して、トレース情報のシステムプログラム使用エリア情報D4の範囲内であるかを判別する。そして、アクセスアドレスやプログラムカウンタが、システムプログラム使用エリア情報D4の範囲内である場合は、エラー発生要因がシステムプログラムであると判断し、システムプログラム使用エリア情報D4の範囲外である場合は、エラー発生要因がユーザプログラムであると判断する。   It is determined whether the access address and program counter of all the information stored in the error occurrence factor candidate D6 are within the range of the system program use area information D4 of the trace information. If the access address or the program counter is within the range of the system program use area information D4, it is determined that the cause of the error is the system program, and if it is outside the range of the system program use area information D4, It is determined that the generation factor is a user program.

エラー発生原因の各項目に対するエラー発生要因がシステムプログラムか、ユーザプログラムであるかの判断結果は、各エラー発生要因候補D6に追加して記憶する(ステップS180)。   The determination result as to whether the error cause for each error cause item is a system program or a user program is added to each error cause candidate D6 and stored (step S180).

プログラム記憶部(標準ROM)16または記憶媒体接続部19に装着した記憶媒体(CFカード等)に、エラー要因の候補としてリストアップされたエラー発生要因候補D6を記憶したファイルであるエラー発生要因判別ファイルとトレース情報(D1〜D4)を記憶したファイルであるトレースデータファイルを保存する(ステップS190)。   Error cause determination that is a file that stores error cause candidates D6 listed as error cause candidates in a program storage unit (standard ROM) 16 or a storage medium (such as a CF card) attached to the storage medium connection unit 19 A trace data file which is a file storing the file and the trace information (D1 to D4) is saved (step S190).

プログラム記憶部16によって記憶されたエラー発生要因判別ファイルやトレースデータファイルは、例えばWEB(ウェブ)ページとして記憶しておく。そして、コントローラ10とインターネット2に接続されたネットワーク機器1からの要求に応じてWEBページの情報をネットワーク機器1に送受信部13から送信する。コントローラ10に対して遠隔地のネットワーク機器1は、インターネット2を介してエラー発生要因判別ファイルやトレースデータファイルを取得することが可能となる。   The error cause determination file and the trace data file stored by the program storage unit 16 are stored as, for example, a WEB (web) page. Then, in response to a request from the network device 1 connected to the controller 10 and the Internet 2, information on the WEB page is transmitted from the transmission / reception unit 13 to the network device 1. The network device 1 that is remote from the controller 10 can acquire an error occurrence factor determination file and a trace data file via the Internet 2.

これにより、エラー発生要因判別ファイルやトレースデータファイルに基づいてユーザプログラム(高級言語プログラム)の動作状況のトレースおよびエラー時の要因判別を容易に確認することが可能となる。   As a result, it is possible to easily confirm the trace of the operation status of the user program (high-level language program) and the cause determination at the time of error based on the error occurrence cause determination file and the trace data file.

また、アクセスアドレスやプログラムカウンタが、システムプログラム使用エリア情報D4の範囲内であるか否かに基づいてエラー発生要因がシステムプログラムか、ユーザプログラムであるかの情報をエラー発生要因候補D6に登録するので、不具合の発生箇所がOSであるシステムプログラムであるかユーザプログラムであるかを簡易に判断することが可能となる。   Further, based on whether the access address and the program counter are within the range of the system program use area information D4, information indicating whether the error cause is a system program or a user program is registered in the error cause candidate D6. Therefore, it is possible to easily determine whether a failure occurs in a system program that is an OS or a user program.

このように実施の形態1によれば、コントローラ10がクロス開発環境下にない状態で組み込み型の高級言語プログラムを動作させて動作状況のトレースおよびエラー時の要因判別を容易に確認することが可能となる。また、コントローラ10がC言語等の高級言語プログラムの不具合発生箇所の絞り込み(特定)を行うので、デバッグ時の不具合箇所特定に要する時間を短縮することが可能となる。また、コントローラ10において不具合発生時のデータを確認することができるため、デバッグの再発生を防止する環境を整える時間を短縮することが可能となる。   As described above, according to the first embodiment, it is possible to easily check the trace of the operation status and the cause determination at the time of the error by operating the embedded high-level language program without the controller 10 being in the cross development environment. It becomes. In addition, since the controller 10 narrows down (specifies) the occurrence of a defect in a high-level language program such as C language, it is possible to reduce the time required for specifying the defect part during debugging. Further, since data at the time of occurrence of a failure can be confirmed in the controller 10, it is possible to shorten the time for preparing an environment for preventing the reoccurrence of debugging.

実施の形態2.
図4−1、図4−2、図6−1および図8に従って実施の形態2に係るコントローラを説明する。実施の形態2においては、コントローラ10がトレース回路(動作情報取得回路)40を備え、トレース回路40がS/Wによるトレースを補助する。
Embodiment 2. FIG.
A controller according to the second embodiment will be described with reference to FIGS. 4-1, 4-2, 6-1 and 8. FIG. In the second embodiment, the controller 10 includes a trace circuit (operation information acquisition circuit) 40, and the trace circuit 40 assists tracing by S / W.

図8は、実施の形態2に係るコントローラの構成を示すブロック図である。図8の各構成要素のうち図2に示す実施の形態1のコントローラと同一の機能をする構成要素については同一番号を付しており、重複する説明は省略する。   FIG. 8 is a block diagram illustrating a configuration of a controller according to the second embodiment. Of the constituent elements in FIG. 8, constituent elements having the same functions as those of the controller of the first embodiment shown in FIG. 2 are denoted by the same reference numerals, and redundant description is omitted.

図8に示すように、本実施の形態2におけるコントローラ10は、トレース回路40を備える。トレース回路40は、データ格納部14からCPU11への命令やデータなどのプログラム動作情報をトレース情報記憶部15に書き込む。すなわち、トレース回路40は、CPU11がユーザプログラムによる処理を開始すると、コントローラ10が動作している間、アクセスアドレス、アクセスデータ、プログラムカウンタを収集してH/Wトレース情報D7(図示せず)に格納する。   As shown in FIG. 8, the controller 10 according to the second embodiment includes a trace circuit 40. The trace circuit 40 writes program operation information such as instructions and data from the data storage unit 14 to the CPU 11 in the trace information storage unit 15. That is, when the CPU 11 starts processing by the user program, the trace circuit 40 collects access addresses, access data, and program counters while the controller 10 is operating, and stores them in the H / W trace information D7 (not shown). Store.

実施の形態1にいてはシステムプログラムによってS/Wトレース情報D2をトレース情報記憶部15に記憶させたが、本実施の形態2においてはトレース回路40によって
H/W(ハードウェア)トレース情報D7をトレース情報記憶部15に記憶させる。H/Wトレース情報D7は、図6−1に示した実施の形態1のS/Wトレース情報D2と同様の情報(アクセスアドレス、アクセスデータ、プログラムカウンタ)を含んでいる。
In the first embodiment, the S / W trace information D2 is stored in the trace information storage unit 15 by the system program. In the second embodiment, the trace circuit 40 stores the H / W (hardware) trace information D7. The information is stored in the trace information storage unit 15. The H / W trace information D7 includes the same information (access address, access data, program counter) as the S / W trace information D2 of the first embodiment shown in FIG.

本実施の形態2のコントローラ10も図4−1や図4−2で説明した実施の形態1のコントローラと同様の動作手順によってエラーの判別処理を行う。すなわち、システムプログラムの起動時に、システムプログラムによってシステムプログラム使用エリア情報D4をトレース情報記憶部15のトレース情報100に記憶しておく。そして、ユーザプログラムの実行時にはトレース回路40によってデータのトレースを行い、この情報をH/Wトレース情報D7としてトレース情報記憶部15のトレース情報100に記憶する。また、システムプログラムのトレース機能によって関数コール履歴情報D3を取得し、トレース情報記憶部15のトレース情報100に記憶する。ユーザプログラムの実行において、エラーが発生すると、エラー発生アドレスD1、システムプログラム使用エリア情報D4、H/Wトレース情報D7、関数コール履歴情報D3に基づいてエラー要因の判別処理等を行い、エラー発生要因判別ファイル、トレースデータファイルとしてプログラム記憶部16等に保存する。このトレース回路40(ハードウェア)によるトレース処理によってCPU11の負荷を減少させることが可能となり、制御装置としての性能の劣化を防止できる。   The controller 10 of the second embodiment also performs error determination processing according to the same operation procedure as that of the controller of the first embodiment described with reference to FIGS. 4A and 4B. That is, when the system program is started, the system program use area information D4 is stored in the trace information 100 of the trace information storage unit 15 by the system program. When the user program is executed, data is traced by the trace circuit 40, and this information is stored in the trace information 100 of the trace information storage unit 15 as H / W trace information D7. Further, the function call history information D3 is acquired by the trace function of the system program and stored in the trace information 100 of the trace information storage unit 15. When an error occurs during execution of the user program, error factor determination processing is performed based on the error occurrence address D1, system program use area information D4, H / W trace information D7, and function call history information D3. The determination file and the trace data file are stored in the program storage unit 16 or the like. Trace processing by the trace circuit 40 (hardware) makes it possible to reduce the load on the CPU 11 and prevent performance deterioration as a control device.

このように実施の形態2によれば、トレースの情報量が多いアクセスアドレス、アクセスデータ、プログラムカウンタをH/Wトレース情報D7としてトレース回路40が取得するので、システムプログラム(ソフトウェア)によって収集するトレース情報を減少させることが可能となる。したがって、コントローラ10によるプログラムの実行時にCPU11にかかるトレース情報収集時の負荷を軽減させた状態で、トレースおよびエラー時の要因判別(高級言語プログラムの不具合発生箇所の特定)を効率的に行うことが可能となる。   As described above, according to the second embodiment, since the trace circuit 40 acquires the access address, access data, and program counter with a large amount of trace information as the H / W trace information D7, the trace collected by the system program (software) Information can be reduced. Therefore, it is possible to efficiently perform trace and error determination (specification of a defect occurrence point of a high-level language program) while reducing the load at the time of collecting trace information on the CPU 11 when the program is executed by the controller 10. It becomes possible.

実施の形態3.
図2、図4−2および図9−1〜図11−2に従って実施の形態3に係るコントローラを説明する。実施の形態3においては、OSとなるシステムプログラム(後述するメインOS)が動作しなくなるエラーが発生した際に、エラー時でも動作可能なOS(後述するサブOS)に切替えて、エラー解析等を行う。
Embodiment 3 FIG.
The controller according to the third embodiment will be described with reference to FIGS. 2, 4-2 and FIGS. 9-1 to 11-2. In the third embodiment, when an error occurs that prevents the system program (main OS, which will be described later) from operating, an error analysis or the like is performed by switching to an OS (sub-OS, which will be described later) that can operate even when an error occurs. Do.

実施の形態3においては、図2に示した実施の形態1に係るコントローラ10または図8に示した実施の形態2に係るコントローラ10によってトレースやエラーの要因判別を行う。   In the third embodiment, trace or error factor determination is performed by the controller 10 according to the first embodiment shown in FIG. 2 or the controller 10 according to the second embodiment shown in FIG.

コントローラ10は、プログラム記憶部16に、通常時にOSとして動作するシステムプログラム(以下、メインOSという)、エラー時にOSとして動作するシステムプログラム(以下、サブOSという)を記憶している。   The controller 10 stores in the program storage unit 16 a system program that operates as an OS during normal operation (hereinafter referred to as a main OS) and a system program that operates as an OS during an error (hereinafter referred to as a sub OS).

メインOSはシステムプログラムの起動時にデータ格納部14のワークRAMに展開され、ワークRAMの該当エリアとシステムメモリ/スタック確保エリア36を使用して動作する。   The main OS is expanded in the work RAM of the data storage unit 14 when the system program is activated, and operates using the corresponding area of the work RAM and the system memory / stack securing area 36.

図9−1は、実施の形態3に係るメインOSの機能ブロックの一例を示す図であり、図9−2は、実施の形態3に係るサブOSの機能ブロックの一例を示す図である。図9−1および図9−2の各構成要素のうち図3に示す実施の形態1のシステムプログラムと同一の機能を達成する構成要素については同一番号を付しており、重複する説明は省略する。   FIG. 9A is a diagram illustrating an example of functional blocks of the main OS according to the third embodiment, and FIG. 9B is a diagram illustrating an example of functional blocks of the sub OS according to the third embodiment. Of the components shown in FIGS. 9-1 and 9-2, components that achieve the same functions as those of the system program according to the first embodiment shown in FIG. To do.

図9−1に示すように、メインOSは、記憶媒体I/F機能ブロック20、スクリプト機能ブロック21、エラー要因診断機能ブロック22、サーバ機能ブロック23、トレース機能ブロック24、システムエリア記憶機能ブロック25、外部機器I/F機能ブロック27に加えてOS切替機能ブロック26を備えている。   As shown in FIG. 9A, the main OS includes a storage medium I / F function block 20, a script function block 21, an error factor diagnosis function block 22, a server function block 23, a trace function block 24, and a system area storage function block 25. In addition to the external device I / F function block 27, an OS switching function block 26 is provided.

OS切替機能ブロック26は、メインOSが機能しなくなるようなエラーが発生した際に、エラー要因診断機能を安定して動作させるため、OSをメインOSからサブOSに切替える機能ブロックである。   The OS switching function block 26 is a functional block for switching the OS from the main OS to the sub-OS in order to stably operate the error factor diagnosis function when an error that causes the main OS to stop functioning occurs.

図9−2に示すように、サブOSは、記憶媒体I/F機能ブロック20、エラー要因診断機能ブロック22、サーバ機能ブロック23、外部機器I/F機能ブロック27を備えている。サブOSはエラー情報分析のためのOSであるので、トレース情報を収集する機能(トレース機能ブロック24、システムエリア記憶機能ブロック25)を備えていない。サブOSは、スクリプト機能ブロック21、トレース機能ブロック24、システムエリア記憶機能ブロック25を備えていないため、システムプログラムが動作しなくなるエラーが発生した場合であっても、安定した状態でのエラー要因の判別を行なうことが可能となる。   As illustrated in FIG. 9B, the sub OS includes a storage medium I / F function block 20, an error factor diagnosis function block 22, a server function block 23, and an external device I / F function block 27. Since the sub-OS is an OS for analyzing error information, it does not have a function of collecting trace information (trace function block 24, system area storage function block 25). Since the sub-OS does not include the script function block 21, the trace function block 24, and the system area storage function block 25, even if an error that causes the system program to not operate occurs, Discrimination can be performed.

つぎに、図4−2および図10に従ってコントローラ10の動作を説明する。図10は、実施の形態3に係るコントローラの動作手順を示すフローチャートである。なお、図10に示す動作手順のうち、図4−1に示す実施の形態1に係るコントローラの動作と同様の動作を行う動作処理については詳細な説明は省略する。   Next, the operation of the controller 10 will be described with reference to FIGS. FIG. 10 is a flowchart illustrating an operation procedure of the controller according to the third embodiment. Note that, in the operation procedure illustrated in FIG. 10, detailed description of the operation processing that performs the same operation as the operation of the controller according to the first embodiment illustrated in FIG. 4A is omitted.

コントローラ10を起動するとプログラム記憶部16に格納しているメインOSをデータ格納部14に展開する。また、ユーザプログラムを起動するとプログラム記憶部16に格納しているメインOSをデータ格納部14に展開する。   When the controller 10 is activated, the main OS stored in the program storage unit 16 is expanded in the data storage unit 14. When the user program is activated, the main OS stored in the program storage unit 16 is expanded in the data storage unit 14.

CPU11がシステムプログラム(メインOS)を起動すると、ユーザプログラムが開始される前に、メインOSが使用しているデータ格納部14のRAM領域に関する情報を、データ格納部14から取得し、システムプログラム使用エリア情報D4へ格納する。   When the CPU 11 activates the system program (main OS), before the user program is started, information on the RAM area of the data storage unit 14 used by the main OS is acquired from the data storage unit 14 and the system program is used. Store in area information D4.

また、CPU11がユーザプログラムによる処理を開始すると、コントローラ10が動作している間、S/Wトレース情報D2と関数コール履歴情報D3を収集してトレース情報100としてトレース情報記憶部15に格納する。   When the CPU 11 starts processing by the user program, the S / W trace information D2 and the function call history information D3 are collected and stored as the trace information 100 in the trace information storage unit 15 while the controller 10 is operating.

CPU11によってプログラム処理が実行されている時に、メインOSが機能しなくなるようなエラーが発生するとメインOSが完全に停止する前にエラーが発生したアドレスをエラー発生アドレスD1としてトレース情報記憶部15のトレース情報100に格納する。   When an error that causes the main OS to stop functioning while the program processing is being executed by the CPU 11, the address in which the error has occurred before the main OS is completely stopped is set as the error occurrence address D1 in the trace of the trace information storage unit 15. Store in the information 100.

OS切替機能によってメインOSからサブOSに切り替わった場合にも、このトレース情報100を参照するため、エラー発生アドレスD1、H/Wトレース情報D2、関数コール履歴情報D3、システムプログラム使用エリア情報D4はそれぞれ固定の領域を使用して格納しておく。メインOSはエラーの発生後、メインOSが完全に停止する前にプログラム記憶部16の後述するサブOS起動信号31をONにし、OSのリブートを実行する。   Even when the OS is switched from the main OS to the sub-OS by the OS switching function, the error occurrence address D1, H / W trace information D2, function call history information D3, and system program use area information D4 are stored in order to refer to the trace information 100. Each is stored using a fixed area. After the error occurs, the main OS turns on a sub-OS activation signal 31 (to be described later) in the program storage unit 16 before the main OS is completely stopped, and reboots the OS.

ここで、本実施の形態3に係るプログラム記憶部16内の構成およびデータ格納部14の構成について説明する。図11−1は実施の形態3に係るプログラム記憶部のメモリマップを示す図であり、図11−2は実施の形態3に係るデータ格納部のメモリマップを示す図である。図11−1の各構成要素のうち図7−1に示す実施の形態1のプログラム記憶部のメモリマップと同一の機能をする構成要素については同一番号を付しており、重複する説明は省略する。また、図11−2の各構成要素のうち図7−2に示す実施の形態1のデータ格納部のメモリマップと同一の機能をする構成要素については同一番号を付しており、重複する説明は省略する。   Here, the configuration in the program storage unit 16 and the configuration of the data storage unit 14 according to the third embodiment will be described. 11A is a diagram illustrating a memory map of the program storage unit according to the third embodiment, and FIG. 11B is a diagram illustrating a memory map of the data storage unit according to the third embodiment. Among the constituent elements in FIG. 11A, constituent elements having the same functions as those in the memory map of the program storage unit of the first embodiment shown in FIG. To do. In addition, among the constituent elements in FIG. 11B, constituent elements having the same functions as those in the memory map of the data storage unit of the first embodiment shown in FIG. Is omitted.

プログラム記憶部16は、メインOSを格納するエリア(メインOS格納エリア58)、サブOSを格納するエリア(サブOS格納エリア59)、ユーザプログラム格納エリア30、サブOS起動信号を格納するエリア(サブOS起動信号31)、トレース実行フラグを格納するエリア(トレース実行フラグ39)を含んで構成されている。   The program storage unit 16 includes an area for storing the main OS (main OS storage area 58), an area for storing the sub OS (sub OS storage area 59), a user program storage area 30, and an area for storing the sub OS activation signal (sub The OS start signal 31) and an area for storing a trace execution flag (trace execution flag 39) are included.

メインOS格納エリア58、サブOS格納エリア59、ユーザプログラム格納エリア30は、標準ROMのエリア37に記憶され、サブOS起動信号31、トレース実行フラグ39は標準ROM以外のエリアに記憶されている。   The main OS storage area 58, the sub OS storage area 59, and the user program storage area 30 are stored in the standard ROM area 37, and the sub OS activation signal 31 and the trace execution flag 39 are stored in areas other than the standard ROM.

サブOS起動信号31は、メインOSからサブOSへの変更を行うか否かを決定する情報である。サブOS起動信号31がONのとき、サブOSによってユーザプログラムの実行を行い、サブOS起動信号31がOFFのとき、メインOSによってユーザプログラムの実行を行う。   The sub OS activation signal 31 is information for determining whether or not to change from the main OS to the sub OS. When the sub OS activation signal 31 is ON, the user program is executed by the sub OS, and when the sub OS activation signal 31 is OFF, the user program is executed by the main OS.

図11−2に示すように、データ格納部14は、メインOSの実行に使用するデータを格納するエリアであるメインOSデータエリア52、メインOS格納エリア53、ユーザプログラム使用エリア34、サブOSの実行に使用するデータを格納するエリアであるサブOSデータエリア35、システムメモリ/スタック確保エリア36を含んで構成されている。   As shown in FIG. 11B, the data storage unit 14 includes a main OS data area 52, a main OS storage area 53, a user program use area 34, and a sub OS for storing data used for executing the main OS. The sub-OS data area 35, which is an area for storing data used for execution, and a system memory / stack securing area 36 are configured.

メインOSデータエリア52、メインOS格納エリア53、ユーザプログラムの使用エリア34、サブOSデータエリア35、システムメモリ/スタック確保エリア36はデータ格納部14のワークRAM38のエリアに記憶されている。   A main OS data area 52, a main OS storage area 53, a user program use area 34, a sub OS data area 35, and a system memory / stack securing area 36 are stored in the work RAM 38 area of the data storage unit 14.

サブOS起動信号31がONした状態でリブートされると、起動プログラムは前回のエラー状態を保持するためRAMエリアを初期化せずに、プログラム記憶部16の標準ROM37上のサブOSの先頭アドレスにジャンプする。   When rebooting with the sub-OS activation signal 31 turned ON, the activation program retains the previous error state, and does not initialize the RAM area, but at the top address of the sub-OS on the standard ROM 37 of the program storage unit 16. Jump.

ここでのサブOSはROM常駐型で動作するプログラムの形式をとる。すなわち、サブOSは、サブOSの動作に必要となるデータのみをデータ格納部14のRAM領域に確保し、サブOSのデータ以外の部分はプログラム記憶部16を参照してプログラムを実行する。   The sub-OS here takes the form of a program that operates in a ROM-resident manner. That is, the sub OS secures only data necessary for the operation of the sub OS in the RAM area of the data storage unit 14, and executes the program with reference to the program storage unit 16 for portions other than the data of the sub OS.

サブOSの実行時は、トレース実行フラグ39がOFFになり、トレース情報の収集が終了する(ステップS100)。そして、サブOSはOS起動後に実施の形態1で説明した処理を関数コールして、高級言語プログラムのエラー要因の判別を実施する。すなわち、イベントの発生がRAM領域のデータの破壊によるエラーに基づくものである場合、データ格納部14のメインOSは不正なアクセスを行ったアドレスを格納したトレース情報記憶部15内のエリアのエラー発生アドレスD1から値を取得しアドレスエラーが発生しているかを判別する(ステップS110)。   When the sub OS is executed, the trace execution flag 39 is turned OFF and the collection of the trace information is finished (step S100). Then, the sub-OS performs a function call to the processing described in the first embodiment after the OS is started, and determines the error factor of the high-level language program. That is, when the occurrence of an event is based on an error due to the destruction of data in the RAM area, the main OS of the data storage unit 14 generates an error in the area in the trace information storage unit 15 that stores the address where the illegal access was made. A value is acquired from the address D1 to determine whether an address error has occurred (step S110).

サブOSが、アドレスエラーが発生していると判断した場合には、エラーアドレスの登録処理を行う(ステップS120)。エラーアドレスの登録処理は、図4−2に示した実施の形態1と同様の処理によって行なう。エラーアドレスの登録処理は、本実施の形態3においてはサブOSに基づいて行なう。これにより、アクセスアドレスの情報に関数情報を付加したもの(取得情報)がエラー要因(アドレスエラー)とともにトレース情報記憶部15のエラー発生要因候補D6に登録される(ステップS370)。   If the sub OS determines that an address error has occurred, an error address registration process is performed (step S120). The error address registration process is performed by the same process as in the first embodiment shown in FIG. The error address registration process is performed based on the sub-OS in the third embodiment. Thus, the access address information added with function information (acquired information) is registered in the error cause candidate D6 of the trace information storage unit 15 together with the error cause (address error) (step S370).

サブOSによってアドレスエラーが発生していないと判断された場合(ステップS110、No)、またはエラーアドレスの登録処理(ステップS120)が終了すると、エラー発生要因候補D6に記憶した全情報のアクセスアドレス、プログラムカウンタに対して、トレース情報のシステムプログラム使用エリア情報D4の範囲内であるかを判別する。そして、アクセスアドレスやプログラムカウンタが、システムプログラム使用エリア情報D4の範囲内である場合は、エラー発生要因がシステムプログラム(メインOS)であると判断し、システムプログラム使用エリア情報D4の範囲外である場合は、エラー発生要因がユーザプログラムであると判断する。   When it is determined by the sub-OS that no address error has occurred (No in step S110), or when the error address registration process (step S120) is completed, the access address of all the information stored in the error cause candidate D6, It is determined whether the program counter is within the range of the system program use area information D4 of the trace information. If the access address or the program counter is within the range of the system program use area information D4, it is determined that the cause of the error is the system program (main OS), and is outside the range of the system program use area information D4. In this case, it is determined that the error occurrence factor is the user program.

エラー発生原因の各項目に対するエラー発生要因がシステムプログラムか、ユーザプログラムであるかの情報は、各エラー発生要因候補D6に追加する(ステップS180)。プログラム記憶部(標準ROM)16または記憶媒体接続部19に装着した記憶媒体(CFカード等)に、エラー要因の候補としてリストアップされたエラー発生要因候補D6とトレース情報(D1〜D4)を、エラー発生要因候補D6を保存したファイルであるエラー発生要因判別ファイル、トレース情報を保存したファイルであるトレースデータファイルとして保存する(ステップS190)。   Information indicating whether the error cause for each error cause item is a system program or a user program is added to each error cause candidate D6 (step S180). Error generation factor candidates D6 and trace information (D1 to D4) listed as error factor candidates in the program storage unit (standard ROM) 16 or a storage medium (CF card or the like) attached to the storage medium connection unit 19 An error occurrence factor determination file, which is a file in which the error cause candidate D6 is saved, and a trace data file, which is a file in which trace information is saved, are saved (step S190).

このようにエラー発生時は、ユーザプログラムを登録するスクリプト機能ブロック21を備えないサブOSによって、エラー要因の判別を行なっているため、ユーザプログラムの登録などシステムプログラムが予期しない外部要因を取り除いた状態の安定したコントローラ10の動作を保証している。   Thus, when an error occurs, the error cause is determined by the sub-OS that does not include the script function block 21 for registering the user program, and therefore, the system program has removed unexpected external factors such as registration of the user program. The stable operation of the controller 10 is guaranteed.

なお、本実施の形態3においては、メインOSが正常に動作できなくなるようなエラーを検出した際に、サブOS起動信号をONにしてリブートを実行することとしたが、
メインOSのリブート処理が実行される場合やシステムWDTが発生した場合にサブOS起動信号をONにしてリブートを実行してもよい。
In the third embodiment, when an error that prevents the main OS from operating normally is detected, the sub OS activation signal is turned on to execute the reboot.
When the reboot process of the main OS is executed or when a system WDT occurs, the sub OS activation signal may be turned on to execute the reboot.

メインOSがシステムWDTを検出した場合は割込みベクタに登録されているプログラムからサブOS起動信号をONしてOSのリブートを実行する。また、サーバ機能、エラー要因診断機能について機能別にWDTを設けておき、メインOSはこれらの機能の動作が正常であるかを監視するとともに、WDTが発生した場合にサブOS起動信号をONしてOSのリブートを実行するようにしてもよい。   When the main OS detects the system WDT, the sub-OS activation signal is turned ON from the program registered in the interrupt vector, and the OS is rebooted. In addition, WDT is provided for each server function and error factor diagnosis function, and the main OS monitors whether the operation of these functions is normal, and turns on the sub-OS activation signal when WDT occurs. The OS may be rebooted.

このように実施の形態3によれば、メインOSが機能しなくなるようなプログラムエラーが発生した場合であっても、安定した状態で動作可能なサブOSに切替えてプログラムの一時診断を行なうことが可能となる。   As described above, according to the third embodiment, even when a program error that causes the main OS to stop functioning is performed, the program is temporarily diagnosed by switching to a sub-OS that can operate in a stable state. It becomes possible.

以上のように、本発明にかかるコントローラは、高級言語プログラムのトレースに適している。   As described above, the controller according to the present invention is suitable for tracing a high-level language program.

実施の形態1に係るコントローラを備えたデバッグシステムのシステム構成図である。1 is a system configuration diagram of a debug system including a controller according to a first embodiment. 実施の形態1に係るコントローラの構成を示すブロック図である。2 is a block diagram illustrating a configuration of a controller according to Embodiment 1. FIG. 実施の形態1に係るシステムプログラムの機能ブロックを示す図である。3 is a diagram showing functional blocks of a system program according to Embodiment 1. FIG. コントローラの動作手順を示すフローチャートである。It is a flowchart which shows the operation | movement procedure of a controller. エラーアドレスを登録する手順を示すフローチャートである。It is a flowchart which shows the procedure which registers an error address. トレース情報の構成を示す図である。It is a figure which shows the structure of trace information. S/Wトレース情報を説明するための図である。It is a figure for demonstrating S / W trace information. 関数コール履歴情報を説明するための図である。It is a figure for demonstrating function call log information. システムプログラム使用エリア情報を説明するための図である。It is a figure for demonstrating system program use area information. 実施の形態1に係るプログラム記憶部のメモリマップを示す図である。4 is a diagram showing a memory map of a program storage unit according to Embodiment 1. FIG. 実施の形態1に係るデータ格納部のメモリマップを示す図である。4 is a diagram showing a memory map of a data storage unit according to Embodiment 1. FIG. 実施の形態2に係るコントローラの構成を示すブロック図である。FIG. 6 is a block diagram illustrating a configuration of a controller according to a second embodiment. 実施の形態3に係るメインOSの機能ブロックを示す図である。FIG. 10 is a diagram illustrating functional blocks of a main OS according to a third embodiment. 実施の形態3に係るサブOSの機能ブロックを示す図である。FIG. 10 is a diagram illustrating functional blocks of a sub OS according to a third embodiment. 実施の形態3に係るコントローラの動作手順を示すフローチャートである。10 is a flowchart illustrating an operation procedure of the controller according to the third embodiment. 実施の形態3に係るプログラム記憶部のメモリマップを示す図である。FIG. 10 is a diagram showing a memory map of a program storage unit according to the third embodiment. 実施の形態3に係るデータ格納部のメモリマップを示す図である。FIG. 10 is a diagram showing a memory map of a data storage unit according to the third embodiment.

符号の説明Explanation of symbols

1 ネットワーク機器
2 インターネット
3 生産システム
9 CPUバス
10 コントローラ
11 CPU
12 周辺機器接続部
13 送受信部
14 データ格納部
15 トレース情報記憶部
16 プログラム記憶部
18 データ変換部
19 記憶媒体接続部
20 記憶媒体I/F機能ブロック
21 スクリプト機能ブロック
22 エラー要因診断機能ブロック
23 サーバ機能ブロック
24 トレース機能ブロック
25 システムエリア記憶機能ブロック
26 切替機能ブロック
27 外部機器I/F機能ブロック
28 システムプログラム格納エリア
30 ユーザプログラム格納エリア
31 サブOS起動信号
32 システムプログラムデータエリア
33 システムプログラム格納エリア
34 ユーザプログラム使用エリア
35 サブOSデータエリア
36 システムメモリ/スタック確保エリア
37 標準ROMエリア
38 ワークRAM
39 トレース実行フラグ
40 トレース回路
41 電源
42 ユニット
45 PLCバス
52 メインOSデータエリア
53 メインOS格納エリア
58 メインOS格納エリア
59 サブOS格納エリア
100 トレース情報
1 Network equipment 2 Internet 3 Production system 9 CPU bus 10 Controller 11 CPU
DESCRIPTION OF SYMBOLS 12 Peripheral device connection part 13 Transmission / reception part 14 Data storage part 15 Trace information storage part 16 Program storage part 18 Data conversion part 19 Storage medium connection part 20 Storage medium I / F functional block 21 Script function block 22 Error factor diagnostic function block 23 Server Function block 24 Trace function block 25 System area storage function block 26 Switching function block 27 External device I / F function block 28 System program storage area 30 User program storage area 31 Sub OS activation signal 32 System program data area 33 System program storage area 34 User program use area 35 Sub OS data area 36 System memory / stack allocation area 37 Standard ROM area 38 Work RAM
39 Trace execution flag 40 Trace circuit 41 Power supply 42 Unit 45 PLC bus 52 Main OS data area 53 Main OS storage area 58 Main OS storage area 59 Sub OS storage area 100 Trace information

Claims (7)

オペレーティングシステムであるシステムプログラムによって自らの動作制御を行うとともに、高級言語プログラムで記述されたユーザプログラムによって外部機器を動作させるユニットの制御を行なうコントローラにおいて、
前記システムプログラムおよび前記ユーザプログラムを実行する際に、前記システムプログラムおよび前記ユーザプログラムが格納されるデータ格納部と、
前記システムプログラムおよび前記ユーザプログラムを前記データ格納部に展開することによって前記システムプログラムおよび前記ユーザプログラムを実行するCPUと、
を備え、
前記CPUは、
前記システムプログラムを実行することによって、前記データ格納部内で前記システムプログラムが使用している領域のアドレス範囲であるプログラム領域情報と、前記システムプログラムおよび前記ユーザプログラムの実行中に用いられた情報としてアクセスアドレス、アクセスデータおよびプログラムカウンタが対応付けされた動作情報と、前記システムプログラムおよび前記ユーザプログラムの実行中に発生したエラーのエラーアドレスと、を取得するプログラム情報取得処理と、
前記システムプログラムを実行することによって、前記プログラム領域情報、前記動作情報および前記エラーアドレスに基づいて、前記システムプログラムおよび前記ユーザプログラムのエラー解析を行うプログラム解析処理と、
を行ない、
前記プログラム領域情報は、前記ユーザプログラムが開始される前に前記CPUによって取得され、且つ前記動作情報は、自らのコントローラが動作している間、前記CPUによって取得され、
前記プログラム解析処理の際には、前記CPUが、前記プログラム領域情報、前記動作情報および前記エラーアドレスの取得を停止し、その後、前記エラーアドレスの有無に基づいてアドレスエラーが発生しているか否かを判断し、アドレスエラーが発生している場合には前記エラーアドレスからエラーが発生したアクセスアドレスを取得するとともに、エラーが発生したアクセスアドレスと同一のアクセスアドレスを持つ動作情報を取得し、この取得した動作情報のアクセスアドレスが前記プログラム領域情報の範囲内であるか否かに基づいてエラー発生要因が前記ユーザプログラムであるか前記システムプログラムであるかを判断することを特徴とするコントローラ。
In a controller that controls its own operation by a system program that is an operating system and controls a unit that operates an external device by a user program described in a high-level language program.
A data storage unit in which the system program and the user program are stored when the system program and the user program are executed;
A CPU that executes the system program and the user program by expanding the system program and the user program in the data storage unit;
With
The CPU
By executing the system program, it is accessed as program area information which is an address range of an area used by the system program in the data storage unit, and information used during execution of the system program and the user program Program information acquisition processing for acquiring operation information associated with an address, access data, and a program counter, and an error address of an error that occurred during execution of the system program and the user program,
A program analysis process for performing an error analysis of the system program and the user program based on the program area information, the operation information, and the error address by executing the system program;
Do
The program area information is acquired by the CPU before the user program is started, and the operation information is acquired by the CPU while its controller is operating,
In the program analysis process, the CPU stops acquiring the program area information, the operation information, and the error address, and then whether or not an address error has occurred based on the presence or absence of the error address. If an address error has occurred, the access address where the error has occurred is acquired from the error address, and operation information having the same access address as the access address where the error has occurred is acquired, and this acquisition is performed. A controller for determining whether an error occurrence factor is the user program or the system program based on whether the access address of the operation information is within the range of the program area information.
前記システムプログラムは、前記ユーザプログラムの動作をリアルタイムトレースすることによって前記動作情報および前記エラーアドレスを取得するトレース機能と、前記プログラム領域情報を取得するシステムエリア記憶機能と、を有し、
前記CPUは、前記プログラム情報取得処理の際に、前記システムプログラムのトレース機能およびシステムエリア記憶機能を用いて前記プログラム情報取得処理を行うことを特徴とする請求項1に記載のコントローラ。
The system program has a trace function for acquiring the operation information and the error address by tracing the operation of the user program in real time, and a system area storage function for acquiring the program area information.
The controller according to claim 1, wherein the CPU performs the program information acquisition process using a trace function and a system area storage function of the system program during the program information acquisition process.
前記動作情報は、プログラムカウンタ、関数名および引数が対応付けされた関数コールデータを複数組有し、
前記CPUは、前記プログラム解析処理として、前記エラーが発生したアクセスアドレスと同一のアクセスアドレスを持つ動作情報を取得し、この取得した動作情報のプログラムカウンタと同一のプログラムカウンタを持つ関数コールデータを取得し、この取得した関数コールデータのプログラムカウンタが前記プログラム領域情報の範囲内であるか否かに基づいてエラー発生要因が前記ユーザプログラムであるか前記システムプログラムであるかを判断することを特徴とする請求項1または2に記載のコントローラ。
The operation information has a plurality of function call data in which a program counter, a function name, and an argument are associated,
As the program analysis process, the CPU acquires operation information having the same access address as the access address where the error has occurred, and acquires function call data having the same program counter as the program counter of the acquired operation information And determining whether the cause of the error is the user program or the system program based on whether or not the program counter of the acquired function call data is within the range of the program area information. The controller according to claim 1 or 2 .
前記オペレーティングシステムは、
前記ユーザプログラムの登録および前記プログラム解析処理の制御を行なうメインオペレーティングシステムと、
前記プログラム解析処理の制御を行なうサブオペレーティングシステムと、
を有し、
前記CPUは、
前記プログラム情報取得処理の際は、前記メインオペレーティングシステムを実行し、 前記ユーザプログラムの実行中にエラーが発生すると、前記メインオペレーティングシステムから前記サブオペレーティングシステムに切替えて前記プログラム解析処理を行うことを特徴とする請求項1または2に記載のコントローラ。
The operating system is
A main operating system that performs registration of the user program and control of the program analysis processing;
A sub-operating system for controlling the program analysis process;
Have
The CPU
In the program information acquisition process, the main operating system is executed, and when an error occurs during execution of the user program, the program analysis process is performed by switching from the main operating system to the sub operating system. The controller according to claim 1 or 2.
前記プログラム解析処理によってエラー解析された前記ユーザプログラムのエラー解析結果とともに前記ユーザプログラムの実行中に発生した前記エラーアドレスを記憶するトレース情報記憶部をさらに備えることを特徴とする請求項1〜4のいずれか1つに記載のコントローラ。 The trace information storage part which memorize | stores the said error address which generate | occur | produced during execution of the said user program with the error analysis result of the said user program analyzed by the said program analysis process of Claim 1-4 further characterized by the above-mentioned. The controller according to any one of the above. 前記トレース情報記憶部は、前記エラー解析結果をウェブページとして格納し、
前記トレース情報記憶部に通信ネットワークを介して接続されるとともに前記ウェブページを表示するネットワーク機器に対し、前記トレース情報記憶部に格納する前記ウェブページを送信する送信部をさらに備えることを特徴とする請求項5に記載のコントローラ。
The trace information storage unit stores the error analysis result as a web page,
It further includes a transmission unit that transmits the web page stored in the trace information storage unit to a network device that is connected to the trace information storage unit via a communication network and displays the web page. The controller according to claim 5 .
オペレーティングシステムであるシステムプログラムによって自らの動作制御を行うとともに、高級言語プログラムで記述されたユーザプログラムによって外部機器を動作させるユニットの制御を行なうコントローラにおいて、  In a controller that controls its own operation by a system program that is an operating system and controls a unit that operates an external device by a user program described in a high-level language program.
前記システムプログラムおよび前記ユーザプログラムを実行する際に、前記システムプログラムおよび前記ユーザプログラムが格納されるデータ格納部と、  A data storage unit in which the system program and the user program are stored when the system program and the user program are executed;
前記システムプログラムおよび前記ユーザプログラムを前記データ格納部に展開することによって前記システムプログラムおよび前記ユーザプログラムを実行するCPUと、  A CPU that executes the system program and the user program by expanding the system program and the user program in the data storage unit;
前記システムプログラムおよび前記ユーザプログラムの実行中に用いられた情報としてアクセスアドレス、アクセスデータおよびプログラムカウンタが対応付けされた動作情報を取得する動作情報取得回路と、  An operation information acquisition circuit for acquiring operation information associated with an access address, access data, and a program counter as information used during execution of the system program and the user program;
を備え、  With
前記CPUは、  The CPU
前記システムプログラムを実行することによって、前記データ格納部内で前記システムプログラムが使用している領域のアドレス範囲であるプログラム領域情報と、前記システムプログラムおよび前記ユーザプログラムの実行中に発生したエラーのエラーアドレスと、を取得するプログラム情報取得処理と、  By executing the system program, program area information that is an address range of an area used by the system program in the data storage unit, and an error address of an error that occurs during execution of the system program and the user program And a program information acquisition process for acquiring
前記システムプログラムを実行することによって、前記プログラム領域情報、前記動作情報および前記エラーアドレスに基づいて、前記システムプログラムおよび前記ユーザプログラムのエラー解析を行うプログラム解析処理と、  A program analysis process for performing an error analysis of the system program and the user program based on the program area information, the operation information, and the error address by executing the system program;
を行ない、  Do
前記プログラム領域情報は、前記ユーザプログラムが開始される前に前記CPUによって取得され、且つ前記動作情報は、自らのコントローラが動作している間、前記動作情報取得回路によって取得され、  The program area information is acquired by the CPU before the user program is started, and the operation information is acquired by the operation information acquisition circuit while its own controller is operating,
前記プログラム解析処理の際には、前記動作情報取得回路が前記動作情報の取得を停止するとともに前記CPUが前記プログラム領域情報および前記エラーアドレスの取得を停止し、その後、前記CPUが、前記エラーアドレスの有無に基づいてアドレスエラーが発生しているか否かを判断し、アドレスエラーが発生している場合には前記エラーアドレスからエラーが発生したアクセスアドレスを取得するとともに、エラーが発生したアクセスアドレスと同一のアクセスアドレスを持つ動作情報を取得し、この取得した動作情報のアクセスアドレスが前記プログラム領域情報の範囲内であるか否かに基づいてエラー発生要因が前記ユーザプログラムであるか前記システムプログラムであるかを判断することを特徴とするコントローラ。  During the program analysis process, the operation information acquisition circuit stops acquiring the operation information and the CPU stops acquiring the program area information and the error address, and then the CPU detects the error address. Whether or not an address error has occurred, and if an address error has occurred, obtain the access address where the error occurred from the error address, and The operation information having the same access address is acquired, and based on whether or not the access address of the acquired operation information is within the range of the program area information, whether the error occurrence factor is the user program or the system program A controller characterized by determining whether or not there is.
JP2004147534A 2004-05-18 2004-05-18 controller Expired - Fee Related JP4558376B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004147534A JP4558376B2 (en) 2004-05-18 2004-05-18 controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004147534A JP4558376B2 (en) 2004-05-18 2004-05-18 controller

Publications (2)

Publication Number Publication Date
JP2005332030A JP2005332030A (en) 2005-12-02
JP4558376B2 true JP4558376B2 (en) 2010-10-06

Family

ID=35486676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004147534A Expired - Fee Related JP4558376B2 (en) 2004-05-18 2004-05-18 controller

Country Status (1)

Country Link
JP (1) JP4558376B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022004007A1 (en) * 2020-06-30 2022-01-06 日本電産株式会社 Error analysis device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5397667B2 (en) * 2008-08-20 2014-01-22 富士ゼロックス株式会社 Data processing apparatus, information processing apparatus, image forming apparatus, and data processing program
JP5262652B2 (en) * 2008-12-05 2013-08-14 富士ゼロックス株式会社 Image processing device
JP2010134747A (en) * 2008-12-05 2010-06-17 Fuji Xerox Co Ltd Image processing apparatus
JP5354463B2 (en) * 2009-06-25 2013-11-27 横河電機株式会社 Programmable controller
KR102028663B1 (en) 2012-07-24 2019-10-04 삼성전자주식회사 Apparatus and method for error detection
JP6075204B2 (en) * 2013-05-17 2017-02-08 富士通株式会社 Performance information collection program, information processing apparatus, and performance information collection method
JP6309919B2 (en) 2015-06-23 2018-04-11 ファナック株式会社 Numerical control device with data acquisition function

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02280201A (en) * 1989-04-21 1990-11-16 Citizen Watch Co Ltd Method and device for digital control
JP2846238B2 (en) * 1994-04-28 1999-01-13 三菱電機株式会社 System control management method by error trace
JP2002082816A (en) * 2000-09-07 2002-03-22 Hitachi Ltd Fault monitoring system
JP2001236237A (en) * 2000-02-23 2001-08-31 Hitachi Ltd Multi-OS configuration method
JP3141856B2 (en) * 1998-09-30 2001-03-07 日本電気株式会社 Failure recovery assisting method, apparatus therefor, and machine-readable recording medium recording a program
JP2001005699A (en) * 1999-06-25 2001-01-12 Toshiba Corp Computer system and failure information collection method
JP2001216557A (en) * 2000-01-31 2001-08-10 Shizuo Ichikawa Internet support system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022004007A1 (en) * 2020-06-30 2022-01-06 日本電産株式会社 Error analysis device

Also Published As

Publication number Publication date
JP2005332030A (en) 2005-12-02

Similar Documents

Publication Publication Date Title
CN100582799C (en) Electronic device diagnostic methods and systems
US7669078B2 (en) Method and apparatus for debugging a program on a limited resource processor
CN111274059B (en) Software exception handling method and device of slave device
CN106537351B (en) Method for diagnosing power failures in wireless communication devices
JP2005339561A (en) Method and device for storing track data cross reference with respect to related application
CN103995500A (en) Controller, information processing apparatus, and program
CN100472471C (en) A system and method for acquiring computer operating system fault site information
JP4558376B2 (en) controller
US6738778B1 (en) Method and apparatus for monitoring the execution of a program
CN115658321A (en) Method and device for acquiring fault information of automobile instrument, electronic equipment and storage medium
CN118467340A (en) Instant debugging method, system, storage medium and equipment of UEFI BIOS
US20050033952A1 (en) Dynamic scheduling of diagnostic tests to be performed during a system boot process
US12405848B2 (en) Error correction dynamic method to detect and troubleshoot system boot failures
JP2004302731A (en) Information processing apparatus and fault diagnosis method
CN102750212A (en) Embedded system fault diagnosis method and embedded system with fault diagnosis
US6792562B1 (en) Format for extensible error and event codes
JP2004013714A (en) Communication terminal device, debug information notification system, and computer program
JPH10254738A (en) Emulator device and emulation method
CN116340031A (en) Computer system, method, and non-transitory computer readable medium for detecting deviation
CN107766251B (en) Detection method, system and device for loading image and readable storage medium
JP2002182951A (en) Information processing apparatus maintenance method and information processing apparatus
CN121597473B (en) Fault analysis method and electronic equipment
JP4633553B2 (en) Debug system, debugging method and program
CN111221701A (en) Chip and circuit logic reconfiguration system thereof
JP4576433B2 (en) Information processing apparatus, arithmetic processing apparatus, information processing apparatus control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090929

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091222

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100215

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100323

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100617

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20100701

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100720

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100721

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130730

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees