JP2015109535A - Communication apparatus and error response level switching method - Google Patents

Communication apparatus and error response level switching method Download PDF

Info

Publication number
JP2015109535A
JP2015109535A JP2013250798A JP2013250798A JP2015109535A JP 2015109535 A JP2015109535 A JP 2015109535A JP 2013250798 A JP2013250798 A JP 2013250798A JP 2013250798 A JP2013250798 A JP 2013250798A JP 2015109535 A JP2015109535 A JP 2015109535A
Authority
JP
Japan
Prior art keywords
communication device
error
error response
frame
response level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013250798A
Other languages
Japanese (ja)
Inventor
高橋 敦
Atsushi Takahashi
敦 高橋
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.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP2013250798A priority Critical patent/JP2015109535A/en
Publication of JP2015109535A publication Critical patent/JP2015109535A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Detection And Prevention Of Errors In Transmission (AREA)
  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To make it easy to switch a determination criterion for error response in a communication apparatus.SOLUTION: A communication apparatus comprises: a command frame reception unit 1 for receiving a command frame from an upper rank apparatus; a command frame analysis unit 2 for analyzing the command frame; an execution unit 3 for executing processing depending on a result of the analysis of the command frame; a storage unit 4 for storing an error response level setting value which is a value for showing a level of error response and is a value for designating a determination criterion for the error response; a response unit 5 which determines whether or not to perform error response on the basis of a result of the execution by the execution unit 3 and the error response level setting value, and generates a response frame to the command frame depending on a result of the determination; a response frame transmission unit 6 for transmitting the response frame to the upper rank apparatus; and a setting unit 7 for setting the error response level setting value and a mode of the communication apparatus.

Description

本発明は、ネットワークに接続されたコントローラなどの通信機器に係り、特にエラー応答の判定基準を切り替えることが可能な通信機器およびエラー応答レベル切替方法に関するものである。   The present invention relates to a communication device such as a controller connected to a network, and more particularly to a communication device and an error response level switching method capable of switching error response determination criteria.

ネットワークと接続された例えばコントローラなどの通信機器では、効率や使い勝手を優先した使い方をした場合に発生する軽微な異常がある。
例えば、上位の装置から通信機器に対してデータを読み書きするときに、通信機器の連続したデータアドレスの中に、単発的にアクセス不可のデータアドレスがある場合、連続したデータアドレスを使った1対の命令フレームと応答フレームで、読み書きするほうが、アクセス不可のデータアドレスを含まないように分割した複数の命令フレームと応答フレームで読み書きするよりも効率が良い。この場合、アクセス不可のデータアドレスに対するアクセスが軽微な異常となる。
A communication device such as a controller connected to a network has a minor abnormality that occurs when usage is given priority on efficiency and usability.
For example, when reading / writing data from / to a communication device from a higher-level device, if there is a data address that cannot be accessed in a single address among continuous data addresses of the communication device, a pair using the continuous data address is used. It is more efficient to read / write with the command frame and response frame than to read / write with a plurality of command frames and response frames divided so as not to include inaccessible data addresses. In this case, access to an inaccessible data address becomes a minor abnormality.

また、通信機器の設定や状態によってアクセスの可/不可が変わるデータアドレスがある場合、アクセスの可/不可にかかわらず読み書きするほうが、上位の装置の通信制御プログラムが簡単になる。この場合、アクセス不可のときに行ったアクセスが軽微な異常となる。   In addition, when there is a data address whose access is enabled / disabled depending on the setting and status of the communication device, the communication control program of the host device becomes simpler when reading / writing is performed regardless of whether access is enabled / disabled. In this case, the access performed when access is not possible is a slight abnormality.

従来は、軽微な異常によって通信機器の動作が停止しないようにするために、(1)エラー応答のエラー種類から異常の重大性を判定し、重大な異常の場合だけ通信機器を停止させる、(2)重大な異常だけがエラー応答となるように上位の装置の通信制御プログラムを作成し、エラー応答の場合は通信機器を停止させる、等の方法が採用されていた。   Conventionally, in order to prevent the operation of a communication device from stopping due to a minor abnormality, (1) the severity of the abnormality is determined from the error type of the error response, and the communication device is stopped only in the case of a serious abnormality. 2) A method of creating a communication control program for a host device so that only a serious abnormality becomes an error response, and stopping the communication device in the case of an error response has been adopted.

しかしながら、これらの方法では、軽微な異常によるエラー応答が発生せず、軽微な異常を検出することができないので、通信機器の十分な試験が実現できない。そこで、異常試験時には通信機器に異常処理用基板を実装し、通信機器の運用時は異常処理用基板を除去することで、異常試験時には軽微な異常も検出できるようにしていた(例えば特許文献1参照)。   However, in these methods, an error response due to a minor abnormality does not occur, and a minor abnormality cannot be detected, so that a sufficient test of the communication device cannot be realized. Therefore, by mounting the abnormality processing board on the communication device during the abnormality test and removing the abnormality processing substrate during the operation of the communication device, a minor abnormality can be detected during the abnormality test (for example, Patent Document 1). reference).

特許第2830601号公報Japanese Patent No. 2830601

特許文献1に開示された技術によれば、通信機器の運用モードと試験モードを切り替えることで、エラー応答の判定基準を切り替えることができる。しかしながら、特許文献1に開示された技術では、切り替えのために異常処理用基板の挿抜が必要になり、使い勝手が悪いという問題点があった。   According to the technique disclosed in Patent Document 1, the error response determination criterion can be switched by switching between the operation mode and the test mode of the communication device. However, the technique disclosed in Patent Document 1 has a problem that it is not easy to use because it is necessary to insert and remove the abnormality processing substrate for switching.

本発明は、上記課題を解決するためになされたもので、エラー応答の判定基準を簡単に切り替えることができる通信機器およびエラー応答レベル切替方法を提供することを目的とする。   The present invention has been made to solve the above-described problem, and an object of the present invention is to provide a communication device and an error response level switching method capable of easily switching error response determination criteria.

本発明の通信機器は、上位機器から命令フレームを受信する命令フレーム受信手段と、前記命令フレームを解析する命令フレーム解析手段と、前記命令フレームの解析結果に応じた処理を実行する実行手段と、エラー応答のレベルを表すエラー応答レベル設定値を記憶する記憶手段と、前記実行手段の実行結果と前記エラー応答レベル設定値とに基づいてエラー応答するか否かを判定し、この判定結果に応じて前記命令フレームに対する応答フレームを作成する応答手段と、前記応答フレームを前記上位機器に送信する応答フレーム送信手段とを備えることを特徴とするものである。   The communication device of the present invention includes a command frame receiving unit that receives a command frame from a host device, a command frame analyzing unit that analyzes the command frame, and an execution unit that executes processing according to the analysis result of the command frame; Based on the storage means for storing the error response level setting value representing the level of error response, whether to execute an error response based on the execution result of the execution means and the error response level setting value, and according to the determination result Response means for creating a response frame for the command frame, and response frame transmission means for transmitting the response frame to the higher-level device.

また、本発明の通信機器の1構成例は、さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、前記エラー応答レベル設定値を設定するエラー応答レベル設定手段を備えることを特徴とするものである。
また、本発明の通信機器の1構成例は、さらに、前記エラー応答レベル設定値を通信機器のモードに対応する値に設定するエラー応答レベル設定手段を備え、前記記憶手段は、通信機器の各モードとエラー応答レベル設定値とを対応付けて予め記憶することを特徴とするものである。
また、本発明の通信機器の1構成例は、さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、通信機器のモードを設定するモード設定手段を備え、前記エラー応答レベル設定手段は、前記エラー応答レベル設定値を、前記モード設定手段によって変更された通信機器のモードに対応する値に変更することを特徴とするものである。
また、本発明の通信機器の1構成例において、前記記憶手段は、前記応答手段が下すべき判定結果を表す判定基準を、エラーの種類毎およびエラー応答レベル設定値毎に予め記憶し、前記応答手段は、前記実行手段の実行結果に基づいてエラーの種類を特定し、特定したエラーの種類と通信機器の現在のエラー応答レベル設定値と前記判定基準とに基づいて、エラー応答するか否かを判定することを特徴とするものである。
Further, according to one configuration example of the communication device of the present invention, an error response level for setting the error response level setting value according to any of the command frame, an operation switch of the communication device, or a digital input to the communication device. A setting means is provided.
Further, one configuration example of the communication device of the present invention further includes error response level setting means for setting the error response level setting value to a value corresponding to the mode of the communication device, and the storage means includes each of the communication devices. The mode and the error response level set value are stored in advance in association with each other.
Further, one configuration example of the communication device of the present invention further includes mode setting means for setting the mode of the communication device according to any of the command frame, the operation switch of the communication device, or the digital input to the communication device. The error response level setting means changes the error response level setting value to a value corresponding to the mode of the communication device changed by the mode setting means.
Further, in one configuration example of the communication device of the present invention, the storage unit stores in advance a determination criterion representing a determination result to be made by the response unit for each error type and each error response level setting value, and the response The means specifies an error type based on the execution result of the execution means, and determines whether or not to make an error response based on the specified error type, the current error response level setting value of the communication device, and the determination criterion. It is characterized by determining.

また、本発明の通信機器のエラー応答レベル切替方法は、上位機器から命令フレームを受信する命令フレーム受信ステップと、前記命令フレームを解析する命令フレーム解析ステップと、前記命令フレームの解析結果に応じた処理を実行する実行ステップと、エラー応答のレベルを表すエラー応答レベル設定値を記憶している記憶手段を参照し、前記実行ステップの実行結果と通信機器の現在のエラー応答レベル設定値とに基づいてエラー応答するか否かを判定し、この判定結果に応じて前記命令フレームに対する応答フレームを作成する応答ステップと、前記応答フレームを前記上位機器に送信する応答フレーム送信ステップとを含むことを特徴とするものである。   Further, the error response level switching method for a communication device according to the present invention includes a command frame receiving step for receiving a command frame from a host device, a command frame analyzing step for analyzing the command frame, and an analysis result of the command frame. An execution step for executing processing and a storage means for storing an error response level setting value representing an error response level are referred to, and based on the execution result of the execution step and the current error response level setting value of the communication device. A response step of generating a response frame for the command frame according to the determination result, and a response frame transmission step of transmitting the response frame to the higher-level device. It is what.

