JP2000293395A - Serial communication equipment, its abnormality detecting method and recording medium - Google Patents

Serial communication equipment, its abnormality detecting method and recording medium

Info

Publication number
JP2000293395A
JP2000293395A JP11097443A JP9744399A JP2000293395A JP 2000293395 A JP2000293395 A JP 2000293395A JP 11097443 A JP11097443 A JP 11097443A JP 9744399 A JP9744399 A JP 9744399A JP 2000293395 A JP2000293395 A JP 2000293395A
Authority
JP
Japan
Prior art keywords
serial communication
information
slave
communication
executed
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.)
Withdrawn
Application number
JP11097443A
Other languages
Japanese (ja)
Inventor
Yukihide Ushio
行秀 牛尾
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP11097443A priority Critical patent/JP2000293395A/en
Publication of JP2000293395A publication Critical patent/JP2000293395A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain serial communication equipment capable of easily and also accurately performing abnormality diagnosis due to wrong transmission such as noise and to obtain its abnormality diagnosing method and a recording medium. SOLUTION: Since a slave station request flag is set in a step S14 when a communication request signal from a slave station is turned on regardless of the existence/ absence of a communication request in a master station, the processing proceeds to a step S17, the content of a high order 4-bit part storing return information from the slave station which is temporarily moved and is before executing normal communication is compared with the content of a low order 4-bit part obtained by updating the return information from the slave station after executing the normal communication for each bit, and in a step S18, whether or not the whole information coincides is discriminated. When the whole information coincides in this discrimination as a result of comparing the information content, because there is discrepancy in a communication request signal generated by the update of the slave station information content, it is considered that noise, etc., is entered in a slave station communication request signal or shift transfer, and information exchange by normal communication is diagnosed as failure and made ineffective.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、シリアル通信装置
及びその異常検出方法ならびに記録媒体に関し、特に、
装置内の主局と当該装置に点在する複数の従局との間で
情報交換を行うためのシリアル通信装置及びその異常検
出方法ならびに記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a serial communication device, a method for detecting an abnormality thereof, and a recording medium.
The present invention relates to a serial communication device for exchanging information between a master station in an apparatus and a plurality of slave stations scattered in the apparatus, a method for detecting an abnormality thereof, and a recording medium.

【0002】[0002]

【従来の技術】従来、機器装置内のシリアル通信装置
は、機器装置の中央処理ユニットが有する主局と称され
るシリアル通信のメイン装置と当該機器装置に点在する
複数の電気ユニットが有する従局と称されるシリアル通
信のサブ装置との間で情報交換を実行するものであり、
装置の組み立てやすさと装置コストを抑制することを目
的として、多くの機器装置において利用されている。
2. Description of the Related Art Conventionally, a serial communication device in a device has a main device for serial communication called a master station of a central processing unit of the device and a slave station having a plurality of electric units scattered in the device. Exchanges information with a serial communication sub-device called
It is used in many devices for the purpose of suppressing the cost of the device and the ease of assembling the device.

【0003】基本的に、シリアル通信装置における情報
交換構成では、装置の中央処理ユニット(CPU)が有
する主局によって発生される情報交換要求に応じてシリ
アル通信が行われていた。また、従局からの情報交換要
求は、通信要求信号を受信した主局が上述したようにシ
リアル通信を実行することにより、従局からの情報を更
新し、これにより双方の情報交換が実行されていた。
[0003] Basically, in an information exchange configuration in a serial communication device, serial communication is performed in response to an information exchange request generated by a master station included in a central processing unit (CPU) of the device. In addition, the information exchange request from the slave station updates the information from the slave station by executing the serial communication as described above by the master station that has received the communication request signal, whereby both information exchanges are performed. .

【0004】この情報交換はあくまでも主局と従局とが
1対1で実施するものであり、主局から発する転送情報
は特定の従局に対して転送され、かつ、従局から返送さ
れる転送情報は主局が特定できる従局からの情報である
ということを、主局と従局とが互いに認識している必要
がある。そのために、従来のシリアル通信装置の多く
は、転送情報に従局を指定する識別子情報を添付して転
送するように構成されていた。この手法は、伝送路に接
続可能な従局の最大数を限定した上で成立する。一つの
従局への転送情報ビット数と識別子情報ビット数を一組
として、伝送路に存在可能な従局数組分のデータ長構成
を転送のための基本条件とする、通信プロトコル及びそ
のデータ処理手段が設計されるからである。従って、こ
のような手法を採用するシリアル通信装置では、予め接
続可能な従局数を定めるため、従局数を多めにとるよう
に考慮して通信プロトコル及びそのデータ処理手段が設
計され、シリアル通信装置のコスト面を考慮すると不利
であった。また、使用する装置全体の従局数構成に応じ
て設計変更する場合であっても、基本となる転送される
データ長構成が変更されてしまうため、少なくともデー
タ処理手段部分は再設計することになる。
[0004] This information exchange is performed by the master station and the slave station on a one-to-one basis. Transfer information originating from the master station is transferred to a specific slave station, and transfer information returned from the slave station is transmitted. It is necessary that the master station and the slave station recognize each other that the information is from the slave station that can be identified by the master station. For this reason, many conventional serial communication devices are configured to transfer the transfer information with identifier information designating a slave station attached thereto. This method is established after limiting the maximum number of slave stations that can be connected to the transmission path. A communication protocol and a data processing means thereof, in which the number of information bits transferred to one slave station and the number of identifier information bits are a set, and the data length configuration of the number of slave stations that can exist on the transmission path is a basic condition for transfer. Is designed. Therefore, in a serial communication device that employs such a method, a communication protocol and its data processing means are designed in consideration of a large number of slave stations in order to determine the number of slave stations that can be connected in advance. This was disadvantageous in view of cost. Further, even when the design is changed in accordance with the configuration of the number of slave stations of the entire device to be used, the basic configuration of the data length to be transferred is changed, so that at least the data processing means is redesigned. .

【0005】そこで、近年では、一つの従局への転送情
報ビット数と識別子情報ビット数とを固定したままで、
半無限の数の従局を接続可能にする通信プロトコル及び
そのデータ処理手段で構成されるシリアル通信装置が出
現するようになった。そのことにより、かかるシリアル
通信装置を使用する装置全体の従局数構成に関係なく、
同じシリアル通信装置が最適な従局数構成で使用できる
ようになり、且つ、途中の設計変更にも簡単に対応でき
るようになった。当然、シリアル通信装置のコストに関
しても、装置全体が必要とする従局数で構成できるた
め、従来のシリアル通信装置と比較して低コスト化され
ることになる。以下に、この転送情報ビット数と識別子
情報ビット数とを固定したままで、半無限の数の従局を
接続可能とするシリアル通信装置の構成について説明す
る。
Therefore, in recent years, while the number of information bits transferred to one slave station and the number of identifier information bits are fixed,
A serial communication device comprising a communication protocol and a data processing means for connecting a semi-infinite number of slave stations has appeared. Thereby, regardless of the configuration of the number of slave stations of the entire device using the serial communication device,
The same serial communication device can be used with the optimum number of slave stations, and it is possible to easily cope with a design change in the middle. Naturally, the cost of the serial communication device can be reduced to the number of slave stations required by the entire device, so that the cost is reduced as compared with the conventional serial communication device. Hereinafter, a configuration of a serial communication device that can connect a semi-infinite number of slave stations while keeping the number of transfer information bits and the number of identifier information bits fixed will be described.

【0006】まず、シリアル通信の基本構成について説
明する。
First, a basic configuration of serial communication will be described.

【0007】従来のシリアル通信装置は、主局が転送情
報のデータ長を作成して、各従局が有するシフトレジス
タ回路(構成ビット数は4ビットとする)に転送クロッ
クと共に主局からの従局並列出力情報をシフト転送する
構成であって、主局がシフト転送を実行する前に予め主
局へ返送する従局並列入力情報をシフトレジスタ回路に
ロードさせることでにより、主局が実行するシフト転送
で主局と各従局との情報交換を可能とするものである。
また、各従局は、個々に有する位相制御カウンタ回路の
カウント値で指示される動作を実行するように構成され
ており、主局がこの位相制御カウンタのカウント値を操
作することにより従局のシフトレジスタ回路などの動作
を制御する。主局は、各従局が有する位相制御カウンタ
を制御するために、主局位相制御カウンタを備え、従局
の位相制御カウンタ回路と同様に操作することにより、
従局動作状況をそのカウント値にて把握できるようにし
て、伝送路中の各従局動作制御を実行してシリアル通信
を実現する。
In a conventional serial communication apparatus, a master station creates a data length of transfer information, and transmits the data length of transfer information to a shift register circuit (constituting bit number of 4 bits) of each slave station together with a transfer clock. In the configuration in which the output information is shifted and transferred, by loading the shift register circuit with the slave parallel input information which is returned to the master in advance before the master performs the shift transfer, the shift transfer performed by the master is performed. This enables information exchange between the master station and each slave station.
Each slave station is configured to execute an operation specified by the count value of the phase control counter circuit that the slave station has, and the master station operates the count value of the phase control counter to shift the shift register of the slave station. Controls the operation of circuits, etc. The master station includes a master station phase control counter to control the phase control counter of each slave station, and operates in the same manner as the phase control counter circuit of the slave station.
The operation status of the slave station can be grasped by the count value, and the operation of each slave station in the transmission path is executed to realize the serial communication.

【0008】一方、主局は、伝送路に接続され得る半無
限の数の従局を固定された識別子情報ビット数で認識し
て1対1の情報交換を実施するために、複数のシリアル
通信動作を区別して実行するように構成されている。
On the other hand, the master station recognizes a semi-infinite number of slave stations that can be connected to the transmission path with a fixed number of identifier information bits and performs one-to-one information exchange by performing a plurality of serial communication operations. Are configured to be executed separately.

【0009】一つは、伝送路に存在する従局を認識する
ことを目的とした通信であり、以下の説明では「初期化
通信」と称する。この初期化通信では、各従局が有する
識別子情報が吸い上げられ、伝送路中の従局配列順番が
認識される。他の一つは初期化通信で認識された従局配
列順番に従ったシフト転送データ長を作成し、転送する
通信であり、以下の説明では「通常通信」と称する。こ
の通常通信では、各従局との間で1対1での情報交換が
実施される。つまり、現状での伝送路に接続された従局
配列順番は初期化通信で再認識されればその後は不変で
あるため、その従局配列順番に従った各従局からの返送
情報データ長がシフト返送され、従って容易に情報交換
を実現することができる。
One is communication for the purpose of recognizing a slave station existing on a transmission line, and is referred to as "initialization communication" in the following description. In this initialization communication, the identifier information of each slave station is downloaded, and the order of the slave stations in the transmission path is recognized. The other is communication in which a shift transfer data length is created and transferred in accordance with the slave station arrangement order recognized in the initialization communication, and is referred to as "normal communication" in the following description. In this normal communication, one-to-one information exchange is performed with each slave station. In other words, since the order of the slave stations connected to the current transmission path is unchanged after re-recognition by the initialization communication, the return information data length from each slave station according to the slave station order is shifted and returned. Therefore, information exchange can be easily realized.

【0010】ここで、固定された識別子情報ビット数で
表現できる以上の数の従局数を認識するための基本的考
えを説明する。なお、ここでは、固定された識別子情報
ビット数が4ビットと仮定して説明するが、これは説明
を容易に理解するための仮定であって、特に限定された
ものではない。
Here, a basic idea for recognizing the number of slave stations which can be expressed by a fixed number of identifier information bits will be described. Note that, here, the description is made on the assumption that the fixed number of identifier information bits is 4 bits, but this is an assumption for easy understanding of the description, and is not particularly limited.

【0011】まず、前提として、シリアル通信装置が利
用される機器装置構成に基づいて、従局を2種類に区別
する。一方は、機器装置動作にとって必要となるユニッ
トに使用される従局を本体ユニットと称し、固定値コー
ドで識別子情報が割り振られる。他方は、機器装置動作
にとって必ずしも必要ではない、いわゆる拡張ユニット
となるオプションに使用される従局をオプションユニッ
トと称し、各オプションユニットは割り振られた値のコ
ード値として識別子情報が割り振られる。つまり、識別
子情報をオールゼロ(0000B)、オール1(111
1B)及び本体ユニット用の固定値(ここでは、(11
01B)とする)以外のコード値で、1(0001B)
から順に、コード値がオプションユニットに割り振られ
る。すなわち、本体ユニット構成だけで伝送路の配列順
番を考えると、その配列順番は、必要なユニットである
がゆえに不変的な配列順番である。つまり、設定された
本体ユニット用の従局配列は、本体ユニットだけで配列
されている場合には不変であるため、伝送路に配列され
た順番に従ってメモリマップすればよい。
First, as a premise, slave stations are classified into two types based on the configuration of the equipment in which the serial communication device is used. On the other hand, a slave station used for a unit necessary for the operation of the device is called a main unit, and identifier information is assigned by a fixed value code. On the other hand, a slave station that is used for an option that is not necessarily required for the operation of the device and is a so-called extension unit is referred to as an option unit, and identifier information is assigned to each option unit as a code value of an assigned value. That is, the identifier information is all zero (0000B) and all one (111
1B) and fixed values for the main unit (here, (11
01B)) and 1 (0001B)
The code values are assigned to the option units in order from. In other words, considering the arrangement order of the transmission lines only by the main unit configuration, the arrangement order is an invariable arrangement order because of the required units. That is, since the set slave station arrangement for the main unit is invariable when the main unit is arranged alone, the memory map may be performed in accordance with the order of arrangement on the transmission path.

【0012】次に、この本体ユニット従局配列順番に基
づいて、接続可能なオプションユニット用従局について
述べる。オプションユニット用従局の場合、伝送路に必
ず接続されているか否かが不明であるので識別子情報は
順番に割り振られ、特に配列順番が本体ユニット配列で
確定している本体ユニットを利用する場合には、各本体
ユニット間に存在する複数のオプションユニットを一つ
のグループとして、同一グループ内では、重複しない識
別子情報が順番に1、2、3……と割り振られる。これ
らのグループは、互いに異なる本体ユニット間で、それ
ぞれ構成される。すなわち、オプションユニットが割り
振られる識別子情報は別グループ間では重複してもよい
のである。
Next, a description will be given of a connectable optional unit slave station based on the main unit slave order. In the case of an optional unit slave station, it is unknown whether or not it is always connected to the transmission path, so the identifier information is assigned in order, especially when using a main unit whose arrangement order is determined in the main unit array. A plurality of option units existing between the main units are regarded as one group, and in the same group, unique identifier information is sequentially allocated to 1, 2, 3,... These groups are respectively configured between different main body units. That is, the identifier information to which the option unit is assigned may overlap between different groups.

【0013】このような考えによって、従局の数を半無
限で構成しても、4ビット構成の識別子情報で各従局を
識別することができる。換言すれば、1番目と2番目の
本体ユニット間に最大13(オールゼロ、オール1、本
体輪割り振りコードを除くためである)のオプションユ
ニットが、重複しないコード値で割り振られる。
According to the above concept, even if the number of slave stations is half-infinite, each slave station can be identified by 4-bit identifier information. In other words, up to thirteen optional units are allocated between the first and second main units with non-overlapping code values.

【0014】これにより、本体ユニットが例えば5つ存
在する場合、4×13=52個のオプションユニット
が、1対1識別可能となる。逆に、必要とされるオプシ
ョンユニット数に応じた本体ユニットを、ダミーも含め
て容易すると、伝送路の電気的伝達能力が許される限り
において、半無限の数の従局を認識することができる。
Thus, when there are five main units, for example, 4 × 13 = 52 optional units can be identified one-to-one. Conversely, if the number of optional units required for the main unit including the dummy is facilitated, a semi-infinite number of slave stations can be recognized as long as the electrical transmission capability of the transmission path is allowed.

【0015】以上説明した、半無限の数の従局を接続可
能な本シリアル通信装置が実際に通信を実行する場合の
全体動作について説明する。
The overall operation in the case where the serial communication device capable of connecting a semi-infinite number of slave stations described above actually executes communication will be described.

【0016】先ず、主局としてシリアル通信装置が利用
される機器装置において、シリアル通信伝送路に接続可
能な全従局数とその配列順番が予め設定され、主局が有
する従局並列入出力情報内容を記憶するメモリにマップ
化される。そして、主局は、初期化通信によるシリアル
通信を実行することにより実際の伝送路に接続される従
局配列順番に従った識別子情報を吸い上げて、メモリ内
に登録されている従局の有無を設定する。これにより、
上記マップ化された従局配列順番は現状の伝送路に存在
する従局配列順番に設定され、メモリマップが再設定さ
れる。この操作により、主局は伝送路に存在する従局配
列順番を把握することができ、以降の処理においては、
この再設定されたメモリマップにより示される従局配列
順番に従ってシフト転送のデータ長が構成・出力される
とともに、入力されるシフト転送のデータ長が、再設定
されたメモリマップが示す従局配列順番に従ってメモリ
にストアされ、シリアル通信が実行可能となる。このと
きのシリアル通信を、上述したように通常通信と称し、
主局と各従局との間における情報交換が実施される。
First, in a device in which a serial communication device is used as a master station, the total number of slave stations connectable to the serial communication transmission line and their arrangement order are set in advance. It is mapped to the memory for storage. Then, the master station performs serial communication by initialization communication, siphons identifier information according to the sequence of slave stations connected to the actual transmission path, and sets the presence / absence of slave stations registered in the memory. . This allows
The mapped slave station order is set to the slave station order existing in the current transmission path, and the memory map is reset. By this operation, the master station can grasp the arrangement order of the slave stations existing in the transmission path, and in the subsequent processing,
The data length of the shift transfer is constructed and output in accordance with the slave station order shown by the reset memory map, and the data length of the input shift transfer is stored in the memory in accordance with the slave station order shown by the reset memory map. And serial communication can be executed. The serial communication at this time is referred to as normal communication as described above,
Information is exchanged between the master station and each slave station.

【0017】このように、シリアル通信の大部分を占め
る通常通信の実行では、所定の従局数に対応する情報ビ
ット数のデータを用意し、各従局に返送データをロード
させた後シフト動作を実行すれば、主局から各従局にま
たは各従局から主局にそれぞれ情報を転送することがで
きるので、通信所要時間が必要最低限になり、また、信
号処理がより簡潔化され、従局の回路構成が更に低コス
ト化することになる。一方、通常通信では、情報交換す
るシフト転送を一巡した後、再び同じ内容の情報で二順
目のシフト転送が行われ、1回分のシリアル通信動作と
することによって、2度送りによる情報交換動作が実行
され、1回目の情報内容と2回目の情報内容とを比較す
ることにより情報内容の精度を容易な構成で向上するこ
とができ、情報の誤伝達を防止することができる。
As described above, in the execution of the normal communication which occupies most of the serial communication, the data of the number of information bits corresponding to the predetermined number of slave stations is prepared, and after the return data is loaded to each slave station, the shift operation is executed. Then, information can be transferred from the master station to each slave station or from each slave station to the master station, so that the communication time is minimized, signal processing is simplified, and the circuit configuration of the slave station is reduced. However, the cost is further reduced. On the other hand, in the normal communication, after making a round of the shift transfer for exchanging information, the second-order shift transfer is performed again with the same contents of information, and a single serial communication operation is performed. Is performed, and by comparing the first information content with the second information content, the accuracy of the information content can be improved with a simple configuration, and erroneous transmission of information can be prevented.

【0018】以降、従来のシリアル通信装置によるシリ
アル通信の具体的内容を、図6〜図13を参照して説明
する。
Hereinafter, the specific contents of serial communication by the conventional serial communication device will be described with reference to FIGS.

【0019】先ず、図6を参照して、従来の従局の動作
について説明する。図6は、従来の従局構成を示すブロ
ック図である。
First, the operation of the conventional slave station will be described with reference to FIG. FIG. 6 is a block diagram showing a conventional slave station configuration.

【0020】同図において、1は入力セレクタ回路であ
る。入力セレクタ回路1は従局から主局に返送される情
報が並列入力情報である識別子情報であるかを選択す
る。2は入力ラッチ回路である。入力ラッチ回路2は、
入力セレクタ回路1の出力側に接続されており、入力セ
レクタ回路1により選択された情報を、一回分のシリア
ル通信の実行期間に亘ってラッチ保持する。入力ラッチ
回路2の出力側は、第1イクスクルーシブオア回路(以
下、「第1EXOR回路」という)3及び従局がシフト
転送を実行するためのシフトレジスタ回路4に接続され
ている。
In FIG. 1, reference numeral 1 denotes an input selector circuit. The input selector circuit 1 selects whether information returned from the slave station to the master station is identifier information which is parallel input information. 2 is an input latch circuit. The input latch circuit 2
It is connected to the output side of the input selector circuit 1 and latches the information selected by the input selector circuit 1 over the execution period of one serial communication. The output side of the input latch circuit 2 is connected to a first exclusive OR circuit (hereinafter, referred to as a "first EXOR circuit") 3 and a shift register circuit 4 for a slave station to execute shift transfer.

【0021】第1EXOR回路3には入力ラッチ回路2
に入力される信号及び入力ラッチ回路2から出力される
信号が入力されており、入力ラッチ回路2の入力と出力
とをビット毎に比較し、その比較結果を多入力ゲートに
より1つにまとめて出力するものであって、入力ラッチ
回路2への入力及び入力ラッチ回路からの出力のいずれ
かが1ビットでも変化したときにオンされる。
The first EXOR circuit 3 has an input latch circuit 2
, And the signal output from the input latch circuit 2 are input. The input and output of the input latch circuit 2 are compared bit by bit, and the comparison results are combined into one by a multi-input gate. The output is turned on when either the input to the input latch circuit 2 or the output from the input latch circuit changes even one bit.

