JPH0556102A - Automatic discrimination device for data length - Google Patents

Automatic discrimination device for data length

Info

Publication number
JPH0556102A
JPH0556102A JP3215043A JP21504391A JPH0556102A JP H0556102 A JPH0556102 A JP H0556102A JP 3215043 A JP3215043 A JP 3215043A JP 21504391 A JP21504391 A JP 21504391A JP H0556102 A JPH0556102 A JP H0556102A
Authority
JP
Japan
Prior art keywords
data
bit length
cpu
mode
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3215043A
Other languages
Japanese (ja)
Inventor
Isao Nishitani
功 西谷
Yukiya Higuchi
行弥 樋口
Kimio Nakagawa
公夫 中川
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP3215043A priority Critical patent/JPH0556102A/en
Publication of JPH0556102A publication Critical patent/JPH0556102A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)
  • Selective Calling Equipment (AREA)

Abstract

PURPOSE:To supply an automatic data length discrimination device which can automatically discriminate the bit length of data transmitted from a terminal equipment. CONSTITUTION:When a line with the data terminal is established, CPU 201 gives a mode setting signal MD to serial I/O 206. Thus, transmission data given from MODEM 209 is received with the bit length following the signal MD. Since an interruption signal IT is given to CPU 201 when a stop bit is not detected in STX of reception data, CPU 201 discriminates that reception data is not the bit length designated at a present mode. The signal MD which restores the error is outputted, and data is always exactly received/decoded even if the bit length of transmission data is altered.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明はデータ長自動判別装置
に関し、特に、電話回線を利用して端末装置からデータ
を収集するデータ収集システムに適用され、端末装置か
ら受信したデータのビット長を自動的に判別するデータ
長自動判別装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data length automatic discriminating apparatus, and more particularly, it is applied to a data collecting system for collecting data from a terminal device by using a telephone line and automatically determines the bit length of data received from the terminal device. The present invention relates to a device for automatically determining the data length.

【0002】[0002]

【従来の技術】従来より、各家庭あるいはその他のユー
ザに設けられたメーター・センサなどの機器類(たとえ
ば、水道メーター、ガスメーター、電気メーター、ガス
漏れ警報器、火災警報器)の情報を、電話回線を利用し
てセンターに送信するシステムが知られている。このよ
うなシステムでは、センターは定期的に各ユーザのメー
ター類の情報を電話回線を介して収集し、使用料金徴収
のための検針作業を集中的に行なっている。また、ガス
漏れ警報器、火災警報器からの緊急情報を受取って警報
を発生し、異常発生の早期発見を図っている。一般的
に、このような電話回線を利用したデータ収集システム
は、テレメータリングシステムと呼ばれている。
2. Description of the Related Art Conventionally, information about equipment such as meters and sensors (for example, water meters, gas meters, electric meters, gas leak alarms, fire alarms) provided in homes or other users is called by telephone. There is known a system that uses a line to transmit to a center. In such a system, the center regularly collects information on meters of each user via a telephone line and intensively performs meter reading work for collecting usage charges. In addition, it receives emergency information from gas leak alarms and fire alarms and issues an alarm to detect the occurrence of an abnormality early. Generally, a data collection system using such a telephone line is called a telemetering system.

【0003】ところで、上記のようなテレメータリング
システムでは、各ユーザごとに端末網制御装置が設けら
れ、各メーター・センサの情報はこの端末網制御装置を
介してセンター側に送られる。このとき、各メーター・
センサの情報は、それぞれデータパケットに載せてセン
ターに送られる。このデータパケットは、複数のキャラ
クタデータを含み、各キャラクタデータのビット長は、
メーター・センサの機種によって異なった値を取り得
る。現在のところ、1キャラクタデータのビット長は、
パリティビットをを含まない5ビット長と、偶数のパリ
ティビットをさらに含む7ビット長とが規格によって定
められている。
In the above telemetering system, a terminal network control device is provided for each user, and the information of each meter / sensor is sent to the center side through this terminal network control device. At this time, each meter
The sensor information is sent to the center in each data packet. This data packet contains a plurality of character data, and the bit length of each character data is
It can take different values depending on the model of the meter / sensor. Currently, the bit length of 1 character data is
The standard defines a 5-bit length that does not include a parity bit and a 7-bit length that further includes an even-numbered parity bit.

【0004】センター側では、各ユーザの端末網制御装
置から送られてくるデータを正しく解読するために、送
られてくるデータについて1キャラクタデータのビット
長が5ビットか7ビットかを予め認識している必要があ
る。そのため、センター側に予め設けられるコンピュー
タは、各ユーザ側に設けられる端末網制御装置のいずれ
のポートにどのようなメーターまたはセンサが接続され
ているかを管理情報として保有しており、アクセスした
メーターまたはセンサから送られてくるデータをこの管
理情報に従ったビット長で解読するようにしていた。
On the center side, in order to correctly decode the data sent from the terminal network control device of each user, it is necessary to recognize in advance whether the bit length of the sent data is 5 bits or 7 bits. Need to be. Therefore, the computer provided in advance on the center side holds as a management information what kind of meter or sensor is connected to which port of the terminal network control device provided on each user side. The data sent from the sensor was decoded with a bit length according to this management information.

【0005】[0005]