本発明によれば、記憶手段に記憶されたエラー応答レベル設定値によって、通信機器のエラー応答の判定基準を簡単に切り替えることができる。例えば通信機器の運用時には、エラー応答レベル(感度)を下げることで、軽微なエラーでエラー応答が発生しないようにすることができ、一方、通信機器の試験を行いたいときには、エラーの原因が分かるようにするためにエラー応答レベル(感度)を上げることで、エラーの重大性と無関係にエラー応答を発生させることができる。こうして、通信機器の運用時には軽微なエラー発生による機器の停止を防止することができ、通信機器の試験を行うときには軽微なエラーでも、その原因を容易に調査可能となる。   According to the present invention, the error response determination criteria of the communication device can be easily switched by the error response level setting value stored in the storage means. For example, when operating a communication device, the error response level (sensitivity) can be lowered to prevent an error response from occurring with a minor error. On the other hand, when a communication device test is desired, the cause of the error is known. Therefore, by increasing the error response level (sensitivity), an error response can be generated regardless of the severity of the error. In this way, it is possible to prevent the device from being stopped due to a minor error when the communication device is operated, and it is possible to easily investigate the cause of a minor error when testing the communication device.

また、本発明では、エラー応答レベル設定値を通信機器のモードと連動させることによって、通信機器のエラー応答の判定基準を簡単に切り替えることができる。   Further, according to the present invention, the error response level setting value is linked with the mode of the communication device, so that the error response determination criteria of the communication device can be easily switched.

本発明の第1の実施の形態に係る通信機器の構成を示すブロック図である。It is a block diagram which shows the structure of the communication apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係る通信機器の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the communication apparatus which concerns on the 1st Embodiment of this invention.

[第1の実施の形態]
以下、本発明の実施の形態について図面を参照して説明する。図1は本発明の第1の実施の形態に係る通信機器の構成を示すブロック図である。通信機器は、図示しない上位機器からの送信信号である命令フレームを受信する命令フレーム受信部1と、命令フレームを解析する命令フレーム解析部2と、命令フレームの解析結果に応じた処理を実行する実行部3と、エラー応答のレベル(感度)を表す値であり、エラー応答の判定基準を指定する値であるエラー応答レベル設定値を記憶する記憶部4と、実行部3での実行結果とエラー応答レベル設定値とに基づいてエラー応答するか否かを判定し、この判定結果に応じて命令フレームに対する応答信号である応答フレームを作成する応答部5と、応答フレームを上位機器に送信する応答フレーム送信部6と、エラー応答レベル設定値および通信機器のモードの設定を行う設定部7と、表示部8と、操作スイッチ9と、デジタル入力部10とを備えている。設定部7は、エラー応答レベル設定手段とモード設定手段とを構成している。
[First Embodiment]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a communication device according to the first embodiment of the present invention. The communication device executes a command frame receiving unit 1 that receives a command frame that is a transmission signal from a host device (not shown), a command frame analyzing unit 2 that analyzes the command frame, and a process according to the result of analyzing the command frame. The execution unit 3, a storage unit 4 for storing an error response level setting value that is a value indicating an error response level (sensitivity) and that specifies an error response determination criterion, and an execution result of the execution unit 3 It is determined whether or not an error response is made based on the error response level setting value, and a response unit 5 that generates a response frame that is a response signal to the command frame according to the determination result, and transmits the response frame to the host device Response frame transmission unit 6, setting unit 7 for setting an error response level setting value and communication device mode, display unit 8, operation switch 9, and digital input unit 1 It is equipped with a door. The setting unit 7 constitutes error response level setting means and mode setting means.

以下、本実施の形態の通信機器の動作を説明する。図2は通信機器の動作を示すフローチャートである。
命令フレーム受信部1は、ネットワークを介して接続された上位機器から命令フレームを受信すると(図2ステップS1においてYES)、この命令フレームを命令フレーム解析部2に渡す。
命令フレーム解析部2は、命令フレーム受信部1から受け取った命令フレームを解析する(図2ステップS2)。
Hereinafter, the operation of the communication device of the present embodiment will be described. FIG. 2 is a flowchart showing the operation of the communication device.
When receiving a command frame from a higher-level device connected via the network (YES in step S1 in FIG. 2), the command frame receiving unit 1 passes this command frame to the command frame analyzing unit 2.
The instruction frame analysis unit 2 analyzes the instruction frame received from the instruction frame reception unit 1 (step S2 in FIG. 2).

実行部3は、命令フレーム解析部2による命令フレームの解析結果を受け取り、命令フレームに記述された命令に応じた処理を実行する(図2ステップS3)。例えば通信機器が温度制御のためのコントローラである場合、命令フレームに応じて行う処理としては、設定値の書き込みや読み出し、温度測定値の読み出し等がある。また、コントローラは、上位機器または使用者から設定された温度設定値と制御対象の温度測定値とが一致するように温度制御を行うことになる。コントローラによる制御は周知の技術であるので、詳細な説明は省略する。   The execution unit 3 receives the analysis result of the instruction frame from the instruction frame analysis unit 2, and executes a process according to the instruction described in the instruction frame (step S3 in FIG. 2). For example, when the communication device is a controller for temperature control, processing to be performed according to the command frame includes writing and reading of setting values, reading of temperature measurement values, and the like. In addition, the controller performs temperature control so that the temperature set value set by the host device or the user matches the temperature measurement value to be controlled. Since the control by the controller is a well-known technique, a detailed description is omitted.

そして、実行部3は、命令フレームに応じた実行結果を応答部5に渡す。この実行結果には、命令フレームに応じて実行した処理の内容を示す情報と、処理の結果得られた値(読み出した設定値や測定値など)と、エラーの有無情報とが含まれる。   Then, the execution unit 3 passes the execution result corresponding to the instruction frame to the response unit 5. This execution result includes information indicating the contents of the process executed according to the instruction frame, values obtained as a result of the process (read setting values, measurement values, etc.), and error presence / absence information.

次に、応答部5は、実行部3での実行結果に基づいてエラーが発生したか否かを判定し、エラーが発生した場合には実行部3での実行結果に基づいてエラーの種類(エラーコード)を特定し、特定したエラーの種類と通信機器の現在のエラー応答レベルとに基づいて、エラー応答するか否かを判定し、命令フレームに対する応答フレームを作成する(図2ステップS4)。   Next, the response unit 5 determines whether or not an error has occurred based on the execution result in the execution unit 3. If an error has occurred, the response unit 5 determines the type of error based on the execution result in the execution unit 3 ( Error code) is determined, and it is determined whether or not an error response is made based on the specified error type and the current error response level of the communication device, and a response frame for the command frame is created (step S4 in FIG. 2). .

[エラー要因]
ここで、エラー要因とエラー応答レベルとの関係について説明する。実行部3による実行の過程で発生したエラーは、そのエラーの内容に応じたエラーコードで表される。エラー応答フレームを作成するか否かは、エラー応答レベルに従ってエラー要因毎に判定される。エラー要因とエラー応答の判定結果との関係を表1に示す。
[Error cause]
Here, the relationship between the error factor and the error response level will be described. An error that has occurred in the course of execution by the execution unit 3 is represented by an error code corresponding to the content of the error. Whether or not to create an error response frame is determined for each error cause according to the error response level. Table 1 shows the relationship between error factors and error response determination results.

Figure 2015109535
Figure 2015109535

表1では、応答部5が下すべき判定結果を表す判定基準が、エラーの種類(エラーコード)毎およびエラー応答レベル設定値毎に記述されている。表1の例では、エラー応答レベル設定値が0、1、2の3段階あるものとする。なお、表1における「異常」、「正常」はエラーの有無ではなく、エラー応答するか否かを表している。すなわち、「異常」はエラー応答することを意味し、「正常」はエラー応答しないことを意味している。   In Table 1, determination criteria representing determination results to be made by the response unit 5 are described for each error type (error code) and for each error response level setting value. In the example of Table 1, it is assumed that there are three stages of error response level setting values of 0, 1, and 2. It should be noted that “abnormal” and “normal” in Table 1 indicate whether or not an error is returned, not the presence or absence of an error. That is, “abnormal” means an error response, and “normal” means no error response.

応答部5は、エラーが無い場合、すなわちエラーコードが0の場合、エラー応答レベル0,1,2のいずれの場合も正常(エラー応答しない)と判定する。この場合、応答部5は、命令フレームで命令された処理を正常に実行できたことを示す正常応答フレームを作成する。応答部5で作成される応答フレーム中には、エラーコードが記述される。正常応答フレームの場合には、エラーコード部分は「0」、すなわちエラー無しという内容が記述される。   When there is no error, that is, when the error code is 0, the response unit 5 determines that it is normal (no error response) in any of the error response levels 0, 1, and 2. In this case, the response unit 5 creates a normal response frame indicating that the process commanded in the command frame has been successfully executed. An error code is described in the response frame created by the response unit 5. In the case of a normal response frame, the error code portion is “0”, that is, the content of no error is described.

未定義の命令を含む命令フレームを受信した場合、エラーコードは10となる。命令フレーム中の後述するパラメータの数が命令と合っていない場合、エラーコードは11となる。応答部5は、エラーコード10,11のいずれかのエラーが発生した場合、エラー応答レベル0,1,2のいずれの場合でも異常(エラー応答する)と判定する。この場合、応答部5は、エラーが発生したことを示すエラー応答フレームを作成する。エラー応答フレームを作成する場合には、エラー要因に応じたエラーコードがフレーム中に記述される。したがって、エラーコード10,11のいずれかがエラー応答フレーム中に記述されることになる。   When an instruction frame including an undefined instruction is received, the error code is 10. If the number of parameters to be described later in the instruction frame does not match the instruction, the error code is 11. When any one of the error codes 10 and 11 occurs, the response unit 5 determines that an abnormality (error response) occurs in any of the error response levels 0, 1, and 2. In this case, the response unit 5 creates an error response frame indicating that an error has occurred. When creating an error response frame, an error code corresponding to the error factor is described in the frame. Therefore, one of the error codes 10 and 11 is described in the error response frame.

