JP2000276408A - Serial communication equipment, detection of abnormality for this equipment, and recording medium - Google Patents

Serial communication equipment, detection of abnormality for this equipment, and recording medium

Info

Publication number
JP2000276408A
JP2000276408A JP11083345A JP8334599A JP2000276408A JP 2000276408 A JP2000276408 A JP 2000276408A JP 11083345 A JP11083345 A JP 11083345A JP 8334599 A JP8334599 A JP 8334599A JP 2000276408 A JP2000276408 A JP 2000276408A
Authority
JP
Japan
Prior art keywords
transmission path
slave
communication
serial
slave stations
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
JP11083345A
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 JP11083345A priority Critical patent/JP2000276408A/en
Publication of JP2000276408A publication Critical patent/JP2000276408A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a serial communication equipment which easily detects the abnormality of a slave station and performs equipment maintenance in a shorter time. SOLUTION: If a transmission line of a serial transfer clock connected in parallel to slave stations 22 to 33 is disconnected or short-circuited in the position of the slave station in a certain part or a transmission line of shift transfer connected in series to each slave station is disconnected or short-circuited in the position of the slave station in a certain part, return information contents from all slave stations existing below the position of this slave station are not practically transferred to a master station 21, and identifier information contents are all one or all 0 from a certain position. Consequently, it is discriminated in the master station (CPU) 21 whether information contents are all one or all 0 or not to decide disconnection or shirt-circuit of transmission lines.

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全体のメモリ初
期化設定処理動作時にマップ化されるものである。後述
するメモリマップ図(図9)に示されるメモリマップ展
開が、本従来例における、基本となる伝送路における従
局配列順番を示すものである。つまり、本シリアル通信
装置は、機器装置によって予め決定される全従局が接続
された場合の伝送路での従局配列順番を基本としてマッ
プ化しておき、次に初期化通信を実行することでメモリ
マップの再設定が実施される。そして、現状における伝
送路の従局配列順番を把握して、通常通信を実行する際
はその現状における伝送路の従局配列順番で構成される
情報内容のみのデータ長をシフト転送して情報交換を実
行するのである。
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. The expansion of the memory map shown in the memory map diagram (FIG. 9) described later shows the order of the slave stations in the 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)及び(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, by performing normal communication based on the reset sequence of the slave stations shown in FIGS. 9C and 9D, 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、図12及び図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. 12 and 13 are flowcharts showing a normal communication procedure when executing conventional serial communication.
The initialization communication and the normal communication shown in FIGS. 11, 12 and 13 are 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 communication operation is controlled to be forcibly terminated by performing a soft reset at a stage where the shift transfer for executing the serial communication operation has been performed once. I have. 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】電源が投入され、CPUリセット後にCP
Uが有するメモリの初期化設定処理が実行されることに
より、主局が有するメモリ部分に、基本となる伝送路に
接続可能な全従局の配列順番がマップ化されると、CP
U動作による機器の制御プログラムが起動され、同時
に、図10に示す主局であるシリアル通信タスクも起動
される。
When the power is turned on and the CPU is reset, the CP
By executing the initialization setting processing of the memory of the U, the arrangement order of all the slave stations connectable to the basic transmission path is mapped in the memory part of the master station.
The control program of the device by the U operation 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)及び(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 state of the master station is as shown in FIGS.
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】すなわち、まず、通信ソフトリセットがオ
ンされて、図5に示した従局の有する入力セレクタ回路
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 to make the input selector circuit 1 of the slave station shown in FIG. 5 access the identifier information of the slave station (FIG. 5). 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)及び(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 reset of the memory map by the initialization serial communication is performed based on the basic memory map of the slave station arrangement order shown in FIGS. 9A and 9B. 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. Then, in the master 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
08で、図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 08, 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, although it is relatively easy to confirm the operation of the electric unit itself, the serial unit in the device constituted by the loop transmission line as described in the above-mentioned conventional example is used. In communication devices,
There has been a serious problem that finding an abnormal slave station often takes a very long time. That is, since the serial communication device is mainly a signal processed in time series such as a transmission line for shift transfer or a transmission line for serial transfer clock, it is very difficult to find an abnormal slave station. . Furthermore, in a serial communication device having a light transmission element using a light transmission element or a light receiving element as a transmission path, since the light is emitted in the infrared region, there is a problem in that it becomes more difficult to find.

【0094】本発明は、上記問題点を解決するためにな
されたもので、従局の異常をより容易に検出でき、ま
た、より短時間で装置メンテナンスを行うことができる
シリアル通信装置及びその異常検出方法並びに記録媒体
を提供することを目的とする。
The present invention has been made in order to solve the above problems, and a serial communication device capable of detecting an abnormality of a slave station more easily and performing device maintenance in a shorter time, and an abnormality detection device for the serial communication device. It is an object to provide a method and a recording medium.

【0095】[0095]

【課題を解決するための手段】上記目的を達成するため
に、請求項1のシリアル通信装置は、一つの主局を中心
に複数の従局を有する伝送路で構成されるシリアル通信
装置であって、前記主局が発するシリアル転送クロック
に同期して当該主局から前記複数の従局への出力情報を
シフト転送し、且つ前記シフト転送を利用して前記複数
の従局から主局へ従局情報を返送することにより前記主
局と前記複数の従局との情報交換を実行するためのシリ
アル通信を行うシリアル通信装置において、前記主局
は、前記シフト転送を利用して当該主局へ返送されてく
る従局情報の内容を判別する返送情報内容判別手段と、
前記返送情報内容判別手段の判別結果に基いて前記シフ
ト転送のための伝送路または前記シリアル転送クロック
のための伝送路の異常を検出する伝送路異常検出手段と
を備えることを特徴とする。
According to a first aspect of the present invention, there is provided a serial communication apparatus comprising a transmission line having one master station and a plurality of slave stations. Shifting the output information from the master station to the plurality of slave stations in synchronization with the serial transfer clock generated by the master station, and returning the slave information from the plurality of slave stations to the master station using the shift transfer. A serial communication device for performing serial communication for performing information exchange between the master station and the plurality of slave stations, wherein the master station uses the shift transfer to return a slave station to the master station. Return information content determining means for determining the content of the information,
A transmission path abnormality detecting means for detecting an abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock based on the result of the determination by the return information content determining means.

【0096】請求項2のシリアル通信装置は、上記請求
項1記載のシリアル通信装置において、前記主局は、前
記複数の従局との情報交換を実行するためのシリアル通
信を行う前に、現状の伝送路に接続される従局の従局配
列順番を認識するための初期化通信を行う初期化通信手
段を備え、前記伝送路異常検出手段は、前記初期化通信
手段による初期化通信時に、前記返送情報内容判別手段
の判別結果に基づいて、予め登録された識別子情報内容
以外の内容を受信したと判別したときに、前記シフト転
送のための伝送路または前記シリアル転送クロックのた
めの伝送路の異常を検出するように構成されることを特
徴とする。
According to a second aspect of the present invention, in the serial communication apparatus according to the first aspect, the master station performs a current communication before performing serial communication for exchanging information with the plurality of slave stations. Initialization communication means for performing initialization communication for recognizing a slave station arrangement order of slave stations connected to the transmission path, wherein the transmission path abnormality detection means performs the initialization information communication by the initialization communication means; Based on the determination result of the content determination unit, when it is determined that the content other than the content of the identifier information registered in advance is received, the abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock is determined. It is configured to detect.

【0097】請求項3のシリアル通信装置は、上記請求
項1記載のシリアル通信装置において、前記主局は、前
記複数の従局との情報交換を実行するためのシリアル通
信を行う前に、現状の伝送路に接続される従局の従局配
列順番を認識するための初期化通信を行う初期化通信手
段を備え、前記伝送路異常検出手段は、前記初期化通信
手段による初期化通信時に、前記返送情報内容判別手段
の判別結果に基づいて、所定の識別子情報内容を受信し
たと判別したときに、前記シフト転送のための伝送路ま
たは前記シリアル転送クロックのための伝送路の異常を
検出するように構成されることを特徴とする。
The serial communication device according to claim 3 is the serial communication device according to claim 1, wherein the master station performs a current communication before performing serial communication for exchanging information with the plurality of slave stations. Initialization communication means for performing initialization communication for recognizing a slave station arrangement order of slave stations connected to the transmission path, wherein the transmission path abnormality detection means performs the initialization information communication by the initialization communication means; When a predetermined identifier information content is determined to be received based on the determination result of the content determination means, an abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected. It is characterized by being performed.

【0098】請求項4のシリアル通信装置は、上記請求
項1〜3のいずれか1項記載のシリアル通信装置におい
て、前記シフト転送のために伝送路に存在する前記複数
の従局の配列に対応させて、前記シフト転送のための伝
送路または前記シリアル転送クロックのための伝送路の
異常個所を表示する伝送路異常個所表示手段を備えるこ
とを特徴とする。
A serial communication device according to a fourth aspect of the present invention is the serial communication device according to any one of the first to third aspects, wherein the serial communication device corresponds to the arrangement of the plurality of slave stations existing on the transmission path for the shift transfer. And a transmission line abnormal part display means for displaying an abnormal part of the transmission path for the shift transfer or the transmission path for the serial transfer clock.

【0099】請求項5のシリアル通信装置は、上記請求
項4記載のシリアル通信装置において、前記伝送路異常
個所表示手段は、前記複数の従局が属する電気ユニット
に対応する発光ダイオードを有し、前記発光ダイオード
を用いて前記シフト転送のための伝送路または前記シリ
アル転送クロックのための伝送路の異常個所を表示する
ように構成されることを特徴とする。
A serial communication device according to a fifth aspect of the present invention is the serial communication device according to the fourth aspect, wherein the transmission path abnormal point display means includes a light emitting diode corresponding to an electric unit to which the plurality of slave stations belong. The transmission line for the shift transfer or the abnormal portion of the transmission line for the serial transfer clock is displayed using a light emitting diode.

【0100】請求項6のシリアル通信装置は、上記請求
項4または5記載のシリアル通信装置において、前記伝
送路異常個所表示手段は、前記シリアル通信装置が利用
されるシステムが有している表示手段または前記システ
ムの状態を診断する診断装置が有する表示手段上に、前
記異常個所を表示するように構成されることを特徴とす
る。
A serial communication device according to a sixth aspect of the present invention is the serial communication device according to the fourth or fifth aspect, wherein the transmission path abnormal point display means is a display means provided in a system using the serial communication apparatus. Alternatively, the abnormal part is configured to be displayed on display means of a diagnostic device for diagnosing the state of the system.

【0101】請求項7のシリアル通信装置の異常検出方
法は、一つの主局を中心に複数の従局を有する伝送路で
構成され、前記主局が発するシリアル転送クロックに同
期して当該主局から前記複数の従局への出力情報をシフ
ト転送し、且つ前記シフト転送を利用して前記複数の従
局から主局へ従局情報を返送することにより前記主局と
前記複数の従局との情報交換を実行するためのシリアル
通信を行うシリアル通信装置の異常検出方法において、
前記シフト転送を利用して前記従局から前記主局へ返送
されてくる従局情報の内容を判別し、前記判別結果に基
いて前記シフト転送のための伝送路または前記シリアル
転送クロックのための伝送路の異常を検出することを特
徴とする。
According to a seventh aspect of the present invention, there is provided a method for detecting an abnormality in a serial communication apparatus, comprising a transmission line having a plurality of slave stations centered on one master station, and synchronizing 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. In a method for detecting an abnormality of a serial communication device that performs serial communication for performing
Using the shift transfer, determine the content of the slave station information returned from the slave station to the master station, and based on the determination result, a transmission path for the shift transfer or a transmission path for the serial transfer clock. It is characterized by detecting an abnormality of.

【0102】請求項8のシリアル通信装置の異常検出方
法は、上記請求項7記載のシリアル通信装置の異常検出
方法において、前記複数の従局との情報交換を実行する
ためのシリアル通信を行う前に、現状の伝送路に接続さ
れる従局の従局配列順番を認識するための初期化通信を
行い、前記初期化通信時に、前記判別結果に基づいて、
予め登録された識別子情報内容以外の内容を受信したと
判別されたときに前記シフト転送のための伝送路または
前記シリアル転送クロックのための伝送路の異常を検出
することを特徴とする。
The serial communication device abnormality detecting method according to claim 8 is the serial communication device abnormality detecting method according to claim 7, wherein before performing serial communication for exchanging information with the plurality of slave stations. Perform initialization communication for recognizing the slave station arrangement order of slave stations connected to the current transmission path, and at the time of the initialization communication, based on the determination result,
When it is determined that the content other than the content of the identifier information registered in advance is received, an abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected.

【0103】請求項9のシリアル通信装置の異常検出方
法は、請求項7記載のシリアル通信装置の異常検出方法
において、前記複数の従局との情報交換を実行するため
のシリアル通信を行う前に、現状の伝送路に接続される
従局の従局配列順番を認識するための初期化通信を行
い、前記初期化通信時に、前記判別結果に基づいて、所
定の識別子情報内容を受信したと判別されたときに前記
シフト転送のための伝送路または前記シリアル転送クロ
ックのための伝送路の異常を検出することを特徴とす
る。
According to a ninth aspect of the present invention, in the method for detecting an abnormality of a serial communication device according to the seventh aspect, before performing serial communication for executing information exchange with the plurality of slave stations, Performs initialization communication for recognizing the slave station arrangement order of slave stations connected to the current transmission path, and, at the time of the initialization communication, based on the determination result, when it is determined that predetermined identifier information content has been received. And detecting an abnormality in the transmission path for the shift transfer or the transmission path for the serial transfer clock.

【0104】請求項10のシリアル通信装置の異常検出
方法は、上記請求項7〜9のいずれか1項記載のシリア
ル通信装置の異常検出方法において、前記シフト転送の
ために伝送路に存在する前記複数の従局の配列に対応さ
せて、前記シフト転送のための伝送路または前記シリア
ル転送クロックのための伝送路の異常を検出したとき
に、当該異常個所を表示することを特徴とする。
The serial communication device abnormality detection method according to claim 10 is the serial communication device abnormality detection method according to any one of claims 7 to 9, wherein the serial communication device abnormality detection method exists in a transmission path for the shift transfer. When an abnormality is detected in the transmission path for the shift transfer or the transmission path for the serial transfer clock corresponding to the arrangement of a plurality of slave stations, the abnormal part is displayed.

【0105】請求項11のシリアル通信装置の異常検出
方法は、上記請求項11記載のシリアル通信装置の異常
検出方法において、前記複数の従局が属する電気ユニッ
トに対応する発光ダイオードを用いて、前記異常個所を
表示することを特徴とする。
The method for detecting an abnormality in a serial communication device according to claim 11 is the method for detecting an abnormality in a serial communication device according to claim 11, wherein the abnormality is detected by using a light emitting diode corresponding to an electric unit to which the plurality of slave stations belong. It is characterized by displaying a location.

【0106】請求項12のシリアル通信装置の異常検出
方法は、上記請求項10または11記載のシリアル通信
装置の異常検出方法において、前記シリアル通信装置が
利用されるシステムが有している表示手段または前記シ
ステムの状態を診断する診断装置が有する表示手段上
に、前記異常個所を表示することを特徴とする。
According to a twelfth aspect of the present invention, there is provided the serial communication device abnormality detecting method according to the tenth or eleventh aspect, wherein the serial communication device uses a display unit or a display unit. The abnormal part is displayed on display means of a diagnostic device for diagnosing the state of the system.

【0107】請求項13の記録媒体は、一つの主局を中
心に複数の従局を有する伝送路で構成されるシリアル通
信装置であって、前記主局が発するシリアル転送クロッ
クに同期して当該主局から前記複数の従局への出力情報
をシフト転送し、且つ前記シフト転送を利用して前記複
数の従局から主局へ従局情報を返送することにより前記
主局と前記複数の従局との情報交換を実行するためのシ
リアル通信を行うシリアル通信装置のコンピュータによ
り読み取り可能な形式で異常検出プログラムを記録した
記録媒体において、前記異常検出プログラムは、前記シ
フト転送を利用して当該主局へ返送されてくる従局情報
内容を判別する返送情報内容判別工程と、前記返送情報
内容判別工程の判別結果に基いて、前記シフト転送のた
めの伝送路または前記シリアル転送クロックのための伝
送路の異常を検出する伝送路異常検出工程とを含むこと
を特徴とする。
A recording medium according to a thirteenth aspect is a serial communication device comprising a transmission line having a plurality of slave stations centered on one master station, wherein the master station is synchronized with a serial transfer clock generated by the master station. Information exchange between the master station and the plurality of slave stations by shifting and transferring output information from a station 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. In a recording medium that records an abnormality detection program in a format readable by a computer of a serial communication device that performs serial communication for executing the abnormality detection program, the abnormality detection program is returned to the main station using the shift transfer. A return information content determining step of determining the slave station information content to be transmitted, and a transmission path or a transmission path for the shift transfer based on the determination result of the return information content determining step. Serial, characterized in that it comprises a transmission line abnormality detecting process of detecting an abnormality in the transmission path for the serial transfer clock.

【0108】請求項14の記録媒体は、上記請求項13
記載の記録媒体において、前記異常検出プログラムは、
前記複数の従局との情報交換を実行するためのシリアル
通信を行う前に、現状の伝送路に接続される従局の従局
配列順番を認識するための初期化通信を行う初期化通信
工程を含み、前記伝送路異常検出工程においては、前記
初期化通信工程における初期化通信時に、前記判別結果
に基いて、予め登録された識別子情報内容以外の内容を
受信したと判別したときに、前記シフト転送のための伝
送路または前記シリアル転送クロックのための伝送路の
異常を検出することを特徴とする。
The recording medium of claim 14 is the recording medium of claim 13
The recording medium according to claim 1, wherein the abnormality detection program comprises:
Before performing serial communication for performing information exchange with the plurality of slave stations, including an initialization communication step of performing initialization communication for recognizing the slave station arrangement order of slave stations connected to the current transmission path, In the transmission path abnormality detection step, during the initialization communication in the initialization communication step, based on the determination result, when it is determined that the content other than the pre-registered identifier information content has been received, the shift transfer of the Of the transmission line for the serial transfer clock or the transmission line for the serial transfer clock is detected.

【0109】請求項15の記録媒体は、上記請求項13
記載の記録媒体において、前記異常検出プログラムは、
前記複数の従局との情報交換を実行するためのシリアル
通信を行う前に、現状の伝送路に接続される従局の従局
配列順番を認識するための初期化通信を行う初期化通信
工程を含み、前記伝送路異常検出工程においては、前記
初期化通信工程における初期化通信時に、前記判別結果
に基づいて、所定の識別子情報内容を受信したと判別し
たときに、前記シフト転送のための伝送路または前記シ
リアル転送クロックのための伝送路の異常を検出するこ
とを特徴とする。
The recording medium of claim 15 is the recording medium of claim 13
The recording medium according to claim 1, wherein the abnormality detection program comprises:
Before performing serial communication for performing information exchange with the plurality of slave stations, including an initialization communication step of performing initialization communication for recognizing the slave station arrangement order of slave stations connected to the current transmission path, In the transmission path abnormality detection step, during initialization communication in the initialization communication step, based on the determination result, when it is determined that predetermined identifier information content has been received, the transmission path for the shift transfer or An abnormality of a transmission line for the serial transfer clock is detected.

【0110】請求項16の記録媒体は、上記請求項13
〜15のいずれか1項記載の記録媒体において、前記異
常検出プログラムは、前記シフト転送のために伝送路に
存在する前記複数の従局の配列に対応させて、前記シフ
ト転送のための伝送路または前記シリアル転送クロック
のための伝送路の異常個所を表示する伝送路異常個所表
示工程を含むことを特徴とする。
The recording medium of claim 16 is the recording medium of claim 13
16. The recording medium according to any one of claims 15 to 15, wherein the abnormality detection program corresponds to the arrangement of the plurality of slave stations present on the transmission path for the shift transfer, and the transmission path for the shift transfer or The method further includes a transmission line abnormal part display step of displaying an abnormal part of the transmission path for the serial transfer clock.

【0111】請求項17の記録媒体は、上記請求項16
記載の記録媒体において、前記伝送路異常個所表示工程
においては、前記複数の従局が属する電気ユニットに対
応する発光ダイオードを用いて、前記シフト転送のため
の伝送路または前記シリアル転送クロックのための伝送
路の異常個所を表示することを特徴とする。
The recording medium according to claim 17 is the recording medium according to claim 16
In the recording medium described in the above, in the transmission path abnormal point display step, a transmission path for the shift transfer or a transmission for the serial transfer clock is used by using a light emitting diode corresponding to an electric unit to which the plurality of slave stations belong. It is characterized by displaying an abnormal part of the road.

【0112】請求項18の記録媒体は、上記請求項15
または16記載の記録媒体において、前記伝送路異常個
所表示工程においては、前記シリアル通信装置が利用さ
れるシステムが有している表示手段または前記システム
の状態を診断する診断装置が有する表示手段上に、前記
異常個所を表示することを特徴とする。
The recording medium according to claim 18 is the recording medium according to claim 15
17. The recording medium according to claim 16, wherein, in the transmission path abnormal point display step, a display unit included in a system using the serial communication device or a display unit included in a diagnostic device that diagnoses a state of the system is provided. , The abnormal part is displayed.

【0113】[0113]

【発明の実施の形態】(第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.

【0114】なお、本実施形態は、従来技術として説明
したシリアル通信装置(図6)により実現可能であるの
で、図6を流用して説明するが、本発明が意図する手段
を利用可能なシリアル通信装置であればこのような構成
に特に限定されるものではない。また、そのシリアル通
信装置が利用される機器装置に接続され得る全従局が接
続されたときの伝送路図は、従来技術として図7に示し
たように構成され、この基本となる伝送路の従局配列順
番は、利用する機器装置に応じて決定されるが、例え
ば、仕様変更等により従局配列順番が入れ替わった場合
は、その変更内容に応じて、基本となる従局配列順番を
変更すればよいことは上述したとおりである。
Since the present embodiment can be realized by the serial communication device (FIG. 6) described as the prior art, the description will be made with reference to FIG. 6, but the serial communication device which can use the means intended by the present invention will be described. The communication device is not particularly limited to such a configuration. Further, a transmission path diagram when all slave stations that can be connected to the equipment using the serial communication apparatus are connected is configured as shown in FIG. 7 as a prior art, and the slave station of this basic transmission path is connected. The arrangement order is determined according to the equipment used, but, for example, if the arrangement sequence of the slave stations is changed due to a change in specification, etc., the basic arrangement sequence of the slave stations may be changed according to the content of the change. Is as described above.

【0115】また、本実施形態に述べるシリアル通信装
置の全体制御は、従来技術として図9に示したシリアル
通信タスクにより実現されるので、本実施形態の説明で
はシリアル通信装置の主制御であるシリアル通信タスク
の説明は省略する。
Further, since the overall control of the serial communication device described in the present embodiment is realized by the serial communication task shown in FIG. 9 as a conventional technique, the serial control which is the main control of the serial communication device will be described in this embodiment. The description of the communication task is omitted.

【0116】図1は、本実施形態に係るシリアル通信装
置における現状での伝送路の従局配列順番の一例を示し
た伝送路図である。同図において、伝送路の従局配列順
番は、基本となる伝送路における従局配列順番(図7)
に対し、オプションと称される電気ユニット(図8の例
ではスイッチバックユニット、高圧(青)ユニット、高
圧(黄)ユニット、封筒ユニット、及び両面制御ユニッ
トの5つの電気ユニット)が、必要に応じて省かれた状
態で利用されている。また、図1に示すように、本実施
形態では、伝送路上の異常個所を表示するための通信伝
送路異常個所表示手段としてのLED(発光素子)が従
局毎に設けられており、伝送路の転送信号状態に応じて
オン・オフ制御される。なお、図1に示したLEDはそ
の取りつけ位置を示すものであり、LED駆動回路につ
いては極めて一般的であるため、省略されているが、本
発明はこのような形式に特に限定されるものではないこ
とはいうまでもない。
FIG. 1 is a transmission path diagram showing an example of the order of arrangement of slave stations in the transmission path in the serial communication device according to the present embodiment at the present time. In the figure, the order of the slave stations in the transmission line is the order of the slave stations in the basic transmission line (FIG. 7).
On the other hand, optional electric units (in the example of FIG. 8, five electric units of a switchback unit, a high-pressure (blue) unit, a high-pressure (yellow) unit, an envelope unit, and a double-sided control unit) are optionally provided. It is used in a state where it is omitted. Further, as shown in FIG. 1, in the present embodiment, an LED (light emitting element) as a communication transmission line abnormal point display means for displaying an abnormal point on the transmission path is provided for each slave station. ON / OFF control is performed according to the state of the transfer signal. Note that the LED shown in FIG. 1 indicates the mounting position, and the LED drive circuit is very common and is omitted, but the present invention is not particularly limited to such a form. It goes without saying.

【0117】本実施形態の説明に先だって、主局の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.

【0118】以下の説明で示すフローチャートを実行す
るためのプログラムも、同様に、並列処理されるタスク
であるが、説明を容易にするために、一つの連続したプ
ログラム処理が行われるものとして説明する。
A 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. .

【0119】図2は、本実施形態にかかるシリアル通信
装置におけるシリアル通信タスクで行われる初期化通信
手順を示すフローチャートである。なお、図2に示す初
期化通信は、図10に示すシリアル通信タスクにおいて
起動されるものである。
FIG. 2 is a flowchart showing an initialization communication procedure performed in a serial communication task in the serial communication device according to the present embodiment. The initialization communication shown in FIG. 2 is started in the serial communication task shown in FIG.

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

【0121】ステップS14の判別で、先頭値アドレス
MTOの値と最終値アドレスMTEの値とが等しくない
場合は、シフト転送する転送データの出力準備が行われ
る(ステップS15)。この初期化通信では、オールゼ
ロの転送データをシフト転送するが、特にこの内容に限
定されるものではなく、シリアル通信装置の利用具合に
応じてオールゼロ以外の内容からなるデータをシフト転
送してもよい。
If it is determined in step S14 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 S15). 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. .

【0122】そして、従局回路構成に合わせて4ビット
分のシフト転送が実行される。すなわち、1ビット分の
シフト転送が行われ、転送クロックが1クロック分転送
され、クロック数カウンタが「1」インクリメントされ
た後(ステップS16)、1ビットのシフト転送入力が
行われ(ステップS17)、4ビット分のシフト転送が
完了したか否かが判別される(ステップS18)。ステ
ップS16〜S18の処理手順を繰返すことにより、4
ビット分のシフト転送が実行される。
Then, 4-bit shift transfer is executed in accordance with the slave station circuit configuration. 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 S16), and one-bit shift transfer input is performed (step S17). It is determined whether the 4-bit shift transfer has been completed (step S18). By repeating the processing procedure of steps S16 to S18, 4
Bit-wise shift transfer is performed.