【発明が解決しようとする課題】従来のテレメータリン
グシステムは上述のように構成されていたので、端末網
制御装置のあるポートに接続されたメーターまたはセン
サが、それまでとは異なるビット長のキャラクタデータ
を送信するメーターまたはセンサに付け換えられた場
合、センター側では付け換えられたメーターまたはセン
サから送られてくるデータを解読することができないと
いう問題点があった。すなわち、この場合、センター側
のコンピュータは受信データの解読不能を示すNAK
(negative acknowledge)信号、
またはデータの再送信を要求するための再オーダーを端
末網制御装置に送り、その後端末網制御装置からの返送
を待つ。端末網制御装置から送られてきたデータが再び
解読不能の場合は、センターはNAK信号または再オー
ダーを端末網制御装置に再送信する。以上の動作を所定
回数繰り返してもなお、端末網制御装置側から解読可能
なデータが送信されない場合、センター側は所定のエラ
ー処理を実行する。
Since the conventional telemetering system is constructed as described above, the meter or sensor connected to a certain port of the terminal network control device has a character of a bit length different from that of the previous one. When the meter or sensor which transmits data is replaced, the center side cannot decode the data sent from the replaced meter or sensor. That is, in this case, the computer on the center side NAK which indicates that the received data cannot be decrypted.
(Negative acknowledge) signal,
Alternatively, a reorder for requesting retransmission of data is sent to the terminal network controller, and then awaiting a return from the terminal network controller. If the data sent from the terminal network controller is undecipherable again, the center retransmits the NAK signal or reorder to the terminal network controller. Even if the above operation is repeated a predetermined number of times, if the decipherable data is not transmitted from the terminal network control device side, the center side executes a predetermined error process.

【0006】このように、従来のテレメータリングシス
テムでは、端末網制御装置に接続されているメーターま
たはセンサが異なるビット長のものに付け換えられた場
合、センター側ではそのメーターまたはセンサの情報を
収集できないという問題点があった。この問題点を解決
するために、端末網制御装置側において、受信されるデ
ータのビット長を自動判別する方式が提案された。詳細
には、電話回線を利用して端末装置から受信したデータ
パケットに含まれている複数のキャラクタデータのう
ち、最初のキャラクタデータにおける論理の反転間隔を
タイマー機能などを利用して計測し、その計測結果に基
づいて、受信されるキャラクタデータのビット長を判別
し、判別されたビット長のデータとして受信されるデー
タパケットのキャラクタデータを解読するようにしてい
る。しかしながら、このビット長自動判別方式を採用し
た場合、受信されるキャラクタデータの論理の反転間隔
を計測する必要があるので、電話回線と端末網制御装置
とを接続するための入力ポートは、汎用機能を備えるも
のに限定されるという制約があり、これは上述した問題
の根本的な解決策とはなり得なかった。
As described above, in the conventional telemetering system, when the meter or sensor connected to the terminal network control device is replaced with one having a different bit length, the center side collects the information of the meter or sensor. There was a problem that I could not. In order to solve this problem, a method has been proposed in which the terminal network controller automatically determines the bit length of received data. Specifically, of the plurality of character data included in the data packet received from the terminal device using the telephone line, the logical inversion interval in the first character data is measured using a timer function or the like, and The bit length of the received character data is discriminated based on the measurement result, and the character data of the data packet received as the discriminated bit length data is decoded. However, if this bit length automatic discrimination method is adopted, it is necessary to measure the logical inversion interval of the received character data, so the input port for connecting the telephone line and the terminal network control device has a general-purpose function. It was not possible to be a fundamental solution to the above mentioned problem, with the limitation that it was limited to those with.

【0007】また、テレメータリングシステムには適用
されないが、汎用モデム制御コマンドに用いられるデー
タ・フォーマット自動判別方式として一般に、Haye
s社(アメリカ合衆国)が提供しているATコマンドが
ある。このデータ・フォーマット自動判別方式は、スタ
ットビットおよびストップビットを除くデータビット長
が同じもの、たとえば8ビットでパリティビットなし
(8+0=8)、7ビットで偶数パリティビットあり
(7+1=8)および7ビットで奇数パリティビットあ
り(7+1=8)などの同一データビット長にのみ適用
されるという制限がある。したがって、このデータ・フ
ォーマット自動判別方式ではデータビット長が全く異な
るものを判別することができないという問題点があっ
た。
Although not applied to a telemetering system, generally, Haye is generally used as a data format automatic discrimination method used for general-purpose modem control commands.
There is an AT command provided by s company (USA). This automatic data format discrimination method has the same data bit length excluding stat bits and stop bits, for example, 8 bits without parity bits (8 + 0 = 8), 7 bits with even parity bits (7 + 1 = 8) and 7 There is a limitation that it is applied only to the same data bit length such as odd parity bits (7 + 1 = 8). Therefore, this data format automatic discrimination method has a problem that it is not possible to discriminate data bit lengths that are completely different.

【0008】それゆえにこの発明の目的は、端末装置か
ら送られてくるデータを入力するための入力ポートの機
能に特別な制約が設けられることなく、受信データの任
意のビット長を自動的に判別でき、それによってセンタ
ー側でのデータの解読不能をなくすことのできるような
データ長自動判別装置を提供することである。
Therefore, an object of the present invention is to automatically discriminate an arbitrary bit length of received data without any special restriction on the function of an input port for inputting data sent from a terminal device. An object of the present invention is to provide an automatic data length discriminating apparatus which can eliminate the indecipherability of data on the center side.

【0009】[0009]

