JPH01261038A - Polling system - Google Patents

Polling system

Info

Publication number
JPH01261038A
JPH01261038A JP9013288A JP9013288A JPH01261038A JP H01261038 A JPH01261038 A JP H01261038A JP 9013288 A JP9013288 A JP 9013288A JP 9013288 A JP9013288 A JP 9013288A JP H01261038 A JPH01261038 A JP H01261038A
Authority
JP
Japan
Prior art keywords
data
terminal
counter
polling signal
flag
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
JP9013288A
Other languages
Japanese (ja)
Inventor
Nobuaki Tanaka
伸明 田中
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP9013288A priority Critical patent/JPH01261038A/en
Publication of JPH01261038A publication Critical patent/JPH01261038A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently receive a terminal data by allowing a terminal equipment sending the last data to set flag and allowing a terminal equipment having a set flag to reset a counter when the counter receives the prescribed value of polling signal sent from a controller. CONSTITUTION:Number of terminal equipments sending once a data in a system is determined to k-set less than all terminal number (n), a polling signal counter is provided and a flag F is provided to each terminal equipment. The counter counts a terminal equipment number sending a data and each terminal equipment sends the data when the number of counters is A prescribed number (k) or below. The flag F is used to allow the terminal equipment to recognize that the data is sent in the k-th order, and a terminal equipment whose flag F is set has a right to reset the count of a polling signal of the counter (k) to zero. Thus, lots of terminal equipments not normally having transmission data can collect data with a few number of buffers efficiently uniformly to each terminal equipment.

Description

【発明の詳細な説明】 〔発明の概要〕 制御装置がポーリングにより複数の端末装置からデータ
を吸い上げるシステムにおけるポーリング方式に関し、 小容量の受信バッファで効率よく端末データを受信でき
るようにすることを目的とし、制御装置と複数台の端末
装置をループ状に接続し、制御装置からのポーリング信
号を端末装置間で受け渡して行って、1回のポーリング
で複数台の端末装置からのデータを制御装置へ吸い上げ
るシステムにおいて、該ポーリング信号にデータ送信を
行なった端末装置の台数を示すカウンタを設け、該カウ
ンタが所定値以下のとき端末装置はデータ送信を可能と
され、そしてデータ送出したとき該カウンタをインクリ
メントし、また端末装置にフラグを設けて、最後のデー
タ送信した端末装置は該フラグをセットし、また制御装
置から送られた該カウンタが前記所定値のポーリング信
号を受けたとき、該セットされたフラグを持つ端末装五
がカウンタをリセットするよう構成する。
[Detailed Description of the Invention] [Summary of the Invention] An object of the present invention is to efficiently receive terminal data using a small-capacity reception buffer regarding a polling method in a system in which a control device sucks data from a plurality of terminal devices by polling. The control device and multiple terminal devices are connected in a loop, the polling signal from the control device is passed between the terminal devices, and data from multiple terminal devices is sent to the control device with one polling. In the siphoning system, a counter indicating the number of terminal devices that have transmitted data is provided in the polling signal, and when the counter is below a predetermined value, the terminal device is enabled to transmit data, and when the data is transmitted, the counter is incremented. In addition, a flag is provided in the terminal device, and the terminal device that transmitted the last data sets the flag, and when the counter sent from the control device receives the polling signal of the predetermined value, the flag is set. Terminal equipment with the flag is configured to reset the counter.

〔産業上の利用分野〕[Industrial application field]

本発明は、制御装置がポーリングにより複数の端末装置
からデータを吸い上げるシステムにおけるポーリング方
式に関する。
The present invention relates to a polling method in a system in which a control device collects data from a plurality of terminal devices by polling.

〔従来の技術〕[Conventional technology]

第1図に示すように制御装置10と複数の11゜12、
・・・・・・をループ状に接続したシステムがある。
As shown in FIG. 1, a control device 10 and a plurality of 11° 12,
There is a system in which ...... are connected in a loop.