読み出しが常時不可のデータを読み出そうとする読み出し命令フレームを受信した場合、エラーコードは20となる。読み出しが一時的に不可のデータを読み出そうとする読み出し命令フレームを受信した場合、エラーコードは21となる。応答部5は、エラーコード20,21のいずれかのエラーが発生した場合、エラー応答レベル0,1では正常と判定し、エラー応答レベル2では異常と判定する。したがって、エラー応答レベル0,1では正常応答フレーム中にエラーコード0が記述され、エラー応答レベル2ではエラー応答フレーム中にエラーコード20,21のいずれかが記述される。   When a read command frame that attempts to read data that cannot always be read is received, the error code is 20. When a read command frame that attempts to read data that cannot be read temporarily is received, the error code is 21. When any one of the error codes 20 and 21 occurs, the response unit 5 determines that the error response levels 0 and 1 are normal, and determines that the error response level 2 is abnormal. Therefore, at error response levels 0 and 1, error code 0 is described in the normal response frame, and at error response level 2, one of error codes 20 and 21 is described in the error response frame.

書き込みが常時不可のデータを書き込もうとする書き込み命令フレームを受信した場合、エラーコードは30となる。書き込みが一時的に不可のデータを書き込もうとする書き込み命令フレームを受信した場合、エラーコードは31となる。書き込み可能なデータ範囲外の値のデータを書き込もうとする書き込み命令フレームを受信した場合、エラーコードは32となる。応答部5は、エラーコード30,31,32のいずれかのエラーが発生した場合、エラー応答レベル0では正常と判定し、エラー応答レベル1,2では異常と判定する。したがって、エラー応答レベル0では正常応答フレーム中にエラーコード0が記述され、エラー応答レベル1,2ではエラー応答フレーム中にエラーコード30,31,32のいずれかが記述される。   When a write command frame that attempts to write data that cannot always be written is received, the error code is 30. The error code is 31 when a write command frame for temporarily writing data that cannot be written is received. When a write command frame for receiving data having a value outside the writable data range is received, the error code is 32. When any one of the error codes 30, 31, and 32 occurs, the response unit 5 determines that the error response level is normal and determines that the error response levels 1 and 2 are abnormal. Therefore, at error response level 0, error code 0 is described in the normal response frame, and at error response levels 1 and 2, one of error codes 30, 31, 32 is described in the error response frame.

[通信フレーム]
次に、通信機器と上位機器との間でやり取りされる通信フレーム(命令フレーム、応答フレーム)について説明する。本実施の形態の通信フレームは、構成要素と、構成要素を区切るカンマ(,)で定義される。例えば、命令フレームは、[機器識別番号],[命令](,[パラメータ1],[パラメータ2],…,[パラメータn])という構造で作成される。機器識別番号は、各通信機器に固有の番号である。パラメータは必要に応じて設定される値で、記述してもよいし記述しなくてもよい。
[Communication frame]
Next, communication frames (command frame and response frame) exchanged between the communication device and the host device will be described. The communication frame of the present embodiment is defined by a component and a comma (,) separating the components. For example, the command frame is created with a structure of [device identification number], [command] (, [parameter 1], [parameter 2],..., [Parameter n]). The device identification number is a number unique to each communication device. The parameter is a value set as necessary, and may or may not be described.

また、応答フレームは、例えば[機器識別番号],[エラーコード](,[パラメータ1],[パラメータ2],…,[パラメータn])という構造で作成される。命令フレームの場合と同様に、パラメータは必要に応じて記述される値である。なお、応答フレームに記述できるエラーコードは1つなので、1つの命令フレームに応じた処理で複数のエラー要因のエラーが発生した場合、その中の1つだけのエラー要因に対応するエラーコードを応答フレームに記述することになる。   The response frame is created with a structure of, for example, [device identification number], [error code] (, [parameter 1], [parameter 2],..., [Parameter n]). As in the case of instruction frames, parameters are values that are described as needed. Since there is only one error code that can be described in the response frame, if an error due to multiple error factors occurs in the processing corresponding to one instruction frame, an error code corresponding to only one of the error factors is returned as a response. It will be described in the frame.

[読み出し命令フレーム]
通信機器からデータを読み出すための読み出し命令フレームは、例えば[機器識別番号],[読み出し命令],[先頭データのアドレス],[データ個数]という構造で作成される。読み出し命令は文字「R」で表現される。先頭データのアドレス、およびデータ個数という2種類の数値はパラメータである。読み出し命令フレームは、具体的には「101,R,1,4」という構造になる。この読み出し命令フレームは、「機器識別番号101の通信機器のアドレス1から4個のデータを読み出す」ことを意味している。
[Read command frame]
A read command frame for reading data from a communication device is created with a structure of, for example, [device identification number], [read command], [address of head data], and [number of data]. The read command is represented by the letter “R”. Two kinds of numerical values such as the address of the top data and the number of data are parameters. Specifically, the read command frame has a structure of “101, R, 1, 4”. This read command frame means that “four data are read from address 1 of the communication device having the device identification number 101”.

[読み出し応答フレーム]
読み出し命令フレームに対する読み出し応答フレームは、例えば[機器識別番号],[エラーコード](,[データ1],[データ2],…,[データn])という構造で作成される。データ1〜データnは読み出した数値を示すパラメータである。データ読み出しが正常に実行できたことを示す読み出し正常応答フレームは、具体的には「101,0,100,200,300,400」という構造になる。この読み出し正常応答フレームは、「機器識別番号101の通信機器からデータを正常に読み出すことができ、読み出したデータは順に100,200,300,400である」ことを意味している。
[Read response frame]
The read response frame for the read command frame is created with a structure of, for example, [device identification number], [error code] (, [data 1], [data 2],..., [Data n]). Data 1 to data n are parameters indicating the read numerical values. The read normal response frame indicating that the data read has been normally executed specifically has a structure of “101, 0, 100, 200, 300, 400”. This read normal response frame means that “data can be normally read from the communication device having the device identification number 101, and the read data is 100, 200, 300, 400 in order”.

データ読み出しでエラーが発生したことを示す読み出しエラー応答フレームは、具体的には「101,10」という構造になる。この読み出しエラー応答フレームは、「機器識別番号101の通信機器に対して未定義の命令を送信するというエラーが発生し、命令に対するデータは無い」ことを意味している。   Specifically, the read error response frame indicating that an error has occurred in data read has a structure of “101, 10”. This read error response frame means that “an error that an undefined command is transmitted to the communication device having the device identification number 101 occurs and there is no data for the command”.

また、読み出しエラー応答フレームの別の例として、「101,20,0,0,0,0」という例も考えられる。この読み出しエラー応答フレームは、「機器識別番号101の通信機器から、読み出しが常時不可のデータを読み出そうとしたエラーが発生し、読み出したデータは順に0,0,0,0である」ことを意味している。この読み出しエラー応答フレームにおいて、4つのデータは読み出し応答フレームの形式を守るために付けられているが、実質的な意味を持っていない。   Another example of the read error response frame is “101, 20, 0, 0, 0, 0”. This read error response frame indicates that “an error occurred when trying to read data that cannot always be read from the communication device having the device identification number 101, and the read data is 0, 0, 0, 0 in order”. Means. In this read error response frame, four data are attached in order to protect the format of the read response frame, but have no substantial meaning.

[書き込み命令フレーム]
通信機器に対してデータを書き込むための書き込み命令フレームは、例えば[機器識別番号],[書き込み命令],[先頭データのアドレス],[データ個数],[データ1](,[データ2], ,…,[データn])という構造で作成される。書き込み命令は文字「W」で表現される。先頭データのアドレス、およびデータ個数という2種類の数値はパラメータである。また、データ1〜データnは書き込む数値を示すパラメータである。書き込み命令フレームは、具体的には「101,W,1,4,100,200,300,400」という構造になる。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス1から順に4個のデータを書き込み、書き込むデータの値は順に100,200,300,400である」ことを意味している。
[Write command frame]
Write command frames for writing data to the communication device include, for example, [device identification number], [write command], [head data address], [data count], [data 1] (, [data 2], , ..., [data n]). The write command is represented by the letter “W”. Two kinds of numerical values such as the address of the top data and the number of data are parameters. Data 1 to data n are parameters indicating numerical values to be written. Specifically, the write command frame has a structure of “101, W, 1, 4, 100, 200, 300, 400”. This write command frame means that “four data are written in order from the address 1 of the communication device having the device identification number 101, and the values of the data to be written are 100, 200, 300, 400 in order”.

[書き込み応答フレーム]
書き込み命令フレームに対する書き込み応答フレームは、例えば[機器識別番号],[エラーコード]という構造で作成される。データ書き込みが正常に実行できたことを示す書き込み正常応答フレームは、具体的には「101,0」という構造になる。この書き込み正常応答フレームは、「機器識別番号101の通信機器においてデータ書き込みが正常に行われた」ことを意味している。
[Write response frame]
The write response frame for the write command frame is created with a structure of, for example, [device identification number] and [error code]. The write normal response frame indicating that the data write has been executed normally has a structure of “101,0”. This writing normal response frame means that “data writing has been normally performed in the communication device having the device identification number 101”.

また、データ書き込みでエラーが発生したことを示す書き込みエラー応答フレームは、具体的には「101,10」という構造になる。この書き込みエラー応答フレームは、「機器識別番号101の通信機器に対して未定義の命令を送信するというエラーが発生した」という意味である。また、書き込みエラー応答フレームの別の例として、「101,30」という例も考えられる。この書き込みエラー応答フレームは、「機器識別番号101の通信機器に対して、書き込みが常時不可のデータを書き込もうとするエラーが発生した」ことを意味している。   Further, the write error response frame indicating that an error has occurred during data writing has a structure of “101, 10”. This write error response frame means that “an error has occurred that an undefined command has been transmitted to the communication device having the device identification number 101”. Further, as another example of the write error response frame, an example of “101, 30” can be considered. This write error response frame means that “an error has occurred in the communication device having the device identification number 101 to write data that cannot be written at all times”.