【課題を解決するための手段】この発明に係るデータ長
自動判別装置は、電話回線を利用して端末装置から複数
のキャラクタデータからなるパケットを収集するデータ
収集システムにおいて、前記端末装置から受信したデー
タのビット長を自動的に判別するデータ長自動判別装置
である。詳細には、端末装置から送信される所定ビット
長のキャラクタデータを正常受信するためのモードを設
定するモード設定手段と、端末装置から送信されるデー
タパケットに含まれている複数の前記キャラクタデータ
のうち、最初のキャラクタデータを前記モード設定手段
によって設定された前記モードに従って受信する受信手
段と、受信手段による受信時に、前記最初のキャラクタ
データのビット長と前記所定ビット長とが一致するか否
かを検出する検出手段と、さらには前記検出手段の検出
結果に基づいて、前記キャラクタデータのビット長を判
別する判別手段とを備えて構成される。
An automatic data length discriminating apparatus according to the present invention receives data from a terminal device in a data collecting system for collecting packets of a plurality of character data from a terminal device using a telephone line. It is an automatic data length determination device that automatically determines the bit length of data. Specifically, a mode setting means for setting a mode for normally receiving character data of a predetermined bit length transmitted from the terminal device, and a plurality of the character data included in a data packet transmitted from the terminal device. Of the receiving means for receiving the first character data in accordance with the mode set by the mode setting means, and whether or not the bit length of the first character data and the predetermined bit length match when received by the receiving means. And a determination means for determining the bit length of the character data based on the detection result of the detection means.

【0010】さらに、上述したような構成において検出
手段による不一致検出に応じて、前記モード設定手段
を、前記設定モードを前記不一致を回復するようなモー
ドに変更するよう制御する制御手段とを備えて構成され
るようにしてもよい。
Further, in the above-mentioned configuration, the control means controls the mode setting means to change the setting mode to a mode for recovering the inconsistency in response to the inconsistency detection by the detecting means. It may be configured.

【0011】[0011]

【作用】この発明に係るデータ長自動判別装置は、端末
装置から送られてくるデータパケットに含まれる複数の
キャラクタデータは、固有のビット長を有していること
に着目し、受信手段がモード設定手段により設定された
モードに従って受信したデータについて、検出手段は、
そのビット長が設定モードに従う所定ビット長に一致す
るか否かを検出する。そして、この検出手段の検出結果
に基づいて判別手段は当該受信データのビット長を判別
する。これによって、端末装置から送られてくるデータ
のビット長が自動的に判別される。また、センタでは、
端末装置から送られてるくデータを、モード設定手段に
より設定されたモードに従って解読すれば、メーターま
たはセンサなどの端末装置が異なるビット長の装置に付
け換えられても、そこから送信されるデータの解読が不
能となることは防止される。
In the automatic data length discriminating apparatus according to the present invention, it is noted that the plurality of character data included in the data packet sent from the terminal device has a peculiar bit length, and the receiving means sets the mode. Regarding the data received according to the mode set by the setting means, the detecting means
It is detected whether or not the bit length matches a predetermined bit length according to the setting mode. Then, the discrimination means discriminates the bit length of the received data based on the detection result of the detection means. As a result, the bit length of the data sent from the terminal device is automatically determined. Also, at the center,
By decoding the data sent from the terminal device according to the mode set by the mode setting means, even if the terminal device such as the meter or the sensor is replaced with a device having a different bit length, the data transmitted from the terminal device Impossible to decipher is prevented.

【0012】[0012]

【実施例】以下、本発明の一実施例について図を参照し
て詳細に説明する。
An embodiment of the present invention will be described in detail below with reference to the drawings.

【0013】図1は、この発明の一実施例によるセンタ
ー側網制御装置の概略構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of a center side network control device according to an embodiment of the present invention.

【0014】図2は、この発明が適用され得るテレメー
タリングシステムの概略構成を示すブロック図である。
FIG. 2 is a block diagram showing a schematic configuration of a telemetering system to which the present invention can be applied.

【0015】図2において、センター側のホストコンピ
ュータ1は、センター側網制御装置(以下、C−NCU
と呼ぶ)2を介して交換機3と接続されている。交換機
3には、複数の電話回線L1〜Lnが接続されている。
各電話回線L1〜Lnは、各ユーザに引込まれている。
各ユーザにおいては、端末網制御装置(以下、T−NC
Uと呼ぶ)4が設けられる。各ユーザにおけるT−NC
U4は、それぞれ電話回線L1〜Lnと接続されてい
る。また、各T−NCU4は、複数のポートを有し、そ
のポートに情報収集の対象となるメーターまたはセンサ
類が接続されている。図2に示されるテレメータリング
システムでは、一例として、各T−NCU4に水道メー
ター5とガスメーター6とが接続される。
In FIG. 2, the host computer 1 on the center side is a network control unit on the center side (hereinafter, C-NCU).
Called) 2 and is connected to the exchange 3. A plurality of telephone lines L1 to Ln are connected to the exchange 3.
Each telephone line L1 to Ln is led to each user.
In each user, a terminal network control device (hereinafter, T-NC
4). T-NC in each user
U4 is connected to telephone lines L1 to Ln, respectively. Further, each T-NCU 4 has a plurality of ports, and meters or sensors that are the targets of information collection are connected to the ports. In the telemetering system shown in FIG. 2, as an example, a water meter 5 and a gas meter 6 are connected to each T-NCU 4.