接続装置10は線β0を通してポーリング信号を端末装
置11へ送り、これを受けて端末装置11はデータを線
1aを通して制御装置10へ送り、かつ線l;を通して
上記ポーリング信号を端末装置12へ転送する。端末装
置11からポーリング信号を受けると端末装置12はデ
ータ線βb、端末11、線βaの経路で制御装置10へ
送り、かつ線12を通して上記ポーリング信号を端末装
置13へ転送する。以下同様である。最後の端末装置I
Nではデータ制御装置へ送ると共に、線βnを通して上
記ポーリング信号を制御装置へ返し、これで1サイクル
終了となる。1サイクル終了後、制御装置はバッファに
溜った端末装置11〜INからのデータを処理する。
The connection device 10 sends a polling signal to the terminal device 11 through the line β0, and in response to this, the terminal device 11 sends data to the control device 10 through the line 1a, and transfers the polling signal to the terminal device 12 through the line l; . When receiving a polling signal from the terminal device 11, the terminal device 12 sends it to the control device 10 through the data line βb, the terminal 11, and the line βa, and also transfers the polling signal to the terminal device 13 through the line 12. The same applies below. Last terminal device I
At N, the polling signal is sent to the data control device, and the polling signal is returned to the control device through the line βn, thus completing one cycle. After one cycle is completed, the control device processes the data accumulated in the buffer from the terminal devices 11 to IN.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

このように、制御装置と複数台の端末装置をループ状に
接続し、接続装置からのポーリング信号を次々に隣りの
端末に受け渡して全端末のデータを1回のポーリングで
吸い上げる場合、各端末からのデータが最大mバイト、
端末数はnとすると、制御装置はmXnバイトの受信バ
ッファを用意する必要がある。各端末では常にデータが
発生するシステムではこれでよいが、同時に全端末がデ
ータを発生する確率は低いシステムでは、m X nバ
イトの受信バッファを用意するのはメモリの無駄である
In this way, when a control device and multiple terminal devices are connected in a loop, and the polling signal from the connected device is passed to the adjacent terminal one after another, and data from all terminals is collected in one poll, the data from each terminal is data up to m bytes,
Assuming that the number of terminals is n, the control device needs to prepare a reception buffer of mXn bytes. This is fine in a system where each terminal always generates data, but in a system where the probability that all terminals generate data at the same time is low, it is a waste of memory to prepare a receive buffer of m x n bytes.

本発明はか\る点を改善し、小容量の受信バッファで効
率よく端末データを受信できるようにすることを目的と
するものである。
It is an object of the present invention to improve these points and to enable terminal data to be efficiently received with a small-capacity reception buffer.

〔課題を解決するための手段〕[Means to solve the problem]

本発明では、システムで1度にデータを送信する端末台
数は、全端末数nより少ないに台に決めるでおく。
In the present invention, the number of terminals that transmit data at one time in the system is set to be less than the total number of terminals n.

また第2図に示すようにポーリング信号カウンタ21を
設け、更に第1図に示すように各端末にフラグFを設け
ておく。カウンタ21はデータを送信した端末数をカウ
ントするものであり、各端末はカウンタが所定数に以下
のときデータ送信可能とされる。フラグFはに番目(当
該サイクルの最終番目)にデータを送信したことを端末
が認識するためのものであり、このフラグFが立ってい
る端末が、制御装置から送られたカウンターにのポーリ
ング信号の該カウンタを0にリセットする権利を持つ。
Further, a polling signal counter 21 is provided as shown in FIG. 2, and a flag F is provided at each terminal as shown in FIG. The counter 21 counts the number of terminals that have transmitted data, and each terminal is enabled to transmit data when the counter is equal to or less than a predetermined number. Flag F is for the terminal to recognize that data has been transmitted in the second (last cycle of the cycle), and the terminal with this flag F set receives the polling signal sent from the control device to the counter. has the right to reset the counter to zero.