[データ構成]
次に、通信機器で読み出しや書き込みの対象となるデータの例を表2に示す。
[Data structure]
Next, Table 2 shows an example of data to be read or written by the communication device.

Figure 2015109535
Figure 2015109535

ここでは、通信機器が温度制御のためのコントローラである場合を想定している。温度測定値は、記憶部4のアドレス1に格納されるデータであり、読み出しは常時可能で、書き込みは常時不可となっている。温度設定値は、記憶部4のアドレス2に格納されるデータであり、読み出し、書き込み共に常時可能となっている。温度警報発生状態は、記憶部4のアドレス3に格納されるデータであり、温度測定値が後述する温度警報設定値以上になったときに値が「1」(警報有り)となり、温度測定値が温度警報設定値未満のときに値が「0」(警報無し)となるデータである。温度警報発生状態は、読み出しは常時可能で、書き込みは常時不可となっている。温度警報設定値は、記憶部4のアドレス4に格納されるデータであり、読み出し、書き込み共に常時可能となっている。   Here, it is assumed that the communication device is a controller for temperature control. The temperature measurement value is data stored in the address 1 of the storage unit 4 and can be always read and cannot always be written. The temperature set value is data stored at address 2 of the storage unit 4 and can be read and written at all times. The temperature alarm generation state is data stored at address 3 of the storage unit 4, and when the temperature measurement value becomes equal to or higher than the temperature alarm set value described later, the value becomes “1” (alarm exists), and the temperature measurement value Is a data whose value is “0” (no alarm) when is less than the temperature alarm set value. In the temperature alarm generation state, reading is always possible, and writing is always impossible. The temperature alarm set value is data stored at the address 4 of the storage unit 4, and both reading and writing are always possible.

以上のように、記憶部4には、エラーの内容とエラーコードとの関係(表1)が記憶され、また応答部5が下すべき判定結果を表す判定基準(表1)が、エラーの種類(エラーコード)毎およびエラー応答レベル設定値毎に記憶されている。さらに、記憶部4には、現在のエラー応答レベル設定値(0,1,2のいずれか)と、表2に示したようなデータの定義と、データとが格納されている。   As described above, the storage unit 4 stores the relationship between error contents and error codes (Table 1), and the determination criterion (Table 1) indicating the determination result to be made by the response unit 5 is the type of error. Stored for each (error code) and for each error response level setting value. Further, the storage unit 4 stores the current error response level setting value (either 0, 1 or 2), the data definition as shown in Table 2, and the data.

応答部5は、実行部3での実行結果に基づいてエラーが発生したか否かを判定し、エラーが発生した場合には実行部3での実行結果と表1の情報に基づいてエラーの種類(エラーコード)を特定し、特定したエラーの種類と通信機器の現在のエラー応答レベル設定値と表1の情報に基づいて、エラー応答するか否かを判定し、判定結果に応じて正常応答フレームまたはエラー応答フレームのいずれかを作成する。   The response unit 5 determines whether or not an error has occurred based on the execution result in the execution unit 3. If an error has occurred, the response unit 5 determines the error based on the execution result in the execution unit 3 and the information in Table 1. Identifies the type (error code), determines whether to respond with an error based on the specified error type, the current error response level setting value of the communication device, and the information in Table 1, and is normal according to the determination result Create either a response frame or an error response frame.

応答フレーム送信部6は、応答部5が作成した応答フレームを、命令フレームの送信元の上位機器に返信する(図2ステップS5)。
以上により、命令フレームに対する通信機器の一連の処理が終了する。
The response frame transmission unit 6 returns the response frame created by the response unit 5 to the higher-level device that is the transmission source of the command frame (step S5 in FIG. 2).
Thus, a series of processing of the communication device for the command frame is completed.

本実施の形態では、記憶部4に記憶されたエラー応答レベル設定値によって、エラー応答の判定基準を簡単に切り替えることができる。例えば通信機器の運用時には、エラー応答レベル(感度)を表1のレベル0に下げることで、軽微なエラーでエラー応答が発生しないようにすることができ、一方、通信機器の試験を行いたいときには、エラーの原因が分かるようにするためにエラー応答レベル(感度)を表1のレベル2に上げることで、エラーの重大性と無関係にエラー応答を発生させることができる。こうして、通信機器の運用時には軽微なエラー発生による機器の停止を防止することができ、通信機器の試験を行うときには軽微なエラーでも、その原因を容易に調査可能となる。   In the present embodiment, the error response determination criteria can be easily switched by the error response level setting value stored in the storage unit 4. For example, when operating a communication device, the error response level (sensitivity) can be lowered to level 0 in Table 1 to prevent an error response from being generated by a minor error. On the other hand, when a communication device test is desired. By increasing the error response level (sensitivity) to level 2 in Table 1 so that the cause of the error can be understood, an error response can be generated regardless of the severity of the error. In this way, it is possible to prevent the device from being stopped due to a minor error when the communication device is operated, and it is possible to easily investigate the cause of a minor error when testing the communication device.

[エラー応答レベル設定値2での動作]
次に、本実施の形態の通信機器の動作をより具体的な例で説明する。ここでは、通信機器の試験を行うために、エラー応答レベル設定値が「2」(表1のレベル2)になっているものとする。例えば、上位機器から「101,W,1,4,500,600,0,800」という書き込み命令フレームを受信したものとする。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス1の温度測定値として500を書き込み、アドレス2の温度設定値として600を書き込み、アドレス3の温度警報発生状態の値として0を書き込み、アドレス4の温度警報設定値として800を書き込む」ことを意味している。
[Operation with error response level setting 2]
Next, the operation of the communication device according to the present embodiment will be described with a more specific example. Here, it is assumed that the error response level setting value is “2” (level 2 in Table 1) in order to test the communication device. For example, it is assumed that a write command frame “101, W, 1, 4, 500, 600, 0, 800” is received from a higher-level device. This write command frame writes “500 is written as the temperature measurement value of address 1 of the communication device having the device identification number 101, 600 is written as the temperature setting value of address 2, and 0 is written as the value of the temperature alarm generation state of address 3. , “800 is written as the temperature alarm setting value of address 4”.

応答部5は、記憶部4に記憶されているデータの定義(表2)に基づき、アドレス1の温度測定値への書き込みは常時不可であると判定する。また、応答部5は、アドレス2の温度設定値への書き込みは常時可であり、指定されたデータの値600は書き込み可能なデータの範囲内であると判定する。また、応答部5は、アドレス3の温度警報発生状態への書き込みは常時不可であると判定する。さらに、応答部5は、アドレス4の温度警報設定値への書き込みは常時可であり、指定されたデータの値800は書き込み可能なデータの範囲内であると判定する。   The response unit 5 determines that writing to the temperature measurement value at the address 1 is always impossible based on the definition of data stored in the storage unit 4 (Table 2). The response unit 5 determines that writing to the temperature setting value at the address 2 is always possible, and that the designated data value 600 is within the writable data range. The response unit 5 determines that writing to the temperature alarm generation state at the address 3 is always impossible. Furthermore, the response unit 5 determines that writing to the temperature alarm setting value at the address 4 is always possible, and that the designated data value 800 is within the writable data range.

したがって、応答部5は、「101,W,1,4,500,600,0,800」という書き込み命令フレームに対して、「101,30」という書き込みエラー応答フレームを作成する。この書き込みエラー応答フレームは、「機器識別番号101の通信機器に対して、書き込みが常時不可のデータを書き込もうとするエラーが発生した」ことを意味している。   Accordingly, the response unit 5 creates a write error response frame “101, 30” for the write command frame “101, W, 1, 4, 500, 600, 0, 800”. This write error response frame means that “an error has occurred in the communication device having the device identification number 101 to write data that cannot be written at all times”.

この書き込みエラーの原因は表2のデータ構成に照らせば明白である。通信機器の使用者は、「101,W,1,4,500,600,0,800」という書き込み命令フレームを通信機器に対して送信すれば、書き込みエラーになることと、温度測定値と温度警報発生状態への書き込みはできないことを承知しているので、書き込みエラー応答フレームが発生しても「問題ない」と判断することができる。   The cause of this write error is obvious in light of the data structure shown in Table 2. If the user of the communication device transmits a write command frame of “101, W, 1, 4, 500, 600, 0, 800” to the communication device, a write error occurs, and the temperature measurement value and temperature Since it knows that writing to the alarm occurrence state is impossible, it can be determined that there is no problem even if a write error response frame occurs.

アドレス1の温度測定値とアドレス3の温度警報発生状態への書き込みは、本来は不要であるが、1つの命令フレームで4個のデータを読み出したり、書き込んだりすることで、通信システムを簡易にすることができる。   Writing to the temperature measurement value at address 1 and the temperature alarm generation state at address 3 is not necessary originally, but it is possible to simplify the communication system by reading and writing four data in one command frame. can do.

さらに別の例として、上位機器の通信ソフトウェアのバグにより、「101,W,1,4」という書き込み命令フレームを受信したものとする。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス1から順に4個のデータを書き込む」ことを意味しているが、書き込み命令フレーム中に4個のデータが記述されていない。このため、応答部5は、パラメータの数が命令に合っていないと判定する。   As yet another example, it is assumed that a write command frame “101, W, 1, 4” is received due to a bug in the communication software of the host device. This write command frame means that “four data are written in order from address 1 of the communication device having the device identification number 101”, but four data are not described in the write command frame. For this reason, the response unit 5 determines that the number of parameters does not match the command.

そして、応答部5は、「101,11」という書き込みエラー応答フレームを作成する。この書き込みエラー応答フレームは、「機器識別番号101の通信機器に送信した命令フレームにおいてパラメータの数が命令に合っていない」ことを意味している。このエラーは、命令フレームを送信した装置の通信ソフトウェアのバグに起因するものである。通信機器の使用者は、書き込みエラー応答フレームが発生したことにより、「対策が必要である」と判断することができる。   Then, the response unit 5 creates a write error response frame “101, 11”. This write error response frame means that “the number of parameters does not match the command in the command frame transmitted to the communication device having the device identification number 101”. This error is due to a bug in the communication software of the device that sent the command frame. The user of the communication device can determine that “measures are required” based on the occurrence of the write error response frame.