【0016】図2に示されるテレメータリングシステム
では、ホストコンピュータ1があるユーザにおけるある
メーターまたはセンサからのデータの送信を要求するオ
ーダーを発生すると、このオーダーはC−NCU2を介
して交換機3に与えられる。オーダーを受取った交換機
3は、そのオーダーに含まれている電話番号に対応する
電話回線を介して、指定されたユーザのT−NCU4に
オーダーを送信する。オーダーを受信したT−NCU4
は、そのオーダーで指定されるポートに接続されたメー
ターまたはセンサから情報を吸い上げてデータパケット
の形に編集して電話回線に送出する。T−NCU4から
のデータは、交換機3を介してセンター側に送られる。
センターでは、交換機3から送られてきたデータをC−
NCU2が解読し、ホストコンピュータ1に出力する。
ホストコンピュータ1はC−NCU2から受取ったデー
タに対して使用料金の演算または他の処理を行なって図
示されないデータメモリに格納する。また、必要に応じ
て、ホストコンピュータ1は処理結果を表示器に表示
し、または印字出力する。
In the telemetering system shown in FIG. 2, when the host computer 1 issues an order requesting the transmission of data from a certain meter or sensor in a user, this order is given to the exchange 3 via the C-NCU 2. Be done. The exchange 3 which has received the order transmits the order to the T-NCU 4 of the designated user via the telephone line corresponding to the telephone number included in the order. T-NCU4 that received the order
Collects information from a meter or sensor connected to the port specified in the order, edits it in the form of a data packet, and sends it to the telephone line. The data from the T-NCU 4 is sent to the center side via the exchange 3.
At the center, the data sent from the exchange 3 is C-
The NCU 2 decodes and outputs to the host computer 1.
The host computer 1 calculates the usage charge or performs other processing on the data received from the C-NCU 2 and stores it in a data memory (not shown). In addition, the host computer 1 displays the processing result on a display or prints it out as necessary.

【0017】図2に示されたC−NCU2のより詳細な
構成が図1に示される。図1において、CPU201に
は、プログラムデータを格納したROM202と、種々
の処理を行なう上で必要となるデータを記憶するRAM
203とが接続されている。CPU201は、ROM2
02に格納されたプログラムデータに従って動作を行な
う。また、CPU201には、シリアルI/O205が
接続されている。シリアルI/O205は、データをシ
リアルに入出力するもので、出力インタフェース208
を介してホストコンピュータ1と接続されている。した
がって、CPU201は、シリアルI/O205、シリ
アルインタフェース208を介してホストコンピュータ
1とシリアルデータの伝送を行なうことが可能である。
A more detailed structure of the C-NCU 2 shown in FIG. 2 is shown in FIG. In FIG. 1, a CPU 201 includes a ROM 202 that stores program data and a RAM that stores data necessary for performing various processes.
And 203 are connected. CPU201 is ROM2
The operation is performed according to the program data stored in 02. Further, a serial I / O 205 is connected to the CPU 201. The serial I / O 205 serially inputs and outputs data, and has an output interface 208.
It is connected to the host computer 1 via. Therefore, the CPU 201 can transmit serial data with the host computer 1 via the serial I / O 205 and the serial interface 208.