【0022】シフトレジスタ回路4の出力側は、2度読
みラッチ回路5及び第2イクスクルーシブオア回路(以
下、「第2EXOR回路」という)6に接続されてい
る。2度読みラッチ回路5は、シフト転送の一巡目の情
報をラッチ保持するものであり、その出力側は第2EX
OR回路6及び出力ラッチ回路7に接続されている。第
2EXOR回路6は、二巡目のシフト転送における情報
内容及び2度読みラッチ回路5内にラッチ保持された情
報内容をビット毎に比較し、その比較結果を多入力ゲー
トにより一つの信号にまとめて出力するものであって、
二巡目のシフト転送における情報内容及び2度読みラッ
チ回路5内にラッチ保持された情報内容のいずれかが1
ビットでも変化したときにオンされる。
The output side of the shift register circuit 4 is connected to a twice-read latch circuit 5 and a second exclusive OR circuit (hereinafter, referred to as a "second EXOR circuit") 6. The twice-read latch circuit 5 latches and holds the information of the first cycle of the shift transfer, and its output side is the second EX.
It is connected to an OR circuit 6 and an output latch circuit 7. The second EXOR circuit 6 compares the information content in the second shift transfer and the information content latched and held in the twice-read latch circuit 5 for each bit, and combines the comparison result into one signal by a multi-input gate. Output
Either the information content in the second shift transfer or the information content latched and held in the twice-read latch circuit 5 is 1
Turns on when a bit changes.

【0023】出力ラッチ回路7は、第2EXOR回路6
における比較の結果全てのビットが一致した場合にの
み、ラッチ保持動作を実行し、ラッチした信号を従局の
並列出力として外部に出力する。
The output latch circuit 7 includes a second EXOR circuit 6
Only when all the bits match as a result of the comparison, the latch holding operation is executed, and the latched signal is output to the outside as a parallel output of the slave station.

【0024】第1デコード回路9は、主局から指示され
る2ビットの従局指示コード化信号をソフトリセット信
号、強制リセット信号、及びカウント指示信号に分類し
て出力する。
The first decoding circuit 9 classifies and outputs a 2-bit slave station instruction coded signal designated by the master station into a soft reset signal, a forced reset signal, and a count instruction signal.

【0025】ゲート回路8は、入力セレクタ回路1に接
続されており、第1デコード回路9から送られてくるソ
フトリセット信号と、転送クロックとから構成される選
択指示信号を入力セレクタ回路1に対して出力すること
により、入力セレクタ回路1が選択すべき情報種類を指
示する。
The gate circuit 8 is connected to the input selector circuit 1 and sends a selection instruction signal composed of a soft reset signal sent from the first decode circuit 9 and a transfer clock to the input selector circuit 1. Output, the input selector circuit 1 indicates the type of information to be selected.

【0026】クロック数カウンタ回路10は第2デコー
ド回路12に接続されており、入力される転送クロック
のクロック数をカウントし、所定の値毎に、タイミング
パルスを第2デコード回路12へ出力する。
The clock number counter circuit 10 is connected to the second decode circuit 12, counts the number of input transfer clocks, and outputs a timing pulse to the second decode circuit 12 for each predetermined value.

【0027】位相制御カウンタ回路11は第1デコード
回路に接続されており、転送クロックをカウント源とし
て、第1デコード回路9により分類されたカウント指示
信号に応じてカウント動作やカウント停止保持などの動
作を行う。なお、主局もこのような位相制御カウンタ回
路11と同様に操作される主局位相制御カウンタ手段を
有しており、シフト転送を制御している。
The phase control counter circuit 11 is connected to the first decode circuit, and uses the transfer clock as a count source to perform operations such as a count operation and a count stop hold in accordance with the count instruction signal classified by the first decode circuit 9. I do. Note that the master station also has master station phase control counter means operated in the same manner as the phase control counter circuit 11 and controls shift transfer.

【0028】第2デコード回路12は、位相制御カウン
タ回路11のカウント結果としてのQ出力を入力源とし
て、制御位相タイミングに基づいて、各回路に動作出力
指示を出力したり、各回路からの入力信号を制御位相タ
イミングに基づいて返送位相信号として主局に出力した
りする。
The second decoding circuit 12 uses the Q output as the count result of the phase control counter circuit 11 as an input source, outputs an operation output instruction to each circuit based on the control phase timing, and outputs an input from each circuit. The signal is output to the main station as a return phase signal based on the control phase timing.

【0029】シフト転送を実行するシフトレジスタ回路
4は、基本的に、主局が指示動作させる従局指示コード
化信号によって位相制御カウンタ回路11のカウント値
が操作されることにより、その動作を制御される。具体
的には、この位相制御カウンタ回路11のカウント値
(以降、「制御カウント値」という)は、主局が発する
従局指示コード化信号によって転送クロックをクロック
源とするカウンタ動作を実行するタイミング制御のため
のものであり、カウントアップ、停止及び制御カウント
値リセットなどの動作制御がなされて、第2デコード回
路12により直接、各従局動作を実行する回路にタイミ
ング指示信号が出力される。
The operation of the shift register circuit 4 for executing the shift transfer is basically controlled by operating the count value of the phase control counter circuit 11 by the slave station coded signal instructed by the master station. You. Specifically, the count value of the phase control counter circuit 11 (hereinafter referred to as “control count value”) is controlled by timing control for executing a counter operation using a transfer clock as a clock source by a slave station coded signal generated by the master station. Operation control such as count-up, stop, and control count value reset is performed, and the second decode circuit 12 directly outputs a timing instruction signal to a circuit that executes each slave station operation.

【0030】ここで、シフト転送を中心に、従来の従局
動作の流れを簡単に説明する。
Here, a flow of a conventional slave operation will be briefly described focusing on shift transfer.

【0031】従局指示コード化信号でソフトリセットを
指示すると、制御カウント値が「00H」となる。ソフ
トリセット中は、転送クロックを受信しても制御カウン
ト値は不変であることを利用して、入力セレクタ回路1
の入力情報選択が実行される。ゲート回路8は、ソフト
リセット中に転送クロックを受信するか否かで入力セレ
クタ回路1の選択指示信号を切りかえるように構成され
ている。これにより、入力セレクタ回路1では、並列入
力及び識別子入力のいずれか一方の情報が選択されて、
その選択された情報が入力ラッチ回路2に情報伝達され
る。
When a soft reset is instructed by the slave station instruction coded signal, the control count value becomes "00H". During the soft reset, the input selector circuit 1 uses the fact that the control count value does not change even when the transfer clock is received.
Is selected. The gate circuit 8 is configured to switch the selection instruction signal of the input selector circuit 1 depending on whether a transfer clock is received during a soft reset. Thereby, in the input selector circuit 1, either one of the parallel input and the identifier input is selected,
The selected information is transmitted to the input latch circuit 2.

【0032】その後、ソフトリセットが解除され、新た
に転送クロックが受信されると、入力ラッチ回路2では
入力情報がラッチ保持されると共に、情報がシフトレジ
スタ回路4のシフトイン並列入力にアクセスされる。一
方、入力ラッチ回路2のラッチ入力及び出力は、第1E
XOR回路3でビット毎に比較され、その比較結果はゲ
ート回路8で一つにまとめられて第2デコード回路12
に送られる。この信号は、従局から発される通信要求信
号の源であって、所定の制御カウント値の時(ここで
は、0EHのタイミングで有効とされるものとする)に
返送位相信号から主局に伝送されるものである。
Thereafter, when the soft reset is released and a new transfer clock is received, the input information is latched and held in the input latch circuit 2, and the information is accessed to the shift-in parallel input of the shift register circuit 4. . On the other hand, the latch input and output of the input latch circuit 2 are the first E
The XOR circuit 3 compares the bits on a bit-by-bit basis.
Sent to This signal is a source of a communication request signal issued from the slave station, and is transmitted from the return phase signal to the master station at a predetermined control count value (here, it is assumed to be valid at the timing of 0EH). Is what is done.

【0033】引き続き制御カウント値が01Hにするよ
うに主局が指示すると、シフトレジスタ回路4に入力ラ
ッチ回路2の出力情報がシフトロードされ、転送クロッ
ク受信と共にシフト転送動作が開始される。この時か
ら、主局は、後述する初期化通信で把握された伝送路中
の従局数に応じたピット数の転送データ及び転送クロッ
クを発して、従局指示コード化信号で所望のタイミング
で制御カウント値を操作しながら、シフト転送を一巡さ
せるシフト終了タイミングに制御カウント値が06Hに
なるように指示制御する。そして、従局は、制御カウン
ト値が制御カウント値が06Hになると一巡目のシフト
動作が終了したと判断して、第2デコード回路12から
2度読みラッチ回路5にシフトレジスタ回路4のシフト
データをラッチ保持させるためにラッチ信号(ラッチパ
ルス)を出力する。このとき、シフトレジスタ回路4に
対して、「00H」時にラッチ保持された入力ラッチ回
路2の情報がアクセス可能になっている。なお、この入
力ラッチ回路2にラッチ保持された情報内容は、制御カ
ウント値が「00H」になる時以外は更新されないた
め、制御カウント値が06Hの段階では同じ情報内容で
保持されている。
When the master station subsequently instructs the control count value to be 01H, the output information of the input latch circuit 2 is shift-loaded into the shift register circuit 4, and the shift transfer operation is started upon receiving the transfer clock. From this time, the master station issues transfer data and a transfer clock of the number of pits corresponding to the number of slave stations in the transmission path grasped by initialization communication to be described later, and performs control count at a desired timing by a slave station instruction coded signal. While manipulating the value, instruction control is performed so that the control count value becomes 06H at the shift end timing at which the shift transfer is completed. When the control count value reaches 06H, the slave station determines that the first round of the shift operation has been completed, and reads the shift data of the shift register circuit 4 from the second decode circuit 12 to the twice-read latch circuit 5. A latch signal (latch pulse) is output to hold the latch. At this time, the information of the input latch circuit 2 latched and held at “00H” is accessible to the shift register circuit 4. Note that the information content latched and held in the input latch circuit 2 is not updated except when the control count value becomes "00H", so that the same information content is held when the control count value is 06H.

【0034】そして、主局により制御カウンタ値が「0
7H」にされ、シフト転送の二巡目が開始される。シフ
トレジスタ回路4では、「07H」でシフトデータが再
びロードされてシフト動作が開始される。一方、主局に
おいても同様に、シフト転送一巡目と同情報内容がロー
ドされて、伝送路の従局数に応じたビット数の転送デー
タと転送クロックとが発せられる。
Then, the control counter value is set to "0" by the master station.
7H ", and the second round of the shift transfer is started. In the shift register circuit 4, the shift data is loaded again at "07H" and the shift operation is started. On the other hand, in the master station, the same information content as that in the first shift transfer is similarly loaded, and transfer data and a transfer clock having the number of bits corresponding to the number of slave stations in the transmission path are issued.

【0035】そして、一巡目と同様の操作が行われ、シ
フト転送の終了タイミングに合わせて制御カウント値が
「0CH」になると、二順目のシフト転送が終了したと
判断され、第2EXOR回路6において、一巡目のデー
タを保持する2度読みラッチ回路5の出力と二順目のデ
ータがあるシフトレジスタ回路4の出力とがビットごと
に比較される。その結果、全ての内容がビット毎に一致
しているときは第2EXOR回路6の出力がオフされ、
いずれか1ビットでも不一致のときは出力がオンされ
る。
When the same operation as in the first cycle is performed and the control count value becomes "0CH" in accordance with the shift transfer end timing, it is determined that the second-order shift transfer has been completed, and the second EXOR circuit 6 In the above, the output of the twice-read latch circuit 5 holding the data of the first cycle and the output of the shift register circuit 4 having the second-order data are compared bit by bit. As a result, when all the contents match for each bit, the output of the second EXOR circuit 6 is turned off,
If any one bit does not match, the output is turned on.

【0036】制御カウント値が「0DH」になった時
に、第2デコード回路12では、2度読み結果が一致し
ている場合は出力ラッチ回路7に対してラッチ保持パル
スが出力される。また、2度読み結果が不一致の場合は
出力ラッチ回路7に対してラッチ保持パルスが出力され
ず、返送位相信号がオンにされる。
When the control count value becomes "0DH", the second decode circuit 12 outputs a latch holding pulse to the output latch circuit 7 when the read results match twice. If the read results do not match, no latch holding pulse is output to the output latch circuit 7, and the return phase signal is turned on.

【0037】制御カウント値が「0DH」のときに返送
位相信号がオン出力されると、主局では、通信異常によ
るシフト転送失敗と判断され、通信エラーと認識され
る。この場合、後述するように、ソフトリセットで制御
カウント値が「00H」に戻され、シリアル通信のリト
ライとして、再び、シリアル通信が実行される。なお、
所定回数のリトライ通信が実行されてもエラーとなる場
合は、シリアル通信故障として機器装置全体の動作が停
止され、サービスマンコール等の所定状態が維持される
ような状態で処理が終了される。一方、「0DH」でシ
フト転送が成功すれば、従局への転送情報が従局並列出
力として出力され、シフト転送作業は終了される。
If the return phase signal is turned on when the control count value is "0DH", the master station determines that the shift transfer has failed due to a communication error and recognizes it as a communication error. In this case, as described later, the control count value is returned to “00H” by the soft reset, and the serial communication is executed again as a retry of the serial communication. In addition,
If an error occurs even after the retry communication is performed a predetermined number of times, the operation of the entire device is stopped as a serial communication failure, and the process is terminated in a state where a predetermined state such as a serviceman call is maintained. On the other hand, if the shift transfer is successful at “0DH”, the transfer information to the slave station is output as the slave station parallel output, and the shift transfer operation is terminated.

【0038】これにより、主局では、入力された従局か
らのシフト転送データが2度読み比較され、全て一致し
た場合に所定のメモリに情報内容が更新される。また、
2度読み比較された結果不一致が1ビットでもあった場
合は、ソフトリセット後にリトライ通信が実行される。
主局においてもシフト転送が成功したと判断されると、
制御カウント値が「0EH」となるように操作され、今
度は、各従局からの従局通信要求信号の有無を判断する
ために返送位相信号の状態が検出される。この「0E
H」の状態は、少なくとも一つの従局、あるいは主局で
の通信要求が発生するまで維持されるものであって、通
信要求があれば、直ちに制御カウンタ値が「00H」に
され、再びシリアル通信が実行される。
As a result, in the master station, the input shift transfer data from the slave station is read and compared twice, and when all the data match, the information content is updated to a predetermined memory. Also,
If the result of the double reading and comparison indicates that even one bit does not match, retry communication is executed after a soft reset.
If the master station determines that the shift transfer was successful,
The control count value is operated so as to be "0EH". This time, the state of the return phase signal is detected to determine the presence / absence of a slave communication request signal from each slave station. This "0E
The state of "H" is maintained until a communication request occurs in at least one slave station or master station. If there is a communication request, the control counter value is immediately set to "00H" and serial communication is performed again. Is executed.

【0039】つまり、主局では、「0DH」のときの返
送位相信号は転送エラー判断として利用されるが、「0
EH」時の返送位相信号は従局通信要求判断として利用
される。このように、返送位相信号出力は、制御カウン
ト値に応じて、その意味することを区別して主局が読み
取るように構成されている。従って、主局は制御カウン
ト値に応じてさまざまな内容で判定できるように必要に
応じて構成され、制御カウント値の操作タイミングを工
夫することにより多種の意味を示す返送信号を部類分け
することができる。
That is, in the master station, the return phase signal at the time of “0DH” is used as a transfer error determination,
The return phase signal at the time of "EH" is used as a slave station communication request determination. As described above, the return phase signal output is configured to be read by the master station while distinguishing its meaning according to the control count value. Therefore, the master station is configured as necessary so that it can make determinations with various contents according to the control count value, and by devising the operation timing of the control count value, it is possible to categorize return signals indicating various meanings. it can.

【0040】一方、従局においては、制御カウント値が
「0EH」になると、第2デコード回路12から、第1
EXOR回路3の出力状態が返送位相信号として出力さ
れる。この制御カウント値が「0EH」の間は、従局通
信要求の有無が伝送され、上述したようにシフト転送さ
れた従局並列入力情報がラッチ保持される入力ラッチ回
路2のラッチ情報内容に対して、入力ラッチ回路2の入
力端子にアクセスされる現状での従局並列入力情報の内
容が1ビットでも更新されると直ちに主局に情報交換の
実施を要求する従局通信要求として出力される。この信
号により、本来は主局からの単方向性シリアル通信構成
であっても、双方向性シリアル通信構成と同様の作用を
もたらすことができる。
On the other hand, in the slave station, when the control count value becomes "0EH", the second decoding circuit 12
The output state of the EXOR circuit 3 is output as a return phase signal. While the control count value is “0EH”, the presence / absence of a slave communication request is transmitted, and the latch information contents of the input latch circuit 2 in which the slave parallel input information shifted and transferred as described above is latched and held, As soon as even one bit of the contents of the slave station parallel input information currently accessed to the input terminal of the input latch circuit 2 is updated, it is output as a slave station communication request for requesting the master station to exchange information. With this signal, the same operation as the bidirectional serial communication configuration can be provided even in the case of the unidirectional serial communication configuration originally from the master station.

【0041】次に、図7〜図13を参照して、従来の主
局の具体的制御例について簡単に説明する。
Next, a specific example of the conventional control of the main station will be briefly described with reference to FIGS.

【0042】図7は、従来のシリアル通信装置が利用さ
れる機器装置に接続され得る全従局が接続されたときの
伝送路図であり、主局制御は図7に示す順番に割り振ら
れた従局配列順番を基本に制御実行される。なお、この
基本となる伝送路の従局配列順番は、利用する機器装置
に応じて決定されるが、例えば、仕様変更等により従局
配列順番はが入れ替わった場合は、その変更内容に応じ
て、基本となる従局配列順番を変更すればよい。
FIG. 7 is a transmission path diagram when all slave stations that can be connected to the equipment using the conventional serial communication device are connected. The master station control is performed by the slave stations allocated in the order shown in FIG. The control is executed based on the arrangement order. Note that the slave station arrangement order of the basic transmission path is determined according to the equipment to be used.For example, if the slave station arrangement order is changed due to a specification change or the like, the basic station order is changed according to the content of the change. May be changed.

【0043】図7及び図8に示すシリアル通信装置の伝
送路図は、主局21を起点として、従局22〜33から
なるリング状の伝送路を構成する。
The transmission path diagrams of the serial communication apparatus shown in FIGS. 7 and 8 form a ring-shaped transmission path composed of the slave stations 22 to 33 starting from the master station 21.

【0044】図7は、ある機器装置におけるシリアル通
信装置での、当該機器装置において予め定義された、伝
送路に接続可能な全従局配列順番を示している。この従
局配列順番が、主局に設定される基本となるメモリマッ
プとして展開されるものであって、電源投入直後などの
CPUリセット時に実行される、CPU全体のメモリ初
期化設定処理動作時にマップ化されるものである。後述
するメモリマップ図(図8)に示されるメモリマップ展
開が、本従来例における、基本となる伝送路における従
局配列順番を示すものである。つまり、本シリアル通信
装置は、機器装置によって予め決定される全従局が接続
された場合の伝送路での従局配列順番を基本としてマッ
プ化しておき、次に初期化通信を実行することでメモリ
マップの再設定が実施される。そして、現状における伝
送路の従局配列順番を把握して、通常通信を実行する際
はその現状における伝送路の従局配列順番で構成される
情報内容のみのデータ長をシフト転送して情報交換を実
行するのである。
FIG. 7 shows an arrangement order of all slave stations connectable to a transmission line, which is defined in advance in a serial communication device in a certain device. The slave station arrangement order is developed as a basic memory map set in the master station, and is mapped at the time of memory initialization setting processing operation of the whole CPU, which is executed at the time of resetting the CPU immediately after turning on the power. Is what is done. A memory map expansion shown in a memory map diagram (FIG. 8) described later indicates the order of arrangement of slave stations in a basic transmission line in the conventional example. In other words, the serial communication device maps the data on the basis of the sequence of the slave stations on the transmission line when all the slave stations determined in advance by the device are connected, and then executes the initialization communication to perform the memory map. Is reset. Then, when the normal communication is executed, the slave station arrangement order of the current transmission line is grasped, and the data length of only the information content constituted by the slave station arrangement order of the current transmission line is shifted and the information exchange is executed. You do it.

【0045】図8は、ある装置機器が実際に作動すると
きのシリアル通信装置における現状での伝送路の従局配
列順番の一例を示した伝送路図である。同図において、
伝送路の従局配列順番は、基本となる伝送路における従
局配列順番(図7)に対し、オプションと称される電気
ユニット(図7の例ではスイッチバックユニット、高圧
(青)ユニット、高圧(黄)ユニット、封筒ユニット、
及び両面制御ユニットの5つの電気ユニット)が、必要
に応じて省かれた状態で利用されている。なお、ここに
いうオプションと称される電気ユニットは、ユーザ設置
によるオプションに限定されるものではなく、例えば工
場における組み立て時に設置されるオプションも含まれ
る。
FIG. 8 is a transmission path diagram showing an example of the order in which slave stations are arranged in a transmission line in the serial communication apparatus at the time when a certain device actually operates. In the figure,
The order of the slave stations in the transmission path is different from the order of the slave stations in the basic transmission path (FIG. 7) by the electric units (switchback unit, high-voltage (blue) unit, high-voltage (yellow) in the example of FIG. ) Unit, envelope unit,
And five electric units of the double-sided control unit) are used in a state where they are omitted as necessary. The electric unit referred to as an option here is not limited to an option installed by a user, but also includes an option installed at the time of assembly in a factory, for example.

【0046】図9は、シリアル通信装置が情報交換を実
施する際に利用されるメモリマップの概念図であって、
主局のみが有する記憶メモリのマップ図の推移を示して
いる。同図において、図9(a)に示す従局並列出力情
報及び図9(b)に示す従局並列入力情報は、上述した
基本となる伝送路における従局配列順番をマップ化した
ものである。一方、図9(c)に示す従局並列出力情報
及び図9(d)に示す従局並列入力情報が後述する初期
化通信によって現状の伝送路における従局配列順番をマ
ップ化したものであって、メモリマップが再設定された
状態を示している。すなわち、図9(c)及び図9
(d)に示される再設定された従局配列順番に基づいて
通常通信を実行することにより、各従局との情報交換が
実行され、データ内容が更新される。一方、このような
従来のシリアル通信装置を利用する機器装置は、本メモ
リマップを読み書き操作することにより、装置制御を実
行する。なお、図9において「X」及び「Z」で示され
るビットは、通常通信実行に伴って更新される情報内容
を示している。
FIG. 9 is a conceptual diagram of a memory map used when the serial communication device performs information exchange.
The transition of the map figure of the storage memory which only the main station has is shown. In this figure, the slave-station parallel output information shown in FIG. 9A and the slave-station parallel input information shown in FIG. 9B are obtained by mapping the slave station arrangement order in the above-described basic transmission path. On the other hand, the slave station parallel output information shown in FIG. 9C and the slave station parallel input information shown in FIG. 9D map the slave station order on the current transmission line by initialization communication described later, and The map has been reset. That is, FIG. 9C and FIG.
By executing the normal communication based on the reset sequence of the slave stations shown in (d), information exchange with each slave station is performed, and the data content is updated. On the other hand, a device using such a conventional serial communication device executes device control by reading and writing the memory map. In FIG. 9, bits indicated by “X” and “Z” indicate information content updated with the execution of normal communication.