[エラー応答レベル設定値0での動作]
次に、エラー応答レベル設定値が「0」(表1のレベル0)になっているときの動作を説明する。例えば、上位機器から「101,W,1,4,500,600,0,800」という書き込み命令フレームを受信したものとする。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス1の温度測定値として500を書き込み、アドレス2の温度設定値として600を書き込み、アドレス3の温度警報発生状態の値として0を書き込み、アドレス4の温度警報設定値として800を書き込む」ことを意味している。
[Operation at error response level setting 0]
Next, the operation when the error response level setting value is “0” (level 0 in Table 1) will be described. For example, it is assumed that a write command frame “101, W, 1, 4, 500, 600, 0, 800” is received from a higher-level device. This write command frame writes “500 is written as the temperature measurement value of address 1 of the communication device having the device identification number 101, 600 is written as the temperature setting value of address 2, and 0 is written as the value of the temperature alarm generation state of address 3. , “800 is written as the temperature alarm setting value of address 4”.

応答部5は、記憶部4に記憶されているデータの定義(表2)に基づき、アドレス1の温度測定値への書き込みは常時不可であると判定する。また、応答部5は、アドレス2の温度設定値への書き込みは常時可であり、指定されたデータの値600は書き込み可能なデータの範囲内であると判定する。また、応答部5は、アドレス3の温度警報発生状態への書き込みは常時不可であると判定する。さらに、応答部5は、アドレス4の温度警報設定値への書き込みは常時可であり、指定されたデータの値800は書き込み可能なデータの範囲内であると判定する。   The response unit 5 determines that writing to the temperature measurement value at the address 1 is always impossible based on the definition of data stored in the storage unit 4 (Table 2). The response unit 5 determines that writing to the temperature setting value at the address 2 is always possible, and that the designated data value 600 is within the writable data range. The response unit 5 determines that writing to the temperature alarm generation state at the address 3 is always impossible. Furthermore, the response unit 5 determines that writing to the temperature alarm setting value at the address 4 is always possible, and that the designated data value 800 is within the writable data range.

したがって、エラー応答レベル設定値が「2」であれば、上記のとおり「101,30」という書き込みエラー応答フレームが作成される。これに対して、エラー応答レベル設定値が「0」の場合、応答部5は、「101,0」という書き込み正常応答フレームを作成する。   Therefore, if the error response level setting value is “2”, the write error response frame “101, 30” is created as described above. On the other hand, when the error response level setting value is “0”, the response unit 5 creates a write normal response frame “101,0”.

このような書き込み正常応答フレームが作成される理由は、エラー応答レベル設定値が「0」の場合、書き込みが常時不可のデータを書き込もうとするエラーが発生した場合でも、正常と判定されるからである。通信機器の使用者は、「101,W,1,4,500,600,0,800」という書き込み命令フレームを通信機器に対して送信すれば、書き込みが禁止されている温度測定値や温度警報発生状態の値に書き込みを試みることになり、軽微な書き込みエラーとなるが、通信機器の応答としては書き込み正常応答フレームになることを承知しているので、「問題ない」と判断することができる。   The reason why such a writing normal response frame is created is that, when the error response level setting value is “0”, it is determined to be normal even if an error occurs in which data that cannot be written is written. is there. If the user of the communication device transmits a write command frame of “101, W, 1, 4, 500, 600, 0, 800” to the communication device, the temperature measurement value or temperature alarm that is prohibited from being written. It will attempt to write to the value of the occurrence state, resulting in a minor write error, but since it knows that it will be a normal write response frame as a response of the communication device, it can be determined that there is no problem .

さらに別の例として、上位機器の通信ソフトウェアのバグにより、「101,W,1,4」という書き込み命令フレームを受信したものとする。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス1から順に4個のデータを書き込む」ことを意味しているが、書き込み命令フレーム中に4個のデータが記述されていない。このため、応答部5は、パラメータの数が命令に合っていないと判定する。   As yet another example, it is assumed that a write command frame “101, W, 1, 4” is received due to a bug in the communication software of the host device. This write command frame means that “four data are written in order from address 1 of the communication device having the device identification number 101”, but four data are not described in the write command frame. For this reason, the response unit 5 determines that the number of parameters does not match the command.

したがって、応答部5は、「101,11」という書き込みエラー応答フレームを作成する。このような書き込みエラー応答フレームが作成される理由は、エラー応答レベル設定値が「0」または「2」のいずれの場合でも、パラメータの数が命令に合っていない場合、異常と判定されるからである。このエラーは、命令フレームを送信した装置の通信ソフトウェアのバグに起因するものである。通信機器の使用者は、書き込みエラー応答フレームが発生したことにより、「対策が必要である」と判断することができる。   Therefore, the response unit 5 creates a write error response frame “101, 11”. The reason why such a write error response frame is created is that, even if the error response level setting value is “0” or “2”, it is determined as abnormal if the number of parameters does not match the command. It is. This error is due to a bug in the communication software of the device that sent the command frame. The user of the communication device can determine that “measures are required” based on the occurrence of the write error response frame.

[エラー応答レベル設定値1での動作]
次に、エラー応答レベル設定値が「1」(表1のレベル1)になっているときの動作を説明する。例えば、上位機器から「101,R,1,4」という読み出し命令フレームを受信したものとする。この読み出し命令フレームは、「機器識別番号101の通信機器のアドレス1から4個のデータを読み出す」ことを意味している。
[Operation with error response level setting 1]
Next, the operation when the error response level setting value is “1” (level 1 in Table 1) will be described. For example, it is assumed that a read command frame “101, R, 1, 4” is received from the host device. This read command frame means that “four data are read from address 1 of the communication device having the device identification number 101”.

応答部5は、記憶部4に記憶されているデータの定義(表2)に基づき、アドレス1の温度測定値、アドレス2の温度設定値、アドレス3の温度警報発生状態、およびアドレス4の温度警報設定値は全て常時読み出し可能であると判定する。したがって、応答部5は、例えば「101,0,100,200,300,400」という読み出し正常応答フレームを作成する。この読み出し正常応答フレームは、「機器識別番号101の通信機器からデータを正常に読み出すことができ、読み出したデータは順に100,200,300,400である」ことを意味している。   Based on the definition of the data stored in the storage unit 4 (Table 2), the response unit 5 measures the temperature measured value at the address 1, the temperature set value at the address 2, the temperature alarm generation state at the address 3, and the temperature at the address 4 It is determined that all alarm setting values can be read at all times. Accordingly, the response unit 5 creates a read normal response frame such as “101, 0, 100, 200, 300, 400”, for example. This read normal response frame means that “data can be normally read from the communication device having the device identification number 101, and the read data is 100, 200, 300, 400 in order”.

さらに別の例として、上位機器から「101,R,10,1」という読み出し命令フレームを受信したものとする。この読み出し命令フレームは、「機器識別番号101の通信機器のアドレス10から1個のデータを読み出す」ことを意味している。ここで、記憶部4のアドレス10に格納されているデータが常時読み出し不可のデータであるとする。したがって、エラー応答レベル設定値が「2」であれば、応答部5は、「101,20,0」という読み出しエラー応答フレームを作成する。これに対して、エラー応答レベル設定値が「1」の場合、応答部5は、「101,0」という読み出し正常応答フレームを作成する。このような読み出し正常応答フレームが作成される理由は、エラー応答レベル設定値が「1」の場合、読み出しが常時不可のデータを読み出そうとするエラーが発生した場合でも、正常と判定されるからである。   As yet another example, it is assumed that a read command frame “101, R, 10, 1” has been received from a host device. This read command frame means “read one piece of data from the address 10 of the communication device having the device identification number 101”. Here, it is assumed that the data stored at the address 10 of the storage unit 4 is data that cannot be read at all times. Therefore, if the error response level setting value is “2”, the response unit 5 creates a read error response frame “101, 20, 0”. On the other hand, when the error response level setting value is “1”, the response unit 5 creates a read normal response frame “101,0”. The reason why such a read normal response frame is created is that when the error response level setting value is “1”, it is determined that the read normal response frame is normal even when an error occurs when reading data that cannot always be read. Because.

[エラー応答レベルの変更方法]
上記のように、記憶部4には、エラー応答レベル設定値(0,1,2のいずれか)が格納されており、このエラー応答レベル設定値により通信機器のエラー応答レベルが決定される。このエラー応答レベル設定値を変更することで、通信機器のエラー応答レベルを変更することができる。
[How to change the error response level]
As described above, the error response level setting value (any of 0, 1, and 2) is stored in the storage unit 4, and the error response level of the communication device is determined based on the error response level setting value. By changing the error response level setting value, the error response level of the communication device can be changed.

エラー応答レベル設定値の変更方法としては、ネットワークを介して上位機器から変更する方法がある。ここで、エラー応答レベル設定値が記憶部4のアドレス9999に格納されているとすると、上位機器から例えば「101,W,9999,1,2」という書き込み命令フレームを送信する。この書き込み命令フレームは、「機器識別番号101の通信機器のアドレス9999の値として2を書き込む」ことを意味している。   As a method of changing the error response level setting value, there is a method of changing from an upper device via a network. Here, assuming that the error response level setting value is stored in the address 9999 of the storage unit 4, a write command frame such as “101, W, 9999, 1, 2” is transmitted from the host device. This write command frame means “write 2 as the value of the address 9999 of the communication device having the device identification number 101”.

設定部7は、命令フレーム解析部2による命令フレームの解析の結果、エラー応答レベル設定値への書き込みを指示する書き込み命令フレームであることを認識すると、この書き込み命令フレームで指定された値2を、記憶部4のアドレス9999のエラー応答レベル設定値として書き込む。こうして、命令フレームによってエラー応答レベル設定値を変更することができる。   When the setting unit 7 recognizes that it is a write command frame that instructs writing to the error response level setting value as a result of the analysis of the command frame by the command frame analysis unit 2, the value 2 specified in this write command frame is set. Then, it is written as the error response level setting value at the address 9999 in the storage unit 4. Thus, the error response level setting value can be changed according to the command frame.