【0018】さらに、CPU201には、シリアルI/
O206が接続されている。シリアルI/O206は簡
単なメモリ機能を備えるIC(集積回路)であり、汎用
入力ポートを含まない構成を有して、モデム209に接
続されている。モデム209は、回線インタフェース2
10を介して交換機3と接続されている。モデム209
は、回線インタフェース210を介して交換機3からキ
ャリア信号が入力されると、応じてCD(carrie
r detect)信号を活性化する。また、モデム2
09は、シリアルI/O206から入力されるRS(r
equestto send)信号が活性化されると、
応じて回線インタフェース210を介して交換機3にキ
ャリア信号を送出する。シリアルI/O206からデー
タを送出する場合は、RS信号を活性化して、出力端子
TXDからシリアルデータをモデム209に向けて出力
する。これによって、モデム209は、回線インタフェ
ース210を介して交換機3へシリアルデータを出力す
る。一方、データを受信する場合、モデム209は、ま
ず交換機3からのキャリア信号の入力を検出し、CD信
号を活性化する。したがって、シリアルI/O206は
CD信号を監視しておき、CD信号が活性化された時点
でモデム209から入力端子RXDに与えられるデータ
を取込む。
Further, the CPU 201 has a serial I /
O206 is connected. The serial I / O 206 is an IC (integrated circuit) having a simple memory function, has a configuration not including a general-purpose input port, and is connected to the modem 209. The modem 209 has a line interface 2
It is connected to the exchange 3 via 10. Modem 209
When a carrier signal is input from the exchange 3 via the line interface 210, the CD (carrier)
r detect) signal is activated. Also, the modem 2
09 is RS (r input from the serial I / O 206
When the request to send signal is activated,
In response, the carrier signal is sent to the exchange 3 via the line interface 210. When transmitting data from the serial I / O 206, the RS signal is activated and serial data is output from the output terminal TXD to the modem 209. As a result, the modem 209 outputs serial data to the exchange 3 via the line interface 210. On the other hand, when receiving data, the modem 209 first detects the input of the carrier signal from the exchange 3 and activates the CD signal. Therefore, the serial I / O 206 monitors the CD signal and fetches the data given from the modem 209 to the input terminal RXD when the CD signal is activated.

【0019】またCPU201はシリアルI/O206
にキャラクタモード設定信号MDを与える。逆に、シリ
アルI/O206はCPU201に割込み信号(ポーリ
ング)ITを与える。シリアルI/O206は、CPU
201からキャラクタモード設定信号MDが与えられる
と、応じて受信可能なデータのビット長に関するデータ
を信号MDに基づいて内部メモリに設定する。これを、
以下キャラクタモード設定機能という。また、シリアル
I/O206は、交換機3から与えられるデータをキャ
ラクタモード設定機能により設定されたビット長データ
に基づいて受信した場合、受信データのキャラクタのビ
ット長が、この設定されたビット長に一致せず、フレー
ミングエラー(調歩同期式においてストップビットが検
出されない場合に生じるエラー)が発生すると、これを
検出し、応じてCPU201に割込み信号ITを与え
る。この割込み信号ITはポーリングであってもよい。
このようにシリアルI/O206は、CPU201から
与えられるキャラクタモード設定信号MDに応じて、交
換機3との間における調歩同期式の信号処理方式を可変
設定する。
The CPU 201 is a serial I / O 206.
To the character mode setting signal MD. On the contrary, the serial I / O 206 gives the CPU 201 an interrupt signal (polling) IT. Serial I / O 206 is a CPU
When the character mode setting signal MD is given from 201, the data relating to the bit length of the receivable data is set in the internal memory based on the signal MD. this,
Hereinafter referred to as the character mode setting function. When the serial I / O 206 receives the data provided from the exchange 3 based on the bit length data set by the character mode setting function, the bit length of the character of the received data matches the set bit length. However, if a framing error (an error that occurs when the stop bit is not detected in the asynchronous method) occurs, the framing error is detected, and the interrupt signal IT is given to the CPU 201 accordingly. This interrupt signal IT may be polling.
In this way, the serial I / O 206 variably sets the start-stop synchronization type signal processing method with the exchange 3 in accordance with the character mode setting signal MD given from the CPU 201.

【0020】さらに、CPU201には、データをパラ
レルに入出力するパラレルI/O207が接続される。
このパラレルI/O207には、入出力機器インタフェ
ース211が接続される。入出力機器インタフェース2
11には、LED212、ブザー213、操作ボタン2
14などの種々の入出力機器が接続される。
Further, the CPU 201 is connected with a parallel I / O 207 which inputs and outputs data in parallel.
An input / output device interface 211 is connected to the parallel I / O 207. I / O device interface 2
11, LED 212, buzzer 213, operation button 2
Various input / output devices such as 14 are connected.

【0021】図3は、図2に示されるT−NCU4から
C−NCU2に送られるデータパケットのフォーマット
を示す図である。
FIG. 3 is a diagram showing a format of a data packet sent from the T-NCU 4 shown in FIG. 2 to the C-NCU 2.

【0022】図3におい、データパケットはヘッダ部と
データ部とエンド部とに分けられる。ヘッダ部には、デ
ータパケットの開始を示すコードSTX(start
oftext)が含まれている。このSTXには02H
(16進表示)の数値コードを用いるように予め定めら
れる。データ部には、センターに送信するべき本来の情
報(たとえば、メーターの番号、検出値など)が含まれ
る。エンド部は、データパケットの終了を示すコードE
TX(end of text)が含まれる。このET
Xには、03H (16進表示)の数値コードを用いるよ
うに予め定められる。ヘッダ部およびエンド部は、それ
ぞれ1つのキャラクタデータ(STX、ETX)を含
み、データ部は複数のキャラクタデータを含む。
In FIG. 3, the data packet is divided into a header part, a data part and an end part. In the header portion, a code STX (start) indicating the start of the data packet is
of text) is included. 02 H for this STX
It is predetermined to use a numerical code (hexadecimal display). The data section includes the original information to be transmitted to the center (for example, meter number, detected value, etc.). The end part has a code E indicating the end of the data packet.
TX (end of text) is included. This ET
It is predetermined that X is a numerical code of 03 H (hexadecimal notation). The header part and the end part each include one character data (STX, ETX), and the data part includes a plurality of character data.

【0023】図4(a)および(b)は、図3に示され
たSTXにおいてフレーミングエラーが検出される場合
について示す波形図である。
FIGS. 4A and 4B are waveform charts showing the case where a framing error is detected in the STX shown in FIG.

【0024】図4(a)には、5ビット長のキャラクタ
データのSTXのビットパターンが示される。図4
(b)には、7ビット長のキャラクタデータのSTXの
ビットパターンが示される。たとえば、今、5ビット長
のキャラクタモードが設定されていると想定としたと
き、7ビット長のキャラクタデータが送信されると、図
4に示される時刻T1でシリアルI/O206はフレー
ミングエラーの発生を検知する。
FIG. 4A shows an STX bit pattern of 5-bit character data. Figure 4
(B) shows an STX bit pattern of 7-bit character data. For example, assuming that the 5-bit length character mode is set, if 7-bit length character data is transmitted, the serial I / O 206 generates a framing error at time T1 shown in FIG. To detect.

【0025】図5は、図2に示されるCPU201の全
体の動作を説明するためのフロー図である。
FIG. 5 is a flow chart for explaining the overall operation of CPU 201 shown in FIG.

【0026】図6は、図2に示されるCPU201が実
行する動作のうち、本実施例にとって興味のある特徴部
分の動作をより詳細に示すフロー図である。
FIG. 6 is a flow chart showing in more detail the operation of the characteristic portion which is of interest to the present embodiment among the operations executed by the CPU 201 shown in FIG.

【0027】以下、これら図4(a)および(b)ない
し図6を参照して、図1および図2に示される実施例の
動作を説明する。
The operation of the embodiment shown in FIGS. 1 and 2 will be described below with reference to FIGS. 4 (a) and 4 (b) to 6.

【0028】なお、本実施例においては、センター側に
送信されるデータには、5ビット長のキャラクタデータ
を含むかまたは7ビット長のキャラクタデータを含むか
の2種類があると想定する。
In the present embodiment, it is assumed that there are two types of data to be transmitted to the center side, that is, including 5-bit character data or 7-bit character data.