【0123】ステップS18の判別で、4ビット(一従
局分が有する識別子情報)のシフト転送が完了すると、
返送された識別子情報内容がオール1もしくはオール0
であるか否かが判別される(ステップS19)。従来技
術として説明したように、識別子情報内容は予め割り振
られているのもであり、オール1もしくはオール0の設
定ではない。従って、何ら異常(例えば伝送路の断線も
しくは短絡)が発生していない正常な場合にはステップ
S19の答は否定(NO)であるから、次に、基本とな
るメモリマップの従局並列出力情報(図9)であるメモ
リマップの先頭値アドレスMTOとメモリポインタ値と
を加算した値で示されるメモリアドレスの内容がピック
アップされて、その上位4ビットの内容が取得され(ス
テップS20)、ステップS18で入力完了と判別され
た4ビット構成の識別子情報と比較され、両者が一致し
ているか否かが判別される(ステップS21)。
In the determination in step S18, when the shift transfer of 4 bits (identifier information of one slave station) is completed,
The returned identifier information content is all 1 or all 0
Is determined (step S19). As described in the related art, the content of the identifier information is allocated in advance, and is not an all 1 or all 0 setting. Therefore, if there is no abnormality (for example, disconnection or short circuit in the transmission path) and the operation is normal, the answer to step S19 is negative (NO), and then the slave station parallel output information ( The contents of the memory address indicated by the value obtained by adding the start value address MTO of the memory map shown in FIG. 9) and the memory pointer value are picked up, and the contents of the upper 4 bits are obtained (step S20). It is compared with the 4-bit identifier information determined to be input completed, and it is determined whether or not both match (step S21).