【0047】図10は、従来のシリアル通信装置におい
てシリアル通信を実行するときのシリアル通信タスクを
示すフローチャートであり、図11は従来のシリアル通
信を実行するときの初期化通信手順を示すフローチャー
トであり、図12及び図13は従来のシリアル通信を実
行するときの通常通信手順を示すフローチャートであ
る。図11〜図13に示す初期化通信及び通常通信は、
図10に示すシリアル通信タスクにおいて起動されるも
のである。なお、通常通信の場合は、シリアル通信動作
を実行するシフト転送を2巡して、1巡目と2巡目との
情報内容を比較する(すなわち上述した2度送り、2度
読みを実行する)ように制御されているが、初期化通信
の場合は、シリアル通信動作を実行するシフト転送を1
巡した段階でソフトリセットをかけることにより、通信
動作を強制的に終了するように制御されている。これ
は、少しでも早くメモリマップの再設定を終了させて通
常通信に移行することができるように構成したためであ
る。この処理により、機器装置全体をできるだけ早い時
間で立ち上げることができる。従って、初期化通信の場
合はシフト転送によるメモリマップの再設定は1巡のシ
フト転送で切り上げられ、1回分のシリアル通信とし
て、次の通常通信に処理が移行する。
FIG. 10 is a flowchart showing a serial communication task when executing serial communication in a conventional serial communication device. FIG. 11 is a flowchart showing an initialization communication procedure when executing conventional serial communication. FIG. 12 and FIG. 13 are flowcharts showing a normal communication procedure when executing conventional serial communication. The initialization communication and the normal communication shown in FIGS.
It is started in the serial communication task shown in FIG. In the case of the normal communication, the shift transfer for executing the serial communication operation is performed twice, and the information contents of the first and second rounds are compared (that is, the above-described double transmission and double reading are performed). However, in the case of the initialization communication, the shift transfer for executing the serial communication operation is performed by one.
The communication operation is controlled to be forcibly terminated by performing a soft reset at the stage of the circulation. This is because the reset of the memory map is finished as soon as possible and the system can be shifted to the normal communication. With this process, the entire device can be started up as quickly as possible. Therefore, in the case of initialization communication, resetting of the memory map by shift transfer is rounded up in one round of shift transfer, and the processing shifts to the next normal communication as one serial communication.

【0048】図10において、電源が投入され、CPU
リセット後にCPUが有するメモリの初期化設定処理が
実行されることにより、主局が有するメモリ部分に、基
本となる伝送路に接続可能な全従局の配列順番がマップ
化されると、CPU動作による機器の制御プログラムが
起動され、同時に、図10に示す主局であるシリアル通
信タスクも起動される。
In FIG. 10, the power is turned on and the CPU
By executing the initialization setting process of the memory of the CPU after the reset, the arrangement order of all the slave stations connectable to the basic transmission path is mapped to the memory part of the master station. The control program of the device is started, and at the same time, the serial communication task, which is the main station shown in FIG. 10, is also started.

【0049】主局は、各従局との情報交換を実行する通
常通信を実行する前に、まず、現状での伝送路に存在す
る従局配列順番を確定する初期化通信を行う。このと
き、主局が有するメモリ状態は、図9(a)及び図9
(b)に示したメモリマップとなっている。
Before executing the normal communication for exchanging information with each slave station, the master station first performs initialization communication for determining the order of arrangement of slave stations existing in the current transmission path. At this time, the memory status of the master station is as shown in FIGS.
This is the memory map shown in FIG.

【0050】主局であるシリアル通信タスクが起動され
ると、リトライカウンタ値が所定値以上であるか否かが
判別される(ステップS101)。最初はリトライカウ
ンタ値はゼロであるため、次に、メモリマップの再設定
がすでに行われたことを「1」で示すメモリマップ再設
定フラグが「1」であるか否かが判別される(ステップ
S102)。ステップS102の判別で、メモリマップ
再設定フラグが「0」である場合は、メモリマップの再
設定が行われる(ステップS103)。ステップS10
3のメモリマップ再設定は、図11に示すフローチャー
トに従って行われる。
When the serial communication task, which is the master station, is started, it is determined whether or not the retry counter value is equal to or greater than a predetermined value (step S101). Since the retry counter value is initially zero, it is next determined whether or not the memory map reset flag indicating “1” indicating that the memory map has been reset is “1” ( Step S102). If it is determined in step S102 that the memory map reset flag is “0”, the memory map is reset (step S103). Step S10
The memory map resetting of No. 3 is performed according to the flowchart shown in FIG.

【0051】すなわち、まず、通信ソフトリセットがオ
ンされて、図6に示した従局の有する入力セレクタ回路
1に従局の識別子情報をアクセスさせるため、転送クロ
ックの空転送(1クロック)が行われる(ステップS1
21)。なお、転送クロックの空転送を行わない場合
は、従局の有する入力セレクタ回路1に従局の情報内容
をアクセスさせる操作を行うように構成することも可能
である。そして、メモリマップの再設定に仕様されるメ
モリポインタ及び通信結果の異常を登録する通信異常フ
ラグがそれぞれ「00H」に初期化され(ステップS1
22)、メモリポインタが「1」インクリメントされ
(ステップS123)、予め従局配列順番が登録されて
いる従局並列出力情報のメモリマップの先頭値アドレス
(MTO)とメモリポインタ値とを加算した値で示され
るメモリアドレスが、予め従局配列順番が登録されてい
る従局並列出力情報のメモリマップの最終値アドレス
(MTE)と等しいか否かが判別される(ステップS1
24)。なお、両者の値が等しい場合は、メモリマップ
のスキャンが終了したことを意味している。
That is, first, the communication software reset is turned on, and the idle transfer (one clock) of the transfer clock is performed in order to make the input selector circuit 1 of the slave station shown in FIG. 6 access the identifier information of the slave station (FIG. 6). Step S1
21). When the idle transfer of the transfer clock is not performed, the input selector circuit 1 of the slave station may be configured to access the information content of the slave station. Then, a memory pointer specified for resetting the memory map and a communication error flag for registering an error in the communication result are initialized to “00H” (step S1).
22) The memory pointer is incremented by "1" (step S123), and is indicated by a value obtained by adding the head value address (MTO) of the memory map of the slave station parallel output information in which the slave array order is registered in advance and the memory pointer value. It is determined whether or not the memory address to be read is equal to the final address (MTE) of the memory map of the slave parallel output information in which the slave array order is registered in advance (step S1).
24). If the two values are equal, it means that the scanning of the memory map has been completed.

【0052】ステップS124の判別で、先頭値アドレ
スMTOの値と最終値アドレスMTEの値とが等しくな
い場合は、シフト転送する転送データの出力準備が行わ
れる(ステップS125)。この初期化通信では、オー
ルゼロの転送データをシフト転送するが、特にこの内容
に限定されるものではなく、シリアル通信装置の利用具
合に応じてオールゼロ以外の内容からなるデータをシフ
ト転送してもよい。
If it is determined in step S124 that the value of the start value address MTO is not equal to the value of the end value address MTE, preparation for output of transfer data to be shifted is performed (step S125). In this initialization communication, all-zero transfer data is shift-transferred. However, the present invention is not particularly limited to this, and data having contents other than all-zero may be shift-transferred depending on the use of the serial communication device. .

【0053】そして、従局回路構成に合わせて4ビット
分のシフト転送が実行される。すなわち、1ビット分の
シフト転送が行われ、転送クロックが1クロック分転送
され、クロック数カウンタが「1」インクリメントされ
た後(ステップS126)、1ビットのシフト転送入力
が行われ(ステップS127)、4ビット分のシフト転
送が完了したか否かが判別される(ステップS12
8)。
Then, 4-bit shift transfer is executed in accordance with the configuration of the slave station circuit. That is, one-bit shift transfer is performed, the transfer clock is transferred by one clock, and the clock number counter is incremented by "1" (step S126), and one-bit shift transfer input is performed (step S127). It is determined whether or not the 4-bit shift transfer has been completed (step S12).
8).

【0054】ステップS126〜S128の処理手順を
繰返すことにより、4ビット分のシフト転送が実行され
る。ステップS128の判別で、4ビット分のシフト転
送が完了すると、主局に対してシフト転送によって返送
される第1番目の従局からの識別子情報が処理される。
ここでは、基本となるメモリマップの従局並列出力情報
であるメモリマップの先頭値アドレスMTOとメモリポ
インタ値とを加算した値で示されるメモリアドレスの内
容がピックアップされて、その上位4ビットの内容が取
得され(ステップS129)、ステップS128で入力
完了と判別された4ビット構成の識別子情報と比較さ
れ、両者が一致しているか否かが判別される(ステップ
S130)。
By repeating the processing procedures of steps S126 to S128, shift transfer of 4 bits is executed. When the 4-bit shift transfer is completed in step S128, the identifier information from the first slave station returned to the master station by the shift transfer is processed.
Here, the contents of the memory address indicated by the sum of the start address MTO of the memory map, which is the slave parallel output information of the basic memory map, and the memory pointer value are picked up, and the contents of the upper 4 bits are picked up. It is acquired (step S129), and is compared with the 4-bit identifier information determined to be input completed in step S128, and it is determined whether or not both match (step S130).

【0055】ステップS130の判別で、一致している
場合は、基本となるメモリマップの従局並列出力情報に
登録された識別子情報の従局が存在すると判断されるの
で、上述したステップS123〜S130の処理が再び
実行され、次のシフト転送による識別子情報に基づいて
従局の有無が判断される。
If it is determined in step S130 that they match, it is determined that there is a slave station of the identifier information registered in the slave station parallel output information of the basic memory map, so that the above-described steps S123 to S130 are performed. Is executed again, and the presence or absence of the slave station is determined based on the identifier information by the next shift transfer.

【0056】また、ステップS130の判別で、一致し
ていない場合は、基本となるメモリマップの従局並列出
力情報に登録された識別子情報の従局が存在しないと判
断されるので、その該当従局の上位4ビットに示される
識別子情報内容を従局が無いことを意味するオールゼロ
(00H)にクリアして再登録が行われる(ステップS
131)。更に、メモリポインタを「1」インクリメン
トすることにより、基本となるメモリマップの従局並列
出力情報の次に位置する登録された識別子情報の従局が
指定され(ステップS132)、上述したステップS1
29に戻り、再び従局の存在が判断される。
If it is determined in step S130 that they do not match, it is determined that there is no slave station of the identifier information registered in the slave parallel output information of the basic memory map. The contents of the identifier information indicated by 4 bits are cleared to all zeros (00H), which means that there is no slave station, and re-registration is performed (step S).
131). Further, by incrementing the memory pointer by “1”, the slave station of the registered identifier information located next to the slave parallel output information of the basic memory map is designated (step S132), and the above-described step S1 is performed.
Returning to 29, the existence of the slave station is determined again.

【0057】つまり、存在しない従局のメモリエリアの
内容を「00H」にすることにより登録が抹消され、存
在する従局のメモリエリアは、すでに登録されている識
別子情報をそのまま残すことにより現状での従局配列順
番が再設定される。
That is, the registration is deleted by setting the contents of the memory area of the non-existing slave station to “00H”, and the existing slave memory area is left as it is by leaving the already registered identifier information as it is. The array order is reset.

【0058】以上の動作を繰返して基本となるメモリマ
ップの従局配列順番が再設定されると、ステップS12
4の判別で先頭値アドレスMTOの値にメモリポインタ
の値を加えた値が最終値アドレスMTEの値に達するの
で、初期化通信実行で実際にシフト転送で出力された転
送クロック総数をカウントする、主局が有するクロック
数カウンタの値を一従局を構成するビット数である4ビ
ットで割り算することにより現状の伝送路に存在する従
局総数が算出され、この従局総数と、再設定されたメモ
リマップ上で存在すると判断された従局総数とが一致す
るか否かが判別される(ステップS133)。
When the above operation is repeated and the slave station arrangement order of the basic memory map is reset, step S12 is performed.
Since the value obtained by adding the value of the memory pointer to the value of the start value address MTO in the determination of 4 reaches the value of the end value address MTE, the total number of transfer clocks actually output in the shift transfer in execution of the initialization communication is counted. By dividing the value of the clock number counter of the master station by 4 bits, which is the number of bits forming one slave station, the total number of slave stations present on the current transmission path is calculated. This total number of slave stations and the reset memory map It is determined whether the total number of the slave stations determined to exist above matches (step S133).

【0059】ステップS133の判別で、算出された従
局総数と再設定されたメモリマップ上の従局総数とが一
致した場合は、初期化通信で従局配列順番が正常に再設
定されたので、再設定フラグに「1」がセットされると
ともに通信ソフトリセットされ(ステップS134)、
初期化通信が終了される。一方、一致しない場合は、正
常に再設定されなかったので、再設定フラグを「0」の
まま、リトライカウンタが「1」インクリメントされる
とともに通信ソフトリセットされ(ステップS13
5)、いったん本手順が終了される。
If it is determined in step S133 that the calculated total number of slave stations coincides with the reset total number of slave stations on the memory map, the sequence of the slave stations is normally reset by the initialization communication. The flag is set to "1" and the communication software is reset (step S134).
The initialization communication is terminated. On the other hand, if they do not match, the reset has not been performed normally, so the retry counter is incremented by "1" and the communication software is reset while the reset flag remains "0" (step S13).
5) Once this procedure is completed.

【0060】ステップS134またはステップS135
によって初期化通信が終了すると、図10のステップS
103のシリアル通信タスクが一旦終了される。
Step S134 or step S135
When the initialization communication is completed by the
The serial communication task of 103 is temporarily ended.

【0061】その後、再びシリアル通信タスクが起動さ
れ、上述したように、ステップS101の判別でリトラ
イカウンタ値が所定値未満であり且つステップS102
の判別でメモリマップ再設定フラグが「0」である場合
は、再びステップS103において初期化通信がリトラ
イされる。初期化通信のリトライが繰返される場合は、
図11のステップ135においてリトライカウンタ値が
所定値に達し、図10のステップS101では所定値以
上と判別される。この場合は、通信動作不能と判断さ
れ、通信故障処理が実行される(ステップS104)。
なお、この通信故障ルーチンは、装置故障として、機器
装置全体の動作を停止するものであり、サービスマン対
応が要求されるものである。
Thereafter, the serial communication task is started again, and as described above, the retry counter value is less than the predetermined value and the step S102
If the memory map reset flag is “0” in the determination of, the initialization communication is retried again in step S103. If retry of initialization communication is repeated,
In step 135 of FIG. 11, the retry counter value reaches a predetermined value, and in step S101 of FIG. 10, it is determined that the value is equal to or larger than the predetermined value. In this case, it is determined that communication is not possible, and communication failure processing is executed (step S104).
This communication failure routine is to stop the operation of the entire device as a device failure, and is required to respond to a service person.

【0062】以上が、初期化通信の主局制御である。こ
こで、図8及び図9を再び参照して、従来例における場
合の具体的な初期化通信動作について、シリアル通信装
置全体の動作から簡単に述べる。初期化シリアル通信に
よるメモリマップの再設定は、図9(a)及び図9
(b)に示した基本となる従局配列順番のメモリマップ
に基づいて行われる。主局ははじめに、基本となる従局
配列順番のメモリマップの従局並列出力情報の下位ビッ
ト列の情報内容を各従局に対してシフト転送することに
より従局並列出力状態を初期化する。なお、本従来例の
シリアル通信装置の場合は、従局並列出力状態を初期化
するためにオールゼロで設定しているが、特にこれに限
定されるものではなく、初期化情報内容は、基本となる
従局配列順番のメモリマップを作成するときに予め設定
しておけばよい。そして、主局では、上述したように、
各従局に対してソフトリセットが発せられ、転送クロッ
ク操作により従局識別子入力内容をシフトレジスタにロ
ードさせる。その後、従局並列出力状態を初期化する従
局並列出力情報がシフト転送される。その結果、各従局
には初期化する従局並列出力情報内容が並列出力端子に
出力され、且つ、主局には順次伝送路の従局配列順番に
識別子情報内容が返送されてくる。主局では、この識別
子情報内容が4ビット毎に区切られ、基本となる従局配
列順番のメモリマップに登録された識別子情報内容の順
番と比較され、現状における伝送路の従局配列順番が再
設定される。
The above is the master station control of the initialization communication. Here, with reference to FIGS. 8 and 9 again, a specific initialization communication operation in the case of the conventional example will be briefly described from the operation of the entire serial communication device. The resetting of the memory map by the initialization serial communication is performed as shown in FIGS.
This is performed based on the basic memory map of the slave station arrangement order shown in (b). First, the master station initializes the slave station parallel output state by shifting and transferring the information content of the lower bit string of the slave station parallel output information of the memory map in the base station arrangement order to each slave station. In the case of the serial communication device of this conventional example, all zeros are set to initialize the slave station parallel output state, but the present invention is not particularly limited to this, and the contents of the initialization information are basic. This may be set in advance when the memory map in the slave station arrangement order is created. And in the main station, as described above,
A soft reset is issued to each slave station, and the input content of the slave station identifier is loaded into the shift register by operating the transfer clock. Thereafter, slave parallel output information for initializing the slave parallel output state is shifted and transferred. As a result, the slave station parallel output information contents to be initialized are output to the parallel output terminals to the slave stations, and the identifier information contents are sequentially returned to the master station in the slave station arrangement order of the transmission path. In the master station, this identifier information content is divided every 4 bits, compared with the order of the identifier information content registered in the memory map of the base slave array order, and the slave array order of the current transmission line is reset. You.

【0063】ここで、識別子情報についての取り決めを
簡単に述べる。機器装置構成に必要とされる電気ユニッ
トは本体ユニットと称し、識別子情報として固定値が割
り振られている。また、機器装置構成でなくても、装置
動作を実行する電気ユニットはオプションユニットと称
し、識別子情報として順番に値が割り振られている。た
だし、オプションユニットの場合は、単に「1」から順
番に割り振るのではない。つまり、本体ユニットの場合
は必ず装置内に存在するため、予め設定された伝送路順
番の位置にあることを確認できればよいので、識別子情
報は固定値で設定可能である。一方、オプションユニッ
トは、すでに位置順番が決定されている本体ユニット間
に必ず存在するため、1つの本体ユニットを基準として
順番に番号が割り振られる。従って、オプションユニッ
トの識別子情報は、1つの本体ユニット間では重複する
識別し情報内容は存在しないが、異なる組での本体ユニ
ット間においては重複することが許されるのであって、
その識別判定も可能である。図9(a)に示すように、
その識別子情報の割り振りは、従局並列出力情報の上位
4ビットに示される。
Here, the rules for the identifier information will be briefly described. The electric unit required for the device configuration is called a main unit, and a fixed value is assigned as identifier information. In addition, even if it is not a device configuration, an electrical unit that performs a device operation is called an option unit, and values are sequentially assigned as identifier information. However, in the case of an optional unit, it is not simply assigned in order from “1”. In other words, since the main unit always exists in the apparatus, it is only necessary to confirm that the main unit is located at the position of the transmission path set in advance, so that the identifier information can be set as a fixed value. On the other hand, since the option units always exist between the main units whose position order has already been determined, the numbers are sequentially assigned based on one main unit. Therefore, the identifier information of the option unit is identical between the main units and there is no duplicate identification information information, but it is allowed to be duplicated between the main units in different sets.
The identification determination is also possible. As shown in FIG.
The allocation of the identifier information is indicated by the upper 4 bits of the slave station parallel output information.

【0064】上記取り決めによる識別子情報定義より、
図8に示す伝送路の場合のメモリマップ再設定を説明す
る。なお、このメモリ設定は、一般的なCPUのメモリ
操作と同様に実行されるものであって、この形式に限定
されるものではない。
From the definition of the identifier information according to the above agreement,
The resetting of the memory map in the case of the transmission path shown in FIG. 8 will be described. Note that this memory setting is performed in the same manner as a general CPU memory operation, and is not limited to this format.

【0065】主局には、まず、チェッカー33の識別
子情報(本体ユニット)がシフト転送される。ここで
は、本体ユニットであるため、基準カウンタ値がインク
リメントされて「01H」にされる。一方、メモリポイ
ンタカウンタ値はインクリメントされず、「00H」の
ままである。そして、基本とされるメモリマップの先頭
位置アドレスからスキャンが開始され、基準カウンタ値
が示す順番に位置する本体ユニットの識別子情報内容が
登録されているアドレス位置が基本とされるメモリマッ
プから割り出され(ここでは「01H」であるため、最
初に位置する本体ユニットであるチェッカー33が割
り出される)、そのアドレス位置に基準ポインタアドレ
スが設定される。そして、メモリポインタカウンタ値と
加算結果が示すアドレスのメモリの上位4ビットとシフ
ト転送された識別子情報内容とが比較される。ここで
は、1番目に位置する本体ユニットの0番目のメモリ内
容「チェッカー」と、転送されたチェッカー33の
識別子情報の内容とが比較され、両者は一致する。一致
した場合は、該当従局ありという判断がなされ、基本と
なるメモリマップの設定された上位4ビットはそのまま
残される。これにより、従局が存在することが示され
る。
First, the identifier information (main unit) of the checker 33 is shifted and transferred to the master station. Here, since it is a main unit, the reference counter value is incremented to “01H”. On the other hand, the memory pointer counter value is not incremented and remains at "00H". Then, scanning is started from the start position address of the basic memory map, and the address position where the identifier information content of the main unit located in the order indicated by the reference counter value is registered is determined from the basic memory map. (Here, since it is "01H", the checker 33 which is the main body unit located first is calculated), and the reference pointer address is set at the address position. Then, the upper 4 bits of the memory at the address indicated by the memory pointer counter value and the addition result are compared with the contents of the identifier information shifted and transferred. Here, the 0th memory content “checker” of the main unit located at the 1st position is compared with the transferred content of the identifier information of the checker 33, and the two match. If they match, it is determined that there is a corresponding slave station, and the upper 4 bits set in the basic memory map are left as they are. This indicates that a slave station exists.