なお第2図(alはポーリング信号のフォーマットを示
し、STX、ETX、の間にENQ及びカウンタ21を
持つ。同(blは端末から制御装置への送信データのフ
ォーマットを示し、STX、ETXの間にUA(ユニッ
トアドレス;端末のID)と送信データ22を持つ。勿
34 S T Xはスタートオプテキスト、ETXはエ
ンドオブテキスト、ENQはエンクワイヤである。
In addition, in Fig. 2 (al indicates the format of the polling signal, and there is an ENQ and counter 21 between STX and ETX. has a UA (unit address; terminal ID) and transmission data 22. Of course, S T X is a start option text, ETX is an end of text, and ENQ is an enquire.

〔作用〕[Effect]

このポーリング方式では、制御装置10は最初カウンタ
21を0にしたポーリング信号を端末11へ送る。端末
11は該カウンタをチエツクしてに以下であれば、そし
て送信データがあれば、該データを制御装置10へ送り
、そしてデータを送信したらカウンタを+1してポーリ
ング信号を次段へ送る。
In this polling method, the control device 10 first sends a polling signal with the counter 21 set to 0 to the terminal 11. The terminal 11 checks the counter and if it is below, and if there is data to be transmitted, it sends the data to the control device 10, and after transmitting the data, it increments the counter by 1 and sends a polling signal to the next stage.

次段でも同様にカウンタをチエツクし、k以下であれば
そして送信データがあれば、該データを制御装置へ送り
、そしてデータを送信したらカウンタを+1してポーリ
ング信号を次段へ送る。以下同様である。最終端末IN
までカウンタ値がkにならなければ、送信データのあっ
た全端末がデータを送出して当該ポーリングサイクルが
終了する。
The next stage similarly checks the counter, and if it is less than k and there is data to be transmitted, the data is sent to the control device, and when the data is transmitted, the counter is incremented by 1 and a polling signal is sent to the next stage. The same applies below. Final terminal IN
If the counter value does not reach k, all terminals that have sent data send out data, and the polling cycle ends.

ある端末でカウンタ値がkになったら、該端末はフラグ
Fを1にセットする。次端末ではカウンターにのポーリ
ング信号を受けることになり、この状態ではデータ送信
は不可とされ、単にカウンターにのポーリング信号を次
段へ転送する。以下同様である。最終端末ではカウンタ
=にのポーリング信号を制御装置へ返す。
When the counter value reaches k at a certain terminal, the terminal sets flag F to 1. The next terminal receives a polling signal from the counter, and in this state, data transmission is not possible, and the polling signal from the counter is simply transferred to the next stage. The same applies below. At the final terminal, a polling signal of the counter is returned to the control device.

これを受けると制御装置はそのま\即ちカウンターにの
ポーリング信号を端末11へ送出する。
Upon receiving this, the control device directly sends a counter polling signal to the terminal 11.

端末11ではカウンターにであるからデータ送信はせず
、単に該ポーリング信号を次段へ転送する。
Since the terminal 11 is a counter, it does not transmit data, but simply transfers the polling signal to the next stage.

フラグFが1になっている端末へカウンターにのポーリ
ング信号が送られて(ると、該端末はカウンタをOにリ
セットし、カウンター0のポーリング信号を次段へ転送
する。次段では、今やカウンタは0であるから、送信デ
ータがあれば該データを制御装置へ送り、そしてデータ
を送信したらカウンタを+1してポーリング信号を次段
へ送る。
A polling signal for the counter is sent to the terminal whose flag F is 1 (then the terminal resets the counter to O and transfers the polling signal of the counter 0 to the next stage. Since the counter is 0, if there is data to be transmitted, the data is sent to the control device, and when the data is transmitted, the counter is incremented by 1 and a polling signal is sent to the next stage.

以下同様であり、こうして最初のポーリングではデータ
を送れなかった端末からデータ送信が開始される。
The same goes for the rest, and in this way data transmission is started from the terminal that could not send data in the first polling.

こうして本発明のポーリング方式では、常時送信データ
があるのではない多数の端末から効率よく、少ないバッ
ファで、各端末均一に、データ収集することができる。
In this manner, the polling method of the present invention allows data to be collected uniformly from a large number of terminals that do not always have data to transmit, efficiently and with a small buffer.

(実施例〕 制御装置での処理を第3図に、また端末装置での処理を
第4図に示す。第3図に示すように制御装置10は最初
はカウンタをOにして■、ポーリング信号を送信する■
。これにより端末から信号(データとポーリング信号の
いずれかであるが、最初はデータ)が送られてくるので
これを受信し■、最終端末からポーリング信号が送られ
てくるまで(■がYES)データ受信を続ける。最終端
末からポーリング信号が送られてくると、カウンタの値
をチエツクし■、カウンタ値がkでなければ(■がNO
)、カウンタを0にし、次のポーリング周期でポーリン
グ信号を送出する■。カウンタ値がkであると(■がY
ES) 、カウンタを0にせず、そのま\従って値にの
ま\、次のポーリング周期でポーリング信号を送信する
■。
(Example) The processing in the control device is shown in FIG. 3, and the processing in the terminal device is shown in FIG. 4.As shown in FIG. ■ Send
. As a result, a signal (either data or polling signal, but initially data) is sent from the terminal, so it is received ■, and until the polling signal is sent from the final terminal (■ is YES) data Continue receiving. When a polling signal is sent from the final terminal, the counter value is checked and if the counter value is not k (■ is NO).
), set the counter to 0, and send a polling signal at the next polling cycle. If the counter value is k (■ is Y
ES), do not set the counter to 0, leave it at that value, and send a polling signal at the next polling cycle■.

端末装置では第4図に示すように、ポーリング信号を受
信するとカウンタ値をチエツクし■、kでなければ、自
端末に送信データがあるか否かチエツクし■、あればそ
れを送り■、カウンタ+1し■、この状態でカウンタを
再び眺めてkか否かチエツクし■、kでなければ次の端
末装置へポーリング信号を送信し、kであれば自端末の
フラグを1にしたのち次の端末へポーリング信号を送信
する。
As shown in Fig. 4, when the terminal device receives a polling signal, it checks the counter value.If it is not k, it checks whether there is data to be transmitted at its own terminal.If so, it sends it and returns it to the counter. +1■, In this state, look at the counter again and check whether it is k or not■, If it is not k, send a polling signal to the next terminal device, if it is k, set the flag of the own terminal to 1, and then proceed to the next terminal device. Send a polling signal to the terminal.

最初のカウンクチェソク■において、カウンタ値がkで
あれば、自端末のフラグをチエツクし■、lでなければ
次の端末装置へポーリング信号を転送する。従っである
端末でカウンタがkになると、それ以後の端末は単にポ
ーリング信号を転送するだけで、データ送出はせず、最
終端末からカウンタ=にの状態でポーリング信号が制御
装置へ戻される。これを受けると前記のように制御信号
はカウンタ=にのポーリング信号を端末側へ送出する。
In the first count check (2), if the counter value is k, the flag of the own terminal is checked (3), and if it is not l, the polling signal is transferred to the next terminal device. Therefore, when the counter reaches k at a certain terminal, subsequent terminals simply transfer the polling signal without transmitting data, and the final terminal returns the polling signal to the control device with the counter =. When this is received, the control signal sends the polling signal of the counter to the terminal side as described above.

最初のく制御装置に最も近い)端末装置はこれを受ける
と、カウンターにであるから■へ移り、自端末のフラグ
は1でないから単に次段へポーリング信号を転送するだ
けになる。データ送信はしない。自端末でカウンターk
になった該端末へポーリング信号が転送されてくると、
■のフラグ−1?ではYESになるから、ポーリング信
号のカウンタ(今はk)を0にリセットし■、自端末の
フラグもOにリセットし■、カウンタ=0のポーリング
信号を次端末へ転送する。該端末では今やカウンタ=0
であるから■、■、■、・・・のルートを辿り、データ
送信、カウンタ+1、ポーリング信号転送を行なう。次
端末の次の端末も同様である。
When the first terminal device (closest to the control device) receives this, the counter is on, so it moves to (2), and since the flag of its own terminal is not 1, it simply transfers the polling signal to the next stage. No data is sent. Counter k on own terminal
When the polling signal is transferred to the terminal that has become
■Flag -1? Since the result is YES, the polling signal counter (currently k) is reset to 0 (2), the flag of the own terminal is also reset to O (2), and the polling signal with the counter = 0 is transferred to the next terminal. The terminal now has counter = 0
Therefore, data transmission, counter +1, and polling signal transfer are performed by following the route (■, ■, ■, etc.). The same goes for the next terminal after the next terminal.

フラグ=1は、当該端末がデータ送信の最終端末であっ
たことを示しており、該最終端末がポーリング信号のカ
ウンタ=kを0にリセットする権利を有する。
Flag = 1 indicates that the terminal was the final terminal for data transmission, and the final terminal has the right to reset the polling signal counter = k to 0.

この方式によると、端末が多数あっても、ポーリング周
期の各時点では送信データのある端末はに以内であれば
、1回のポーリングで端末データをすべて吸い上げるこ
とができ、バッファ容量もに台分で済む。たまたま多数
の端末で送信データが同時に発生した場合は複数回のポ
ーリングでデータ収集することになるが、端末データが
連続して発生するのでなければ端末でのデータのオーバ
フローもない。
According to this method, even if there are a large number of terminals, as long as the number of terminals that have data to send at each point in the polling cycle is within That's enough. If transmission data happens to occur at the same time in a large number of terminals, data will be collected by multiple pollings, but unless terminal data is generated continuously, there will be no data overflow at the terminals.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、受信バッファの大
きさを小さくすることができる。例えば端末台数100
台、データの最大長をIKバイトとすると、従来方式で
は100Kバイトのバッファが必要であったのに対し、
1度にデータ送信する端末台数を10台に制限してIO
Kバイトにすることが可能で、しかもどの端末も均等に
サービスを受けることができる。
As explained above, according to the present invention, the size of the reception buffer can be reduced. For example, the number of terminals is 100
Assuming that the maximum length of data is IK bytes, the conventional method required a 100K byte buffer.
IO by limiting the number of terminals that send data at one time to 10
K bytes, and all terminals can receive the same service.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はポーリングシステムの構成を説明するブロック
図、 第2図は信号のフォーマントの説明図、第3図は制御装
置の動作を示す流れ図、第4図は端末装置の動作を示す
流れ図である。 第1図、第2図で10は制御装置、11〜INは端末装
置、1aylln、la、・・・は信号線、Fはフラグ
、21はカウンタである。
Fig. 1 is a block diagram explaining the configuration of the polling system, Fig. 2 is an explanatory diagram of the signal formant, Fig. 3 is a flowchart showing the operation of the control device, and Fig. 4 is a flowchart showing the operation of the terminal device. be. In FIGS. 1 and 2, 10 is a control device, 11 to IN are terminal devices, 1aylln, la, . . . are signal lines, F is a flag, and 21 is a counter.

Claims (1)

【特許請求の範囲】 1、制御装置(10)と複数台の端末装置(11、12
、・・・)をループ状に接続し、制御装置からのポーリ
ング信号を端末装置間で受け渡して行って、1回のポー
リングで複数台の端末装置からのデータを制御装置へ吸
い上げるシステムにおいて、該ポーリング信号にデータ
送信を行なった端末装置の台数を示すカウンタを設け、
該カウンタが所定値以下のとき端末装置はデータ送信を
可能とされ、そしてデータ送出したとき該カウンタをイ
ンクリメントし、 また端末装置にフラグ(F)を設けて、最後のデータ送
信した端末装置は該フラグをセットし、また制御装置か
ら送られた該カウンタが前記所定値のポーリング信号を
受けたとき、該セットされたフラグを持つ端末装置がカ
ウンタをリセットすることを特徴とするポーリング方式
[Claims] 1. A control device (10) and a plurality of terminal devices (11, 12)
,...) are connected in a loop, and polling signals from the control device are passed between the terminal devices, and data from multiple terminal devices is sucked up to the control device with one polling. A counter indicating the number of terminal devices that transmitted data is provided in the polling signal,
When the counter is below a predetermined value, the terminal device is enabled to transmit data, and when data is transmitted, the counter is incremented, and a flag (F) is set in the terminal device, indicating that the terminal device that transmitted the last data is eligible for data transmission. A polling method characterized in that a flag is set, and when the counter sent from a control device receives a polling signal of the predetermined value, a terminal device having the set flag resets the counter.
JP9013288A 1988-04-12 1988-04-12 Polling system Pending JPH01261038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9013288A JPH01261038A (en) 1988-04-12 1988-04-12 Polling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9013288A JPH01261038A (en) 1988-04-12 1988-04-12 Polling system

Publications (1)

Publication Number Publication Date
JPH01261038A true JPH01261038A (en) 1989-10-18

Family

ID=13989982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9013288A Pending JPH01261038A (en) 1988-04-12 1988-04-12 Polling system

Country Status (1)

Country Link
JP (1) JPH01261038A (en)

Similar Documents

Publication Publication Date Title
US4583089A (en) Distributed computer control system with variable monitor timers
US5251214A (en) Method for transmitting data to a plurality of data stations
JPH01261038A (en) Polling system
JPH02230838A (en) Method and equipment for communication of field sensor
JPS586639A (en) Data transmitter
JP2823710B2 (en) Building management system
JPS59168737A (en) Multi-drop transmission system
JPH0496541A (en) Communication controller
JP3116165B2 (en) Monitoring and control system
JPH0344465B2 (en)
JPS62219056A (en) Data transmitter
JPS62216452A (en) Serial transmission equipment
JP3073830B2 (en) Communication control device
JPH01296828A (en) Condition signal transmitting system
JPS58198941A (en) Simple data transmitter
JPH04278749A (en) System for communicating data
JPH0152947B2 (en)
JPH0380732A (en) Bus transmission system
JPS61140293A (en) Communication system for communication conference among multi-points
JPS59114662A (en) Message transmitting device
JPH01303999A (en) Remote control system
EP0395376A3 (en) Data processing and handling system with channel extender in data processor to peripheral device data transfer link
JPS63199560A (en) Data transmission equipment
JPS6236997A (en) Two-way catv system
JPH1141375A (en) Communication system