【0124】ステップS21の判別で、一致している場
合は、基本となるメモリマップの従局並列出力情報に登
録された識別子情報の従局が存在すると判断されるの
で、上述したステップS13〜S21の処理が再び実行
され、次のシフト転送による識別子情報に基づいて従局
の有無が判断される。
In the determination in step S21, if 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 S13 to S21 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.

【0125】また、ステップS21の判別で、一致して
いない場合は、基本となるメモリマップの従局並列出力
情報に登録された識別子情報の従局が存在しないと判断
されるので、その該当従局の上位4ビットに示される識
別子情報内容を従局が無いことを意味するオールゼロ
(00H)にクリアして再登録が行われる(ステップS
22)。更に、メモリポインタを「1」インクリメント
することにより、基本となるメモリマップの従局並列出
力情報の次に位置する登録された識別子情報の従局が指
定され(ステップS23)、上述したステップS20に
戻り、再び従局の存在が判断される。
If the two do not coincide with each other in step S21, 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).
22). Further, by incrementing the memory pointer by "1", the slave station of the registered identifier information located next to the slave station parallel output information of the basic memory map is specified (step S23), and the process returns to step S20 described above. The existence of the slave station is determined again.

【0126】つまり、存在しない従局のメモリエリアの
内容を「00H」にすることにより登録が抹消され、存
在する従局のメモリエリアは、すでに登録されている識
別子情報をそのまま残すことにより現状での従局配列順
番が再設定される。なお、上述した、登録従局の有無を
再設定する返送情報内容判断(ステップS20〜S2
3)は、従来技術として図11のステップS129〜S
132に示した手順と同様である。
That is, the registration is deleted by setting the content of the memory area of the non-existing slave station to “00H”, and the existing slave memory area is left as it is by retaining the already registered identifier information. The array order is reset. Note that the above-described return information content determination for resetting the presence or absence of the registered slave station (steps S20 to S2)
3) corresponds to steps S129-S in FIG.
132 is the same as the procedure shown in FIG.

【0127】このように、伝送路が断線もしくは短絡さ
れていない正常な状態にある場合は、本来のシリアル通
信動作であるメモリの再設定動作が実行される。
As described above, when the transmission path is in a normal state in which there is no disconnection or short circuit, a memory reset operation which is an original serial communication operation is executed.

【0128】以上の動作を繰返して基本となるメモリマ
ップの従局配列順番が再設定されると、ステップS14
の判別で先頭値アドレスMTOの値にメモリポインタの
値を加えた値が最終値アドレスMTEの値に達するの
で、初期化通信実行で実際にシフト転送で出力された転
送クロック総数をカウントするための主局が有するクロ
ック数カウンタの値を一重局構成ビット数である4ビッ
トで割り算することにより、現状の伝送路に存在する従
局総数が算出され、この従局総数と、再設定されたメモ
リマップ上で存在すると判断された従局総数とが一致す
るか否かが判別される(ステップS24)。
When the sequence of the slave stations in the basic memory map is reset by repeating the above operation, step S14 is performed.
In the determination, the value obtained by adding the value of the memory pointer to the value of the start value address MTO reaches the value of the end value address MTE, so that 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 constituting the single station, the total number of slave stations present on the current transmission path is calculated. It is determined whether or not the total number of slave stations determined to be present matches (step S24).

【0129】ステップS24の判別で、算出された従局
総数と再設定されたメモリマップ上の従局総数とが一致
した場合は、初期化通信で従局配列順番が正常に再設定
されたので、再設定フラグに「1」がセットされるとと
もに通信ソフトリセットされ(ステップS25)、初期
化通信が終了される。一方、一致しない場合は、正常に
再設定されなかったので、再設定フラグを「0」のま
ま、リトライカウンタが「1」インクリメントされると
ともに通信ソフトリセットされ(ステップS26)、一
旦本手順が終了される。ステップS25またはステップ
S26によって初期化通信が終了すると、図10のステ
ップS103のシリアル通信タスクが一旦終了される。
If it is determined in step S24 that the calculated total number of slave stations matches the total number of slave stations on the reset memory map, the sequence of slave stations is normally reset by the initialization communication. The flag is set to "1" and the communication software is reset (step S25), and the initialization communication is terminated. On the other hand, if they do not match, the reset was not performed normally, so the retry counter is incremented by "1" and the communication software is reset while the reset flag remains "0" (step S26), and this procedure is temporarily terminated. Is done. When the initialization communication ends in step S25 or step S26, the serial communication task in step S103 in FIG. 10 ends once.

【0130】一方、上記ステップS19の判別で伝送路
が断線もしくは短絡されている場合は、後述する断線・
短絡ルーチンが実行される(ステップS27)。
On the other hand, if it is determined in step S19 that the transmission path is disconnected or short-circuited,
A short-circuit routine is executed (Step S27).