【0029】まず、図5を参照して、CPU201の全
体的な動作を説明する。CPU201は、まずステップ
S1(図中、S1と略す)において、動作開始に必要な
種々の初期設定を行なう。続いて、CPU201は、ス
テップS2において、電話回線の監視制御を行なう。こ
の電話回線の監視制御では、現在使用中の電話回線はど
れであるか、あるいはどの電話回線からデータが送られ
てきたかなどの監視を行なう。次に、ステップS3にお
いて、CPU201は、T−NCU4とのデータの送受
信制御を行なう。すなわち、CPU201は、このステ
ップS3において、モデム209で行なわれるT−NC
U4へのデータの送信処理およびT−NCU4からのデ
ータの受信処理の制御を行なう。次に、CPU201
は、ステップS4において、センター側のホストコンピ
ュータ1との通信処理を行なう。その後、CPU201
は、ステップS5において、LED212、ブザー21
3、操作ボタン214などの入出力に対するデータの入
出力制御を行なう。その後、処理はステップS2に戻
り、以下同様にして処理が繰り返される。
First, the overall operation of the CPU 201 will be described with reference to FIG. First, in step S1 (abbreviated as S1 in the figure), the CPU 201 performs various initial settings necessary for starting the operation. Subsequently, the CPU 201 performs monitoring control of the telephone line in step S2. In this telephone line monitoring control, which telephone line is currently being used or from which telephone line the data has been sent is monitored. Next, in step S3, the CPU 201 controls data transmission / reception with the T-NCU 4. That is, the CPU 201 executes the T-NC performed by the modem 209 in step S3.
It controls the data transmission process to U4 and the data reception process from T-NCU4. Next, the CPU 201
Performs a communication process with the host computer 1 on the center side in step S4. After that, the CPU 201
In step S5, the LED 212 and the buzzer 21
3. Input / output control of data with respect to input / output of the operation button 214 and the like is performed. Then, the process returns to step S2, and the process is repeated in the same manner.

【0030】図6に示される処理フローは、図5におけ
るステップS3で実行される端末との送受信制御の一部
をより詳細に示すもので、本実施例の特徴部分の動作を
示している。次に、この図6を図3および図4とともに
参照して、本実施例の特徴となるCPU201の動作を
以下に説明する。
The processing flow shown in FIG. 6 shows in more detail a part of the transmission / reception control with the terminal executed in step S3 in FIG. 5, and shows the operation of the characteristic part of this embodiment. Next, with reference to FIG. 6 together with FIG. 3 and FIG. 4, the operation of the CPU 201, which is a feature of this embodiment, will be described below.

【0031】図6に示される処理は、図2において交換
機3を介してC−NCU2に呼が着信し、これに応じて
C−NCU2と相手側データ端末(水道メーター5また
はガスメーター6)との間で電話回線が確立され、デー
タ通信可能となったことに応じて開始される処理であ
る。
In the processing shown in FIG. 6, a call arrives at the C-NCU 2 via the exchange 3 in FIG. 2, and the C-NCU 2 and the data terminal (water meter 5 or gas meter 6) of the other party respond to the call. This is a process started when a telephone line is established between the two and data communication becomes possible.

【0032】まず、ステップS201において、CPU
201は予め該C−NCU2のキャラクタモードを5ビ
ット長に設定する。すなわち、シリアルI/O206に
キャラクタモード設定信号MDを与え、シリアルI/O
206の内部メモリに5ビット長のキャラクタモードデ
ータを設定する。これに応じて、シリアルI/O206
の内部メモリには受信可能なキャラクタデータのSTX
のビットパターンとして、図4(a)に示されたような
(0010001)のマークとスペースの組合わせによ
る5ビット長のSTXパターンが設定される。次にCP
U201はステップS202において電話回線が確立さ
れたことに応じて次に受信すべき信号が受信されない場
合のタイムアウトを監視し、タイムアウトとなれば、処
理を次のステップS209に移行させて、エラー処理を
実行する。このステップS202におけるタイムアウト
の監視では、回線確立後に受信すべき信号に相当するキ
ャリア信号が受信されるまでの期間が計時され、この計
時期間が所定時間(たとえば6秒)を超えてなお、キャ
リア信号未受信であれば、ステップS208のエラー処
理が実行される。
First, in step S201, the CPU
201 sets beforehand the character mode of the C-NCU 2 to a 5-bit length. That is, the character mode setting signal MD is given to the serial I / O 206, and the serial I / O 206
The character mode data having a length of 5 bits is set in the internal memory of 206. In response to this, the serial I / O 206
STX of the character data that can be received in the internal memory of
As the bit pattern of, the STX pattern of 5 bits length is set by the combination of the mark and space of (001001) as shown in FIG. Next CP
The U201 monitors the time-out when the signal to be received next is not received in response to the establishment of the telephone line in step S202, and when the time-out occurs, the process proceeds to the next step S209 to perform the error process. Run. In the time-out monitoring in step S202, a period until the carrier signal corresponding to the signal to be received after the line is established is measured, and the time period exceeds the predetermined time (for example, 6 seconds). If not received, the error process of step S208 is executed.

【0033】前記ステップS202の処理において回線
確立後所定時間内に所定のキャリア信号が検出されれ
ば、すなわちモデム209を介してキャリア検出信号C
DがシリアルI/O206に与えられ、応じてCPU2
01に報知されると、ステップS203の処理が実行さ
れる。
If a predetermined carrier signal is detected within a predetermined time after the line is established in the processing of step S202, that is, the carrier detection signal C is received via the modem 209.
D is given to the serial I / O 206, and accordingly the CPU2
When 01 is notified, the process of step S203 is executed.