なお、上記のエラー応答レベル設定値の変更方法は通信機器1台ごとにエラー応答レベル設定値を変更する方法であるが、ネットワークに接続された全ての通信機器に対して、エラー応答レベル設定値を変えるような通信システム命令を定義すれば、その命令によって、全ての通信機器のエラー応答レベル設定値を変更することができる。例えば全ての通信機器を対象とする場合の機器識別番号を0と定義する。この場合、例えば「0,W,9999,1,2」という書き込み命令フレームを送信すればよい。これにより、ネットワークに接続されている全ての通信機器のアドレス9999に格納されているエラー応答レベル設定値を2に変更することができる。   The method for changing the error response level setting value is a method for changing the error response level setting value for each communication device. However, for all communication devices connected to the network, the error response level setting value By defining a communication system command that changes the error response level, it is possible to change the error response level setting values of all communication devices. For example, the device identification number for all communication devices is defined as 0. In this case, for example, a write command frame “0, W, 9999, 1, 2” may be transmitted. Thereby, the error response level setting value stored in the address 9999 of all communication devices connected to the network can be changed to 2.

また、上記のエラー応答レベル設定値の変更方法は、エラー応答レベル設定値変更のための命令フレームを使う方法であるが、上位機器から通信機器への通信のアクセス用の命令フレーム自体にエラー応答レベル設定値の切り替えのための指定情報を記述するようにしてもよい。   In addition, the error response level setting value changing method described above is a method of using an instruction frame for changing the error response level setting value. However, an error response is sent to the instruction frame itself for communication access from the host device to the communication device. Specification information for switching the level setting value may be described.

エラー応答レベル設定値を命令フレームによって変更した場合、その変更の有効な時間を定義、あるいは設定できるようにしてもよい。この場合、設定部7は、変更の有効な時間が過ぎたときに、記憶部4に記憶されているエラー応答レベル設定値を変更前の値に戻す。これにより、使用者が通信機器のエラー応答レベルを一時的に変更した後に、エラー応答レベルを元に戻すことを忘れてしまったとしても、通信機器のエラー応答レベルを自動的に復帰させることができる。   When the error response level setting value is changed by the instruction frame, the effective time of the change may be defined or set. In this case, when the effective time for the change has passed, the setting unit 7 returns the error response level setting value stored in the storage unit 4 to the value before the change. This allows the error response level of the communication device to be automatically restored even if the user forgets to restore the error response level after temporarily changing the error response level of the communication device. it can.

また、エラー応答レベル設定値を命令フレームによって変更した場合、変更後に通信機器の停電やリセットが起きた場合には、設定部7は、変更後のエラー応答レベル設定値を維持するようにしてもよいし、エラー応答レベル設定値を予め定められた初期値に戻すようにしてもよい。   In addition, when the error response level setting value is changed by the instruction frame, when the communication device is interrupted or reset after the change, the setting unit 7 may maintain the changed error response level setting value. Alternatively, the error response level setting value may be returned to a predetermined initial value.

[エラー応答レベルの確認方法]
エラー応答レベル設定値の変更方法があるならば、その結果であるエラー応答レベルを確認する方法もあると便利である。このような方法があれば、エラー応答レベル設定値の変更が正しく行われたこと、あるいは、行われなかったことを確認できる。また、現在の応答フレームのエラーコードが、どのようなエラー応答レベルで判断されたものかを確認できる。
[How to check the error response level]
If there is a method for changing the error response level setting value, it is convenient if there is a method for checking the error response level as a result. With such a method, it can be confirmed that the error response level setting value has been changed correctly or has not been changed. Further, it is possible to confirm at what error response level the error code of the current response frame is determined.

上記と同様に、エラー応答レベル設定値が記憶部4のアドレス9999に格納されているとすると、上位機器から例えば「101,R,9999,1」という読み出し命令フレームを送信する。この読み出し命令フレームは、「機器識別番号101の通信機器のアドレス9999からデータ1個を読み出す」ことを意味している。   Similarly to the above, if the error response level setting value is stored in the address 9999 of the storage unit 4, a read command frame such as “101, R, 9999, 1” is transmitted from the host device. This read command frame means “read one piece of data from the address 9999 of the communication device having the device identification number 101”.

この読み出し命令フレームに対して、応答部5は、例えば「101,0,2」という読み出し応答フレームを作成する。この読み出し応答フレームは、「機器識別番号101の通信機器からデータを正常に読み出すことができ、読み出したデータは2である」ことを意味している。こうして、命令フレームによって通信機器のエラー応答レベル設定値を読み出すことができるので、通信機器の使用者は現在のエラー応答レベルを確認することができる。   In response to this read command frame, the response unit 5 creates a read response frame of “101, 0, 2”, for example. This read response frame means that “data can be normally read from the communication device having the device identification number 101, and the read data is 2.” Thus, since the error response level setting value of the communication device can be read out by the command frame, the user of the communication device can check the current error response level.

なお、上記の確認方法はエラー応答レベル設定値を通信によって読み出す方法であるが、応答部5が現在のエラー応答レベル設定値を表示部8に表示させるようにしてもよい。表示の方法としては、エラー応答レベル設定値をそのまま数値表示したり、LEDなどのランプの点灯/消灯、色、点滅の間隔でエラー応答レベル設定値を区別して表示したりする方法がある。こうして、通信機器の現在のエラー応答レベルを使用者に知らせることができる。   Although the above confirmation method is a method of reading the error response level setting value by communication, the response unit 5 may cause the display unit 8 to display the current error response level setting value. As a display method, there are a method of numerically displaying the error response level setting value as it is, or a method of distinguishing and displaying the error response level setting value according to lighting / extinguishing of a lamp such as an LED, a color, and a blinking interval. Thus, the current error response level of the communication device can be notified to the user.

[第2の実施の形態]
第1の実施の形態では、エラー応答レベル設定値を命令フレームによって変更しているが、これに限るものではなく、例えば通信機器に設けられた操作スイッチ9によって変更することも可能である。すなわち、設定部7は、使用者がエラー応答レベル設定用の操作スイッチ9を操作したときに、記憶部4に記載されている、通信機器の現在のエラー応答レベル設定値を操作スイッチ9の操作に応じて変更する。
[Second Embodiment]
In the first embodiment, the error response level setting value is changed by the command frame, but the present invention is not limited to this. For example, the error response level setting value can be changed by the operation switch 9 provided in the communication device. In other words, when the user operates the operation switch 9 for setting the error response level, the setting unit 7 operates the operation switch 9 with the current error response level setting value of the communication device described in the storage unit 4. Change according to.

また、エラー応答レベル設定値を特定のデジタル入力によって変更することも可能である。デジタル入力部10は、外部の装置からのデジタル入力を受け付ける。記憶部4には、特定のデジタル入力がLOW状態のときのエラー応答レベル設定値と、特定のデジタル入力がHIGH状態のときのエラー応答レベル設定値とが予め記憶されている。設定部7は、特定のデジタル入力の状態に応じて、LOW状態のときのエラー応答レベル設定値とHIGH状態のときのエラー応答レベル設定値のいずれかを選択し、選択した値を通信機器の現在のエラー応答レベル設定値とする。こうして、特定のデジタル入力のLOW、HIGHを切り替えることによって、エラー応答レベル設定値を変更することができる。   It is also possible to change the error response level setting value by a specific digital input. The digital input unit 10 receives a digital input from an external device. The storage unit 4 stores in advance an error response level setting value when the specific digital input is in the LOW state and an error response level setting value when the specific digital input is in the HIGH state. The setting unit 7 selects either the error response level setting value in the LOW state or the error response level setting value in the HIGH state according to the state of the specific digital input, and selects the selected value of the communication device. The current error response level setting value. In this way, the error response level setting value can be changed by switching between LOW and HIGH of a specific digital input.

なお、上記のエラー応答レベル設定値の変更方法では、特定のデジタル入力がLOW状態のときのエラー応答レベル設定値とHIGH状態のときのエラー応答レベル設定値とは、記憶部4に予め設定されている固定値であるが、例えば書き込み命令フレームを用いることによって、これらのエラー応答レベル設定値を書き換え可能なことは言うまでもない。   In the above-described method for changing the error response level setting value, the error response level setting value when the specific digital input is in the LOW state and the error response level setting value when the specific digital input is in the HIGH state are set in the storage unit 4 in advance. Needless to say, these error response level setting values can be rewritten, for example, by using a write command frame.

[第3の実施の形態]
次に、本発明の第3の実施の形態について説明する。本実施の形態においても通信機器の構成は第1の実施の形態と同様であるので、図1の符号を用いて説明する。第1、第2の実施の形態では、エラー応答レベル設定値が通信機器のモードと無関係に設定されるようになっているが、エラー応答レベル設定値を通信機器のモードと連動させるようにしてもよい。本実施の形態における通信機器のモードとエラー応答レベル設定値との関係の1例を表3に示す。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. Since the configuration of the communication device in this embodiment is the same as that in the first embodiment, the description will be given using the reference numerals in FIG. In the first and second embodiments, the error response level setting value is set regardless of the mode of the communication device. However, the error response level setting value is linked with the mode of the communication device. Also good. Table 3 shows an example of the relationship between the communication device mode and the error response level setting value in the present embodiment.

Figure 2015109535
Figure 2015109535

表3の例では、通信機器のモードが運用モードのときはエラー応答レベル設定値が0となり、通信機器のモードが通信機器の試験用のデバッグモードのときはエラー応答レベル設定値が2となる。
本実施の形態の記憶部4には、表3に示したような通信機器のモードとエラー応答レベル設定値との関係が格納されている。
In the example of Table 3, the error response level setting value is 0 when the communication device mode is the operation mode, and the error response level setting value is 2 when the communication device mode is the debug mode for testing the communication device. .
The storage unit 4 of the present embodiment stores the relationship between the communication device mode and the error response level setting value as shown in Table 3.