【0131】各従局に対して並列接続されているシリア
ル転送クロックの伝送路がある部分の従局の位置で断線
もしくは短絡されている場合、その従局のシフトレジス
タに転送クロックが入力されないため、主局にはその従
局の位置から下流側に存在する全従局からの返送情報内
容が実質転送されなくなる。つまり、識別子情報の内容
がある所からオール1もしくはオール0になってしまう
のである。さらに、各従局に対して直列接続されている
シフト転送の伝送路がある部分の従局の位置で断線もし
くは短絡されている場合も同様に、主局には、その従局
の位置から下流側に存在する全従局からの返送情報内容
が実質転送されなくなり、識別子情報の内容が、ある所
からオール1もしくはオール0になってしまうのであ
る。
When the transmission line of the serial transfer clock connected in parallel to each slave station is disconnected or short-circuited at the position of the slave station, the transfer clock is not input to the shift register of the slave station. , The return information contents from all the slave stations existing downstream from the position of the slave station are not substantially transferred. That is, the content of the identifier information is changed to all 1s or all 0s from a certain place. Similarly, when the slave station is disconnected or short-circuited at the position of the slave station in a portion where the shift transfer transmission line serially connected to each slave station is located, the master station also exists downstream from the position of the slave station. The content of the return information from all the slave stations is not substantially transferred, and the content of the identifier information becomes all 1 or all 0 from a certain point.

【0132】すなわち、例えば図1に示す伝送路におい
て従局27(高圧1)と従局29(高圧赤)との間の伝
送路が断線した場合は、主局21のシフトイン端子に対
してシフト転送される情報内容は、従局33から従局2
9までは正常に返送されてくる。しかし、従局29より
下流側の伝送路に位置する従局27から従局22までの
返送情報内容は主局21に返送されなくなり、実質オー
ル1もしくはオール0となってしまうのである。
That is, for example, when the transmission path between the slave station 27 (high voltage 1) and the slave station 29 (high voltage red) is disconnected in the transmission path shown in FIG. The information content to be transmitted is from slave station 33 to slave station 2
Up to 9 is returned normally. However, the contents of the return information from the slave station 27 to the slave station 22 located on the transmission path downstream of the slave station 29 are not returned to the master station 21 and are substantially all ones or all zeros.

【0133】従って、ステップS27では、主局(CP
U)21において、情報内容がオール1もしくはオール
0であるか否かを判別する手段を設けることにより、伝
送路の断線もしくは短絡の判断を容易に且つコストアッ
プ無しに判断することが可能となる。
Therefore, in step S27, the main station (CP
In U) 21, by providing a means for determining whether the information content is all 1 or all 0, it is possible to easily determine the disconnection or short circuit of the transmission path without increasing the cost. .

【0134】図3は、図2のステップS27で行われる
断線・短絡処理手順を示すフローチャートである。
FIG. 3 is a flowchart showing a disconnection / short-circuiting procedure performed in step S27 of FIG.

【0135】伝送路に断線もしくは短絡がある場合、図
2のステップS19からステップS27へプログラムス
テップジャンプが実行されて、図3に示す処理が起動さ
れる。
If there is a disconnection or short circuit in the transmission path, a program step jump is executed from step S19 in FIG. 2 to step S27, and the processing shown in FIG. 3 is started.

【0136】まず、配線異常カウンタが所定値異常であ
るか否かを判別することにより、上記ステップS19で
判別された伝送路の断線・短絡状態がノイズ等の要因で
誤検知されているか否かが判別される(ステップS3
1)。ここで、伝送路に断線もしくは短絡が発生してい
る場合は、図2のステップS19から本手順へ連続して
ジャンプされてくるので、本手順が何回行われたかをカ
ウントする配線異常カウンタのカウンタ値を確認するこ
とにより誤検知されていないかどうかを判別するように
している。
First, by determining whether or not the wiring abnormality counter has a predetermined value abnormality, it is determined whether or not the disconnection / short-circuit state of the transmission path determined in step S19 is erroneously detected due to noise or the like. Is determined (step S3
1). Here, if a disconnection or a short circuit occurs in the transmission line, the procedure jumps from step S19 in FIG. 2 to this procedure, so that the wiring abnormality counter for counting how many times this procedure has been performed is performed. By checking the counter value, it is determined whether an erroneous detection has been made.

【0137】ステップS31の判別で、配線異常カウン
タが所定値未満である場合は、配線異常カウンタ値を
「1」インクリメントし(ステップS32)、初期化通
信をリトライさせるために再設定フラグを「0」にセッ
トするとともに通信ソフトリセットが行われ(ステップ
S33)、その後本手順が終了される。なお、配線異常
カウンタ値が所定値未満のまま伝送路が断線・短絡状態
ではないと判断された場合は、初期化通信が終了されて
通常通信へ処理が移行され、シリアル通信が実行され
る。
If it is determined in step S31 that the wiring abnormality counter is smaller than the predetermined value, the wiring abnormality counter value is incremented by "1" (step S32), and the reset flag is set to "0" in order to retry the initialization communication. ”, And communication software reset is performed (step S33), and then this procedure is terminated. If it is determined that the transmission line is not in the disconnected / short circuit state while the wiring abnormality counter value is less than the predetermined value, the initialization communication is terminated, the process is shifted to the normal communication, and the serial communication is executed.

【0138】また、ステップS31の判別で、配線異常
カウンタの値が所定値以上である場合は、伝送路の断線
・短絡状態であると判断され、シリアル通信装置の異常
動作処理を制御する通信異常フラグにおける、伝送路の
断線・短絡を示す該当ビットが所定の値にセットされる
(ステップS34)。そして、図9に示すメモリ内容か
ら、伝送路中どの部分で断線もしくは短絡しているかを
判断する解析制御が開始される。
If it is determined in step S31 that the value of the wiring abnormality counter is equal to or greater than a predetermined value, it is determined that the transmission line is disconnected or short-circuited, and a communication abnormality that controls abnormal operation processing of the serial communication device is determined. The corresponding bit indicating the disconnection / short circuit of the transmission line in the flag is set to a predetermined value (step S34). Then, from the memory contents shown in FIG. 9, analysis control for determining which part in the transmission path is disconnected or short-circuited is started.

【0139】本手順を実行しているときは、初期化通信
の再設定途中で本手順にジャンプしてくるため、メモリ
ポインタは伝送路中の断線・短絡がある部分(従局)を
示し、その値がホールドされている。そこで、メモリポ
インタが示す値までのメモリ設定数をカウントすること
で、メモリ内容から伝送路中どの部分で断線・短絡して
いるかを判断することができる。
When this procedure is being executed, the procedure jumps to this procedure in the course of resetting the initialization communication. Therefore, the memory pointer indicates a portion (slave station) in the transmission path where a disconnection or short circuit occurs. The value is being held. Therefore, by counting the number of memory settings up to the value indicated by the memory pointer, it is possible to determine from the contents of the memory which part of the transmission path is disconnected or short-circuited.

【0140】具体的には、まず、メモリ操作のためのメ
モリポインタの代用として使用する検出ポインタと、現
状の伝送路に接続された従局中何番目に属する従局であ
るかを示す異常従局カウンタと、異常従局を表示するた
めの表示指示カウンタとが「00H」に初期化される
(ステップS35)。そして、ステップS35で「00
H」に初期化された検出ポインタがインクリメントされ
(ステップS36)、これによりメモリ内容アクセスが
初期位置に設定される。この状態で、基本となるメモリ
マップの従局並列出力情報であるメモリマップの先頭値
アドレスMTOと検出ポインタの値とを加算した値で示
されるメモリアドレスの内容がピックアップされて、そ
の上位4ビットの内容が取得され(ステップS37)、
その値が「00H」であるか否かが判別される(ステッ
プS38)。
More specifically, first, a detection pointer used as a substitute for a memory pointer for memory operation, and an abnormal slave station counter indicating the order of the slave station belonging to the current slave station connected to the current transmission line. Then, a display instruction counter for displaying the abnormal slave station is initialized to "00H" (step S35). Then, in step S35, "00"
The detection pointer initialized to "H" is incremented (step S36), whereby the memory content access is set to the initial position. In this state, the contents of the memory address indicated by the sum of the start value address MTO of the memory map, which is the slave-station parallel output information of the basic memory map, and the value of the detection pointer are picked up, and the upper 4 bits of the contents are picked up. The content is obtained (step S37),
It is determined whether the value is "00H" (step S38).

【0141】ステップS38の判別で、「00H」では
ない場合は、現在異常チェックの対象になっている従局
が正常であるので、異常従局カウンタが「1」インクリ
メントされる(ステップS39)。また、ステップS3
8の判別で、「00H」である場合は、ステップS39
の処理がスキップされる。
If it is not "00H" in the determination at step S38, the slave station currently being checked for abnormality is normal, and the abnormal slave station counter is incremented by "1" (step S39). Step S3
If the determination in step 8 is "00H", step S39 is reached.
Is skipped.

【0142】そして、現時点ですでに再設定されている
メモリに対応する従局の異常チェックが終了したか否か
を判別するために、再設定途中で記憶保持されているメ
モリポインタの値が検出ポインタの値と等しいか否かが
判別され(ステップS40)、等しくない場合はステッ
プS36の処理が再び行われる。また、メモリポインタ
の値が検出ポインタの値と等しい場合は、異常チェック
が終了したと判断される。
In order to determine whether or not the abnormality check of the slave station corresponding to the memory that has already been reset at this time has been completed, the value of the memory pointer stored and held during the resetting is detected. Is determined (step S40), and if not, the process of step S36 is performed again. If the value of the memory pointer is equal to the value of the detection pointer, it is determined that the abnormality check has been completed.

【0143】この処理の結果、異常従局カウンタには、
現状の伝送路に存在すると判断され、且つ伝送路が断線
・短絡されていない(つまり主局へと伝送路が繋がって
いる)と判断される従局数がカウントされていることに
なる。そこで、この異常従局カウンタ値はメモリ保持さ
れる(ステップS41)。以上の処理により、伝送路異
常の自己診断が完了される。
As a result of this processing, the abnormal slave station counter contains:
The number of slave stations that are determined to be present in the current transmission path and that are determined to be not disconnected or short-circuited (that is, the transmission path is connected to the master station) is counted. Therefore, the abnormal slave station counter value is stored in the memory (step S41). With the above processing, the self-diagnosis of the transmission path abnormality is completed.

【0144】つまり、この伝送路異常事故診断は、現状
の伝送路に接続された従局の再設定中に伝送路の断線も
しくは短絡で中断された状態を維持して、中断されるま
でに伝送路にあると確認された従局数をカウントするこ
とにより、現状伝送路の従局配列順番中、何番目まで正
常であったかを確認し、これによって伝送路の断線・短
絡位置を検出することができる。
That is, this transmission path abnormality accident diagnosis is performed by maintaining the state interrupted by the disconnection or short circuit of the transmission path during resetting of the slave station connected to the current transmission path, and by the time the transmission path is interrupted. By counting the number of slave stations confirmed to be in the above order, it is possible to check the normal order in the slave station arrangement order of the current transmission line, and thereby to detect the disconnection / short-circuit position of the transmission line.

【0145】ステップS41の処理により伝送路の断線
・短絡位置が従局配列順番の何番目であるかが記憶保持
されると、次に、シリアル通信装置の伝送路異常個所を
サービスマンが容易に視認し、ユニット交換を短時間で
行うことが出来るように、図1に示したLEDを用いて
異常個所を表示する処理が行われる。
When the number of the disconnection / short-circuit position of the transmission line in the sequence of the slave stations is stored and held by the processing of step S41, the serviceman can easily visually recognize the transmission line abnormal portion of the serial communication device. Then, a process of displaying an abnormal part using the LED shown in FIG. 1 is performed so that the unit can be replaced in a short time.