【0034】ステップS203において、CPU201
は前述したフレミングエラーの検出がなされるか否かを
判別する。シリアルI/O206はモデム209を介し
て与えられる信号を入力端子RXDを介して入力し、応
じてそのヘッダ部のSTXを予め内部メモリにストアさ
れた5ビット長のSTXパターンと比較処理する。この
とき予めメモリにストアされたSTXの7ビット目のマ
ークと受信されるキャラクタデータのSTXの7ビット
目のパターンが一致する間は、シリアルI/O206に
よりフレミングエラーは検出されないので、CPU20
1はステップS204の処理に移行し、STXが受信さ
れたか否かを判別する。このとき、5ビット長のSTX
が受信されない間は、再びステップS202の処理に戻
り、前述した処理が繰り返される。
In step S203, the CPU 201
Determines whether the aforementioned Fleming error is detected. The serial I / O 206 inputs the signal given via the modem 209 via the input terminal RXD, and in response, compares the STX of the header portion with the STX pattern of 5-bit length stored in advance in the internal memory. At this time, while the STX 7-bit mark stored in the memory in advance matches the STX 7-bit pattern of the received character data, no Fleming error is detected by the serial I / O 206.
1 shifts to the processing of step S204 and determines whether or not STX is received. At this time, 5-bit length STX
While is not received, the process returns to step S202 again, and the above-described process is repeated.

【0035】ステップS203の処理において、シリア
ルI/O206がフレーミングエラーを検出し、応じて
割込み信号ITをCPU201に与えると、CPU20
1は、応じてステップS205の処理に移行する。すな
わち、CPU201は、前述したステップS203の処
理において割込み信号ITが与えられたことに応じて、
現在のキャラクタモードでは受信できないデータ、すな
わち7ビット長のキャラクタデータが送信されているこ
とに応じて、再びシリアルI/O206にキャラクタモ
ード設定信号MDを与えて、7ビット長のキャラクタモ
ードに設定変更する。詳細には、シリアルI/O206
は、その内部メモリに図4(b)に示される(0010
0000)のスペースとマークの組合わせによる7ビッ
トのパターンがストアされる。
In the processing of step S203, when the serial I / O 206 detects a framing error and gives an interrupt signal IT to the CPU 201 in response, the CPU 20
1 shifts to the processing of step S205 accordingly. That is, the CPU 201 responds to the fact that the interrupt signal IT is given in the process of step S203 described above.
In response to the data that cannot be received in the current character mode, that is, the character data of 7-bit length is transmitted, the character mode setting signal MD is again given to the serial I / O 206 to change the setting to the character mode of 7-bit length. To do. For details, see Serial I / O 206.
In its internal memory as shown in FIG.
A 7-bit pattern with a combination of space and mark of (0000) is stored.

【0036】以上のようにステップS204の判別処理
においてSTX受信が確認されれば、以降、キャラクタ
モードが5ビット長であることに基づく図3に示された
データ部とエンド部のETXの受信処理がステップS2
06およびステップS207の処理において行なわれ、
その後ステップS208の次の処理に移行する。
If STX reception is confirmed in the discrimination processing of step S204 as described above, thereafter, ETX reception processing of the data portion and the end portion shown in FIG. 3 based on the character mode being 5 bits long. Is step S2
06 and the processing of step S207,
Then, the process proceeds to the next process of step S208.

【0037】ステップS205の処理を経て7ビット長
のキャラクタモードに設定変更された場合、以降のデー
タ部の受信は、キャラクタモードが7ビット長であるこ
とに従ってそのデータ部の受信処理およびETXの受信
処理がS206およびステップS207の処理において
行なわれる。その後、次の処理に移行する。
When the setting is changed to the character mode of 7-bit length through the processing of step S205, the subsequent reception of the data portion is performed in accordance with the fact that the character mode is 7-bit length and the reception processing of the data portion and the ETX reception. The process is performed in the process of S206 and step S207. After that, the processing shifts to the next processing.

【0038】なお、上述の実施例は、いわゆるテレメー
タリングシステムに適用されているが、この発明は端末
からデータを収集するようなデータ収集システムであれ
ば、その他のデータ収集システムにも同様にして適用す
ることが可能である。
Although the above-mentioned embodiment is applied to a so-called telemetering system, the present invention is similarly applied to other data collecting systems as long as the data collecting system collects data from terminals. It is possible to apply.

【0039】[0039]

【発明の効果】以上説明したように、この発明によれ
ば、端末装置から送られてくるデータのビット長を自動
的に判別することができる。これによりセンター側で端
末装置からのデータを解読する場合、たとえ端末装置側
でデータ通信のためのデータのビット長が独自に変更さ
れても常に受信データの解読が正確に行なえ、センター
側でデータの収集が不可能となるような事態を防止でき
るという効果がある。
As described above, according to the present invention, the bit length of the data sent from the terminal device can be automatically determined. With this, when the center side decodes the data from the terminal device, even if the terminal device side changes the bit length of the data for data communication independently, the received data can always be accurately decoded and the center side data There is an effect that it is possible to prevent a situation in which it becomes impossible to collect.

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

【図1】この発明の一実施例によるセンター側網制御装
置の概略構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of a center side network control device according to an embodiment of the present invention.

【図2】この発明が適用され得るテレメータリングシス
テムの概略構成を示すブロック図である。
FIG. 2 is a block diagram showing a schematic configuration of a telemetering system to which the present invention can be applied.

【図3】テレメータリングシステムにおいて採用されて
いるデータパケットのフォーマットを示す図である。
FIG. 3 is a diagram showing a data packet format adopted in a telemetering system.

【図4】(a)および(b)は、図3に示されたSTX
においてフレミングエラーが検出される場合について示
す波形図である。
4 (a) and (b) are STX shown in FIG.
6 is a waveform diagram showing a case where a Fleming error is detected in FIG.