【0066】次に、ソータの識別子情報(オプションユ
ニット)がシフト転送される。この場合は、オプション
ユニットであるため、基準カウンタ値がインクリメント
されず、「01H」のままであり、メモリポインタカウ
ンタ値がインクリメントされた「01H」にされる。そ
の結果、1番目に位置する本体ユニットの後ろの1番目
に示されるメモリ(図中「ソータ」を記載されている)
と、転送されたソータの識別子情報内容とが比較され
る。比較の結果、両者は一致し、該当従局ありとして処
理される。次に、シフト転送される識別子情報は、図8
により高圧赤(オプションユニット)の識別子情報であ
るが、本体ユニットではないため、メモリポインタカウ
ンタ値がインクリメントされた「02H」とされる。一
方、基準カウンタ値が「01H」のままである。従っ
て、1番目に位置する本体ユニット後の1番目に位置さ
れるメモリ(図中、「スイッチバック」と記載されてい
る)と、転送されたソータの識別子情報内容とが比較さ
れる。その結果両者は不一致となるので、1番目に位置
する本体ユニット後から2番目に位置するメモリである
スイッチバックメモリの上位4ビットがオールゼロに再
設定され、これにより該当する従局が無いことが示され
る。
Next, the sorter identifier information (optional unit) is shifted and transferred. In this case, since this is an optional unit, the reference counter value is not incremented and remains at "01H", and the memory pointer counter value is set to "01H" which is incremented. As a result, the first memory (the "sorter" is shown in the figure) behind the first main unit.
Is compared with the transferred sorter identifier information content. As a result of the comparison, the two match and the corresponding slave is processed. Next, the identifier information to be shifted is shown in FIG.
Is the high-pressure red (optional unit) identifier, but is not the main unit, so the memory pointer counter value is incremented to “02H”. On the other hand, the reference counter value remains “01H”. Therefore, the memory located at the first position after the main unit located at the first position (denoted as "switchback" in the figure) is compared with the transferred sorter identifier information content. As a result, the two do not match, so the upper 4 bits of the switchback memory, which is the memory located second after the main unit located first, are reset to all zeros, thereby indicating that there is no corresponding slave station. It is.

【0067】次に、再度メモリポインタカウンタ値がイ
ンクリメントされ「03H」とされ、次のメモリマップ
に位置する内容と比較される。本例では、この場合も不
一致と判断され、一致するまでは、不一致のメモリは該
当従局なし設定される。メモリポインタカウンタ値が
「04H」のとき、すなわち1番目に位置する本体ユニ
ットから4番目に位置するメモリと比較を行ったときに
両者の値が一致する。したがって、このメモリは従局を
有りと設定される。次は、図8から判るように、高圧1
の識別子情報(本体ユニット)がシフト転送される。本
体ユニットの識別子情報を受信すると、まず、基準カウ
ンタ値とメモリポインタカウンタ値とが示す値以降のメ
モリから開始され、基準カウンタ値がインクリメントさ
れた値で示される本体ユニット間に登録されたオプショ
ンユニットのメモリ内容が該当従局なしに全て設定され
る。本例では、高圧(黄)(オプションユニット)が該
当する。そして、次に、インクリメントされた基準カウ
ンタ値に基づいて、基本となるメモリマップの再設定が
継続される。
Next, the value of the memory pointer counter is incremented again to "03H" and compared with the contents located in the next memory map. In this example, in this case also, it is determined that there is no match, and until the match, the memory of the mismatch is set without the corresponding slave station. When the memory pointer counter value is “04H”, that is, when the memory unit is compared with the memory located at the fourth position from the main unit located at the first position, both values match. Accordingly, this memory is set as having a slave station. Next, as can be seen from FIG.
(The main unit) is shifted and transferred. When the identifier information of the main unit is received, first, the option unit registered between the main units, starting from the memory after the value indicated by the reference counter value and the memory pointer counter value, and the reference counter value is indicated by the incremented value Are all set without the corresponding slave station. In this example, the high pressure (yellow) (optional unit) corresponds. Then, based on the incremented reference counter value, resetting of the basic memory map is continued.

【0068】なお、基準カウンタがインクリメントされ
るときは、メモリポインタカウンタ値はクリアされ「0
0H」に戻される。そして、上記動作を基本とされるメ
モリマップ全てに対して実行することにより、図9
(c)に示すようにメモリの再設定が行われる。つま
り、このメモリ操作は、基本的に、何番目に位置する本
体ユニットから何番目に位置するオプションユニット、
という形式で操作され、メモリ内容の設定がなされる。
When the reference counter is incremented, the memory pointer counter value is cleared to "0".
0H ". Then, the above-described operation is performed on all of the basic memory maps, whereby FIG.
The memory is reset as shown in FIG. In other words, this memory operation is basically performed from what position of the main unit to what position of the optional unit,
And the contents of the memory are set.

【0069】以上が初期化通信の制御動作である。The above is the control operation of the initialization communication.

【0070】次に、初期化通信を終えて、本来の各従局
との情報交換を実行する主局により制御される通常通信
について説明する。
Next, a description will be given of normal communication controlled by the master station which performs information exchange with each slave station after the initialization communication.

【0071】図10において、上記初期化通信がステッ
プS103で行われると、メモリマップ再設定フラグに
「1」がセットされ、その結果、メモリマップは、図9
(c)の従局並列出力情報の上位4ビットに示すように
基本となるメモリマップでの従局配列順番から、現状の
伝送路に存在する従局の従局配列順番に再設定される。
通常通信は、この従局配列順番の状態に基づいて行われ
る。
In FIG. 10, when the initialization communication is performed in step S103, "1" is set in the memory map reset flag, and as a result, the memory map
As shown in the upper four bits of the slave parallel output information in (c), the slave array order in the basic memory map is reset to the slave array order of the slaves existing on the current transmission path.
Normal communication is performed based on the state of the slave station arrangement order.

【0072】図10のステップS102の判別で、メモ
リマップ再設定フラグが「1」であると判別されると、
リトライフラグが「1」であるか否かが判別され(ステ
ップS105)、リトライ通信の有無が判別される。こ
のリトライ通信は初期化通信で述べたものと同様に一回
のシリアル通信が失敗したときに、リトライカウンタを
インクリメントして、所定値以内の場合は再通信を実行
するためのものである。なお、このリトライ通信手段構
成には、従来のシリアル通信装置の2種類の通信手段で
ある、初期化通信と通常通信とが同時進行しないため、
同じ構成要素が利用される。つまり、リトライ通信で所
定値を超えてエラーとなるときは、初期化通信及び通常
通信のいずれも通信故障処理ルーチンで処理されるので
ある。
If it is determined in step S102 in FIG. 10 that the memory map reset flag is "1",
It is determined whether or not the retry flag is "1" (step S105), and it is determined whether or not there is retry communication. In the retry communication, as in the case of the initialization communication, when one serial communication fails, the retry counter is incremented, and when the serial communication is within a predetermined value, the retry communication is executed. This retry communication means configuration has two types of communication means of the conventional serial communication device, that is, initialization communication and normal communication do not proceed simultaneously.
The same components are used. That is, when an error occurs in the retry communication exceeding a predetermined value, both the initialization communication and the normal communication are processed in the communication failure processing routine.

【0073】一方、リトライ通信を実行するときは、初
期化通信の場合は、上述したように図11のステップS
135でリトライカウンタの処理が行われ、再設定フラ
グをリセットのまま、図10の未設定ということでリト
ライ通信が実行される。また、通常通信の場合は、通常
通信実行後のステップS110でリトライカウンタの処
理が行われ、ステップS105の処理によってリトライ
通信実行の判断がなされる。つまり、初期化通信と通常
通信とのリトライ通信制御は、別々に制御されるが、エ
ラー処理ルーチンや処理に必要なフラグ、及びカウンタ
類は、共有されている。
On the other hand, when the retry communication is executed, when the initialization communication is performed, as described above, step S in FIG.
At 135, the process of the retry counter is performed, and the retry communication is executed while the reset flag is reset, because it is not set in FIG. In the case of the normal communication, the process of the retry counter is performed in step S110 after the execution of the normal communication, and the execution of the retry communication is determined by the process of step S105. In other words, the retry communication control for the initialization communication and the normal communication is controlled separately, but the flags and counters necessary for the error processing routine and processing are shared.

【0074】図10に戻り、メモリマップの再設定が終
了されると、リトライフラグが「1」であるか否かを見
ることにより、リトライ通信を行うか否かが判別される
(ステップS105)。ステップS105の判別で、リ
トライ通信なしの場合は、主局通信要求フラグが「1」
であるか否か(ステップS106)または従局での通信
要求信号がオンされているか否か(ステップS107)
が判別される。主局通信要求フラグが「1」にセットさ
れている場合、または従局通信要求信号がオンされてい
る場合は、通常通信の実行が要求されていることを示
す。なお、初期化通信を終了した後は、従局の位相制御
カウンタ回路11も主局位相制御カウント手段での制御
カウント値も共に通信ソフトリセットで「00H」にな
っているため、従局通信要求信号はオフと判別される。
従って、主局は、初期化通信を終了した直後に主局通信
要求フラグをリセットして、ステップS106で通常通
信の実行を指示する。一方、通常通信を1回でも実行し
ていると、制御カウント値は「0EH」となっており、
上述したように、通常通信の実行指示を待つ待機状態と
なる。そのステップS107からステップS110に処
理が移行し、故障などの処理信号がリセットされ、その
まま一旦タスクが終了され、再びステップS105以下
の処理を実行することにより、待機検知が実行される。
そして、通常通信の実行指示を受けると、ステップS1
04で、図12及び図13に示す通常通信が実行され
る。
Returning to FIG. 10, when the resetting of the memory map is completed, it is determined whether the retry communication is to be performed by checking whether the retry flag is "1" (step S105). . If no retry communication is determined in step S105, the master station communication request flag is set to “1”.
(Step S106) or whether the communication request signal at the slave station is on (step S107).
Is determined. When the master station communication request flag is set to "1" or when the slave station communication request signal is turned on, it indicates that execution of normal communication is requested. After the initialization communication is completed, the control count value of the slave station phase control counter circuit 11 and the control count value of the master station phase control counting means are both set to “00H” by the communication software reset. It is determined to be off.
Accordingly, the master station resets the master station communication request flag immediately after finishing the initialization communication, and instructs execution of the normal communication in step S106. On the other hand, if the normal communication is performed even once, the control count value is “0EH”,
As described above, the standby state is set to wait for the execution instruction of the normal communication. The process shifts from step S107 to step S110, where a processing signal such as a failure is reset, the task is temporarily ended as it is, and the processing after step S105 is performed again, thereby performing standby detection.
Then, when receiving the execution instruction of the normal communication, step S1
At 04, the normal communication shown in FIGS. 12 and 13 is executed.

【0075】図12において、まず通信ソフトリセット
が実行され、通信実行の同期が取られる(ステップS1
41)。また、通信異常フラグ、メモリポインタ、位相
制御カウンタ及びクロック数カウンタがそれぞれリセッ
トされて「00H」にされる(ステップS142)。そ
して、メモリ操作のためのメモリポインタがインクリメ
ントされ、(ステップS143)、主局位相制御カウン
タから制御カウンタ値がロードされ(ステップS14
4)、その制御カウンタ値が所定値であるか否かが判別
される(ステップS145)。ここでは、従局からシフ
ト転送される従局入力情報が選択されたときの「00
H」シフト転送を一巡実行したときの「06H」の2値
で判別が行われる。更に、シフト転送を二巡実行した後
の2度読み比較の結果のときを「0DH」に設定し、後
述するステップで判別に使用している。一方、従局通信
要求信号の有効期間を「0EH」と設定しているが、こ
こでは、特にタイミング判定の実行はしていないもの
の、通常通信での通信動作を終了し、次回に通信実行可
能状態を「0EH」にするように制御している。
In FIG. 12, first, a communication software reset is executed to synchronize the execution of communication (step S1).
41). Further, the communication abnormality flag, the memory pointer, the phase control counter, and the clock number counter are reset to “00H” (step S142). Then, the memory pointer for the memory operation is incremented (step S143), and the control counter value is loaded from the master station phase control counter (step S14).
4) It is determined whether or not the control counter value is a predetermined value (step S145). Here, “00” when the slave input information to be shifted and transferred from the slave is selected.
The determination is made based on the binary value of "06H" when the "H" shift transfer is performed once. Furthermore, the value of the result of the double reading comparison after performing the shift transfer twice is set to “0DH”, and is used for determination in steps described later. On the other hand, the validity period of the slave station communication request signal is set to “0EH”. Here, although the timing determination is not particularly performed, the communication operation in the normal communication is terminated, and the communication is ready for the next communication. Is controlled to be “0EH”.

【0076】ステップS145の判別で、制御カウント
値が所定値である場合は、返送位相信号がオンされてい
るか否かが判別され(ステップS146)、返送位相信
号のオンチェック時にオンである場合は正常に位相タイ
ミングの同期が取れていると判断され、ステップS15
0の処理が行われる。
If it is determined in step S145 that the control count value is the predetermined value, it is determined whether or not the return phase signal is ON (step S146). It is determined that the phase timings are normally synchronized, and step S15
0 processing is performed.

【0077】一方、ステップS145の判別で、制御カ
ウント値が所定値ではない場合は、返送移送信号がオフ
されているか否かが判別され(ステップS147)、位
相返送信号のオフチェック時にオフされている場合は正
常に位相タイミングの同期が取れていると判断されるの
で、ステップS150の処理が行われる。
On the other hand, if it is determined in step S145 that the control count value is not the predetermined value, it is determined whether or not the return transport signal is turned off (step S147). If there is, it is determined that the phase timing is normally synchronized, and the process of step S150 is performed.

【0078】ステップS146の判別で返送位相信号の
オンチェック時にオフであった場合、またはステップS
147の判別で返送位相信号のオフチェック時にオンで
あった場合は、位相タイミングの同期がずれていると判
断される。そこで、通信異常フラグの位相エラービット
に「1」がセットされ(ステップS148)、通信ソフ
トリセットがオンされて(ステップS149)、通常通
信がキャンセルされる。
If it is determined in step S146 that the return phase signal is off at the time of on-check,
If the return phase signal is ON at the time of the OFF check in the determination of 147, it is determined that the phase timing is out of synchronization. Therefore, "1" is set to the phase error bit of the communication abnormality flag (step S148), the communication software reset is turned on (step S149), and the normal communication is canceled.

【0079】ステップS146又はステップS147で
返送位相信号が正常であると判断された場合は、通常通
信が開始される。まず、メモリポインタ値と従局並列出
力情報に示される再設定終了したメモリマップの先頭値
アドレスMTOとの加算値が、メモリマップの最終値ア
ドレスMTEの等しいか否かが判別される(ステップS
150)。
If it is determined in step S146 or S147 that the return phase signal is normal, normal communication is started. First, it is determined whether or not the sum of the memory pointer value and the start value address MTO of the reset memory map indicated by the slave station parallel output information is equal to the final value address MTE of the memory map (step S).
150).

【0080】この判別で、両者が等しくない場合は、シ
フト転送がまだ終了していないので、メモリポインタ値
とメモリマップの先頭値アドレスMTOとの加算値アド
レスが示すメモリ内容の上位4ビットが取得され(ステ
ップS151)、その値が「00H」であるか否かが判
別される(ステップS152)。ここで、「00H」で
ある場合は,再設定で登録された従局が無いので、再び
ステップS143に戻り、メモリポインタ値をインクリ
メントして、メモリマップの次の従局におけるシフト転
送が開始される。
If the two values are not equal, the shift transfer has not been completed yet, and the upper 4 bits of the memory contents indicated by the sum value address of the memory pointer value and the top value address MTO of the memory map are obtained. (Step S151), and it is determined whether or not the value is “00H” (step S152). Here, if it is “00H”, there is no slave station registered by resetting, so the flow returns to step S143 again, the memory pointer value is incremented, and shift transfer in the next slave station in the memory map is started.

【0081】また、ステップS152の判別で、「00
H」ではない場合は、そのメモリ内容の下位4ビットが
取得され(ステップS153)、シフト転送のため1ビ
ットシフトが実行される(ステップS154)。すなわ
ち、ステップS154では、1ビット分の内容がシフト
出力され、転送クロックが1クロック出力され、クロッ
ク数カウンタが「1」だけインクリメントされる。さら
に、主局が有するクロック数カウンタ手段の値が所定値
であるか否かが判別され(ステップS155)、所定値
である場合は主局及び従局が各々有する位相制御カウン
タの制御カウント値がそれぞれ「1」インクリメントさ
れる(ステップS156)。一方、ステップS155の
判別で、クロック数カウンタ手段の値が所定値ではない
場合は、ステップS156の処理はスキップされる。そ
して、シフト転送による1ビットの返送信号が入力され
(ステップS157)、1つの従局分である4ビット分
のシフト転送が完了したか否かが判別される(ステップ
S158)。
In the determination of step S152, "00"
If it is not "H", the lower 4 bits of the memory content are obtained (step S153), and one-bit shift is performed for shift transfer (step S154). That is, in step S154, the content of one bit is shifted out, the transfer clock is output one clock, and the clock number counter is incremented by "1". Further, it is determined whether the value of the clock number counter means of the master station is a predetermined value (step S155). If the value is the predetermined value, the control count values of the phase control counters of the master station and the slave stations are respectively determined. "1" is incremented (step S156). On the other hand, if it is determined in step S155 that the value of the clock number counter is not the predetermined value, the process of step S156 is skipped. Then, a 1-bit return signal by the shift transfer is input (step S157), and it is determined whether or not the shift transfer for 4 bits corresponding to one slave station is completed (step S158).

【0082】この判別で、4ビット分のシフト転送が完
了していない場合は再びステップS154の処理が行わ
れる。また、4ビット分のシフト転送が完了した場合
は、その4ビットデータが、図9(d)に示すメモリマ
ップの従局並列入力情報にストアされる(ステップS1
59)。具体的には、メモリポインタ値と従局並列入力
情報のメモリマップの先頭値アドレスMTIとの加算値
アドレスが示すメモリ内容の下位4ビットに、シフト転
送された4ビット分のデータがストアされ、これによ
り、情報内容が更新される。そして、従局のシフト転送
を実行するために異常の動作を繰返すため、再びステッ
プS143の処理が実行される。そして、上述したよう
に、ステップS150において、シフト転送される従局
のデータスキャンが一巡して終了したと判別された場合
は、通常通信実行後の処理が行われる。
If it is determined in this determination that the 4-bit shift transfer has not been completed, the process of step S154 is performed again. When the 4-bit shift transfer is completed, the 4-bit data is stored in the slave station parallel input information in the memory map shown in FIG. 9D (step S1).
59). Specifically, the shift-transferred 4-bit data is stored in the lower 4 bits of the memory content indicated by the sum value address of the memory pointer value and the start value address MTI of the memory map of the slave station parallel input information. , The information content is updated. Then, in order to repeat the abnormal operation to execute the shift transfer of the slave station, the process of step S143 is executed again. Then, as described above, if it is determined in step S150 that the data scan of the slave station to be shifted and transferred has completed one cycle, the processing after the execution of the normal communication is performed.

【0083】すなわち、位相制御カウンタの制御カウン
タ値が「0DH」にセットされ(ステップS160)、
返送位相信号がオンされているか否かが判別される(ス
テップS161)。この判別で、返送位相信号がオンさ
れている場合は、いずれかの従局で2度読み比較でエラ
ーが発生したことを意味するために、通信異常フラグの
2度読み比較エラービットがセットされ(ステップS1
62)、リトライ通信を実行するための通信ソフトリセ
ットが実行され(ステップS163)、その後本手順が
終了される。
That is, the control counter value of the phase control counter is set to "0DH" (step S160),
It is determined whether the return phase signal is on (step S161). In this determination, if the return phase signal is ON, it means that an error has occurred in the double reading comparison in any of the slave stations, so the double reading comparison error bit of the communication abnormality flag is set ( Step S1
62), a communication software reset for executing the retry communication is executed (step S163), and the procedure is thereafter terminated.

【0084】一方、ステップS161の判別で、返送位
相信号がオンされていない場合は、全ての従局で2度読
み比較にエラーが発生しなかったことを意味するため
に、主局位相制御カウンタの制御カウント値が「0E
H」にセットされ(ステップS164)、各従局からの
通信要求信号が有効に設定されて、本手順が終了され
る。
On the other hand, if it is determined in step S161 that the return phase signal has not been turned on, it means that no error has occurred in the read comparison twice in all the slave stations. When the control count value is "0E
H ”(step S164), the communication request signal from each slave station is set to be valid, and the procedure ends.

【0085】図10に戻り、ステップS108(図12
及び図13)の通常通信処理が終了すると、通信異常フ
ラグが「00H」であるか否か、すなわち正常に通信が
終了したか否かが判別される(ステップS109)。こ
の判別で、通信異常フラグが「00H」である場合は、
リトライフラグに「0」がセットされるとともにリトラ
イカウンタに「00H」がセットされ(ステップS11
0)、本タスクが終了される。これによって、主局又は
従局からの通信要求があるとステップS106又はステ
ップS107で判別される時まで通信待機状態が継続さ
れ、要求がない限り通信実行は基本的にはなされないよ
うに構成される。
Returning to FIG. 10, step S108 (FIG. 12)
When the normal communication process of FIG. 13) ends, it is determined whether or not the communication abnormality flag is “00H”, that is, whether or not the communication has ended normally (step S109). In this determination, when the communication abnormality flag is “00H”,
“0” is set to the retry flag and “00H” is set to the retry counter at step S11.
0), this task is terminated. Thereby, the communication standby state is continued until it is determined in step S106 or step S107 that there is a communication request from the master station or the slave station, and communication is basically not performed unless there is a request. .