【0146】すなわち、LEDがオン状態になる内容で
シフト転送が行われ、表示指示カウンタが「1」インク
リメントされ(ステップS42)、表示指示カウンタの
値が伝送路に接続可能な全従局数(メモリに再設定され
る前での状態における従局数)を4倍した値と等しいか
否かが判別される(ステップS43)。これは、伝送路
に接続され得る従局数に1従局4ビット構成文のシフト
転送ビット数分を転送し終えたか否かをチェックするも
のであって、接続され得る全LEDに対してオン指示を
出力するために行われる。LEDオン指示のシフト転送
が終了されるまでは、ステップS42及びステップS4
3の処理が繰り返される。
That is, shift transfer is performed with the content that the LED is turned on, the display instruction counter is incremented by "1" (step S42), and the value of the display instruction counter is set to the total number of slave stations connectable to the transmission line (memory). Is determined to be equal to four times the number of slave stations in the state before resetting to (step S43). This is to check whether or not the number of shift transfer bits of one 4-bit configuration sentence has been transferred to the number of slaves that can be connected to the transmission line. Done to output. Steps S42 and S4 are performed until the shift transfer of the LED-on instruction is completed.
Step 3 is repeated.

【0147】これにより、伝送路に断線・短絡の影響が
ない正常従局のLEDはオン点灯するが、伝送路の断線
・短絡の影響がある、伝達不能従局のLEDはオフ消灯
することになる。例えば、従局27と従局29との間で
断線している場合には、主局21からのLEDオン出力
は従局22、23、25及び27には伝達され、これら
が有するLEDはオン点灯される。しかし、従局29、
32及び33には主局21からのLEDオン出力が伝達
されないので、その付随するLEDは点灯しない。従っ
て、このシリアル通信装置のメンテナンスの際には、こ
のLED点灯を目視することにより、伝送路の断線もし
くは短絡が発生している個所を容易に認識することがで
きる。なお、伝送路の断線・短絡状態は、一旦機器装置
の電源をオフにしても解消することは無いため、サービ
スマンによるメンテナンス時の電源投入により、直ちに
確認することができる。
As a result, the LED of the normal slave station, which is not affected by the disconnection / short circuit on the transmission line, is turned on, but the LED of the slave station, which cannot be transmitted, is affected by the disconnection / short circuit of the transmission path, is turned off. For example, when there is a disconnection between the slave station 27 and the slave station 29, the LED-on output from the master station 21 is transmitted to the slave stations 22, 23, 25, and 27, and the LEDs included therein are turned on. . However, slave station 29,
Since the LED ON output from the main station 21 is not transmitted to 32 and 33, the associated LED is not turned on. Therefore, at the time of maintenance of the serial communication device, by visually observing the LED lighting, it is possible to easily recognize the location where the transmission line is disconnected or short-circuited. Note that the disconnection / short-circuit state of the transmission line is not resolved even once the power of the device is turned off, and can be immediately confirmed by turning on the power at the time of maintenance by a serviceman.

【0148】その後、通信故障処理ルーチンが実行され
(ステップS44)、本手順は終了され、これによりシ
リアル通信タスクは終了される。
Thereafter, a communication failure processing routine is executed (step S44), and this procedure is terminated, whereby the serial communication task is terminated.

【0149】以上説明したように、本実施形態によれ
ば、伝送路の断線・短絡による通信普通状態を容易に自
己診断することができ、また、その自己診断結果を低コ
ストでサービスマンに知らせることができる。これによ
り、メンテナンスを短時間で行うことができる。
As described above, according to the present embodiment, the self-diagnosis of the normal communication state due to the disconnection / short-circuit of the transmission line can be easily performed, and the result of the self-diagnosis is notified to the service person at low cost. be able to. Thereby, maintenance can be performed in a short time.

【0150】なお、伝送路に設けたLED表示による異
常個所表示は、異常個所を特定することができるもので
あれば他の手段を採用してもよい。例えばサービスマン
が認識できる表示手段として、機器装置が有する当該機
器装置の操作表示部のセグメント表示部を用い、これに
異常従局カウント値の情報内容を表示することにより、
サービスマンは一目で伝送路の断線、短絡位置が従局配
列順番の何番目であるかを認識することができる。ま
た、例えば機器装置の設置などで利用される機器装置の
チェック冶具などに表示部を設けることにより、上記同
様に異常従局カウント値の値を表示することができる。
また、伝送路中に設けたLEDを冶具に用意して図1に
示したチェッカーを利用して表示するようにしてもよ
いことは言うまでもない。
It should be noted that any other means may be used for the indication of the abnormal location by the LED display provided on the transmission line as long as the abnormal location can be specified. For example, as a display means that can be recognized by a serviceman, by using a segment display unit of the operation display unit of the device device that the device device has, by displaying the information content of the abnormal slave station count value on this,
At a glance, a serviceman can recognize the position of the disconnection or short circuit of the transmission line in the order of arrangement of the slave stations. Further, by providing a display unit on a check jig of an equipment used for installation of the equipment, for example, the value of the abnormal slave station count value can be displayed in the same manner as described above.
It goes without saying that the LED provided in the transmission path may be prepared in a jig and displayed using the checker shown in FIG.

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

【0152】本実施形態は、上述した第1実施形態と同
様に、返信情報内容判断のステップで伝送路異常を判定
し、伝送路異常自己診断、通信伝送路異常個所表示を行
うものであるが、第1実施形態においてはシリアル通信
動作が初期化通信を実行中に返送情報内容判断を行って
伝送路の断線若しくは短絡を検出するのに対し、本実施
形態では、シリアル通信動作が初期化通信を終えた後に
各従局の有する情報内容との情報交換を行う通常通信の
実行中に返送情報内容判断を行うことにより、伝送路の
断線もしくは短絡を検出する。すなわち、本実施形態
は、返送情報内容判断を実行するタイミングが第1実施
形態と相違する。
In the present embodiment, as in the first embodiment described above, the transmission path abnormality is determined in the step of determining the reply information content, and the transmission path abnormality self-diagnosis is performed and the communication transmission path abnormality location is displayed. In contrast, in the first embodiment, the serial communication operation determines the return information content during execution of the initialization communication to detect a disconnection or a short circuit in the transmission path. After completion of the process, the return information content is determined during the execution of the normal communication for exchanging information with the information content of each slave station, thereby detecting the disconnection or short circuit of the transmission path. That is, the present embodiment is different from the first embodiment in the timing of executing the return information content determination.

【0153】図4及び図5は、本実施形態に係るシリア
ル通信装置において実行される通常通信手順を示すフロ
ーチャートである。
FIGS. 4 and 5 are flowcharts showing a normal communication procedure executed in the serial communication device according to the present embodiment.

【0154】本実施形態における通常通信では、シフト
転送実行によって、主局に返送される各従局情報をメモ
リに保存するときに、伝送路の断線をチェックするよう
に構成される。なお、通常通信における伝送路の断線チ
ェックを実行するには、以下に述べる前提条件を満足す
る形態が必要である。
In the normal communication according to the present embodiment, when each slave station information returned to the master station is stored in the memory by executing the shift transfer, the disconnection of the transmission line is checked. In order to perform a disconnection check of a transmission line in normal communication, a form that satisfies the following prerequisites is required.

【0155】その前提条件とは、本実施形態における断
線チェックを行う場合、従来例で述べたように、通常通
信が実行する各従局との情報交換で、その情報内容にオ
ール1またはオール0も含めて、あらゆる状態の信号が
返送され得るということである。
The precondition is that, when the disconnection check in the present embodiment is performed, as described in the conventional example, information exchange with each slave station that executes normal communication includes all 1 or all 0 in the information content. Any state signal can be returned, including:

【0156】つまり、第1実施形態のように正常に返送
される情報内容にはオール1またはオール0が含まれて
いない、という状態とは相違する。従って、通常通信実
行における伝送路の断線を認知するためには、各従局か
ら返送される情報内容に固定値ビットを設ける必要があ
る。ここでは、4ビット構成のうち1ビットはゼロ固定
した情報内容を付加する。これにより、4ビット構成の
従局からの返送情報内容は、3ビットの情報と1ビット
の固定値とから構成されることになる。このように、前
提条件で従局からの返送情報内容がオール1にならない
ような構成とすることが、本実施形態を実現するうえで
必要である。なお、固定値ビットを「0」とした場合に
はオール1が、また、固定値ビットを1とした場合には
オール0が、返送情報内容に存在しないように構成する
ために、上記いずれかの状態を予め選択する必要があ
る。更に、4ビット構成の従局からの返送情報内容は2
ビットを情報とし、2ビットは固定値(1及び0の両
方)とすれば、第1実施形態と同様に、正常に返送され
る情報内容にオール1又はオール0を含まないように構
成することが可能である。
That is, this is different from the state in which the information contents normally returned as in the first embodiment do not include all 1s or all 0s. Therefore, in order to recognize the disconnection of the transmission line in the execution of the normal communication, it is necessary to provide a fixed value bit in the information content returned from each slave station. Here, one bit of the 4-bit configuration adds information content fixed to zero. As a result, the content of the return information from the slave station having the 4-bit configuration is composed of the 3-bit information and the 1-bit fixed value. As described above, it is necessary to realize a configuration in which the content of the return information from the slave station does not become all 1 under the preconditions. Note that, in order to configure so that the fixed value bit is “0”, all 1s are set, and when the fixed value bit is set to 1, all 0s are not included in the return information content. Must be selected in advance. Further, the content of the return information from the slave station of 4-bit configuration is 2
Assuming that the bits are information and the two bits are fixed values (both 1 and 0), similarly to the first embodiment, the information content returned normally does not include all 1s or all 0s. Is possible.

【0157】本実施形態では、上述した前提条件にのう
ち、4ビットの返送情報内容を3ビットの情報と1ビッ
トの固定値「0」とから構成する場合について説明す
る。つまり、返送情報内容がオール1と判別された場合
に、伝送路に異常が発生していると判定する。
In the present embodiment, among the preconditions described above, a case will be described where the 4-bit return information content is composed of 3-bit information and a 1-bit fixed value "0". That is, when the return information content is determined to be all 1, it is determined that an abnormality has occurred in the transmission path.

【0158】図4において、通常通信手順が開始される
と、まず通信ソフトリセットが実行され、通信実行の同
期が取られる(ステップS51)。また、通信異常フラ
グ、メモリポインタ、位相制御カウンタ及びクロック数
カウンタがそれぞれリセットされて「00H」にされる
(ステップS52)。そして、メモリ操作のためのメモ
リポインタがインクリメントされ、(ステップS5
3)、主局位相制御カウンタから制御カウンタ値がロー
ドされ(ステップS54)、その制御カウンタ値が所定
値であるか否かが判別される(ステップS55)。ここ
では、従局からシフト転送される従局入力情報が選択さ
れたときの「00H」シフト転送を一巡実行したときの
「06H」の2値で判別が行われる。更に、シフト転送
を二巡実行した後の2度読み比較の結果のときを「0D
H」に設定し、後述するステップで判別に使用してい
る。一方、従局通信要求信号の有効期間を「0EH」と
設定しているが、ここでは、特にタイミング判定の実行
はしていないものの、通常通信での通信動作を終了し、
次回に通信実行可能状態を「0EH」にするように制御
している。
In FIG. 4, when the normal communication procedure is started, a communication software reset is first performed to synchronize the execution of communication (step S51). Further, the communication abnormality flag, the memory pointer, the phase control counter, and the clock number counter are reset to “00H” (step S52). Then, the memory pointer for the memory operation is incremented (step S5).
3) The control counter value is loaded from the main station phase control counter (step S54), and it is determined whether the control counter value is a predetermined value (step S55). Here, the discrimination is performed based on the binary value of "06H" when the shift transfer from the slave station is selected and "00H" when the shift input is selected. Further, the result of the double reading comparison after performing the shift transfer twice has been described as "0D
H ", which 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 ends.
Control is performed so that the communication executable state is set to “0EH” next time.

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

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