【図5】図2に示されるCPUの全体の動作を説明する
ためのフロー図である。
5 is a flowchart for explaining the overall operation of the CPU shown in FIG.

【図6】図2に示されるCPUが実行する動作のうち、
本実施例にとって興味ある特徴部分の動作をより詳細に
示すフロー図である。
FIG. 6 is a flowchart showing an operation performed by a CPU shown in FIG.
It is a flowchart which shows operation | movement of the characteristic part which is interesting for a present Example in detail.

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

1 ホストコンピュータ 2 センター側網制御装置 3 交換機 L1〜Ln 電話回線 4 端末網制御装置 5 水道メーター 6 ガスメーター 201 CPU 202 ROM 203 ROM IT 割込み信号 MD キャラクタモード設定信号 なお、各図中、同一符号は同一または相当部分を示す。 1 host computer 2 center side network control device 3 exchanges L1-Ln telephone line 4 terminal network control device 5 water meter 6 gas meter 201 CPU 202 ROM 203 ROM IT interrupt signal MD character mode setting signal Or shows a considerable part.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 電話回線を利用して端末装置から複数の
キャラクタデータからなるパケットを収集するデータ収
集システムにおいて、前記端末装置から受信したデータ
のビット長を自動的に判別するデータ長自動判別装置で
あって、 前記端末装置から送信される所定ビット長のキャラクタ
データを正常受信するためのモードを予め設定するモー
ド設定手段と、 前記端末装置から送信されるデータパケットに含まれて
いる複数の前記キャラクタデータのうち、最初のキャラ
クタデータを前記モード設定手段によって設定された前
記モードに従って受信する受信手段と、 前記受信手段による受信時に、前記最初のキャラクタデ
ータのビット長と前記所定ビット長とが一致するか否か
を検出する検出手段と、 前記検出手段の検出結果に基づいて、前記キャラクタデ
ータのビット長を判別する判別手段とを備える、データ
長自動判別装置。
1. A data collection system for collecting a packet of a plurality of character data from a terminal device using a telephone line, and a data length automatic discrimination device for automatically discriminating a bit length of data received from the terminal device. A mode setting means for presetting a mode for normally receiving character data of a predetermined bit length transmitted from the terminal device, and a plurality of the data packets included in a data packet transmitted from the terminal device. Among the character data, receiving means for receiving the first character data in accordance with the mode set by the mode setting means, and the bit length of the first character data and the predetermined bit length match when received by the receiving means. Based on the detection result of the detection means, which detects whether or not to do, And a discrimination means for discriminating the bit length of the serial character data, data length automatic determination device.
【請求項2】 前記検出手段による不一致検出に応じ
て、前記モード設定手段を前記設定モードを前記不一致
を回復するようなモードに変更するよう制御する制御手
段とを、さらに備えた請求項1記載のデータ長自動判別
装置。
2. The control means for controlling the mode setting means to change the setting mode to a mode for recovering the inconsistency according to the inconsistency detection by the detecting means. Data length automatic discriminating device.
JP3215043A 1991-08-27 1991-08-27 Automatic discrimination device for data length Pending JPH0556102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3215043A JPH0556102A (en) 1991-08-27 1991-08-27 Automatic discrimination device for data length

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3215043A JPH0556102A (en) 1991-08-27 1991-08-27 Automatic discrimination device for data length

Publications (1)

Publication Number Publication Date
JPH0556102A true JPH0556102A (en) 1993-03-05

Family

ID=16665812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3215043A Pending JPH0556102A (en) 1991-08-27 1991-08-27 Automatic discrimination device for data length

Country Status (1)

Country Link
JP (1) JPH0556102A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258712A (en) * 2007-04-02 2008-10-23 Hitachi Kokusai Electric Inc Data communication device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0357348A (en) * 1989-07-26 1991-03-12 Matsushita Electric Works Ltd Signal transmitter

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0357348A (en) * 1989-07-26 1991-03-12 Matsushita Electric Works Ltd Signal transmitter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258712A (en) * 2007-04-02 2008-10-23 Hitachi Kokusai Electric Inc Data communication device

Similar Documents

Publication Publication Date Title
US4590924A (en) Endoscope system
JPH0556102A (en) Automatic discrimination device for data length
JPH0789396B2 (en) Fire alarm equipment
JP4090038B2 (en) Fire alarm system
JPH07264263A (en) Serial communication interface device
JPH0683328B2 (en) Automatic data communication method
KR20210063751A (en) Fire detection system
JPH05108561A (en) System for discriminating completion of serial transfer reception
JP2838325B2 (en) Automatic data bit length discriminator
JP3009020B2 (en) Security terminal
JP2003151047A (en) Machine security system
KR20040048533A (en) Fire alarm system using power line communication
KR0167910B1 (en) Remote data service unit controlling apparatus
JP4090037B2 (en) Fire alarm system
KR100191628B1 (en) Alternating single or double data receiver and control method for guard system
JPH11175872A (en) Radio meter inspection system
JP2944837B2 (en) Transmission method
JP2662319B2 (en) Transmission error detection method and terminal equipment for disaster prevention monitoring system
JP2662320B2 (en) Transmission data synchronization method for disaster prevention monitoring system
JP3903298B2 (en) Fire alarm system
JP3312078B2 (en) Frame relay device
JPS63155293A (en) Instantaneous disconnection monitor/alarm for digital circuit
JP2002247665A (en) Communication system
KR19980047473A (en) Device type classification method by communication protocol
JP2000059520A (en) Data terminal equipment

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980707