設定部7は、記憶部4に記憶されているエラー応答レベル設定値のうち、通信機器のモードに対応するエラー応答レベル設定値を、通信機器の現在のエラー応答レベル設定値として設定する。したがって、エラー要因とエラー応答レベルとの関係が表1のとおりであれば、運用モードでは、エラーコード10,11のエラーを異常(エラー応答する)と判定し、エラーコード20,21,30,31,32のエラーを正常(エラー応答しない)と判定する。また、デバッグモードでは、全てのエラーコードのエラーを異常と判定する。   The setting unit 7 sets the error response level setting value corresponding to the mode of the communication device among the error response level setting values stored in the storage unit 4 as the current error response level setting value of the communication device. Therefore, if the relationship between the error cause and the error response level is as shown in Table 1, in the operation mode, it is determined that the error of error codes 10 and 11 is abnormal (error response), and error codes 20, 21, 30, It is determined that the errors 31 and 32 are normal (no error response). In the debug mode, all error code errors are determined to be abnormal.

エラー応答レベル設定値が0〜1での通信機器の具体的な動作は第1の実施の形態で説明したとおりである。
以上のように、本実施の形態では、エラー応答レベル設定値を通信機器のモードと連動させることによって、エラー応答の判定基準を簡単に切り替えることができる。例えば通信機器の運用モードでは、エラー応答レベル(感度)を表1のレベル0に下げることで、軽微なエラーでエラー応答が発生しないようにすることができ、一方、通信機器の試験を行うデバッグモードでは、エラーの原因が分かるようにするためにエラー応答レベル(感度)を表1のレベル2に上げることで、エラーの重大性と無関係にエラー応答を発生させることができる。こうして、通信機器の運用時には軽微なエラー発生による機器の停止を防止することができ、通信機器の試験を行うときには軽微なエラーでも、その原因を容易に調査可能となる。
The specific operation of the communication device when the error response level setting value is 0 to 1 is as described in the first embodiment.
As described above, in the present embodiment, the error response determination criteria can be easily switched by linking the error response level setting value with the mode of the communication device. For example, in the communication device operation mode, the error response level (sensitivity) can be lowered to level 0 in Table 1 to prevent an error response from occurring with a minor error, while debugging to test the communication device. In the mode, by raising the error response level (sensitivity) to level 2 in Table 1 so that the cause of the error can be understood, an error response can be generated regardless of the severity of the error. In this way, it is possible to prevent the device from being stopped due to a minor error when the communication device is operated, and it is possible to easily investigate the cause of a minor error when testing the communication device.

また、通信機器のモードを変えることによって、使用者は必要な情報から効率よく判断を行うことが可能となる。
通信機器のデバッグモードでは、エラー応答レベルが2となるので、書き込み命令フレーム中に記述された、個々のアドレスに対する書き込みが全て行われたのか、一部あるいは全部が行われなかったのかを確認することができるし、書き込み命令フレーム自体が正常なのか異常なのかも確認することができる。このようにすれば、使用者は、書き込み命令フレームに対する通信機器の動作を調べることができるので、通信システムのデバッグを効率的に行うことが可能になる。
In addition, by changing the mode of the communication device, the user can make an efficient determination from necessary information.
Since the error response level is 2 in the debug mode of the communication device, it is confirmed whether writing to each address described in the write command frame has been performed completely or partly or not. It is also possible to confirm whether the write command frame itself is normal or abnormal. In this way, the user can check the operation of the communication device with respect to the write command frame, so that the communication system can be debugged efficiently.

一方、通信機器の運用モードでは、エラー応答レベルが0となるので、書き込み命令フレーム中に記述された、個々のアドレスに対する書き込みについては確認できなくなるが、書き込み命令フレーム自体が正常なのか異常なのかは確認することができる。このようにすれば、通信システムを運用している時に異常な命令フレームだけを容易に検出できるようになる。また、運用モードにおいて通信機器から書き込み正常応答フレームが返ってくるにも拘わらず、特定のアドレスに対する書き込みが行われない場合、デバッグモードに切り替えて、書き込みエラー応答フレーム中のエラーコードを確かめて、データの書き込みが行われない理由を調べることができる。   On the other hand, in the operation mode of the communication device, since the error response level is 0, writing to individual addresses described in the write command frame cannot be confirmed, but is the write command frame itself normal or abnormal? Can be confirmed. In this way, only an abnormal command frame can be easily detected when the communication system is operated. In addition, even if a write normal response frame is returned from the communication device in the operation mode, if writing to a specific address is not performed, switch to debug mode and check the error code in the write error response frame, The reason why data is not written can be investigated.

[エラー応答レベルの変更方法]
エラー応答レベルを変更する方法としては、第1、第2の実施の形態と同様に、命令フレームを用いる方法と、操作スイッチ9を用いる方法と、デジタル入力を用いる方法とがある。
[How to change the error response level]
As a method of changing the error response level, there are a method using an instruction frame, a method using an operation switch 9, and a method using a digital input, as in the first and second embodiments.

命令フレームを用いてエラー応答レベルを変更する場合には、上位機器から通信機器のモードを変更する命令フレームを送信すればよい。設定部7は、命令フレーム解析部2による命令フレームの解析の結果、通信機器のモード変更を指示する命令フレームであることを認識すると、通信機器のモードを命令フレームで指定されたモードに変更する。さらに、設定部7は、記憶部4に記憶されているエラー応答レベル設定値のうち、変更後の通信機器のモードに対応するエラー応答レベル設定値を、通信機器の現在のエラー応答レベル設定値として設定する。こうして、命令フレームによって、通信機器のモードと連動してエラー応答レベル設定値を変更することができる。   When the error response level is changed using the command frame, a command frame for changing the mode of the communication device may be transmitted from the host device. When the setting unit 7 recognizes that the command frame is a command frame instructing the mode change of the communication device as a result of the command frame analysis by the command frame analysis unit 2, the setting unit 7 changes the mode of the communication device to the mode specified by the command frame. . Further, the setting unit 7 sets the error response level setting value corresponding to the changed mode of the communication device among the error response level setting values stored in the storage unit 4 to the current error response level setting value of the communication device. Set as. Thus, the error response level setting value can be changed in conjunction with the mode of the communication device by the command frame.

また、使用者がモード設定用の操作スイッチ9を操作すると、設定部7は、操作スイッチ9の操作に応じて通信機器のモードを変更する。さらに、設定部7は、変更後の通信機器のモードに対応するエラー応答レベル設定値を、通信機器の現在のエラー応答レベル設定値として設定する。こうして、操作スイッチ9によって、通信機器のモードと連動してエラー応答レベル設定値を変更することができる。   When the user operates the mode setting operation switch 9, the setting unit 7 changes the mode of the communication device according to the operation of the operation switch 9. Furthermore, the setting unit 7 sets the error response level setting value corresponding to the changed mode of the communication device as the current error response level setting value of the communication device. In this way, the error response level setting value can be changed by the operation switch 9 in conjunction with the mode of the communication device.

また、デジタル入力を用いてエラー応答レベルを変更する場合には、特定のデジタル入力を通信機器に与えるようにすればよい。設定部7は、特定のデジタル入力に応じて通信機器のモードを変更する。さらに、設定部7は、変更後の通信機器のモードに対応するエラー応答レベル設定値を、通信機器の現在のエラー応答レベル設定値として設定する。こうして、デジタル入力によって、通信機器のモードと連動してエラー応答レベル設定値を変更することができる。   In addition, when the error response level is changed using digital input, a specific digital input may be given to the communication device. The setting unit 7 changes the mode of the communication device according to a specific digital input. Furthermore, the setting unit 7 sets the error response level setting value corresponding to the changed mode of the communication device as the current error response level setting value of the communication device. Thus, the error response level setting value can be changed in conjunction with the mode of the communication device by digital input.

なお、上記のエラー応答レベル設定値の変更方法では、通信機器のモードとエラー応答レベル設定値との関係が固定状態となっているが、例えば書き込み命令フレームを用いることによって、通信機器の各モードに対応するエラー応答レベル設定値を書き換え可能なことは言うまでもない。これにより、表3に示した関係を変更することができる。   In the above error response level setting value changing method, the relationship between the mode of the communication device and the error response level setting value is fixed, but for example, each mode of the communication device can be determined by using a write command frame. It goes without saying that the error response level setting value corresponding to can be rewritten. Thereby, the relationship shown in Table 3 can be changed.

エラー応答レベルを確認する方法は第1の実施の形態で説明したとおりである。なお、本実施の形態の場合には、通信機器のモードとエラー応答レベル設定値とが連動しているので、通信機器の現在のモードを確認できれば、エラー応答レベルを推定することも可能である。   The method for confirming the error response level is as described in the first embodiment. In the case of the present embodiment, since the mode of the communication device and the error response level setting value are linked, it is possible to estimate the error response level if the current mode of the communication device can be confirmed. .

第1〜第3の実施の形態で説明した通信機器は、CPU(Central Processing Unit)、記憶装置及びインタフェースを備えたコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。CPUは、記憶装置に格納されたプログラムに従って第1〜第3の実施の形態で説明した処理を実行する。   The communication apparatus described in the first to third embodiments can be realized by a computer having a CPU (Central Processing Unit), a storage device, and an interface, and a program for controlling these hardware resources. The CPU executes the processes described in the first to third embodiments in accordance with a program stored in the storage device.

本発明は、ネットワークに接続されたコントローラなどの通信機器において、エラー応答の判定基準を切り替える技術に適用することができる。   The present invention can be applied to a technique for switching error response determination criteria in a communication device such as a controller connected to a network.

1…命令フレーム受信部、2…命令フレーム解析部、3…実行部、4…記憶部、5…応答部、6…応答フレーム送信部、7…設定部、8…表示部、9…操作スイッチ、10…デジタル入力部。   DESCRIPTION OF SYMBOLS 1 ... Command frame receiving part, 2 ... Command frame analysis part, 3 ... Execution part, 4 ... Memory | storage part, 5 ... Response part, 6 ... Response frame transmission part, 7 ... Setting part, 8 ... Display part, 9 ... Operation switch 10: Digital input section.