【0161】ステップS56の判別で返送位相信号のオ
ンチェック時にオフであった場合、またはステップS5
7の判別で返送位相信号のオフチェック時にオンであっ
た場合は、位相タイミングの同期がずれていると判断さ
れる。そこで、通信異常フラグの位相エラービットに
「1」がセットされ(ステップS58)、通信ソフトリ
セットがオンされて(ステップS59)、通常通信がキ
ャンセルされる。
If it is determined in step S56 that the return phase signal is off at the time of on-check, or if step S5
If the return phase signal is on when the return phase signal is off-checked in the determination of 7, 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 S58), the communication software reset is turned on (step S59), and the normal communication is canceled.

【0162】ステップS56又はステップS57で返送
位相信号が正常であると判断された場合は、通常通信が
開始される。
When it is determined in step S56 or S57 that the return phase signal is normal, normal communication is started.

【0163】まず、メモリポインタ値と従局並列出力情
報に示される再設定終了したメモリマップの先頭値アド
レスMTOとの加算値が、メモリマップの最終値アドレ
スMTEの等しいか否かが判別される(ステップS6
0)。
First, it is determined whether or not the sum of the memory pointer value and the head value address MTO of the reset-completed memory map indicated by the slave station parallel output information is equal to the final value address MTE of the memory map. Step S6
0).

【0164】この判別で、両者が等しくない場合は、シ
フト転送がまだ終了していないので、メモリポインタ値
とメモリマップの先頭値アドレスMTOとの加算値アド
レスが示すメモリ内容の上位4ビットが取得され(ステ
ップS61)、その値が「00H」であるか否かが判別
される(ステップS62)。ここで、「00H」である
場合は、再設定で登録された従局が無いので、再びステ
ップS53に戻り、メモリポインタ値をインクリメント
して、メモリマップの次の従局におけるシフト転送が開
始される。
In this discrimination, if they are not equal, the shift transfer has not been completed yet, so 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 S61), and it is determined whether or not the value is "00H" (step S62). Here, if it is “00H”, there is no slave station registered by the resetting, so the flow returns to step S53 again, the memory pointer value is incremented, and shift transfer at the next slave station in the memory map is started.

【0165】また、ステップS62の判別で、「00
H」ではない場合は、そのメモリ内容の下位4ビットが
取得され(ステップS63)、シフト転送のため1ビッ
トシフトが実行される(ステップS64)。すなわち、
ステップS64では、1ビット分の内容がシフト出力さ
れ、転送クロックが1クロック出力され、クロック数カ
ウンタが「1」だけインクリメントされる。さらに、主
局が有するクロック数カウンタ手段の値が所定値である
か否かが判別され(ステップS65)、所定値である場
合は主局及び従局が各々有する位相制御カウンタの制御
カウント値がそれぞれ「1」インクリメントされる(ス
テップS66)。一方、ステップS65の判別で、クロ
ック数カウンタ手段の値が所定値ではない場合は、ステ
ップS66の処理はスキップされる。そして、シフト転
送による1ビットの返送信号が入力され(ステップS6
7)、1つの従局分である4ビット分のシフト転送が完
了したか否かが判別される(ステップS68)。この判
別で、4ビット分のシフト転送が完了していない場合は
再びステップS64処理が行われる。
In the determination in step S62, "00"
If not "H", the lower 4 bits of the memory content are obtained (step S63), and one-bit shift is performed for shift transfer (step S64). That is,
In step S64, the contents of one bit are shifted out, one transfer clock is output, 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 S65). 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 S66). On the other hand, if it is determined in step S65 that the value of the clock number counter is not the predetermined value, the process of step S66 is skipped. Then, a 1-bit return signal from the shift transfer is input (step S6).
7) It is determined whether or not 4-bit shift transfer corresponding to one slave station has been completed (step S68). If it is determined in this determination that the 4-bit shift transfer has not been completed, step S64 is performed again.

【0166】ステップS68の判別で、4ビット(1従
局分)のシフト転送が完了した場合は、その4ビットデ
ータが、オール1であるか否かが判別される(ステップ
S69)。
If the shift transfer of 4 bits (for one slave station) is completed in the determination in step S68, it is determined whether or not the 4-bit data is all 1s (step S69).

【0167】この判別で、オール1である場合は、現在
の通常通信実行中の状態が維持されて、断線・短絡ルー
チンが実行される(ステップS71)。この処理は、上
述した第1実施形態の図3に示したフローチャートに従
って実行される。
If the result of this determination is all 1s, the current state of normal communication is maintained, and the disconnection / short circuit routine is executed (step S71). This process is executed according to the flowchart shown in FIG. 3 of the first embodiment.

【0168】このように、本実施形態によれば、通常通
信手段を実行している場合であっても常にシフト転送の
伝送路の断線状態の自己診断を行うことができるのであ
る。
As described above, according to the present embodiment, the self-diagnosis of the disconnection state of the transmission path of the shift transfer can be always performed even when the normal communication means is executed.

【0169】ステップS69の判別で、オール1ではな
い場合は、正常な従局返送情報内容であると判断され、
ステップS70以降の処理が行われる。すなわち、入力
された4ビットデータが図9(d)に示すメモリマップ
の従局並列入力情報にストアされる(ステップS6
9)。具体的には、メモリポインタ値と従局並列入力情
報のメモリマップの先頭値アドレスMTIとの加算値ア
ドレスが示すメモリ内容の下位4ビットに、シフト転送
された4ビット分のデータがストアされ、これにより、
情報内容が更新される。そして、従局のシフト転送を実
行するために以上の動作を繰返すため、再びステップS
53の処理が実行される。そして、上述したように、ス
テップS60において、シフト転送される従局のデータ
スキャンが一巡して終了したと判別された場合は、通常
通信実行後の処理が行われる。
If it is not all 1 in the determination in step S69, it is determined that the content of the slave station return information is normal, and
The processing after step S70 is performed. That is, the input 4-bit data is stored in the slave station parallel input information of the memory map shown in FIG. 9D (step S6).
9). 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. By
The information content is updated. Then, in order to repeat the above operation in order to execute the shift transfer of the slave station, step S is executed again.
53 is executed. Then, as described above, if it is determined in step S60 that the data scan of the slave station to be shifted and transferred has completed one cycle, processing after execution of normal communication is performed.

【0170】すなわち、位相制御カウンタの制御カウン
タ値が「0DH」にセットされ(ステップS72)、返
送位相信号がオンされているか否かが判別される(ステ
ップS73)。この判別で、返送位相信号がオンされて
いる場合は、いずれかの従局で2度読み比較でエラーが
発生したことを意味するために、通信異常フラグの2度
読み比較エラービットがセットされ(ステップS7
4)、リトライ通信を実行するための通信ソフトリセッ
トが実行され(ステップS75)、その後本手順が終了
される。
That is, the control counter value of the phase control counter is set to "0DH" (step S72), and it is determined whether or not the return phase signal is on (step S73). 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 S7
4), a communication software reset for executing retry communication is executed (step S75), and the procedure is thereafter terminated.

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

【0172】以上説明したように、本実施形態によれ
ば、通常通信実行時にも伝送路異常自己診断処理を実行
することができる。
As described above, according to the present embodiment, the transmission path abnormality self-diagnosis processing can be executed even during normal communication.

【0173】なお、本実施形態における通信伝送路の断
線、短絡に対する自己診断は、シリアル通信を開始する
ときにチェックする構成(第1実施形態でいう初期化通
信時に実行する構成)のみで通常は充分であるが、本実
施形態のように通常通信時のみ実行するように構成して
もよいことはいうまでもない。また、第1実施形態と組
み合わせて、初期化通信時と通常通信時の両方で自己診
断を行うように構成してもよい。
Note that the self-diagnosis for disconnection and short-circuit of the communication transmission line in this embodiment is only a configuration that is checked when serial communication is started (a configuration that is executed at the time of initialization communication in the first embodiment). Although sufficient, it goes without saying that the configuration may be such that it is executed only during normal communication as in the present embodiment. Further, in combination with the first embodiment, the self-diagnosis may be performed both during the initialization communication and during the normal communication.

【0174】(他の実施形態)なお、本発明は、シリア
ル通信装置に上述した実施形態の機能を実現するソフト
ウエアのプログラムコードを記録した記憶媒体を供給
し、そのシリアル通信装置のCPUが記憶媒体に格納さ
れたプログラムコードを読み出し実行することによって
も、本発明の目的が達成されることはいうまでもない。
(Other Embodiments) 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 device, and a CPU of the serial communication device stores the program code. It goes without saying that the object of the present invention is also achieved by reading and executing the program code stored in the medium.

【0175】この場合、記憶媒体から読み出されたプロ
グラムコード自体が本発明の新規な機能を実現すること
になり、そのプログラムコードを記憶した記憶媒体は本
発明を構成することになる。
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.

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

【0177】また、コンピュータが読み出したプログラ
ムコードを実行することにより上述した実施形態の機能
が実現されるだけでなく、そのプログラムコードの指示
に基づいて、コンピュータ上で稼動しているOS等が実
際の処理の一部または全部を行い、その処理によって前
述した実施形態の機能が実現される場合も含まれること
はいうまでもない。
Further, not only the functions of the above-described embodiment are realized by the computer executing the readout program code, but also the OS or the like running on the computer is actually executed based on the instruction 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.

【0178】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張ボー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書き込まれた後、そのプログラムコードの指
示に基づいて、その機能拡張ボードや機能拡張ユニット
に備わるCPU等が実際の処理の一部または全部を行
い、その処理によって前述した実施形態の機能が実現さ
れる場合も含まれることはいうまでもない。
Further, after the program code read from the storage medium is written into 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.

【0179】[0179]

【発明の効果】以上説明したように、請求項1乃至3の
シリアル通信装置または請求項7乃至9のシリアル通信
装置の異常検出方法によれば、シフト転送を利用して従
局から主局へ返送されてくる従局情報の内容を判別し、
前記判別結果に基いて前記シフト転送のための伝送路ま
たは前記シリアル転送クロックのための伝送路の異常を
検出するようにしたので、伝送路の断線・短絡による従
局の異常をより容易に検出することができるという効果
が得られる。
As described above, according to the abnormality detection method for the serial communication device according to the first to third aspects or the serial communication device according to the seventh to ninth aspects, the slave station returns to the master station using shift transfer. The contents of the slave station information
Since the abnormality of the transmission line for the shift transfer or the transmission line for the serial transfer clock is detected based on the determination result, the abnormality of the slave station due to disconnection or short circuit of the transmission line can be more easily detected. The effect that it can be obtained is obtained.