【0086】また、「00H」ではない場合は、何らか
の異常が発生しているので、通信異常フラグの解析が行
われ(ステップS111)、リトライ通信を指示するた
めにリトライフラグに「1」がセットされると共にリト
ライカウンタがインクリメントされ(ステップS11
2)、本タスクが終了される。
If it is not "00H", some abnormality has occurred, so that the communication abnormality flag is analyzed (step S111), and "1" is set to the retry flag to instruct retry communication. And the retry counter is incremented (step S11).
2) This task is completed.

【0087】なお、通信異常フラグは、特に図示しない
が各種異常状態に応じて、各々対応した複数のフラグか
ら構成されている。そして、通信異常フラグ解析ルーチ
ンの実行により、異常状態内容が軽いとされるフラグが
セットされている場合(ここで、異常状態内容は、予め
軽度の部類と重度の部類とに分けて設定されているもの
とする)は、ステップS112においてリトライカウン
タ値が「1」インクリメントされ、リトライ通信の実行
が指示される。一方、異常状態内容が重いとされるフラ
グがセットされているときは、リトライカウンタ値はそ
の場でエラーとなる所定値にダイレクトにセットされる
ように予め分類分けられているので、ステップS112
でインクリメント処理され一旦本タスクが終了された
後、再び本タスクが起動されたときにはリトライ通信は
実行されず、即ステップS101からステップS104
の処理が行われ、通信故障処理ルーチンで通信動作及び
機器装置の動作が停止される。
Although not shown, the communication abnormality flag is composed of a plurality of flags corresponding to various abnormal states. When the flag indicating that the content of the abnormal state is light is set by execution of the communication error flag analysis routine (here, the content of the abnormal state is set in advance into a light category and a severe category, and In step S112, the retry counter value is incremented by "1", and an instruction to execute retry communication is issued. On the other hand, when the flag indicating that the content of the abnormal state is heavy is set, the retry counter value is classified in advance so as to be directly set to a predetermined value causing an error on the spot.
When the task is started again after the task is terminated after the increment processing is performed, the retry communication is not executed, and the steps S101 to S104 are immediately performed.
Is performed, and the communication operation and the operation of the device are stopped in the communication failure processing routine.

【0088】以上が、通常通信の主局制御である。この
通常通信は、初期化通信の実行で現状の伝送路に存在す
る従局の配列順番を再設定した後に実行されるものであ
り、再設定された伝送に存在する従局の配列順番が変化
した場合は、直ちに初期化通信が実行されてメモリの再
設定が実行されなければならない。
The above is the master station control of the normal communication. This normal communication is executed after resetting the arrangement order of the slave stations existing on the current transmission line by performing the initialization communication, and when the arrangement order of the slave stations existing in the reset transmission changes. In this case, the initialization communication must be performed immediately to reset the memory.

【0089】なお、主局通信要求の発生部分は、特に図
示していないが、機器装置制御を司るCPUが、各従局
に情報更新が必要と判断する主局通信要求フラグを各制
御タスク中にセットする。従って、主局は、シリアル通
信タスクの通常通信を制御するステップS106で主局
通信要求フラグをチェックして、通常通信実行の有無を
判断する。
Although not shown in the drawing, the part that generates the master station communication request includes a master station communication request flag that determines that each slave station needs to update information in each control task. set. Therefore, the master station checks the master station communication request flag in step S106 for controlling the normal communication of the serial communication task, and determines whether or not the normal communication is to be performed.

【0090】このように、通常通信の実行は、再設定さ
れたメモリマップの従局並列出力情報で有効とされる下
位4ビット情報内容を順次シフト転送するとともに、返
送される情報内容を順次従局並列入力情報の下位4ビッ
トに格納するだけでよい。つまり、一旦メモリの再設定
を行えば、主局は単にメモリ内容を転送のような簡単で
容易な制御で各従局との情報交換を行うことができる。
また、通常通信を実行する所要時間は、情報交換するデ
ータビット数のみのシフト転送ですむため、最小時間で
処理することができる。
As described above, the normal communication is executed by sequentially shifting and transferring the lower 4-bit information contents validated by the slave station parallel output information of the reset memory map, and sequentially transmitting the returned information contents by the slave station parallel output. Only the lower 4 bits of the input information need be stored. In other words, once the memory is reset, the master station can exchange information with each slave station by simple and easy control such as simply transferring the contents of the memory.
In addition, the time required for executing the normal communication can be shifted by only the number of data bits for exchanging information, so that the processing can be performed in a minimum time.

【0091】しかし、どのような機器装置であっても、
電気ユニット間の配線が何らかの要因により断線・短絡
されてしまえば装置動作は成立しない。当然のごとく、
上記従来例におけるシリアル通信装置においても同様で
ある。実際問題として、断線・短絡等により装置異常に
なった場合は、サービスマンコールというメンテナンス
が実行される。
However, whatever the device,
If the wiring between the electric units is disconnected or short-circuited for some reason, the operation of the device is not established. Not surprisingly,
The same applies to the serial communication device in the above conventional example. As a practical matter, when the apparatus becomes abnormal due to disconnection or short circuit, maintenance called a serviceman call is performed.

【0092】近年における機器メンテナンスは、異常ユ
ニットを発見してユニット交換を行うことにより、メン
テナンスに要する時間を短縮し、極力コストを抑制する
という手法が主体となっている。
In recent years, equipment maintenance is mainly performed by finding an abnormal unit and exchanging the unit, thereby shortening the time required for the maintenance and minimizing the cost as much as possible.

【0093】[0093]

【発明が解決しようとする課題】しかしながら、上記従
来のシリアル通信装置によれば、以下の問題点があっ
た。
However, the above-described conventional serial communication device has the following problems.

【0094】すなわち、従来のシリアルは、主局主導に
よる単方向性シリアル通信装置として構成されており、
いずれかの従局においてその従局情報の内容が更新され
ると、その従局から主局に対して通信要求信号が発せら
れ、これを検出した主局が主局内で発生する主局通信要
求の有無に関わらずシリアル通信を実行する。このよう
に、従来のシリアル通信は、主局が有する情報の内容と
各従局が有する情報の内容が常に最新状態で情報交換さ
れる、双方向性のシリアル通信形態で情報交換を行う点
に特徴がある。
That is, the conventional serial is configured as a unidirectional serial communication device led by the master station.
When the content of the slave station information is updated in any of the slave stations, a communication request signal is issued from the slave station to the master station, and the master station detecting this signal determines whether there is a master station communication request generated in the master station. Regardless, execute serial communication. As described above, the conventional serial communication is characterized in that information is exchanged in a bidirectional serial communication form in which the information content of the master station and the information content of each slave station are always exchanged in the latest state. There is.

【0095】つまり、従来のシリアル通信装置は、従局
からの通信要求があって初めて主局と従局との間で情報
交換が成立するのであり、従局からの通信要求信号にな
んらかの異常が発生したことによりその通信要求信号が
主局に対して正常に作用しなくなると、シリアル通信そ
のものが成立しなくなってしまう。
That is, in the conventional serial communication device, the information exchange between the master station and the slave station is established only after a communication request from the slave station has occurred, and some abnormality has occurred in the communication request signal from the slave station. Therefore, if the communication request signal does not normally operate on the master station, serial communication itself will not be established.

【0096】従局からの通信要求が主局に対して正常に
作用しない要因として、(1)従局から送信される通信
要求信号の伝送路に異常が発生した場合、すなわち通信
要求信号の伝送路が断線や短絡し、通信要求信号がオン
状態を持続したり、オフ状態を持続したりして、伝達が
普通になる場合及び、(2)機器装置内部に発生するノ
イズ等によって一時的にオン状態となり、しかも、その
状態を主局が通信要求信号として誤検出した場合が考え
られる。上記(1)の断線・短絡は、時系列には変化し
ないため、他の手段を用いて伝送炉の断線・短絡の検出
を実行すればよいが、(2)のノイズ等の誤伝達につい
ては、ノイズと主局との位相タイミングが一致したとき
に起こり得るという、確立論的なものであるため、その
異常を正確に検出することができないという問題点があ
った。
The factors that prevent the communication request from the slave station from operating normally on the master station are as follows. (1) When the transmission path of the communication request signal transmitted from the slave station occurs, that is, when the transmission path of the communication request signal is When the communication becomes normal due to disconnection or short circuit, the communication request signal keeps on or off, and (2) temporarily turns on due to noise generated inside the equipment. In addition, there may be a case where the state is erroneously detected by the master station as a communication request signal. Since the disconnection / short-circuit of the above (1) does not change in chronological order, the disconnection / short-circuit of the transmission furnace may be detected using other means. However, since it is a probabilistic theory that it can occur when the phase timing between the noise and the main station coincides with each other, there is a problem that the abnormality cannot be detected accurately.

【0097】本発明は、上記問題点を解決するためにな
されたもので、ノイズ等の誤伝達による異常診断を、容
易に且つ正確に行うことができるシリアル通信装置、そ
の異常診断方法ならびに記録媒体を提供することを目的
とする。
The present invention has been made in order to solve the above problems, and a serial communication apparatus, an abnormality diagnosis method, and a recording medium capable of easily and accurately performing an abnormality diagnosis due to erroneous transmission of noise or the like. The purpose is to provide.

【0098】[0098]

【課題を解決するための手段】上記目的を達成するため
に、請求項1のシリアル通信装置は、一つの主局を中心
に複数の従局を有する伝送路で構成され、前記主局が発
するシリアル転送クロックに同期して当該主局から前記
複数の従局への出力情報をシフト転送し、且つ前記シフ
ト転送を利用して前記複数の従局から主局へ従局情報を
返送することにより前記主局と前記複数の従局との情報
交換を実行するためのシリアル通信を行うシリアル通信
装置であって、前記複数の従局は、それぞれ、前記主局
に返送する前記従局情報の内容が更新されたか否かを判
別する更新判別手段と、前記更新判別手段により前記従
局情報が更新されたと判別された場合に前記主局に対し
て通信要求信号を送信する通信要求信号送信手段とを備
え、前記主局は、前記複数の従局へシフト転送する出力
情報の内容が更新された場合または前記複数の従局のい
ずれかから送信されてきた通信要求信号を受信した場合
に、前記シリアル通信を実行するシリアル通信実行手段
を備えるシリアル通信装置において、前記主局は、前記
複数の従局へシフト転送する出力情報の内容を記憶する
出力情報記憶手段と、前記複数の従局から返送される従
局情報の内容を記憶する入力情報記憶手段とを備え、前
記入力情報記憶手段は、前記シリアル通信の実行前の従
局情報の内容を記憶保持する第1入力情報記憶手段と前
記シリアル通信の実行後の従局情報の内容を記憶保持す
る第2入力情報記憶手段と、前記シリアル通信の実行後
に、前記第1入力情報記憶手段に記憶保持されている従
局情報の内容と前記第2入力情報記憶手段に記憶保持さ
れている従局情報の内容とをビット毎に比較する比較手
段とから構成され、更に、前記主局は、前記実行された
シリアル通信が前記従局の前記通信要求信号送信手段か
ら出力された通信要求信号により実行されたものである
か否かに応じて、前記比較手段による比較結果を判定す
る比較結果判定手段と、前記比較結果判定手段による判
定の結果に基いて前記実行されたシリアル通信による情
報交換が不成立であるか否かを診断する自己診断手段と
を備えることを特徴とする。
According to a first aspect of the present invention, there is provided a serial communication apparatus comprising a transmission line having a plurality of slave stations centered on a single master station, and a serial line transmitted from the master station. The master station shifts output information from the master station to the plurality of slave stations in synchronization with a transfer clock, and returns slave station information from the plurality of slave stations to the master station using the shift transfer. A serial communication device that performs serial communication for performing information exchange with the plurality of slave stations, wherein the plurality of slave stations each determine whether or not the content of the slave station information returned to the master station has been updated. Update determining means for determining, and a communication request signal transmitting means for transmitting a communication request signal to the master station when it is determined that the slave station information has been updated by the update determining means, the master station, When the content of the output information to be shifted and transferred to the plurality of slave stations is updated or when a communication request signal transmitted from any of the plurality of slave stations is received, the serial communication executing means for executing the serial communication is provided. In the serial communication device, the master station has output information storage means for storing contents of output information to be shifted and transferred to the plurality of slave stations, and input information storage for storing contents of slave station information returned from the plurality of slave stations. Means, wherein the input information storage means stores and holds the contents of slave information before execution of the serial communication, and the input information storage means stores and holds contents of slave information after execution of the serial communication. A second input information storage unit, and the contents of the slave information stored and held in the first input information storage unit after the execution of the serial communication; Means for comparing the contents of the slave station information stored and held in the means bit by bit, and the master station outputs the executed serial communication from the communication request signal transmitting means of the slave station. A comparison result judging unit for judging a comparison result by the comparing unit according to whether or not the execution is performed by the performed communication request signal; and performing the execution based on a result of the judgment by the comparison result judging unit. Self-diagnosis means for diagnosing whether information exchange by serial communication is not established.

【0099】請求項2のシリアル通信装置は、上記請求
項1記載のシリアル通信装置において、前記自己診断手
段は、前記実行されたシリアル通信が前記従局の前記通
信要求信号送信手段から送出された通信要求信号により
実行されたものであるときに、前記比較結果判定手段に
より前記比較手段による比較の結果が全ビットとも一致
していると判定した場合に、前記実行されたシリアル通
信による情報交換が不成立であると診断するように構成
されることを特徴とする。
In the serial communication apparatus according to a second aspect of the present invention, in the serial communication apparatus according to the first aspect, the self-diagnosis unit is configured to transmit the executed serial communication from the communication request signal transmitting unit of the slave station. If the comparison result determination unit determines that the comparison result by the comparison unit matches all the bits when the comparison is performed by the request signal, the information exchange by the executed serial communication is not established. Is configured to be diagnosed.

【0100】請求項3のシリアル通信装置は、上記請求
項1記載のシリアル通信装置において、前記自己診断手
段は、前記実行されたシリアル通信が前記従局の前記通
信要求信号送信手段から送出された通信要求信号により
実行されたものであるときに前記比較結果判定手段によ
り前記比較手段による比較の結果が全ビットとも一致し
ていると判定した場合、及び前記実行されたシリアル通
信が前記従局の前記通信要求信号送信手段から送出され
た通信要求信号により実行されたものではないときに前
記比較結果判定手段により前記比較手段による比較結果
のうち少なくとも1ビットが一致していないと判定した
場合に、前記実行されたシリアル通信による情報交換が
不成立であると診断するように構成されることを特徴と
する。
According to a third aspect of the present invention, in the serial communication apparatus according to the first aspect, the self-diagnosis unit is configured to transmit the executed serial communication from the communication request signal transmitting unit of the slave station. When the comparison result determination means determines that the comparison result by the comparison means matches all the bits when the execution is performed by the request signal, and when the executed serial communication is performed by the slave station, If the comparison result determination unit determines that at least one bit in the comparison result by the comparison unit does not match when the comparison result determination unit does not execute the communication request signal transmitted from the request signal transmission unit, It is characterized in that it is configured to diagnose that the information exchange by the performed serial communication is not established.

【0101】請求項4のシリアル通信装置は、上記請求
項1〜3のいずれか1項記載のシリアル通信装置におい
て、所定回数連続で、前記自己診断手段により前記シリ
アル通信による情報交換が不成立であると診断された場
合に、前記シリアル通信装置の故障が発生したと診断す
る故障診断手段を備えることを特徴とする。
According to a fourth aspect of the present invention, in the serial communication apparatus according to any one of the first to third aspects, the information exchange by the serial communication is not established by the self-diagnosis means continuously for a predetermined number of times. A failure diagnosing means for diagnosing that a failure has occurred in the serial communication device when it is diagnosed.

【0102】請求項5のシリアル通信装置の異常診断方
法は、一つの主局を中心に複数の従局を有する伝送路で
構成され、前記主局が発するシリアル転送クロックに同
期して当該主局から前記複数の従局への出力情報をシフ
ト転送し、且つ前記シフト転送を利用して前記複数の従
局から主局へ従局情報を返送することにより前記主局と
前記複数の従局との情報交換を実行するためのシリアル
通信を行うシリアル通信装置であって、前記複数の従局
は前記主局に返送する前記従局情報の内容が更新された
場合に前記主局に対して通信要求信号を送信するように
構成され、前記主局は前記複数の従局へシフト転送する
出力情報の内容が更新された場合または前記複数の従局
のいずれかから送信されてきた通信要求信号を受信した
場合に前記シリアル通信を実行するように構成されるシ
リアル通信装置の異常診断方法において、前記主局にお
いて、前記シリアル通信の実行前の従局情報の内容を第
1入力情報記憶手段に記憶保持し、前記シリアル通信の
実行後の従局情報の内容を第2入力情報記憶手段に記憶
保持し、前記シリアル通信の実行後に前記第1入力情報
記憶手段に記憶保持されている従局情報の内容と前記第
2入力情報記憶手段に記憶保持されている従局情報の内
容とをビット毎に比較し、前記実行されたシリアル通信
が前記従局の前記通信要求信号送信手段から出力された
通信要求信号により実行されたものであるか否かに応じ
て、前記ビット毎の比較結果に基いて前記実行されたシ
リアル通信による情報交換が不成立であるか否かを診断
することを特徴とする。
According to a fifth aspect of the present invention, there is provided a method for diagnosing an abnormality in a serial communication apparatus, comprising a transmission line having a plurality of slave stations centered on one master station, wherein the master station synchronizes with a serial transfer clock generated by the master station. Performs information exchange between the master station and the plurality of slave stations by shifting and transferring the output information to the plurality of slave stations and returning the slave information from the plurality of slave stations to the master station using the shift transfer. A plurality of slave stations transmit a communication request signal to the master station when the content of the slave station information returned to the master station is updated. The master station performs the serial communication when the content of the output information to be shifted and transferred to the plurality of slave stations is updated or when a communication request signal transmitted from any of the plurality of slave stations is received. In the abnormality diagnosis method for a serial communication device configured to execute communication, in the master station, the content of slave station information before execution of the serial communication is stored and held in a first input information storage unit; The contents of the slave information after execution are stored and held in the second input information storage means, and the contents of the slave information stored and held in the first input information storage means and the second input information storage means after the execution of the serial communication. Is compared with the content of the slave information stored and held in each bit, and whether or not the executed serial communication is executed by the communication request signal output from the communication request signal transmitting means of the slave. And diagnosing whether or not the information exchange by the executed serial communication is not established based on the comparison result for each bit.

【0103】請求項6のシリアル通信装置の異常診断方
法は、上記請求項5記載のシリアル通信装置の異常診断
方法において、前記自己診断手段は、前記実行されたシ
リアル通信が前記従局から送信された通信要求信号によ
り実行されたものであるときに、前記比較の結果が全ビ
ットとも一致していると判定した場合に、前記実行され
たシリアル通信による情報交換が不成立であると診断す
ることを特徴とする。
According to a sixth aspect of the present invention, in the abnormality diagnosis method for a serial communication device according to the fifth aspect, the self-diagnosis means transmits the executed serial communication from the slave station. When it is determined that the result of the comparison matches all the bits when the comparison is performed by the communication request signal, it is diagnosed that the information exchange by the performed serial communication is not established. And

【0104】請求項7のシリアル通信装置の異常診断方
法は、上記請求項5記載のシリアル通信装置の異常診断
方法において、前記自己診断手段は、前記実行されたシ
リアル通信が前記従局から送信された通信要求信号によ
り実行されたものであるときに前記比較の結果が全ビッ
トとも一致していると判定した場合、及び前記実行され
たシリアル通信が前記従局から送出された通信要求信号
により実行されたものではないときに前記比較の結果の
うち少なくとも1ビットが一致していないと判定した場
合に、前記実行されたシリアル通信による情報交換が不
成立であると診断することを特徴とする。
According to a seventh aspect of the present invention, in the abnormality diagnosis method for a serial communication device according to the fifth aspect, the self-diagnosis means transmits the executed serial communication from the slave station. When it is determined that the result of the comparison matches all the bits when the communication is performed by the communication request signal, and when the performed serial communication is performed by the communication request signal transmitted from the slave station. If it is determined that at least one bit of the comparison result does not match when the information is not the same, it is diagnosed that the information exchange by the executed serial communication is not established.

【0105】請求項8のシリアル通信装置の異常診断方
法は、上記請求項5〜7のいずれか1項記載のシリアル
通信装置の異常診断方法において、所定回数連続で、前
記自己診断手段により前記シリアル通信による情報交換
が不成立であると診断された場合に、前記シリアル通信
装置の故障が発生したと診断することを特徴とする。
The method of diagnosing abnormality of a serial communication device according to claim 8 is the method of diagnosing abnormality of serial communication device according to any one of claims 5 to 7, wherein the serial diagnosis is performed by the self-diagnosis means continuously for a predetermined number of times. When it is diagnosed that information exchange by communication is not established, it is diagnosed that a failure of the serial communication device has occurred.

【0106】請求項9の記録媒体は、一つの主局を中心
に複数の従局を有する伝送路で構成され、前記主局が発
するシリアル転送クロックに同期して当該主局から前記
複数の従局への出力情報をシフト転送し、且つ前記シフ
ト転送を利用して前記複数の従局から主局へ従局情報を
返送することにより前記主局と前記複数の従局との情報
交換を実行するためのシリアル通信を行うシリアル通信
装置であって、前記複数の従局は、それぞれ、前記主局
に返送する前記従局情報の内容が更新されたか否かを判
別する更新判別手段と、前記更新判別手段により前記従
局情報が更新されたと判別された場合に前記主局に対し
て通信要求信号を送信する通信要求信号送信手段とを備
え、前記主局は、前記複数の従局へシフト転送する出力
情報の内容が更新された場合または前記複数の従局のい
ずれかから送信されてきた通信要求信号を受信した場合
に、前記シリアル通信を実行するシリアル通信実行手段
を備えるシリアル通信装置の異常診断プログラムであっ
て、前記複数の従局へシフト転送する出力情報の内容を
記憶する出力情報記憶工程と、前記シリアル通信の実行
前の前記従局情報の内容を記憶保持する第1入力情報記
憶工程と、前記シリアル通信の実行後の従局情報の内容
を記憶保持する第2入力情報記憶工程と、前記シリアル
通信の実行後に、前記第1入力情報記憶手段に記憶保持
されている従局情報の内容と前記第2入力情報記憶手段
に記憶保持されている従局情報の内容とをビット毎に比
較する比較工程と、前記実行されたシリアル通信が前記
従局から出力された通信要求信号により実行されたもの
であるか否かに応じて、前記比較工程における比較の結
果を判定する比較結果判定工程と、前記比較結果判定工
程における判定の結果に基いて前記実行されたシリアル
通信による情報交換が不成立であるか否かを診断する自
己診断工程とを含む異常診断プログラムを、コンピュー
タにより読み取り可能な形式で記録したことを特徴とす
る。
The recording medium according to the ninth aspect is constituted by a transmission line having a plurality of slave stations centered on one master station, and from the master station to the plurality of slave stations in synchronization with a serial transfer clock generated by the master station. Serial communication for performing information exchange between the master station and the plurality of slave stations by shifting and transferring the output information of the plurality of slave stations and returning the slave station information from the plurality of slave stations to the master station using the shift transfer. A plurality of slave stations, each of the plurality of slave stations determines whether or not the content of the slave station information to be returned to the master station has been updated. Communication request signal transmission means for transmitting a communication request signal to the master station when it is determined that the information has been updated, wherein the master station updates the content of the output information to be shifted and transferred to the plurality of slave stations. An abnormality diagnosis program for a serial communication device comprising serial communication execution means for executing the serial communication when the communication request signal transmitted from any of the plurality of slave stations is received or when the communication request signal is received. An output information storing step of storing the content of output information to be shifted and transferred to the slave station; a first input information storing step of storing and holding the content of the slave station information before execution of the serial communication; and A second input information storage step of storing and holding the contents of the slave information; and after the execution of the serial communication, storing the contents of the slave information stored in the first input information storage means and the second input information storage means. A comparison step of comparing the content of the held slave station information bit by bit, and performing the executed serial communication with a communication request signal output from the slave station. A comparison result judging step of judging a result of the comparison in the comparing step according to whether or not the information has been executed, and information on the executed serial communication based on the judgment result in the comparison result judging step. An abnormality diagnosis program including a self-diagnosis step of diagnosing whether or not the replacement has failed is recorded in a computer-readable format.

【0107】請求項10の記録媒体は、上記請求項9記
載の記録媒体において、前記自己診断工程において、前
記実行されたシリアル通信が前記従局から送出された通
信要求信号により実行されたものであるときに、前記比
較結果判定工程において前記比較工程における比較の結
果が全ビットとも一致していると判定した場合に、前記
実行されたシリアル通信による情報交換が不成立である
と診断することを特徴とする。
A recording medium according to a tenth aspect is the recording medium according to the ninth aspect, wherein the executed serial communication is executed by a communication request signal transmitted from the slave station in the self-diagnosis step. When it is determined in the comparison result determination step that the result of the comparison in the comparison step matches all the bits, it is diagnosed that the information exchange by the executed serial communication is not established. I do.

【0108】請求項11の記録媒体は、上記請求項9記
載の記録媒体において、前記自己診断工程において、前
記実行されたシリアル通信が前記従局から送出された通
信要求信号により実行されたものであるときに前記比較
結果判定工程において前記比較工程における比較の結果
が全ビットとも一致していると判定した場合、及び前記
実行されたシリアル通信が前記従局から送出された通信
要求信号により実行されたものではないときに前記比較
結果判定工程において前記比較手段における比較の結果
のうち少なくとも1ビットが一致していないと判定した
場合に、前記実行されたシリアル通信による情報交換が
不成立であると診断することを特徴とする。
According to an eleventh aspect of the present invention, in the recording medium according to the ninth aspect, in the self-diagnosis step, the executed serial communication is executed by a communication request signal transmitted from the slave station. When it is determined in the comparison result determination step that the result of the comparison in the comparison step matches all the bits, and the executed serial communication is executed by a communication request signal transmitted from the slave station. Diagnosing that the information exchange by the executed serial communication is unsuccessful when it is determined in the comparison result determination step that at least one bit of the result of the comparison by the comparing means does not match when not It is characterized by.

【0109】請求項12の記録媒体は、上記請求項9〜
11のいずれか1項記載の記録媒体において、前記異常
診断プログラムは、所定回数連続で、前記自己診断工程
において前記シリアル通信による情報交換が不成立であ
ると診断された場合に、前記シリアル通信装置の故障が
発生したと診断する故障診断工程を含むことを特徴とす
る。
The recording medium according to claim 12 is the recording medium according to claim 9 or
12. The recording medium according to claim 11, wherein the abnormality diagnosis program is configured to execute the serial communication device when the information exchange by the serial communication is determined to be unsuccessful in the self-diagnosis step for a predetermined number of consecutive times. The method includes a failure diagnosis step of diagnosing that a failure has occurred.

【0110】[0110]

【発明の実施の形態】(第1実施形態)まず、本発明の
第1実施形態について、図1〜図3を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) First, a first embodiment of the present invention will be described with reference to FIGS.