Claims (10)

上位機器から命令フレームを受信する命令フレーム受信手段と、
前記命令フレームを解析する命令フレーム解析手段と、
前記命令フレームの解析結果に応じた処理を実行する実行手段と、
エラー応答のレベルを表すエラー応答レベル設定値を記憶する記憶手段と、
前記実行手段の実行結果と前記エラー応答レベル設定値とに基づいてエラー応答するか否かを判定し、この判定結果に応じて前記命令フレームに対する応答フレームを作成する応答手段と、
前記応答フレームを前記上位機器に送信する応答フレーム送信手段とを備えることを特徴とする通信機器。
Command frame receiving means for receiving a command frame from a host device;
An instruction frame analyzing means for analyzing the instruction frame;
Execution means for executing processing according to the analysis result of the instruction frame;
Storage means for storing an error response level setting value representing an error response level;
A response unit for determining whether to perform an error response based on the execution result of the execution unit and the error response level setting value, and for generating a response frame for the command frame according to the determination result;
A communication device comprising response frame transmission means for transmitting the response frame to the higher-level device.
請求項1記載の通信機器において、
さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、前記エラー応答レベル設定値を設定するエラー応答レベル設定手段を備えることを特徴とする通信機器。
The communication device according to claim 1, wherein
The communication device further comprises error response level setting means for setting the error response level setting value according to any of the command frame, an operation switch of the communication device, or a digital input to the communication device.
請求項1記載の通信機器において、
さらに、前記エラー応答レベル設定値を通信機器のモードに対応する値に設定するエラー応答レベル設定手段を備え、
前記記憶手段は、通信機器の各モードとエラー応答レベル設定値とを対応付けて予め記憶することを特徴とする通信機器。
The communication device according to claim 1, wherein
Further, an error response level setting means for setting the error response level setting value to a value corresponding to the mode of the communication device,
The storage unit stores in advance each mode of the communication device and an error response level setting value in association with each other.
請求項3記載の通信機器において、
さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、通信機器のモードを設定するモード設定手段を備え、
前記エラー応答レベル設定手段は、前記エラー応答レベル設定値を、前記モード設定手段によって変更された通信機器のモードに対応する値に変更することを特徴とする通信機器。
The communication device according to claim 3, wherein
Furthermore, it comprises mode setting means for setting the mode of the communication device in accordance with either the command frame, the operation switch of the communication device or the digital input to the communication device,
The communication device characterized in that the error response level setting means changes the error response level setting value to a value corresponding to the mode of the communication device changed by the mode setting means.
請求項1乃至4のいずれか1項に記載の通信機器において、
前記記憶手段は、前記応答手段が下すべき判定結果を表す判定基準を、エラーの種類毎およびエラー応答レベル設定値毎に予め記憶し、
前記応答手段は、前記実行手段の実行結果に基づいてエラーの種類を特定し、特定したエラーの種類と通信機器の現在のエラー応答レベル設定値と前記判定基準とに基づいて、エラー応答するか否かを判定することを特徴とする通信機器。
The communication device according to any one of claims 1 to 4,
The storage means stores in advance a determination criterion representing a determination result to be made by the response means for each error type and each error response level setting value,
Whether the response means identifies an error type based on the execution result of the execution means, and responds with an error based on the identified error type, the current error response level setting value of the communication device, and the determination criterion. A communication device characterized by determining whether or not.
上位機器から命令フレームを受信する命令フレーム受信ステップと、
前記命令フレームを解析する命令フレーム解析ステップと、
前記命令フレームの解析結果に応じた処理を実行する実行ステップと、
エラー応答のレベルを表すエラー応答レベル設定値を記憶している記憶手段を参照し、前記実行ステップの実行結果と通信機器の現在のエラー応答レベル設定値とに基づいてエラー応答するか否かを判定し、この判定結果に応じて前記命令フレームに対する応答フレームを作成する応答ステップと、
前記応答フレームを前記上位機器に送信する応答フレーム送信ステップとを含むことを特徴とする通信機器のエラー応答レベル切替方法。
A command frame receiving step for receiving a command frame from the host device;
An instruction frame analyzing step of analyzing the instruction frame;
An execution step of executing processing according to the analysis result of the instruction frame;
Whether or not to make an error response based on the execution result of the execution step and the current error response level setting value of the communication device with reference to storage means storing an error response level setting value representing the level of error response A response step of determining and generating a response frame for the command frame according to the determination result;
And a response frame transmission step of transmitting the response frame to the higher-level device.
請求項6記載の通信機器のエラー応答レベル切替方法において、
さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、前記エラー応答レベル設定値を設定するエラー応答レベル設定ステップを含むことを特徴とする通信機器のエラー応答レベル切替方法。
In the communication apparatus error response level switching method according to claim 6,
The communication device error further includes an error response level setting step for setting the error response level setting value according to any of the command frame, the operation switch of the communication device, or a digital input to the communication device. Response level switching method.
請求項6記載の通信機器のエラー応答レベル切替方法において、
さらに、前記エラー応答レベル設定値を通信機器のモードに対応する値に設定するエラー応答レベル設定ステップを含み、
前記記憶手段は、通信機器の各モードとエラー応答レベル設定値とを対応付けて予め記憶することを特徴とする通信機器のエラー応答レベル切替方法。
In the communication apparatus error response level switching method according to claim 6,
Furthermore, an error response level setting step for setting the error response level setting value to a value corresponding to the mode of the communication device,
An error response level switching method for a communication device, wherein the storage means stores each mode of the communication device and an error response level setting value in advance in association with each other.
請求項8記載の通信機器のエラー応答レベル切替方法において、
さらに、前記命令フレーム、通信機器の操作スイッチまたは通信機器へのデジタル入力のいずれかに応じて、通信機器のモードを設定するモード設定ステップを含み、
前記エラー応答レベル設定ステップは、前記エラー応答レベル設定値を、前記モード設定ステップで変更された通信機器のモードに対応する値に変更するステップを含むことを特徴とする通信機器のエラー応答レベル切替方法。
The communication apparatus error response level switching method according to claim 8,
And a mode setting step of setting a mode of the communication device in accordance with any of the command frame, an operation switch of the communication device, or a digital input to the communication device,
The error response level setting step includes a step of changing the error response level setting value to a value corresponding to the mode of the communication device changed in the mode setting step. Method.
請求項6乃至9のいずれか1項に記載の通信機器のエラー応答レベル切替方法において、
前記記憶手段は、前記応答ステップで下すべき判定結果を表す判定基準を、エラーの種類毎およびエラー応答レベル設定値毎に予め記憶し、
前記応答ステップは、前記実行ステップの実行結果に基づいてエラーの種類を特定し、特定したエラーの種類と通信機器の現在のエラー応答レベル設定値と前記判定基準とに基づいて、エラー応答するか否かを判定することを特徴とする通信機器のエラー応答レベル切替方法。
In the communication apparatus error response level switching method according to any one of claims 6 to 9,
The storage means stores in advance a determination criterion representing a determination result to be made in the response step for each error type and each error response level setting value,
Whether the response step identifies an error type based on the execution result of the execution step, and whether to make an error response based on the identified error type, the current error response level setting value of the communication device, and the determination criterion. An error response level switching method for a communication device, characterized by determining whether or not.
JP2013250798A 2013-12-04 2013-12-04 Communication apparatus and error response level switching method Pending JP2015109535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013250798A JP2015109535A (en) 2013-12-04 2013-12-04 Communication apparatus and error response level switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013250798A JP2015109535A (en) 2013-12-04 2013-12-04 Communication apparatus and error response level switching method

Publications (1)

Publication Number Publication Date
JP2015109535A true JP2015109535A (en) 2015-06-11

Family

ID=53439603

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013250798A Pending JP2015109535A (en) 2013-12-04 2013-12-04 Communication apparatus and error response level switching method

Country Status (1)

Country Link
JP (1) JP2015109535A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020179050A1 (en) * 2019-03-07 2020-09-10 三菱電機株式会社 Communication monitoring device, communication monitoring method, and communication monitoring program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020179050A1 (en) * 2019-03-07 2020-09-10 三菱電機株式会社 Communication monitoring device, communication monitoring method, and communication monitoring program

Similar Documents

Publication Publication Date Title
US20200151072A1 (en) Method, computer apparatus, and user interface for performing automatic test upon storage devices
JP6171386B2 (en) Controller, information processing apparatus and program
US20170068229A1 (en) Control system, method, program, and information processing device
US9984244B2 (en) Controller, information processing apparatus, and recording medium
KR100932057B1 (en) PL
CN105209925A (en) Implementing edit and update functionality within a development environment used to compile test plans for automated semiconductor device testing
US9317397B2 (en) Programmable logic controller (PLC) simulation system, PLC simulator, recording medium, and simulation method
US20080276129A1 (en) Software tracing
US20100312541A1 (en) Program test device and program
EP2733613B1 (en) Controller and program
TWI759719B (en) Flash memory controller and method used in flash memory controller
TW201500919A (en) System and method of remote debugging BMC
CN109271270A (en) The troubleshooting methodology, system and relevant apparatus of bottom hardware in storage system
JP2015109535A (en) Communication apparatus and error response level switching method
JP5365875B2 (en) Industrial controller
JP2009223714A (en) Arithmetic circuit and failure analysis method of arithmetic circuit
EP3674903B1 (en) Mobile device with secondary debug display
CN109445877B (en) Method for detecting same virtual machine used by multiple threads of game server
US20190310800A1 (en) Method for accessing code sram and electronic device
CN111221701A (en) Chip and circuit logic reconfiguration system thereof
CN114138588B (en) Method, system, equipment and medium for deriving debug information of controller
JP2012208932A (en) Plc system, state display method, plc, and programmable display
JP2006235665A (en) Command tester
JP2008152665A (en) Method for analyzing operation of semiconductor integrated circuit
CN116489001A (en) Switch fault diagnosis and recovery method and device, switch and storage medium