【0180】請求項4乃至6のシリアル通信装置または
請求項10乃至12のシリアル通信装置の異常検出方法
によれば、前記シフト転送のために伝送路に存在する前
記複数の従局の配列に対応させて、前記シフト転送のた
めの伝送路または前記シリアル転送クロックのための伝
送路の異常を検出したときに、当該異常個所を表示する
ようにしたので、伝送路の断線・短絡による異常を容易
に自己診断することができ、また、その自己診断結果を
低コストでサービスマンに知らせることができる。これ
により、メンテナンスを短時間で行うことができるとい
う効果が得られる。
According to the serial communication device according to claims 4 to 6 or the abnormality detection method for serial communication devices according to claims 10 to 12, it is possible to correspond to the arrangement of the plurality of slave stations existing on the transmission path for the shift transfer. When an abnormality is detected in the transmission line for the shift transfer or the transmission line for the serial transfer clock, the abnormal portion is displayed, so that abnormality due to disconnection or short circuit in the transmission line can be easily performed. Self-diagnosis can be performed, and the result of the self-diagnosis can be notified to a service person at low cost. As a result, an effect that maintenance can be performed in a short time is obtained.

【0181】請求項13乃至15の記録媒体によれば、
一つの主局を中心に複数の従局を有する伝送路で構成さ
れるシリアル通信装置であって、前記主局が発するシリ
アル転送クロックに同期して当該主局から前記複数の従
局への出力情報をシフト転送し、且つ前記シフト転送を
利用して前記複数の従局から主局へ従局情報を返送する
ことにより前記主局と前記複数の従局との情報交換を実
行するためのシリアル通信を行うシリアル通信装置のコ
ンピュータにより読み取り可能な形式で異常検出プログ
ラムを記録した記録媒体において、前記異常検出プログ
ラムは、前記シフト転送を利用して当該主局へ返送され
てくる従局情報の内容を判別する返送情報内容判別工程
と、前記返送情報内容判別工程の判別結果に基いて前記
シフト転送のための伝送路または前記シリアル転送クロ
ックのための伝送路の異常を検出する伝送路異常検出工
程とを含むようにしたので、従来のシリアル通信装置の
コンピュータに当該記録媒体に記録されている異常検出
プログラムを読み取らせて実行させることにより上述し
た請求項1乃至3のシリアル通信装置と同等の効果を得
ることができる。
According to the recording medium of claims 13 to 15,
A serial communication device including a transmission line having a plurality of slave stations centered on one master station, wherein output information from the master station to the plurality of slave stations is synchronized with a serial transfer clock generated by the master station. Serial communication for performing shift transfer and performing serial communication for performing 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 a recording medium recording an abnormality detection program in a format readable by a computer of the apparatus, the abnormality detection program determines the content of slave station information returned to the master station using the shift transfer. A transmission step for the shift transfer or a transmission for the serial transfer clock based on a determination result of the determination step and the return information content determination step. And a transmission line abnormality detecting step of detecting an abnormality of the serial communication device, so that the computer of the conventional serial communication apparatus reads and executes the abnormality detection program recorded on the recording medium. The same effects as those of the serial communication devices of Nos. 1 to 3 can be obtained.

【0182】請求項16乃至18の記録媒体によれば、
前記異常検出プログラムは、前記シフト転送のために伝
送路に存在する前記複数の従局の配列に対応させて、前
記シフト転送のための伝送路または前記シリアル転送ク
ロックのための伝送路の異常個所を表示する伝送路異常
個所表示工程を含むようにしたので、従来のシリアル通
信装置のコンピュータに当該記録媒体に記録されている
異常検出プログラムを読み取らせて実行させることによ
り上述した請求項4乃至6のシリアル通信装置と同等の
効果を得ることができる。
According to the recording medium of claims 16 to 18,
The abnormality detection program is configured to detect an abnormal portion of the transmission path for the shift transfer or the transmission path for the serial transfer clock in accordance with the arrangement of the plurality of slave stations present on the transmission path for the shift transfer. 7. The method according to claim 4, further comprising the step of displaying a transmission path abnormality location displaying step, by causing a computer of the conventional serial communication apparatus to read and execute an abnormality detection program recorded on the recording medium. The same effect as that of the serial communication device can be obtained.

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

【図1】本発明の第1実施形態に係るシリアル通信装置
における現状での伝送路の従局配列順番の一例を示した
伝送路図である。
FIG. 1 is a transmission path diagram showing an example of a sequence of arrangements of slave stations in a current state of a transmission path in a serial communication device according to a first embodiment of the present invention.

【図2】本実施形態にかかるシリアル通信装置における
シリアル通信タスクで行われる初期化通信手順を示すフ
ローチャートである。
FIG. 2 is a flowchart showing an initialization communication procedure performed in a serial communication task in the serial communication device according to the embodiment.

【図3】図2のステップS27で行われる断線・短絡処
理手順を示すフローチャートである。
FIG. 3 is a flowchart showing a disconnection / short-circuit processing procedure performed in step S27 of FIG. 2;

【図4】本発明の第2実施形態に係るシリアル通信装置
において実行される通常通信手順を示すフローチャート
である。
FIG. 4 is a flowchart showing a normal 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 normal 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 (18)