【0111】なお、本実施形態は、従来技術として説明
したシリアル通信装置の構成により実現可能であるの
で、図6を流用して説明するが、本発明が意図する手段
を利用可能なシリアル通信装置であればこのような構成
に特に限定されるものではない。
Since the present embodiment can be realized by the configuration of the serial communication device described as the prior art, it will be described with reference to FIG. 6, but the serial communication device which can use the means intended by the present invention is described. If so, the configuration is not particularly limited to this.

【0112】本実施形態の説明に先だって、主局のCP
Uのプログラム形態について説明する。本プログラム形
態は、タスク形式の並列処理形態で構成されている。つ
まり、各独立した制御プログラムが複数のタスクを構成
し、電源投入後のCPUリセットでメモリやポートの初
期化設定等を実行して、モニタプログラムと呼ばれる各
タスクの起動動作を実行するプログラムが実行されるの
である。各タスクは、並列処理されて、リアルタイムで
実行される。従来技術として図10に示したシリアル通
信タスクもモニタプログラムにより起動され、所定の処
理動作を実行すると、一旦モニタプログラムに処理が戻
るが、再び起動されると前回の続きからプログラムが実
行される。同様に別のタスクも所定の処理動作を行うと
一旦停止するが、再び起動されることで続きの制御動作
を実行する。これにより、各タスクは、所定の処理操作
を順次実行することで並列処理がなされ、装置全体の動
作が制御されるのである。また、各タスク間の連携は、
各タスクが有するメモリ手段の内容を読み書きすること
により制御処理されるものである。
Prior to the description of this embodiment, the CP of the main station
The program form of U will be described. This program form is configured in a task-type parallel processing form. In other words, each independent control program constitutes a plurality of tasks, a memory and port initialization settings and the like are executed by CPU reset after power-on, and a program called a monitor program to execute the start operation of each task is executed. It is done. Each task is processed in parallel and executed in real time. As a prior art, the serial communication task shown in FIG. 10 is also started by the monitor program, and once a predetermined processing operation is performed, the process is once returned to the monitor program, but when it is started again, the program is executed from the continuation of the previous time. Similarly, another task temporarily stops when a predetermined processing operation is performed, but is restarted to execute a subsequent control operation. As a result, the tasks are executed in parallel by sequentially executing predetermined processing operations, and the operation of the entire apparatus is controlled. Also, the cooperation between each task is
Control processing is performed by reading and writing the contents of the memory means of each task.

【0113】以下の説明で示すフローチャートを実行す
るためのプログラムも、同様に、並列処理されるタスク
であるが、説明を容易にするために、一つの連続したプ
ログラム処理が行われるものとして説明する。
The program for executing the flowcharts shown in the following description is a task that is also processed in parallel, but for the sake of simplicity, the description will be made assuming that one continuous program process is performed. .

【0114】図1及び図2は、本実施形態に係るシリア
ル通信装置において実行されるシリアル通信タスクを示
すフローチャートである。
FIGS. 1 and 2 are flowcharts showing a serial communication task executed in the serial communication device according to the present embodiment.

【0115】モニタプログラムによりシリアル通信タス
クが起動されると、まず、リトライカウンタ値が所定値
以上であるか否かが判別される(ステップS1)。最初
はリトライカウンタ値はゼロであるため、次に、メモリ
マップの再設定がすでに行われたことを「1」で示すメ
モリマップ再設定フラグが「1」であるか否かが判別さ
れる(ステップS2)。ステップS102の判別で、メ
モリマップ再設定フラグが「0」である場合は、現状の
通信伝送路に接続される従局配列順番のメモリマップの
再設定(いわゆる初期化通信)が行われ(ステップS
3)、その後、本手順が一旦終了される。
When the serial communication task is started by the monitor program, first, it is determined whether or not the retry counter value is equal to or more than a predetermined value (step S1). Since the retry counter value is initially zero, it is next determined whether or not the memory map reset flag indicating “1” indicating that the memory map has been reset is “1” ( Step S2). If the memory map reset flag is "0" in the determination of step S102, the memory map in the order of the slave stations connected to the current communication transmission line is reset (so-called initialization communication) (step S102).
3) Then, this procedure is temporarily terminated.

【0116】その後、再びシリアル通信タスクが起動さ
れ、ステップS1の判別でリトライカウンタ値が所定値
未満であり且つステップS2の判別でメモリマップ再設
定フラグが「0」である場合は、再びステップS3にお
いて初期化通信が実行される。
Thereafter, the serial communication task is started again, and if the retry counter value is smaller than the predetermined value in the discrimination in step S1 and the memory map reset flag is "0" in the discrimination in step S2, step S3 is performed again. , Initialization communication is executed.

【0117】一方、ステップS1の判別で、リトライカ
ウンタの値が所定値以上である場合は、通信動作不能と
判断され、通信故障処理が実行される(ステップS
4)。なお、この通信故障ルーチンは、装置故障とし
て、機器装置全体の動作を停止するものであり、サービ
スマン対応が要求されるものである。
On the other hand, if it is determined in step S1 that the value of the retry counter is equal to or larger than the predetermined value, it is determined that communication is not possible, and communication failure processing is executed (step S1).
4). This communication failure routine is to stop the operation of the entire device as a device failure, and is required to respond to a service person.

【0118】ステップS2の判別で、メモリマップ再設
定フラグが「1」であると判別されると、リトライフラ
グが「1」であるか否かが判別され(ステップS5)、
リトライ通信の有無が判別される。このリトライ通信
は、従来の場合と同様に、一回のシリアル通信が失敗し
たときに、リトライカウンタをインクリメントして、所
定値以内の場合は再通信を実行するためのものである。
If it is determined in step S2 that the memory map reset flag is "1", it is determined whether the retry flag is "1" (step S5).
The presence or absence of retry communication is determined. In the retry communication, as in the conventional case, when one serial communication fails, the retry counter is incremented, and when the serial communication is less than a predetermined value, the retry communication is executed.

【0119】ステップS5の判別で、リトライフラグが
「1」ではない場合は、従局通信要求信号がオンされて
いるか否か(ステップS6)及び主局通信要求フラグが
「1」であるか否か(ステップS7)が判別される。な
お、従来の手法では主局内部で発生する通信要求フラグ
を判断した後に従局からの通信要求信号を判断していた
が、本実施形態ではこの順序が逆になり、従局からの通
信要求信号を判断した後に主局内部で発生する通信要求
を判断するように構成される。
If it is determined in step S5 that the retry flag is not "1", it is determined whether the slave station communication request signal is on (step S6) and whether the master station communication request flag is "1". (Step S7) is determined. In the conventional method, the communication request signal from the slave station is determined after determining the communication request flag generated inside the master station. However, in the present embodiment, the order is reversed, and the communication request signal from the slave station is determined. It is configured to determine a communication request generated inside the master station after the determination.

【0120】これは、従局からの通信要求がある場合に
おけるシリアル通信実行時にはシリアル通信の実行前後
の情報内容の変化具合を判断して、従局通信要求がある
にも関わらず情報内容に変化がなかった場合のように通
信実行結果に矛盾があるか否かを判別するためである。
すなわち、従来の手法のように主局及び従局のいずれか
一方に通信要求があればシリアル通信を実行して情報交
換を実行するものとは異なり、通信実行結果の矛盾を判
定するために本発明では、シリアル通信実行が主局内の
通信要求によるものであるか従局からの通信要求信号に
よるものであるかを区別することが重要となり、従っ
て、本実施形態では、シリアル通信を実行するときは従
局からの通信要求信号の有無を確認する必要があるので
ある。なお、本実施形態で述べる従局通信要求信号は、
従来例として述べたものと同様であるので、その詳細な
説明は省略する。
This is because when the serial communication is executed when there is a communication request from the slave station, the degree of change in the information content before and after the execution of the serial communication is determined, and the information content does not change despite the request for the slave station communication. This is to determine whether or not there is a contradiction in the communication execution result as in the case where the communication has been performed.
That is, unlike the conventional method, in which a communication request is issued to either the master station or the slave station, serial communication is executed and information exchange is executed. Therefore, it is important to distinguish whether the execution of serial communication is due to a communication request in the master station or a communication request signal from a slave station. Therefore, in this embodiment, when executing serial communication, It is necessary to confirm the presence or absence of a communication request signal from. The slave communication request signal described in the present embodiment is:
Since this is the same as that described as the conventional example, a detailed description thereof will be omitted.

【0121】ステップS6の判別で従局からの通信要求
信号がオフされていると判別され、ステップS7の判別
で主局通信要求フラグが「0」にリセットされていると
判別された場合は、通信要求が無いので、リトライフラ
グに「0」がセットされるとともにリトライカウンタに
「00H」がセットされ(ステップS8)、本タスクが
終了される。
If it is determined in step S6 that the communication request signal from the slave station has been turned off, and if it is determined in step S7 that the master station communication request flag has been reset to "0", the communication is started. Since there is no request, "0" is set in the retry flag and "00H" is set in the retry counter (step S8), and this task is terminated.

【0122】また、ステップS6において従局からの通
信要求信号がオフされていると判別され、ステップS7
で主局内の通信要求フラグが「1」であると判別された
場合は、通常通信によるシリアル通信が実行される(ス
テップS9)。そして、通常通信が終了すると、通信異
常フラグが「00H」であるか否か、すなわち正常に通
信が終了したか否かが判別される(ステップS10)。
この判別で、「00H」ではない場合は、何らかの異常
が発生しているので、従来の場合と同様に、通信異常フ
ラグの解析が行われ(ステップS11)、リトライ通信
を指示するためにリトライフラグに「1」がセットされ
ると共にリトライカウンタがインクリメントされ(ステ
ップS12)、本タスクが終了される。
In step S6, it is determined that the communication request signal from the slave station has been turned off, and step S7
If it is determined that the communication request flag in the main station is "1", serial communication by normal communication is executed (step S9). Then, when the normal communication ends, it is determined whether or not the communication abnormality flag is “00H”, that is, whether or not the communication has ended normally (step S10).
If it is not "00H" in this determination, some abnormality has occurred, so that the communication abnormality flag is analyzed as in the conventional case (step S11), and the retry flag is issued to instruct retry communication. Is set to "1" and the retry counter is incremented (step S12), and this task is ended.

【0123】一方、ステップS10の判別で、通信異常
フラグが「00H」であり、通常通信実行に異常がない
場合は、従局要求フラグがセットされているか否かが判
別される(ステップS13)。ここでは、主局の通信要
求フラグが「1」と判断された場合であるから従局要求
フラグはセットされておらず、ステップS13の答は否
定(NO)となる。従って、上述したステップS8の処
理が行われて、本タスクが終了される。
On the other hand, if it is determined in step S10 that the communication abnormality flag is "00H" and there is no abnormality in normal communication execution, it is determined whether the slave request flag is set (step S13). Here, since the communication request flag of the master station is determined to be "1", the slave station request flag is not set, and the answer in step S13 is negative (NO). Therefore, the process of step S8 described above is performed, and the present task ends.

【0124】主局内での通信要求の有無に関わらず、従
局からの通信要求信号がオンされている場合は(ステッ
プS6)、シリアル通信の実行前後の従局からの返送情
報内容の変化をチェックすることを指示する従局要求フ
ラグがセットされる(ステップS14)。そして、前回
のシリアル通信実行によって記憶保持された従局からの
返送情報内容を別のメモリに一時的に移動させる(ステ
ップS15)。
Regardless of the presence or absence of a communication request in the master station, if the communication request signal from the slave station is on (step S6), the change in the information returned from the slave station before and after the execution of the serial communication is checked. Is set (step S14). Then, the content of the return information from the slave station stored and held by the previous serial communication execution is temporarily moved to another memory (step S15).

【0125】図3は、主局が有するメモリマップ図であ
る。図3(d)に示すように、本実施形態では、再設定
された従局並列入力情報の上位4ビット(図中、「Z
n」で示す)を、一時的に移動させるために使用するメ
モリ領域とする。つまり、従来の手法として述べたよう
にシリアル通信により受信した従局からの返送情報内容
は、従局並列入力情報と称されるメモリマップの下位4
ビット部分に格納される。そして、従局通信要求自己診
断を実行する際は、利用されていない従局並列入力情報
での上位4ビット部分を一時移動用の入力情報メモリと
して利用する。
FIG. 3 is a memory map diagram of the master station. As shown in FIG. 3D, in the present embodiment, the upper 4 bits (“Z” in the figure) of the re-set slave parallel input information are reset.
n) is a memory area used for temporary movement. That is, as described in the conventional method, the content of the return information received from the slave station through the serial communication is the lower four bits of the memory map called the slave station parallel input information.
Stored in the bit part. When executing the slave station communication request self-diagnosis, the upper four bits of unused slave station parallel input information are used as an input information memory for temporary movement.

【0126】ステップS15の処理が終了すると、上述
したステップS9及びS10の処理が行われる。ステッ
プS10の判別で、通信異常フラグが「00H」であ
り、異常がない場合は、ステップS13の処理に移る。
なお、この時点で通信異常があると判別された場合は、
シリアル通信による情報交換内容の有効・無効に関わら
ず、リトライ通信が実行され、従局通信要求自己診断は
行われない。ステップS13の判別で、従局要求フラグ
は上記ステップS14でセットされている。従って、そ
の従局要求フラグがリセットされ(ステップS16)、
一時的に移動させた通常通信実行前の従局からの返送情
報を格納した上位4ビット部分の内容と、通常通信実行
後の従局からの返送情報を更新した下位4ビット部分の
内容とが、ビット毎に比較され(ステップS17)、全
ての情報が一致したか否かが判別される(ステップS1
8)。
When the processing in step S15 ends, the processing in steps S9 and S10 described above is performed. If it is determined in step S10 that the communication abnormality flag is "00H" and there is no abnormality, the process proceeds to step S13.
At this point, if it is determined that there is a communication error,
Regardless of the validity / invalidity of the information exchange content by the serial communication, the retry communication is executed, and the slave station communication request self-diagnosis is not performed. In the determination in step S13, the slave request flag has been set in step S14. Accordingly, the slave request flag is reset (step S16), and
The contents of the upper 4-bit portion storing the return information from the slave station before the execution of the normal communication temporarily moved and the contents of the lower 4-bit portion updating the return information from the slave station after the execution of the normal communication are represented by bits. Each information is compared (step S17), and it is determined whether all information matches (step S1).
8).

【0127】この判別で、少なくとも1ビットが不一致
である場合は通常通信による情報交換は成立したと診断
されるので、従局要求異常カウンタを「00H」にリセ
ットし(ステップS19)、上述したステップS8の処
理を行った後、本タスクが終了される。
In this determination, if at least one bit does not match, it is diagnosed that information exchange by normal communication has been established, so that the slave request abnormality counter is reset to "00H" (step S19), and the above-described step S8 is performed. After performing the processing of, this task is terminated.

【0128】つまり、従局からの情報内容が更新される
ことにより、従局通信要求が発生して実行された通常通
信であるので、更新情報内容が少なくとも1つなければ
従局通信要求に矛盾が生じると考えられるからである。
従って、通常通信前後の従局からの情報内容の比較結果
が不一致であれば、矛盾無く従局情報内容の更新による
通信要求信号であると診断することができるのである。
In other words, since the information content from the slave station is updated, the normal communication is executed when a slave communication request is generated. If there is at least one update information content, the inconsistency occurs in the slave communication request. Because it is possible.
Therefore, if the comparison results of the information contents from the slave stations before and after the normal communication do not match, it is possible to diagnose that the communication request signal is obtained by updating the slave station information contents without contradiction.

【0129】一方、ステップS18の判別で、情報内容
の比較の結果、全て一致した場合は、従局情報内容の更
新によって生じた通信要求信号に矛盾があるから、従局
通信要求信号かシフト転送にノイズ等が入り込んだと考
えられる。従って、この場合は通常通信による情報交換
は不成立と診断されて無効とされ、主局に設定される従
局情報内容が前回の状態に戻される(ステップS1
9)。つまり、一時的に移動させた従局情報内容である
従局並列入力情報の上位4ビット部分を従局並列入力情
報の下位4ビット部分に転送することにより、通常通信
実行前の状態に従局情報が戻される。
On the other hand, as a result of the comparison of the information contents, if all match in the discrimination in step S18, there is an inconsistency in the communication request signal generated by the update of the slave station information content. And so on. Therefore, in this case, the information exchange by the normal communication is diagnosed as unsuccessful and is invalidated, and the slave station information set in the master station is returned to the previous state (step S1).
9). In other words, by transferring the upper 4 bits of the slave parallel input information, which is the temporarily shifted slave information contents, to the lower 4 bits of the slave parallel input information, the slave information is returned before the normal communication. .

【0130】そして、従局通信要求に矛盾による異常が
発生していることを示す従局要求異常カウンタが「1」
インクリメントされ(ステップS21)、この従局要求
異常カウンタの値が所定値以上であるか否かを判別する
ことにより、従局通信要求における矛盾が所定回数以上
連続して発生したか否かが判別される(ステップS2
2)。この判別で、従局要求異常カウンタが所定値未満
である場合は、単に今回の通常通信による結果を無効に
するのみでステップS8の処理が行われ、そのまま本タ
スクが終了される。
Then, the slave request abnormality counter indicating that the slave communication request is abnormal due to contradiction is "1".
It is incremented (step S21), and it is determined whether or not the value of the slave request abnormality counter is equal to or greater than a predetermined value, thereby determining whether or not contradiction in the slave communication request has occurred continuously for a predetermined number of times. (Step S2
2). In this determination, if the slave request abnormality counter is smaller than the predetermined value, the process of step S8 is performed simply by invalidating the result of the current normal communication, and the task is terminated as it is.