【特許請求の範囲】[Claims] 【請求項1】 一つの主局を中心に複数の従局を有する
伝送路で構成されるシリアル通信装置であって、前記主
局が発するシリアル転送クロックに同期して当該主局か
ら前記複数の従局への出力情報をシフト転送し、且つ前
記シフト転送を利用して前記複数の従局から主局へ従局
情報を返送することにより前記主局と前記複数の従局と
の情報交換を実行するためのシリアル通信を行うシリア
ル通信装置において、 前記主局は、 前記シフト転送を利用して当該主局へ返送されてくる従
局情報の内容を判別する返送情報内容判別手段と、 前記返送情報内容判別手段の判別結果に基いて前記シフ
ト転送のための伝送路または前記シリアル転送クロック
のための伝送路の異常を検出する伝送路異常検出手段と
を備えることを特徴とするシリアル通信装置。
1. A serial communication apparatus comprising a transmission line having a plurality of slave stations centered on one master station, wherein the plurality of slave stations are transmitted from the master station in synchronization with a serial transfer clock generated by the master station. Serial transfer for performing information exchange between the master station and the plurality of slave stations by shifting the output information to the master station and returning slave station information from the plurality of slave stations to the master station using the shift transfer. In the serial communication device for performing communication, the master station uses return information to determine the content of slave station information returned to the master station using the shift transfer. A transmission path abnormality detecting means for detecting an abnormality in the transmission path for the shift transfer or the transmission path for the serial transfer clock based on the result. Place.
【請求項2】 前記主局は、前記複数の従局との情報交
換を実行するためのシリアル通信を行う前に、現状の伝
送路に接続される従局の従局配列順番を認識するための
初期化通信を行う初期化通信手段を備え、 前記伝送路異常検出手段は、前記初期化通信手段による
初期化通信時に、前記返送情報内容判別手段の判別結果
に基づいて、予め登録された識別子情報内容以外の内容
を受信したと判別したときに、前記シフト転送のための
伝送路または前記シリアル転送クロックのための伝送路
の異常を検出するように構成されることを特徴とする請
求項1記載のシリアル通信装置。
2. An initialization for recognizing an arrangement sequence of slave stations connected to a current transmission line before performing serial communication for executing information exchange with the plurality of slave stations. Initializing communication means for performing communication, the transmission path abnormality detecting means, based on the determination result of the return information content determining means at the time of initialization communication by the initializing communication means, other than the content of identifier information registered in advance The serial device according to claim 1, wherein when it is determined that the content of the serial transfer has been received, an abnormality in the transmission line for the shift transfer or the transmission line for the serial transfer clock is detected. Communication device.
【請求項3】 前記主局は、前記複数の従局との情報交
換を実行するためのシリアル通信を行う前に、現状の伝
送路に接続される従局の従局配列順番を認識するための
初期化通信を行う初期化通信手段を備え、 前記伝送路異常検出手段は、前記初期化通信手段による
初期化通信時に、前記返送情報内容判別手段の判別結果
に基づいて、所定の識別子情報内容を受信したと判別し
たときに、前記シフト転送のための伝送路または前記シ
リアル転送クロックのための伝送路の異常を検出するよ
うに構成されることを特徴とする請求項1記載のシリア
ル通信装置。
3. An initialization for recognizing an arrangement sequence of slave stations connected to a current transmission line before performing serial communication for executing information exchange with the plurality of slave stations. Comprising an initialization communication means for performing communication, the transmission path abnormality detection means, at the time of initialization communication by the initialization communication means, based on a determination result of the return information content determination means, received a predetermined identifier information content 2. The serial communication device according to claim 1, wherein when it is determined that the transmission path for the shift transfer or the transmission path for the serial transfer clock is abnormal.
【請求項4】 前記シフト転送のために伝送路に存在す
る前記複数の従局の配列に対応させて、前記シフト転送
のための伝送路または前記シリアル転送クロックのため
の伝送路の異常個所を表示する伝送路異常個所表示手段
を備えることを特徴とする請求項1〜3のいずれか1項
記載のシリアル通信装置。
4. An abnormal portion of the transmission path for the shift transfer or the transmission path for the serial transfer clock is displayed in correspondence with the arrangement of the plurality of slave stations existing on the transmission path for the shift transfer. The serial communication device according to any one of claims 1 to 3, further comprising a transmission line abnormality location display unit that performs the operation.
【請求項5】 前記伝送路異常個所表示手段は、前記複
数の従局が属する電気ユニットに対応する発光ダイオー
ドを有し、前記発光ダイオードを用いて前記シフト転送
のための伝送路または前記シリアル転送クロックのため
の伝送路の異常個所を表示するように構成されることを
特徴とする請求項4記載のシリアル通信装置。
5. The transmission path abnormal point display means includes a light emitting diode corresponding to an electric unit to which the plurality of slave stations belong, and using the light emitting diode, a transmission path for the shift transfer or the serial transfer clock. 5. The serial communication device according to claim 4, wherein the communication device is configured to display an abnormal portion of the transmission path for the communication.
【請求項6】 前記伝送路異常個所表示手段は、前記シ
リアル通信装置が利用されるシステムが有している表示
手段または前記システムの状態を診断する診断装置が有
する表示手段上に、前記異常個所を表示するように構成
されることを特徴とする請求項4または5記載のシリア
ル通信装置。
6. The abnormal location of the transmission path is displayed on a display of a system using the serial communication device or a display of a diagnostic device for diagnosing the state of the system. The serial communication device according to claim 4, wherein the serial communication device is configured to display the following.
【請求項7】 一つの主局を中心に複数の従局を有する
伝送路で構成され、前記主局が発するシリアル転送クロ
ックに同期して当該主局から前記複数の従局への出力情
報をシフト転送し、且つ前記シフト転送を利用して前記
複数の従局から主局へ従局情報を返送することにより前
記主局と前記複数の従局との情報交換を実行するための
シリアル通信を行うシリアル通信装置の異常検出方法に
おいて、 前記シフト転送を利用して前記従局から前記主局へ返送
されてくる従局情報の内容を判別し、前記判別結果に基
いて前記シフト転送のための伝送路または前記シリアル
転送クロックのための伝送路の異常を検出することを特
徴とするシリアル通信装置の異常検出方法。
7. 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 the abnormality detection method, the content of slave information returned from the slave to the master using the shift transfer is determined, and a transmission path or the serial transfer clock for the shift transfer is determined based on the determination result. For detecting an abnormality in a transmission path for a serial communication device.
【請求項8】 前記複数の従局との情報交換を実行する
ためのシリアル通信を行う前に、現状の伝送路に接続さ
れる従局の従局配列順番を認識するための初期化通信を
行い、前記初期化通信時に、前記判別結果に基づいて、
予め登録された識別子情報内容以外の内容を受信したと
判別されたときに前記シフト転送のための伝送路または
前記シリアル転送クロックのための伝送路の異常を検出
することを特徴とする請求項7記載のシリアル通信装置
の異常検出方法。
8. Prior to performing serial communication for exchanging information with the plurality of slave stations, initialization communication for recognizing a slave station arrangement order of slave stations connected to a current transmission path is performed, At the time of initialization communication, based on the determination result,
8. An abnormality in the transmission path for the shift transfer or the transmission path for the serial transfer clock when it is determined that the content other than the content of the identifier information registered in advance is received. The method for detecting an abnormality of the serial communication device described in the above.
【請求項9】 前記複数の従局との情報交換を実行する
ためのシリアル通信を行う前に、現状の伝送路に接続さ
れる従局の従局配列順番を認識するための初期化通信を
行い、前記初期化通信時に、前記判別結果に基づいて、
所定の識別子情報内容を受信したと判別されたときに前
記シフト転送のための伝送路または前記シリアル転送ク
ロックのための伝送路の異常を検出することを特徴とす
る請求項7記載のシリアル通信装置の異常検出方法。
9. An initialization communication for recognizing a slave station arrangement order of slave stations connected to a current transmission line before performing serial communication for exchanging information with the plurality of slave stations, At the time of initialization communication, based on the determination result,
8. The serial communication device according to claim 7, wherein when it is determined that a predetermined identifier information content is received, an abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected. Abnormality detection method.
【請求項10】 前記シフト転送のために伝送路に存在
する前記複数の従局の配列に対応させて、前記シフト転
送のための伝送路または前記シリアル転送クロックのた
めの伝送路の異常を検出したときに、当該異常個所を表
示することを特徴とする請求項7〜9のいずれか1項記
載のシリアル通信装置の異常検出方法。
10. An abnormality in the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected in accordance with the arrangement of the plurality of slave stations present on the transmission path for the shift transfer. 10. The method for detecting an abnormality in a serial communication device according to claim 7, wherein the abnormal point is displayed at the time.
【請求項11】 前記複数の従局が属する電気ユニット
に対応する発光ダイオードをを用いて、前記異常個所を
表示することを特徴とする請求項11記載のシリアル通
信装置の異常検出方法。
11. The abnormality detection method for a serial communication device according to claim 11, wherein the abnormal location is displayed using a light emitting diode corresponding to an electric unit to which the plurality of slave stations belong.
【請求項12】 前記シリアル通信装置が利用されるシ
ステムが有している表示手段または前記システムの状態
を診断する診断装置が有する表示手段上に、前記異常個
所を表示することを特徴とする請求項10または11記
載のシリアル通信装置の異常検出方法。
12. The abnormal part is displayed on display means of a system using the serial communication device or display means of a diagnostic device for diagnosing the state of the system. Item 12. The method for detecting an abnormality in a serial communication device according to item 10 or 11.
【請求項13】 一つの主局を中心に複数の従局を有す
る伝送路で構成されるシリアル通信装置であって、前記
主局が発するシリアル転送クロックに同期して当該主局
から前記複数の従局への出力情報をシフト転送し、且つ
前記シフト転送を利用して前記複数の従局から主局へ従
局情報を返送することにより前記主局と前記複数の従局
との情報交換を実行するためのシリアル通信を行うシリ
アル通信装置のコンピュータにより読み取り可能な形式
で異常検出プログラムを記録した記録媒体において、 前記異常検出プログラムは、前記シフト転送を利用して
当該主局へ返送されてくる従局情報の内容を判別する返
送情報内容判別工程と、前記返送情報内容判別工程の判
別結果に基いて前記シフト転送のための伝送路または前
記シリアル転送クロックのための伝送路の異常を検出す
る伝送路異常検出工程とを含むことを特徴とする記録媒
体。
13. A serial communication device comprising a transmission line having a plurality of slave stations centering on one master station, wherein the plurality of slave stations are transmitted from the master station in synchronization with a serial transfer clock generated by the master station. Serial transfer for performing information exchange between the master station and the plurality of slave stations by shifting the output information to the master station and returning slave station information from the plurality of slave stations to the master station using the shift transfer. In a recording medium recording an abnormality detection program in a format readable by a computer of a serial communication device that performs communication, the abnormality detection program stores the content of slave station information returned to the master station using the shift transfer. A return information content determining step of determining, and a transmission path for the shift transfer or the serial transfer clock based on the determination result of the return information content determining step. Recording medium, characterized in that it comprises a transmission line abnormality detecting process of detecting an abnormality in the transmission path for the click.
【請求項14】 前記異常検出プログラムは、前記複数
の従局との情報交換を実行するためのシリアル通信を行
う前に、現状の伝送路に接続される従局の従局配列順番
を認識するための初期化通信を行う初期化通信工程を含
み、 前記伝送路異常検出工程においては、前記初期化通信工
程における初期化通信時に、前記判別結果に基づいて、
予め登録された識別子情報内容以外の内容を受信したと
判別したときに、前記シフト転送のための伝送路または
前記シリアル転送クロックのための伝送路の異常を検出
することを特徴とする請求項13記載の記録媒体。
14. The abnormality detection program according to claim 1, further comprising: an initializing step for recognizing a slave station arrangement order of slave stations connected to a current transmission line before performing serial communication for exchanging information with the plurality of slave stations. Comprising an initialization communication step of performing an initialized communication, In the transmission path abnormality detection step, at the time of the initialization communication in the initialization communication step, based on the determination result,
14. An abnormality in the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected when it is determined that the content other than the content of the identifier information registered in advance is received. The recording medium according to the above.
【請求項15】 前記異常検出プログラムは、前記複数
の従局との情報交換を実行するためのシリアル通信を行
う前に、現状の伝送路に接続される従局の従局配列順番
を認識するための初期化通信を行う初期化通信工程を含
み、 前記伝送路異常検出工程においては、前記初期化通信工
程における初期化通信時に、前記判別結果に基いて、所
定の識別子情報内容を受信したと判別したときに、前記
シフト転送のための伝送路または前記シリアル転送クロ
ックのための伝送路の異常を検出することを特徴とする
請求項13記載の記録媒体。
15. The abnormality detection program according to claim 1, further comprising: an initializing step for recognizing an arrangement sequence of the slave stations connected to the current transmission path before performing serial communication for exchanging information with the plurality of slave stations. In the transmission path abnormality detection step, during the initialization communication in the initialization communication step, when it is determined that predetermined identifier information content has been received based on the determination result 14. The recording medium according to claim 13, wherein an abnormality of the transmission path for the shift transfer or the transmission path for the serial transfer clock is detected.
【請求項16】 前記異常検出プログラムは、前記シフ
ト転送のために伝送路に存在する前記複数の従局の配列
に対応させて、前記シフト転送のための伝送路または前
記シリアル転送クロックのための伝送路の異常個所を表
示する伝送路異常個所表示工程を含むことを特徴とする
請求項13〜15のいずれか1項記載の記録媒体。
16. The transmission program for the shift transfer or the transmission for the serial transfer clock in accordance with the arrangement of the plurality of slave stations present on the transmission line for the shift transfer. The recording medium according to any one of claims 13 to 15, further comprising a transmission path abnormal point display step of displaying a path abnormal point.
【請求項17】 前記伝送路異常個所表示工程において
は、前記複数の従局が属する電気ユニットに対応する発
光ダイオードを用いて、前記シフト転送のための伝送路
または前記シリアル転送クロックのための伝送路の異常
個所を表示することを特徴とする請求項16記載の記録
媒体。
17. The transmission path for the shift transfer or the transmission path for the serial transfer clock using the light emitting diode corresponding to the electric unit to which the plurality of slave stations belong in the transmission path abnormal part display step. 17. The recording medium according to claim 16, wherein the abnormal part is displayed.
【請求項18】 前記伝送路異常個所表示工程において
は、前記シリアル通信装置が利用されるシステムが有し
ている表示手段または前記システムの状態を診断する診
断装置が有する表示手段上に、前記異常個所を表示する
ことを特徴とする請求項15または16記載の記録媒
体。
18. The method according to claim 18, wherein the step of displaying the location of the transmission line abnormality includes displaying the abnormality on display means of a system using the serial communication device or display means of a diagnostic device for diagnosing the state of the system. 17. The recording medium according to claim 15, wherein a location is displayed.
JP11083345A 1999-03-26 1999-03-26 Serial communication equipment, detection of abnormality for this equipment, and recording medium Withdrawn JP2000276408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11083345A JP2000276408A (en) 1999-03-26 1999-03-26 Serial communication equipment, detection of abnormality for this equipment, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11083345A JP2000276408A (en) 1999-03-26 1999-03-26 Serial communication equipment, detection of abnormality for this equipment, and recording medium

Publications (1)

Publication Number Publication Date
JP2000276408A true JP2000276408A (en) 2000-10-06

Family

ID=13799861

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11083345A Withdrawn JP2000276408A (en) 1999-03-26 1999-03-26 Serial communication equipment, detection of abnormality for this equipment, and recording medium

Country Status (1)

Country Link
JP (1) JP2000276408A (en)

Similar Documents

Publication Publication Date Title
US4433413A (en) Built-in apparatus and method for testing a microprocessor system
US4667288A (en) Enable/disable control checking apparatus
US4228537A (en) Method of and apparatus for automatic fault diagnosis of electrical circuits employing on-line simulation of faults in such circuits during diagnosis
US5617430A (en) Testing system interconnections using dynamic configuration and test generation
CA1315409C (en) Memory diagnostic apparatus and method
US8320401B2 (en) System and method to access and address high-speed interface converter devices
US20220358270A1 (en) Chip verification system and verification method therefor
US4004103A (en) Path-finding scheme for a multistage switching network
EP0146698A2 (en) Test and maintenance system for a data processing system
JP2006012234A (en) Circuit and method for memory testing
JP4076174B2 (en) Handling node address failures in distributed node systems with processors
EP0102150B1 (en) Data processing system with diagnosis function
JP2000276408A (en) Serial communication equipment, detection of abnormality for this equipment, and recording medium
US3999053A (en) Interface for connecting a data-processing unit to an automatic diagnosis system
US4580212A (en) Computer having correctable read only memory
JP2000293395A (en) Serial communication equipment, its abnormality detecting method and recording medium
CN114241984B (en) LED driving device, multi-stage LED driving system and driving method
CN105045732A (en) Compatible collection workstation
JP2001016297A (en) Serial communication equipment, serial communication method and storage medium
US6829657B1 (en) Method to support general enclosure wiring when associating SES data with physical devices on a fiber channel loop with soft addresses
FR2546319A1 (en) CIRCUIT ARRANGEMENT CAPABLE OF PREVENTING ACCESS TO A PART OF A COMMAND MEMORY ON THE APPEARANCE OF AN ERROR IN THIS PART
FI83569C (en) ANPASSNINGSKRETS.
JP2001014287A (en) Serial communication device and serial communication method, and storage medium
JPH0628048B2 (en) Switching error handling mechanism
EP0067294A2 (en) Data processing apparatus with master/slave control

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 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606