【0131】また、従局通信異常カウンタの値が所定値
以上である場合は、リトライカウンタの値がステップS
1で用いられる所定値以上の値に設定され(ステップS
23)、本タスクが一旦終了される。この状態で次回の
シリアル通信タスクが起動されると、ステップS1の判
断により通信故障処理ルーチンが実行され、以降のシリ
アル通信が停止され、機器装置の故障(通信故障)とし
てサービスマンコール等の処理が実行されることにな
る。
If the value of the slave station communication abnormality counter is equal to or larger than the predetermined value, the value of the retry counter is set to step S.
(Step S)
23), the task is temporarily terminated. When the next serial communication task is started in this state, the communication failure processing routine is executed according to the determination in step S1, the subsequent serial communication is stopped, and processing such as a serviceman call is performed as a failure of the device (communication failure). Will be executed.

【0132】以上説明したように、本実施形態によれ
ば、従局からの通信要求があったにも拘わらず従局情報
の内容が更新されていない場合のようにシリアル通信結
果が矛盾している場合を判別することにより、ノイズ等
の誤伝達による異常を正確に診断することができる。ま
た、情報交換不成立状態が所定回数連続した場合にはシ
リアル通信故障処理を実行するようにしたので、シリア
ル通信の誤伝達による機器装置の暴走等を未然に防止す
ることができる。
As described above, according to the present embodiment, when the serial communication result is inconsistent as in the case where the content of the slave station information is not updated despite the communication request from the slave station. , It is possible to accurately diagnose an abnormality due to erroneous transmission such as noise. Further, when the information exchange failure state continues for a predetermined number of times, the serial communication failure processing is executed, so that a runaway of the device due to erroneous transmission of the serial communication can be prevented.

【0133】なお、本実施形態では、情報交換が不成立
となった場合、主局が有している従局情報の内容を通信
前の状態に戻すようにしているが、情報交換が不成立と
なった場合の従局側の対処については、たとえば、ソフ
トウエアリセットにより従局並列出力状態を一旦初期化
してから通常通信を続行するように構成してもよく、ま
た、主局情報は正確に伝達されているものとしてそのま
ま通常通信を続行するように構成してもよい。
In this embodiment, when the information exchange is not established, the contents of the slave station information held by the master station are returned to the state before the communication. However, the information exchange is not established. In the case of the slave station, the slave station parallel output state may be initialized once by software reset, and normal communication may be continued, and the master station information is accurately transmitted. The normal communication may be continued as it is.

【0134】(第2実施形態)次に、本発明の第2実施
形態を、図4及び図5を参照して説明する。
(Second Embodiment) Next, a second embodiment of the present invention will be described with reference to FIGS.

【0135】本実施形態は、上述した第1実施形態と同
様に、従局通信要求信号の有無に基いて通常通信前後の
従局情報内容の変化具合を判断し、矛盾がある場合に情
報交換の不成立を判定するものであるが、従局からの通
信要求信号により実行された通常通信であるにも拘わら
ず従局情報内容が変化していない、という矛盾だけでな
く、従局通信要求信号によらず、主局内での通信要求の
みにより実行された通常通信であるにも拘わらず従局情
報内容が変化している、という矛盾があると判別された
場合にも、情報交換が不成立であると判定する点で、第
1実施形態と相違する。
In the present embodiment, as in the first embodiment described above, the degree of change in the content of slave station information before and after normal communication is determined based on the presence or absence of a slave station communication request signal. Not only inconsistency that the content of the slave station information has not changed in spite of the normal communication performed by the communication request signal from the slave station. Even when it is determined that there is an inconsistency that the content of the slave station information has changed in spite of the normal communication executed only by the communication request in the station, the information exchange is determined to be unsuccessful. , Is different from the first embodiment.

【0136】図4及び図5は、本実施形態に係るシリア
ル通信装置において実行されるシリアル通信手順を示す
フローチャートである。同図において、第1実施形態の
図3に示した手順と同様に行われる処理手順について
は、同一番号を付してある。つまり、本実施形態におい
て実行されるシリアル通信タスクにおいて、ステップS
1からステップS12まで、及びステップS14からス
テップS15までの処理は、第1実施形態と同様に制御
されるのである。
FIGS. 4 and 5 are flowcharts showing a serial communication procedure executed in the serial communication device according to the present embodiment. In the figure, the same steps as those in the first embodiment shown in FIG. 3 are denoted by the same reference numerals. That is, in the serial communication task executed in the present embodiment, step S
The processes from 1 to S12 and from S14 to S15 are controlled in the same manner as in the first embodiment.

【0137】したがって、従局通信要求による通常通信
が実行されている場合、ステップS14で従局要求フラ
グがセットされ、従局通信要求によるものではない通常
通信が実行されている場合には従局要求フラグはセット
されず、この状態でステップS54の通常通信が実行さ
れる。
Therefore, if the normal communication according to the slave communication request is being executed, the slave request flag is set in step S14, and if the normal communication which is not due to the slave communication request is being executed, the slave request flag is set. However, the normal communication in step S54 is performed in this state.

【0138】そして、ステップS10の尾判別で通信異
常フラグが「00H」である場合は、第1実施形態と異
なり、無条件で、一時待避した従局情報の内容と今回実
行した通常通信により得られた従局情報の内容とが全ビ
ットについて比較され(ステップS31)、その後従局
要求フラグがセットされているか否かが判別される(ス
テップS32)。
If the communication abnormality flag is "00H" in the tail discrimination in step S10, unlike the first embodiment, the contents of the temporarily saved slave station information and the normal communication executed this time are obtained unconditionally. The contents of the slave station information are compared for all bits (step S31), and thereafter, it is determined whether or not the slave station request flag is set (step S32).

【0139】ステップS32の判別で、従局要求フラグ
がセットされている場合は、従局要求フラグがリセット
された後(ステップS33)、ステップS31の比較の
結果全ビットが一致しているか否かが判別される(ステ
ップS34)。この判別で、全てのビットが一致してい
る場合は、従局通信要求による通常通信実行であるにも
かかわらず従局情報の内容が更新されていないという矛
盾が発生しているので、従局情報の内容を通常通信実行
前の状態に戻すことにより今回の通常通信を無効とし
(ステップS35)、従局要求異常カウンタを「1」イ
ンクリメントする。そして、従局要求異常カウンタの値
が所定値に等しくなったか否かが判別され(ステップS
37)、所定値に等しくなった場合は、リトライカウン
タの値が、現在の値に関係なく、上記ステップS1で用
いられる所定値より大きい値に設定される(ステップS
38)。これは、上述した第1実施形態の場合と同様
に、この状態で次回のシリアル通信タスクが起動された
ときに、ステップS1の判断によりすぐに通信故障処理
ルーチンが実行され、以降のシリアル通信が停止され、
機器装置の故障(通信故障)としてサービスマンコール
等の処理が実行されるようにするためである。
If it is determined in step S32 that the slave request flag is set, the slave request flag is reset (step S33), and it is determined whether or not all bits match as a result of the comparison in step S31. Is performed (step S34). In this determination, if all the bits match, there is a contradiction that the content of the slave station information has not been updated even though the normal communication has been executed according to the slave station communication request. Is returned to the state before the execution of the normal communication, thereby invalidating the current normal communication (step S35), and incrementing the slave request abnormality counter by "1". Then, it is determined whether or not the value of the slave request abnormality counter has become equal to a predetermined value (Step S).
37) If it is equal to the predetermined value, the value of the retry counter is set to a value larger than the predetermined value used in step S1 regardless of the current value (step S1).
38). This is because, as in the first embodiment described above, when the next serial communication task is started in this state, the communication failure processing routine is immediately executed according to the determination in step S1, and the subsequent serial communication is performed. Suspended,
This is to execute processing such as a serviceman call as a failure of the device (communication failure).

【0140】また、ステップS37の判別で、従局要求
異常カウンタの値が所定値未満である場合は、単に今回
の通常通信による結果を無効にするのみでステップS8
の処理が行われ、そのまま本タスクが終了される。
If it is determined in step S37 that the value of the slave request abnormality counter is smaller than the predetermined value, the result of the normal communication is simply invalidated in step S8.
Is performed, and this task is terminated as it is.

【0141】一方、ステップS34の判別で、少なくと
も1ビットの情報が一致していない場合は、通常通信が
矛盾無く正常に終了しているので、従局要求異常カウン
タに「00H」がセットされ(ステップS39)、その
後ステップS8の処理が行われる。
On the other hand, if it is determined in step S34 that the information of at least one bit does not match, the normal communication has been normally completed without any inconsistency, and "00H" is set in the slave request abnormality counter (step S34). S39) Then, the process of step S8 is performed.

【0142】また、ステップS32の判別で、従局要求
フラグがセットされていない場合、すなわち従局通信要
求によらない通常通信の実行である場合は、ステップS
31の比較の結果が全ビットで一致したか否かが判別さ
れる(ステップS40)。この判別で、少なくとも1ビ
ットの情報が一致しなかった場合は、従局通信要求によ
らない通常通信の実行であるにも拘わらず従局情報内容
が更新されていたという矛盾が発生しているので、ステ
ップS35以降の処理が実行される。更に、ステップS
40の判別で、全ビットが一致した場合は、従局通信要
求でない通常通信実行であって従局情報内容が更新され
ておらず、矛盾が生じていない状態であるから、ステッ
プS39以降の処理が実行される。
If it is determined in step S32 that the slave request flag is not set, that is, if the normal communication is not performed according to the slave communication request, the process proceeds to step S32.
It is determined whether or not the result of the comparison of step 31 matches all bits (step S40). In this discrimination, if at least one bit of information does not match, there is a contradiction that the content of the slave station information has been updated in spite of execution of the normal communication without the slave station communication request. The processing after step S35 is executed. Further, step S
If all bits match in the determination at 40, the normal communication is not a slave communication request and the slave information content has not been updated and no inconsistency has occurred. Is done.

【0143】以上説明したように、本実施形態によれ
ば、従局からの通信要求信号により実行された通常通信
であるにも拘わらず従局情報内容が変化していない、と
いう矛盾だけでなく、従局通信要求信号によらず、主局
内での通信要求のみにより実行された通常通信であるに
も拘わらず従局情報内容が変化している、という矛盾が
あると判別された場合にも、情報交換が不成立であると
判定する。従って、ノイズ等の誤伝達による異常を、シ
リアル通信を実行しながら、容易に且つ正確に診断する
ことができる。また、情報交換不成立状態が所定回数連
続した場合にはシリアル通信故障処理を実行するように
したので、シリアル通信の誤伝達による機器装置の暴走
等を未然に防止することができる。
As described above, according to the present embodiment, not only the contradiction that the slave station information content does not change despite the normal communication executed by the communication request signal from the slave station, but also the slave station Even if it is determined that there is an inconsistency that the slave station information content has changed despite the normal communication being executed only by the communication request within the master station regardless of the communication request signal, the information exchange is also performed. It is determined that it is not established. Therefore, it is possible to easily and accurately diagnose an abnormality due to erroneous transmission such as noise while executing serial communication. Further, when the information exchange failure state continues for a predetermined number of times, the serial communication failure processing is executed, so that a runaway of the device due to erroneous transmission of the serial communication can be prevented.

【0144】(他の実施形態)なお、上述した第1、第
2実施形態で示したシリアル通信以外の通信形態であっ
ても、各従局からの通信要求を受けて通信を行うように
構成される通信形態であれば、上記第1、第2実施形態
と同様の効果を得られることはいうまでもない。すなわ
ち、従局からの通信要求の有無に応じて通信実行毎に通
信実行前後の従局からの返送情報内容の変化具合を確認
することで矛盾が生じたか否かを判定し、これによりシ
リアル通信の異常を、通信を実行しながら容易に且つ正
確に診断することができる。
(Other Embodiments) Even in a communication mode other than the serial communication shown in the first and second embodiments, communication is performed in response to a communication request from each slave station. It is needless to say that the same effect as in the first and second embodiments can be obtained if the communication mode is such a communication mode. In other words, it is determined whether or not inconsistency has occurred by checking the change in the content of the return information from the slave station before and after the execution of the communication each time the communication is executed in accordance with the presence or absence of the communication request from the slave station. Can be easily and accurately diagnosed while executing communication.

【0145】また、本発明は、シリアル通信装置に上述
した実施形態の機能を実現するソフトウエアのプログラ
ムコードを記録した記憶媒体を供給し、そのシリアル通
信装置のCPUが記憶媒体に格納されたプログラムコー
ドを読み出し実行することによっても、本発明の目的が
達成されることはいうまでもない。
Further, according to the present invention, a storage medium storing a program code of software for realizing the functions of the above-described embodiments is supplied to a serial communication apparatus, and the CPU of the serial communication apparatus stores the program stored in the storage medium. It goes without saying that the object of the present invention is also achieved by reading and executing the code.

【0146】この場合、記憶媒体から読み出されたプロ
グラムコード自体が本発明の新規な機能を実現すること
になり、そのプログラムコードを記憶した記憶媒体は本
発明を構成することになる。
In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.

【0147】プログラムコードを供給する為の記憶媒体
としては、例えば、フロッピー(登録商標)ディスク、
ハードディスク、光ディスク、光磁気ディスク、CD−
ROM、CD−R、磁気テープ、不揮発性のメモリカー
ド、ROM等を用いることができる。
Examples of a storage medium for supplying the program code include a floppy (registered trademark) disk,
Hard disk, optical disk, magneto-optical disk, CD-
A ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

【0148】また、コンピュータが読み出したプログラ
ムコードを実行することにより上述した実施形態の機能
が実現されるだけでなく、そのプログラムコードの指示
に基づいて、コンピュータ上で稼動しているOS等が実
際の処理の一部または全部を行い、その処理によって前
述した実施形態の機能が実現される場合も含まれること
はいうまでもない。
The functions of the above-described embodiments are implemented when the computer executes the readout program code, and the OS or the like running on the computer is actually executed based on the instructions of the program code. It goes without saying that a part or all of the above processing is performed, and the function of the above-described embodiment is realized by the processing.

【0149】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張ボー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書き込まれた後、そのプログラムコードの指
示に基づいて、その機能拡張ボードや機能拡張ユニット
に備わるCPU等が実際の処理の一部または全部を行
い、その処理によって前述した実施形態の機能が実現さ
れる場合も含まれることはいうまでもない。
Further, after the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the program code is read based on the instruction of the program code. Needless to say, a CPU or the like provided in the function expansion board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0150】[0150]

【発明の効果】以上説明したように、請求項1乃至3の
シリアル通信装置または請求項5乃至7のシリアル通信
装置の異常検出方法によれば、主局において、前記シリ
アル通信の実行前の従局情報の内容を第1入力情報記憶
手段に記憶保持し、前記シリアル通信の実行後の従局情
報の内容を第2入力情報記憶手段に記憶保持し、前記シ
リアル通信の実行後に前記第1入力情報記憶手段に記憶
保持されている従局情報の内容と前記第2入力情報記憶
手段に記憶保持されている従局情報の内容とをビット毎
に比較し、前記実行されたシリアル通信が前記従局の前
記通信要求信号送信手段から出力された通信要求信号に
より実行されたものであるか否かに応じて、前記ビット
毎の比較結果に基いて前記実行されたシリアル通信によ
る情報交換が不成立であるか否かを診断するようにした
ので、ノイズ等の誤伝達による異常を、通信を実行しな
がら容易に且つ正確に診断することができるという効果
が得られる。
As described above, according to the abnormality detection method for the serial communication device according to any one of claims 1 to 3 or the serial communication device according to any one of claims 5 to 7, the master station uses the slave station before executing the serial communication. The contents of the information are stored and held in the first input information storage means, the contents of the slave information after the execution of the serial communication are stored and held in the second input information storage means, and the first input information storage is performed after the execution of the serial communication Comparing the contents of the slave information stored and held in the means with the contents of the slave information stored and held in the second input information storage means for each bit, and determining whether the serial communication has been executed by the slave. The information exchange by the executed serial communication is not successful based on the result of the bit-by-bit comparison depending on whether or not the communication is performed by the communication request signal output from the signal transmitting means. Since so as to diagnose whether or not an abnormality due to erroneous transmission of noise or the like, there is an advantage that it is possible to easily and accurately diagnose while performing the communication.

【0151】請求項4のシリアル通信装置または請求項
8のシリアル通信装置の異常診断方法によれば、所定回
数連続で、前記自己診断手段により前記シリアル通信に
よる情報交換が不成立であると診断された場合に、前記
シリアル通信装置の故障が発生したと診断するようにし
たので、上記シリアル通信の誤伝達による機器装置の暴
走等を未然に防止することができるという効果が得られ
る。
According to the method for diagnosing abnormality of the serial communication device of the fourth aspect or the serial communication device of the eighth aspect, the self-diagnosis means diagnoses that the information exchange by the serial communication is not established continuously for a predetermined number of times. In this case, since it is diagnosed that a failure has occurred in the serial communication device, it is possible to prevent the device device from running away due to the erroneous transmission of the serial communication.

【0152】請求項9乃至12の記録媒体によれば、一
つの主局を中心に複数の従局を有する伝送路で構成さ
れ、前記主局が発するシリアル転送クロックに同期して
当該主局から前記複数の従局への出力情報をシフト転送
し、且つ前記シフト転送を利用して前記複数の従局から
主局へ従局情報を返送することにより前記主局と前記複
数の従局との情報交換を実行するためのシリアル通信を
行うシリアル通信装置であって、前記複数の従局は、そ
れぞれ、前記主局に返送する前記従局情報の内容が更新
されたか否かを判別する更新判別手段と、前記更新判別
手段により前記従局情報が更新されたと判別された場合
に前記主局に対して通信要求信号を送信する通信要求信
号送信手段とを備え、前記主局は、前記複数の従局へシ
フト転送する出力情報の内容が更新された場合または前
記複数の従局のいずれかから送信されてきた通信要求信
号を受信した場合に、前記シリアル通信を実行するシリ
アル通信実行手段を備えるシリアル通信装置の異常診断
プログラムであって、前記複数の従局へシフト転送する
出力情報の内容を記憶する出力情報記憶工程と、前記シ
リアル通信の実行前の前記従局情報の内容を記憶保持す
る第1入力情報記憶工程と、前記シリアル通信の実行後
の従局情報の内容を記憶保持する第2入力情報記憶工程
と、前記シリアル通信の実行後に、前記第1入力情報記
憶手段に記憶保持されている従局情報の内容と前記第2
入力情報記憶手段に記憶保持されている従局情報の内容
とをビット毎に比較する比較工程と、前記実行されたシ
リアル通信が前記従局から出力された通信要求信号によ
り実行されたものであるか否かに応じて、前記比較工程
における比較の結果を判定する比較結果判定工程と、前
記比較結果判定工程における判定の結果に基いて前記実
行されたシリアル通信による情報交換が不成立であるか
否かを診断する自己診断工程とを含む異常診断プログラ
ムを、コンピュータにより読み取り可能な形式で記録の
で、従来のシリアル通信装置のコンピュータに当該記録
媒体に記録されている異常検出プログラムを読み取らせ
て実行させることにより、上述した請求項1乃至3のシ
リアル通信装置と同等の効果を得ることができるという
効果が得られる。
According to the recording medium of the ninth to twelfth aspects, the recording medium is constituted by a transmission line having a plurality of slave stations centered on one master station, and the master station transmits the signals in synchronization with a serial transfer clock generated by the master station. Performs information exchange between the master station and the plurality of slave stations by shifting and transferring output information to a plurality of slave stations, and returning the slave station information from the plurality of slave stations to the master station using the shift transfer. A serial communication device for performing serial communication for the plurality of slave stations, wherein each of the plurality of slave stations determines whether or not the content of the slave station information to be returned to the master station has been updated; and the update determining means. Communication request signal transmitting means for transmitting a communication request signal to the master station when it is determined that the slave station information has been updated by the master station, wherein the master station outputs output information for shift transfer to the plurality of slave stations. When the content of is updated or when a communication request signal transmitted from any of the plurality of slave stations is received, the abnormality diagnosis program for the serial communication device includes serial communication execution means for executing the serial communication. An output information storing step of storing the contents of the output information to be shifted and transferred to the plurality of slave stations; a first input information storing step of storing and holding the contents of the slave information before executing the serial communication; A second input information storing step of storing and holding the contents of the slave information after the execution of the step (a), and after the execution of the serial communication, the contents of the slave information stored and held in the first input information storage means and the second
A comparison step of comparing the contents of slave station information stored and held in the input information storage means bit by bit, and whether or not the executed serial communication is executed by a communication request signal output from the slave station A comparison result determining step of determining the result of the comparison in the comparing step, and determining whether or not the information exchange by the executed serial communication is not established based on the result of the determination in the comparison result determining step. An abnormality diagnosis program including a self-diagnosis step of diagnosing is recorded in a computer-readable format, so that the computer of the conventional serial communication device reads and executes the abnormality detection program recorded on the recording medium. Thus, the same effect as that of the above-described serial communication device of claims 1 to 3 can be obtained.

【0153】請求項12の記録媒体によれば、前記異常
診断プログラムは、所定回数連続で、前記自己診断工程
において前記シリアル通信による情報交換が不成立であ
ると診断された場合に、前記シリアル通信装置の故障が
発生したと診断する故障診断工程を含むようにしたの
で、従来のシリアル通信装置のコンピュータに当該記録
媒体に記録されている異常検出プログラムを読み取らせ
て実行させることにより、上述した請求項4のシリアル
通信装置と同等の効果を得ることができるという効果が
得られる。
According to the recording medium of the twelfth aspect, the abnormality diagnostic program is configured to execute the serial communication device when the information exchange by the serial communication is determined to be unsuccessful in the self-diagnosis step for a predetermined number of consecutive times. A failure diagnosis step of diagnosing that a failure has occurred, causing a computer of a conventional serial communication device to read and execute an abnormality detection program recorded on the recording medium, thereby making the above-described claim possible. 4 has the same effect as the serial communication device of No. 4.

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

【図1】本発明の第1実施形態に係るシリアル通信装置
において実行されるシリアル通信タスクを示すフローチ
ャートである。
FIG. 1 is a flowchart illustrating a serial communication task executed in a serial communication device according to a first embodiment of the present invention.

【図2】同実施形態に係るシリアル通信装置において実
行されるシリアル通信タスクを示すフローチャートであ
る。
FIG. 2 is a flowchart showing a serial communication task executed in the serial communication device according to the embodiment.

【図3】主局が有するメモリマップ図である。FIG. 3 is a memory map diagram of a master station.

【図4】本発明の第2実施形態に係るシリアル通信装置
において実行されるシリアル通信手順を示すフローチャ
ートである。
FIG. 4 is a flowchart illustrating a serial communication procedure executed in a serial communication device according to a second embodiment of the present invention.

【図5】同実施形態に係るシリアル通信装置において実
行されるシリアル通信手順を示すフローチャートであ
る。
FIG. 5 is a flowchart showing a serial communication procedure executed in the serial communication device according to the embodiment.

【図6】従来の従局構成を示すブロック図である。FIG. 6 is a block diagram showing a conventional slave station configuration.

【図7】従来のシリアル通信装置が利用される機器装置
に接続され得る全従局が接続されたときの伝送路図であ
る。
FIG. 7 is a transmission path diagram when all slave stations that can be connected to a device using a conventional serial communication device are connected.

【図8】ある装置機器が実際に作動するときのシリアル
通信装置における現状での伝送路の従局配列順番の一例
を示した伝送路図である。
FIG. 8 is a transmission path diagram showing an example of the order of arrangement of slave stations in a current state of a transmission path in a serial communication device when a certain device actually operates.

【図9】シリアル通信装置が情報交換を実施する際に利
用されるメモリマップの概念図である。
FIG. 9 is a conceptual diagram of a memory map used when the serial communication device performs information exchange.

【図10】従来のシリアル通信装置においてシリアル通
信を実行するときのシリアル通信タスクを示すフローチ
ャートである。
FIG. 10 is a flowchart showing a serial communication task when performing serial communication in a conventional serial communication device.

【図11】従来のシリアル通信を実行するときの初期化
通信手順を示すフローチャートである。
FIG. 11 is a flowchart showing an initialization communication procedure when performing conventional serial communication.

【図12】従来のシリアル通信を実行するときの通常通
信手順を示すフローチャートである。
FIG. 12 is a flowchart showing a normal communication procedure when performing conventional serial communication.

【図13】従来のシリアル通信を実行するときの通常通
信手順を示すフローチャートである。
FIG. 13 is a flowchart showing a normal communication procedure when performing conventional serial communication.

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

21 主局 22〜33 従局 21 Master station 22-33 Slave station

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 一つの主局を中心に複数の従局を有する
伝送路で構成され、前記主局が発するシリアル転送クロ
ックに同期して当該主局から前記複数の従局への出力情
報をシフト転送し、且つ前記シフト転送を利用して前記
複数の従局から主局へ従局情報を返送することにより前
記主局と前記複数の従局との情報交換を実行するための
シリアル通信を行うシリアル通信装置であって、前記複
数の従局は、それぞれ、前記主局に返送する前記従局情
報の内容が更新されたか否かを判別する更新判別手段
と、前記更新判別手段により前記従局情報が更新された
と判別された場合に前記主局に対して通信要求信号を送
信する通信要求信号送信手段とを備え、前記主局は、前
記複数の従局へシフト転送する出力情報の内容が更新さ
れた場合または前記複数の従局のいずれかから送信され
てきた通信要求信号を受信した場合に、前記シリアル通
信を実行するシリアル通信実行手段を備えるシリアル通
信装置において、 前記主局は、前記複数の従局へシフト転送する出力情報
の内容を記憶する出力情報記憶手段と、前記複数の従局
から返送される従局情報の内容を記憶する入力情報記憶
手段とを備え、 前記入力情報記憶手段は、前記シリアル通信の実行前の
従局情報の内容を記憶保持する第1入力情報記憶手段と
前記シリアル通信の実行後の従局情報の内容を記憶保持
する第2入力情報記憶手段と、前記シリアル通信の実行
後に、前記第1入力情報記憶手段に記憶保持されている
従局情報の内容と前記第2入力情報記憶手段に記憶保持
されている従局情報の内容とをビット毎に比較する比較
手段とから構成され、 更に、前記主局は、前記実行されたシリアル通信が前記
従局の前記通信要求信号送信手段から出力された通信要
求信号により実行されたものであるか否かに応じて、前
記比較手段による比較結果を判定する比較結果判定手段
と、前記比較結果判定手段による判定の結果に基いて前
記実行されたシリアル通信による情報交換が不成立であ
るか否かを診断する自己診断手段とを備えることを特徴
とするシリアル通信装置。
1. A transmission path having a plurality of slave stations centered on one master station, and shift-transferring output information from the master station to the plurality of slave stations in synchronization with a serial transfer clock generated by the master station. And a serial communication device that performs serial communication for executing information exchange between the master station and the plurality of slave stations by returning slave station information from the plurality of slave stations to the master station using the shift transfer. In addition, the plurality of slave stations each determine whether or not the content of the slave station information returned to the master station has been updated, and the update determining means determines that the slave station information has been updated. Communication request signal transmitting means for transmitting a communication request signal to the master station when the content of the output information to be shifted and transferred to the plurality of slave stations is updated, or A serial communication device including a serial communication execution unit that executes the serial communication when receiving a communication request signal transmitted from any of the slave stations, wherein the master station shift-transfers to the plurality of slave stations. Output information storage means for storing the content of the output information, and input information storage means for storing the content of the slave information returned from the plurality of slaves, the input information storage means, before the execution of the serial communication First input information storage means for storing and holding the content of slave station information, second input information storage means for storing and holding the content of slave station information after the execution of the serial communication, and the first input information storage means for executing the serial communication. Comparing means for comparing, on a bit-by-bit basis, the contents of the slave information stored and held in the storage means and the contents of the slave information stored and held in the second input information storing means; Further, the master station is configured to perform the comparison according to whether or not the executed serial communication is executed by a communication request signal output from the communication request signal transmitting unit of the slave station. And a self-diagnosis unit for diagnosing whether or not information exchange by the executed serial communication is not established based on a result of the determination by the comparison result determination unit. A serial communication device characterized by the above-mentioned.
【請求項2】 前記自己診断手段は、 前記実行されたシリアル通信が前記従局の前記通信要求
信号送信手段から送出された通信要求信号により実行さ
れたものであるときに、前記比較結果判定手段により前
記比較手段による比較の結果が全ビットとも一致してい
ると判定した場合に、前記実行されたシリアル通信によ
る情報交換が不成立であると診断するように構成される
ことを特徴とする請求項1記載のシリアル通信装置。
2. The self-diagnosis means, when the executed serial communication is executed by a communication request signal sent from the communication request signal transmission means of the slave station, 2. The information processing apparatus according to claim 1, wherein when it is determined that the result of the comparison by the comparing means matches all the bits, it is determined that the information exchange by the executed serial communication is not established. A serial communication device as described.
【請求項3】 前記自己診断手段は、 前記実行されたシリアル通信が前記従局の前記通信要求
信号送信手段から送出された通信要求信号により実行さ
れたものであるときに前記比較結果判定手段により前記
比較手段による比較の結果が全ビットとも一致している
と判定した場合、及び前記実行されたシリアル通信が前
記従局の前記通信要求信号送信手段から送出された通信
要求信号により実行されたものではないときに前記比較
結果判定手段により前記比較手段による比較結果のうち
少なくとも1ビットが一致していないと判定した場合
に、前記実行されたシリアル通信による情報交換が不成
立であると診断するように構成されることを特徴とする
請求項1記載のシリアル通信装置。
3. The self-diagnosis means, when the executed serial communication is executed by a communication request signal sent from the communication request signal transmitting means of the slave station, When it is determined that the result of the comparison by the comparing means matches all the bits, and when the executed serial communication is not executed by the communication request signal transmitted from the communication request signal transmitting means of the slave station. When the comparison result determination unit determines that at least one bit of the comparison result by the comparison unit does not match, it is configured to diagnose that the information exchange by the executed serial communication is not established. 2. The serial communication device according to claim 1, wherein:
【請求項4】 所定回数連続で、前記自己診断手段によ
り前記シリアル通信による情報交換が不成立であると診
断された場合に、前記シリアル通信装置の故障が発生し
たと診断する故障診断手段を備えることを特徴とする請
求項1〜3のいずれか1項記載のシリアル通信装置。
4. A failure diagnosis means for diagnosing that a failure has occurred in the serial communication device when the self-diagnosis means has diagnosed that information exchange by serial communication has not been established for a predetermined number of consecutive times. The serial communication device according to claim 1, wherein:
【請求項5】 一つの主局を中心に複数の従局を有する
伝送路で構成され、前記主局が発するシリアル転送クロ
ックに同期して当該主局から前記複数の従局への出力情
報をシフト転送し、且つ前記シフト転送を利用して前記
複数の従局から主局へ従局情報を返送することにより前
記主局と前記複数の従局との情報交換を実行するための
シリアル通信を行うシリアル通信装置であって、前記複
数の従局は前記主局に返送する前記従局情報の内容が更
新された場合に前記主局に対して通信要求信号を送信す
るように構成され、前記主局は前記複数の従局へシフト
転送する出力情報の内容が更新された場合または前記複
数の従局のいずれかから送信されてきた通信要求信号を
受信した場合に前記シリアル通信を実行するように構成
されるシリアル通信装置の異常診断方法において、 前記主局において、 前記シリアル通信の実行前の従局情報の内容を第1入力
情報記憶手段に記憶保持し、前記シリアル通信の実行後
の従局情報の内容を第2入力情報記憶手段に記憶保持
し、前記シリアル通信の実行後に前記第1入力情報記憶
手段に記憶保持されている従局情報の内容と前記第2入
力情報記憶手段に記憶保持されている従局情報の内容と
をビット毎に比較し、 前記実行されたシリアル通信が前記従局の前記通信要求
信号送信手段から出力された通信要求信号により実行さ
れたものであるか否かに応じて、前記ビット毎の比較結
果に基いて前記実行されたシリアル通信による情報交換
が不成立であるか否かを診断することを特徴とするシリ
アル通信装置の異常診断方法。
5. A transmission path having a plurality of slave stations centered on one master station, and shift-transferring output information from the master station to the plurality of slave stations in synchronization with a serial transfer clock generated by the master station. And a serial communication device that performs serial communication for executing information exchange between the master station and the plurality of slave stations by returning slave station information from the plurality of slave stations to the master station using the shift transfer. The plurality of slave stations are configured to transmit a communication request signal to the master station when the content of the slave station information to be returned to the master station is updated, and the master station is configured to transmit the plurality of slave stations. Serial communication configured to execute the serial communication when the content of the output information to be shifted and transferred is updated or when a communication request signal transmitted from any of the plurality of slave stations is received. In the apparatus abnormality diagnosis method, in the master station, contents of the slave station information before the execution of the serial communication are stored and held in a first input information storage means, and contents of the slave station information after the execution of the serial communication are input to a second input section. The contents of slave information stored and held in the first input information storage means and the contents of slave information stored and held in the second input information storage means after execution of the serial communication. Is compared for each bit, and the comparison result for each bit is determined depending on whether or not the executed serial communication is executed by a communication request signal output from the communication request signal transmitting unit of the slave station. A method for diagnosing whether or not the information exchange by the executed serial communication is unsuccessful on the basis of the above.
【請求項6】 前記自己診断手段は、 前記実行されたシリアル通信が前記従局から送信された
通信要求信号により実行されたものであるときに、前記
比較の結果が全ビットとも一致していると判定した場合
に、前記実行されたシリアル通信による情報交換が不成
立であると診断することを特徴とする請求項5記載のシ
リアル通信装置の異常診断方法。
6. The self-diagnosis means, when the executed serial communication is executed by a communication request signal transmitted from the slave station, when the comparison result matches all bits. 6. The method for diagnosing abnormality of a serial communication device according to claim 5, wherein when it is determined that the information exchange by the executed serial communication is not established.
【請求項7】 前記自己診断手段は、 前記実行されたシリアル通信が前記従局から送信された
通信要求信号により実行されたものであるときに前記比
較の結果が全ビットとも一致していると判定した場合、
及び前記実行されたシリアル通信が前記従局から送出さ
れた通信要求信号により実行されたものではないときに
前記比較の結果のうち少なくとも1ビットが一致してい
ないと判定した場合に、前記実行されたシリアル通信に
よる情報交換が不成立であると診断することを特徴とす
る請求項5記載のシリアル通信装置の異常診断方法。
7. The self-diagnosis means determines that the comparison result matches all bits when the executed serial communication is executed by a communication request signal transmitted from the slave station. if you did this,
And when it is determined that at least one bit of the result of the comparison does not match when the executed serial communication is not executed by the communication request signal transmitted from the slave station, the executed 6. The method for diagnosing abnormalities in a serial communication device according to claim 5, wherein it is diagnosed that information exchange by serial communication is not established.
【請求項8】 所定回数連続で、前記自己診断手段によ
り前記シリアル通信による情報交換が不成立であると診
断された場合に、前記シリアル通信装置の故障が発生し
たと診断することを特徴とする請求項5〜7のいずれか
1項記載のシリアル通信装置の異常診断方法。
8. A method for diagnosing a failure of the serial communication device when the self-diagnosis unit diagnoses that the information exchange by serial communication is not established continuously for a predetermined number of times. Item 8. The abnormality diagnosis method for a serial communication device according to any one of Items 5 to 7.
【請求項9】 一つの主局を中心に複数の従局を有する
伝送路で構成され、前記主局が発するシリアル転送クロ
ックに同期して当該主局から前記複数の従局への出力情
報をシフト転送し、且つ前記シフト転送を利用して前記
複数の従局から主局へ従局情報を返送することにより前
記主局と前記複数の従局との情報交換を実行するための
シリアル通信を行うシリアル通信装置であって、前記複
数の従局は、それぞれ、前記主局に返送する前記従局情
報の内容が更新されたか否かを判別する更新判別手段
と、前記更新判別手段により前記従局情報が更新された
と判別された場合に前記主局に対して通信要求信号を送
信する通信要求信号送信手段とを備え、前記主局は、前
記複数の従局へシフト転送する出力情報の内容が更新さ
れた場合または前記複数の従局のいずれかから送信され
てきた通信要求信号を受信した場合に、前記シリアル通
信を実行するシリアル通信実行手段を備えるシリアル通
信装置の異常診断プログラムであって、 前記複数の従局へシフト転送する出力情報の内容を記憶
する出力情報記憶工程と、前記シリアル通信の実行前の
前記従局情報の内容を記憶保持する第1入力情報記憶工
程と、前記シリアル通信の実行後の従局情報の内容を記
憶保持する第2入力情報記憶工程と、前記シリアル通信
の実行後に、前記第1入力情報記憶手段に記憶保持され
ている従局情報の内容と前記第2入力情報記憶手段に記
憶保持されている従局情報の内容とをビット毎に比較す
る比較工程と、前記実行されたシリアル通信が前記従局
から出力された通信要求信号により実行されたものであ
るか否かに応じて、前記比較工程における比較の結果を
判定する比較結果判定工程と、前記比較結果判定工程に
おける判定の結果に基いて前記実行されたシリアル通信
による情報交換が不成立であるか否かを診断する自己診
断工程とを含む異常診断プログラムを、コンピュータに
より読み取り可能な形式で記録したことを特徴とする記
録媒体。
9. A transmission line having a plurality of slave stations centered on one master station, and shift-transferring output information from the master station to the plurality of slave stations in synchronization with a serial transfer clock generated by the master station. And a serial communication device that performs serial communication for executing information exchange between the master station and the plurality of slave stations by returning slave station information from the plurality of slave stations to the master station using the shift transfer. In addition, the plurality of slave stations each determine whether or not the content of the slave station information returned to the master station has been updated, and the update determining means determines that the slave station information has been updated. Communication request signal transmitting means for transmitting a communication request signal to the master station when the content of the output information to be shifted and transferred to the plurality of slave stations is updated, or A serial communication execution means for executing the serial communication when receiving a communication request signal transmitted from any of a number of slave stations; An output information storing step of storing the content of the output information to be performed, a first input information storing step of storing and holding the content of the slave station information before executing the serial communication, and a content of the slave station information after executing the serial communication. A second input information storage step of storing and holding, and after execution of the serial communication, contents of slave information stored and held in the first input information storage means and slave stations stored and held in the second input information storage means A comparison step of comparing the content of information with each bit, and the executed serial communication is executed by a communication request signal output from the slave station. Whether the information exchange by the serial communication executed based on the result of the determination in the comparison result determining step and the result of the determination in the comparison result determining step is not established. A recording medium characterized by recording an abnormality diagnosis program including a self-diagnosis step of diagnosing the abnormality in a computer-readable format.
【請求項10】 前記自己診断工程において、前記実行
されたシリアル通信が前記従局から送出された通信要求
信号により実行されたものであるときに、前記比較結果
判定工程において前記比較工程における比較の結果が全
ビットとも一致していると判定した場合に、前記実行さ
れたシリアル通信による情報交換が不成立であると診断
することを特徴とする請求項9記載の記録媒体。
10. In the self-diagnosis step, when the executed serial communication is executed by a communication request signal transmitted from the slave station, a result of the comparison in the comparison step in the comparison result determination step 10. The recording medium according to claim 9, wherein when it is determined that all the bits match, the executed information exchange by serial communication is diagnosed as not being established.
【請求項11】 前記自己診断工程において、前記実行
されたシリアル通信が前記従局から送出された通信要求
信号により実行されたものであるときに前記比較結果判
定工程において前記比較工程における比較の結果が全ビ
ットとも一致していると判定した場合、及び前記実行さ
れたシリアル通信が前記従局から送出された通信要求信
号により実行されたものではないときに前記比較結果判
定工程において前記比較手段における比較の結果のうち
少なくとも1ビットが一致していないと判定した場合
に、前記実行されたシリアル通信による情報交換が不成
立であると診断することを特徴とする請求項9記載の記
録媒体。
11. In the self-diagnosis step, when the executed serial communication is executed by a communication request signal transmitted from the slave station, the result of the comparison in the comparison step is determined in the comparison result judging step. When it is determined that all the bits match, and when the executed serial communication is not executed by the communication request signal sent from the slave station, the comparison in the comparison means in the comparison result judging step is performed. 10. The recording medium according to claim 9, wherein when it is determined that at least one bit of the result does not match, it is diagnosed that the information exchange by the executed serial communication is not established.
【請求項12】 前記異常診断プログラムは、所定回数
連続で、前記自己診断工程において前記シリアル通信に
よる情報交換が不成立であると診断された場合に、前記
シリアル通信装置の故障が発生したと診断する故障診断
工程を含むことを特徴とする請求項9〜11のいずれか
1項記載の記録媒体。
12. The abnormality diagnosis program diagnoses that a failure of the serial communication device has occurred when it is determined that information exchange by serial communication is not established in the self-diagnosis step for a predetermined number of consecutive times. The recording medium according to any one of claims 9 to 11, further comprising a failure diagnosis step.
JP11097443A 1999-04-05 1999-04-05 Serial communication equipment, its abnormality detecting method and recording medium Withdrawn JP2000293395A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11097443A JP2000293395A (en) 1999-04-05 1999-04-05 Serial communication equipment, its abnormality detecting method and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11097443A JP2000293395A (en) 1999-04-05 1999-04-05 Serial communication equipment, its abnormality detecting method and recording medium

Publications (1)

Publication Number Publication Date
JP2000293395A true JP2000293395A (en) 2000-10-20

Family

ID=14192487

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11097443A Withdrawn JP2000293395A (en) 1999-04-05 1999-04-05 Serial communication equipment, its abnormality detecting method and recording medium

Country Status (1)

Country Link
JP (1) JP2000293395A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101057170B1 (en) 2009-06-05 2011-08-16 주식회사 에스원 Communication error detection method in serial communication system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101057170B1 (en) 2009-06-05 2011-08-16 주식회사 에스원 Communication error detection method in serial communication system

Similar Documents

Publication Publication Date Title
EP2474915A1 (en) Device identifier selection
EP0507381B1 (en) Method of processing control instruction
US4295122A (en) Bus priority control method in loop bus network system
JPS61225946A (en) Diagnosis of second node from first node in local area network
EP0409539A2 (en) Frame routing method for communication networks
JPS5816820B2 (en) Communications system
KR20000071338A (en) Method and apparatus for connecting manufacturing test interface to a global serial bus including an inter integrated circuit bus
US4371924A (en) Computer system apparatus for prefetching data requested by a peripheral device from memory
US4034346A (en) Interface for establishing communications between a data-processing unit and a plurality of stations
CN114553373A (en) Data transmission method, device, equipment and storage medium
US7054983B2 (en) USB-HUB device and its control method
CN109669635A (en) Order LBA for solid-state storage main control chip is overlapped detection method and device
JPH0695685B2 (en) Two-way communication method
JP2000293395A (en) Serial communication equipment, its abnormality detecting method and recording medium
CN103348327A (en) Test card for testing one or more devices under test and tester
US4031375A (en) Arrangement for fault diagnosis in the communication controller of a program controlled data switching system
US3999053A (en) Interface for connecting a data-processing unit to an automatic diagnosis system
JP2000276408A (en) Serial communication equipment, detection of abnormality for this equipment, and recording medium
JP2001016297A (en) Serial communication equipment, serial communication method and storage medium
JP2001014287A (en) Serial communication device and serial communication method, and storage medium
CN108021476B (en) Test method and device of interconnection interface and computing equipment
JP2562703B2 (en) Data input controller for serial controller
US20060010280A1 (en) Interfacing of functional modules in an on-chip system
FR2546319A1 (en) CIRCUIT ARRANGEMENT CAPABLE OF PREVENTING ACCESS TO A PART OF A COMMAND MEMORY ON THE APPEARANCE OF AN ERROR IN THIS PART
JPH03137752A (en) Device and method for processing changeover error

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060210

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606