Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0648478B2 - Masterless serial bus occupancy control method - Google Patents
[go: Go Back, main page]

JPH0648478B2 - Masterless serial bus occupancy control method - Google Patents

Masterless serial bus occupancy control method

Info

Publication number
JPH0648478B2
JPH0648478B2 JP61003434A JP343486A JPH0648478B2 JP H0648478 B2 JPH0648478 B2 JP H0648478B2 JP 61003434 A JP61003434 A JP 61003434A JP 343486 A JP343486 A JP 343486A JP H0648478 B2 JPH0648478 B2 JP H0648478B2
Authority
JP
Japan
Prior art keywords
transmission
data
serial bus
time
processing device
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.)
Expired - Fee Related
Application number
JP61003434A
Other languages
Japanese (ja)
Other versions
JPS62162159A (en
Inventor
弘昌 山岡
章弘 脇田
純寿 斉藤
康博 天日
和彦 下山
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP61003434A priority Critical patent/JPH0648478B2/en
Priority to IN5/CAL/87A priority patent/IN165881B/en
Priority to CN 87100279 priority patent/CN1008019B/en
Publication of JPS62162159A publication Critical patent/JPS62162159A/en
Publication of JPH0648478B2 publication Critical patent/JPH0648478B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数台の処理装置が通信用バスを共用する場
合のバス占有制御方式に係り、特に制御用プログラマブ
ル・コントローラ(以下PCと略す)に適用するに最適
なバス占有制御方法に関する。
Description: TECHNICAL FIELD The present invention relates to a bus occupancy control method when a plurality of processing devices share a communication bus, and more particularly to a control programmable controller (hereinafter abbreviated as PC). ) Is suitable for the bus occupancy control method.

〔従来の技術〕[Conventional technology]

PCは、プラントのスイツチ,接点,発振器の状態など
を入力し、コイルやモータのON/OFF、バルブの開
閉などを、プログラムにより演算し制御を行つている。
このプログラムは、高速かつサイクリツクに実行される
という特徴を有している。このPCを複数台接続したシ
ステムにおいては、PC間相互のデータ転送は、上述サ
イクルに同期し、高速に発生する。
The PC inputs the states of switches, contacts, oscillators, etc. of the plant, and controls the ON / OFF of coils and motors, the opening / closing of valves, etc. by a program.
This program has a feature that it is executed at high speed and cyclically. In a system in which a plurality of PCs are connected, data transfer between the PCs occurs at high speed in synchronization with the above cycle.

さらに、PCに要求されることはコンパクトさである。Furthermore, what is required of the PC is compactness.

そのためには、データ転送装置はパラレルバスよりもシ
リアルバスが望ましい。
For that purpose, the data transfer device is preferably a serial bus rather than a parallel bus.

またシリアルバスの制御方法としても1台のプロセツサ
でPCの演算制御とデータ転送制御の両方を行える方式
がコンパクトさの点で有利である。上記PCに於て、プ
ログラムは信号入力、演算、演算結果出力という流れで
実行されるが、PC間の協調のとれた制御を行うために
は、この一連のプログラムの中で必ず最低1回はデータ
転送を行い、演算結果を他PC及び外部へ連絡する必要
がある。この1回のデータ転送が確保されない場合PC
相互間の協調が遅れたりすることによりシステム全体と
しての制御性,応答性の低下をもたらすことになる。
Also, as a control method of the serial bus, a method in which one processor can perform both the arithmetic control of the PC and the data transfer control is advantageous in terms of compactness. In the above-mentioned PC, the program is executed in the sequence of signal input, calculation, and calculation result output, but in order to perform coordinated control between PCs, at least once in this series of programs. It is necessary to transfer data and communicate the calculation results to other PCs and the outside. If this one-time data transfer cannot be secured PC
If the mutual cooperation is delayed, the controllability and responsiveness of the entire system will deteriorate.

このことを解決するためにデータ転送を高速化し1プロ
グラム周期の中で、2度,3度のデータ転送を行い確実
を期す方法が考えられるが、上記に示す様に1台のプロ
セツサでPCの演算制御とデータ転送の両方の制御を行
いコンパクトさを狙いとしたPCではプロセツサがデー
タ転送処理に占有され演算制御の時間を確保することが
困難となつてくる。従つて演算周期とデータ転送の同期
をとり1プログラム周期で確実に1回のデータ転送を保
証しかつ演算制御時間を確保することが重要となる。
In order to solve this problem, it is conceivable to speed up data transfer and transfer data twice or three times in one program cycle to ensure reliability. However, as shown above, one processor can In a PC that aims at compactness by performing both arithmetic control and data transfer, the processor is occupied by the data transfer processing, and it becomes difficult to secure the time for arithmetic control. Therefore, it is important to synchronize the operation cycle and the data transfer to ensure one data transfer in one program cycle and to secure the operation control time.

従来シリアルバス占有制御方法としては、マスターとな
る装置があり、シリアルバスに接続される各スレーブ装
置のバス占有権の制御を行う方式や、マスターはなくバ
ス占有要求が発生した時に一方的にバス上にデータを送
出し、バス上でデータの衝突が発生した場合、一定時間
を隔てて、再度リトライを実施する衝突検出方法が知ら
れている。
As a conventional serial bus occupancy control method, there is a device that serves as a master, and a method of controlling the bus occupancy right of each slave device connected to the serial bus, or there is no master and a unilateral bus occupancy request is issued. A collision detection method is known in which data is transmitted to the upper side, and when a data collision occurs on the bus, a retry is performed again with a certain time interval.

しかしながら前者の方法はマスターが停止した場合デー
タ転送が停止してしまうという問題がある。後者の方法
はバス上のデータ衝突に伴うリトライ等の処理が複雑と
なり演算制御周期とデータ転送周期の同期をとるのが困
難となる。
However, the former method has a problem that data transfer stops when the master stops. The latter method complicates processing such as retries associated with data collision on the bus, and makes it difficult to synchronize the arithmetic control cycle with the data transfer cycle.

簡単な方法によりマスターレスバス占有制御を行う例と
しては、特開昭58-161061号公報に記載されたものであ
る。
An example of performing masterless bus occupancy control by a simple method is described in JP-A-58-161061.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

前記従来例(特開昭58-161061号公報)に記載された方
式では、送信待時間タイマの設定として前回受信終了時
点から次の送信に要する最低限の時間を設定することに
より、高速データ転送を行うことを主眼としているが、
送信データ量、不在PCの影響により伝送周期が変化す
るという問題があつた。
In the method described in the conventional example (Japanese Patent Laid-Open No. 58-161061), high-speed data transfer is achieved by setting the minimum time required for the next transmission from the end of the previous reception as the setting of the transmission waiting time timer. The main purpose is to
There is a problem that the transmission cycle changes due to the influence of the amount of transmitted data and the absent PC.

本発明の目的は、特別な優先制御装置を設けることな
く、簡単な構成でバス上のデータ衝突を回避し、かつ各
PCの演算制御時間とデータ送受信時間との合計が同期
した一定伝送周期にてサイクリツクデータ転送を行うこ
とを可能とするマスターレスシリアルバス占有制御方法
および制御装置を提供することにある。
An object of the present invention is to avoid a data collision on the bus with a simple configuration without providing a special priority control device, and to provide a constant transmission cycle in which the total of the arithmetic control time of each PC and the data transmission / reception time is synchronized. A masterless serial bus occupancy control method and a control device that enable cyclic data transfer to be performed.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明は、複数台の処理装置が共通バスに接続されたシ
ステムにおいて、システム立上げ時に決定された各処理
装置のシリアル番号に対応した送信時間間隔及び前回送
信を行つた処理装置の番号により決定される送信待時間
を各処理装置中の設定した計時装置を用いることによ
り、達成される。特に、本発明のマスターレスシリアル
バス占有制御方法は、複数台の処理装置を共通バスに接
続し、前記複数台の処理装置からサイクリツクにデータ
を共通バスに送信するものであって、処理装置のそれぞ
れに番号を割り付ける段階と、処理装置の数に対応した
送信間隔時間を決定する段階と、自己の処理装置の番号
と自己の処理装置が前回データを受信した処理装置の番
号との差に、送信間隔時間を乗じ、この積から前回デー
タがシリアスバス上に送出されている時間を減じること
によつて送信待時間を決定する段階と、送信待時間経過
後、自己の処理装置が、共通バスにデータを送信する段
階と、を有し、全処理装置が行うデータのサイクリツク
の送信を一定の伝送周期内で行うことを特徴とするもの
である。また、本発明のマスターレスシリアルバス占有
制御装置は共通バスに接続された複数台の処理装置を有
し、前記複数台の処理装置がサイクリツクにデータを前
記共通バスに送信するものであって、処理装置は、処理
プログラム及びデータを格納するメモリと、メモリに格
納されている処理プログラムを読み出して実行するマイ
クロプロセツシングユニツト(MPU)と、MPUの実
行結果を被プロセス手段に伝えると共に、被プロセス手
段からの情報をMPUに受けるプロセス入出力制御回路
と、共通バスに接続され、他の処理装置からの受信デー
タをMPUへ伝えると共に、MPUからの送信データを
共通バスへ伝えるシリアルバス入出力回路と、MPUに
自己の処理装置の番号及び各処理装置間の送信間隔時間
を与える計時装置と、自己の処理装置の番号と自己の処
理装置が前回データを受信した処理装置の番号との差
に、前記送信間隔時間を乗じ、該積からの前回データが
シリアスバス上に送出されている時間を減じることによ
つて送信待時間を決定する設定装置と、を有することを
特徴とする。
The present invention, in a system in which a plurality of processing devices are connected to a common bus, is determined by the transmission time interval corresponding to the serial number of each processing device determined at system startup and the number of the processing device that transmitted last time. The transmission waiting time is achieved by using the set timing device in each processing device. Particularly, the masterless serial bus occupancy control method of the present invention is to connect a plurality of processing devices to a common bus and transmit data from the plurality of processing devices to the common bus cyclically. Assigning a number to each, determining the transmission interval time corresponding to the number of processing devices, and the difference between the number of its own processing device and the number of the processing device from which its own processing device last received data, Multiply the transmission interval time and determine the transmission wait time by subtracting the time when the previous data was sent on the serial bus from this product, and after the transmission wait time elapses, its own processing device And a step of transmitting data to the device, and the transmission of the cyclic data is performed by all the processing devices within a certain transmission cycle. Further, the masterless serial bus occupancy control device of the present invention has a plurality of processing devices connected to a common bus, and the plurality of processing devices cyclically transmit data to the common bus. The processing device transmits a memory for storing a processing program and data, a micro processing unit (MPU) for reading and executing the processing program stored in the memory, and an execution result of the MPU to a process target unit, and A process input / output control circuit for receiving information from the process means in the MPU and a serial bus input / output connected to a common bus for transmitting data received from other processing devices to the MPU and transmitting data transmitted from the MPU to the common bus A circuit and a timer that gives the MPU the number of its own processing unit and the transmission interval time between each processing unit; Multiplying the difference between the number of the processing device and the number of the processing device that received the previous data by its own processing device by the transmission interval time, and subtracting the time during which the previous data from the product is transmitted on the serial bus. And a setting device that determines the transmission waiting time according to the above.

〔作用〕[Action]

同期した送信時間間隔でデータ送受信を行なうだけでな
く、所定の演算制御を各PCが高速かつサイクリツクに
行う必要性から、マスターレスでしかも全てが同一優先
順位を持ち、シリアルバス上のデータ衝突を回避し、一
定の送信時間間隔にてデータ転送を行う手段として、前
回転送した処理装置の番号と自処理装置の番号に対応し
た時間を計時装置に設定し、これを最適送信待時間とし
て送信を行うことにより、一定送信時間間隔にて伝送を
行うための転送データ量による補正が加えられることと
なり、上記目的が達成されることとなる。
In addition to transmitting and receiving data at synchronized transmission time intervals, it is necessary for each PC to perform predetermined arithmetic control at high speed and in a cyclic manner. Therefore, all PCs have the same priority, and data collision on the serial bus does not occur. As a means of avoiding and transferring data at fixed transmission time intervals, the time corresponding to the number of the processing device transferred last time and the number of its own processing device is set in the clock device, and this is set as the optimum transmission waiting time. By performing the correction, the correction based on the transfer data amount for performing the transmission at the constant transmission time interval is added, and the above object is achieved.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明を適用したPCの構成を、第2図は該P
Cを使用した制御システム例を示す。
FIG. 1 shows the configuration of a PC to which the present invention is applied, and FIG.
An example of a control system using C is shown.

先ず、第2図により全体構成を説明する。PC1は、主
としてプログラムを実行する中央処理装置(以下CPU
と略す。)2とプロセスとのインターフエイスを司どる
プロセス入出力装置(以下PIOと略す)3により構成
される。CPU2は、第2図のリミツトスイツチ5,発
振器8などのプロセスデータを、周期的にPIO3より
入力し、このプロセスデータとCPU2内にあらかじめ
格納されるプログラムにより演算実行し、再びPIOを
通し、第2図のモーター4,電磁弁6のON/OFF制
御、調整弁7の開閉制御を行つている。また第2図に示
すようにPC1は、シリアルバス9により他の各PCと
接続されており、各PCの演算制御に必要なデータ及び
演算結果を周期的に送出してPC相互の制御協調をとり
ながら演算制御を行う。
First, the overall configuration will be described with reference to FIG. The PC 1 is a central processing unit (hereinafter CPU) that mainly executes programs.
Abbreviated. ) 2 and a process input / output device (hereinafter abbreviated as PIO) 3 that controls the interface between the process 2) and the process. The CPU 2 periodically inputs the process data such as the limit switch 5 and the oscillator 8 shown in FIG. 2 from the PIO 3, executes the arithmetic operation by this process data and a program stored in advance in the CPU 2, and passes the PIO again, ON / OFF control of the motor 4 and solenoid valve 6 and opening / closing control of the adjusting valve 7 are performed. Further, as shown in FIG. 2, the PC 1 is connected to each other PC by a serial bus 9, and periodically sends out data and a calculation result necessary for the calculation control of each PC so that the PCs can cooperate with each other. Perform arithmetic control while taking.

次に第1図によりCPU2の構成を説明する。プログラ
ム,データ及び途中演算結果を格納するメモリ26,メ
モリ26に格納されているプログラムを実行するマイク
ロプロセツシングユニツト(以下MPUと略す)24,
プログラムを実行した結果を、プロセスに対し伝えるた
めのPIO3とのインターフエイスを司どるPIO入出
力制御回路28,PIO3から入力したデータ、及びM
PU24により演算実行された結果をシリアルバス9に
対し送出するシリアルバス出力回路22,シリアルバス
9上に送出された、他PCのデータ、演算結果を受信す
るシリアルバス入力回路21、及び、これらシリアルバ
ス入出力回路の制御を行うシリアルバス入出力制御回路
23、PC1のPC番号、シリアルバスへの送信データ
の送信間隔を設定する設定装置27,設定装置27によ
り決定されるPC番号、伝送周期と送信PC番号より得
られる送信時間を設定し、MPU24に対し送信タイミ
ングを与える計時装置25から成つている。
Next, the configuration of the CPU 2 will be described with reference to FIG. A memory 26 for storing programs, data, and intermediate calculation results, a microprocessing unit (hereinafter abbreviated as MPU) 24 for executing the programs stored in the memory 26,
PIO input / output control circuit 28 for controlling the interface with PIO3 for transmitting the result of executing the program to the process, data input from PIO3, and M
A serial bus output circuit 22 for sending the result of the operation executed by the PU 24 to the serial bus 9, a data of another PC sent on the serial bus 9, a serial bus input circuit 21 for receiving the operation result, and these serial The serial bus input / output control circuit 23 that controls the bus input / output circuit, the PC number of the PC 1, the setting device 27 that sets the transmission interval of the transmission data to the serial bus, the PC number determined by the setting device 27, and the transmission cycle. It comprises a time measuring device 25 for setting a transmission time obtained from a transmission PC number and giving a transmission timing to the MPU 24.

次に第1図に示すCPU2のデータ転送制御動作を説明
する。MPU24は、通常時メモリ26に格納されるプ
ログラムを実行しプロセス入出力制御回路28に接続さ
れたプロセス機器の制御を行つている。この演算制御
中、一定伝送周期でデータ送信を行うように計時装置2
5から送信タイミングがMPU24に対し与えられる。
MPU24は送信タイミングを受けとるとそれまでの演
算制御を中断しデータ転送制御を開始する。まずMPU
24は、メモリ26に格納された出力データをシリアル
バス入出力制御回路23内レジスタにセツトすることに
よりシリアルバス出力回路22を介しシリアルバス9に
データが送出される。MPU24は、自CPUの転送が
終了すると再び演算制御を始める。他PCがシリアルバ
ス9に対し送出した場合、送出データは、無条件にシリ
アルバス入力回路21を介し、シリアルバス入出力制御
回路23内レジスタにデータがセツトされる。データが
セツトされるとシリアルバス入出力制御回路23はMP
U24に対し、受信データが存在することを伝える。こ
れによりMPU24は、それまでの演算制御を中断し、
データ受信を開始する。MPU24は、シリアルバス入
出力制御回路23内レジスタにセツトされたデータをメ
モリ26に転送し、以下受信が終了するまでを繰り返
す。その後再びMPU24は、演算制御を始める。
Next, the data transfer control operation of the CPU 2 shown in FIG. 1 will be described. The MPU 24 executes a program stored in the normal-time memory 26 and controls the process equipment connected to the process input / output control circuit 28. During this arithmetic control, the timer device 2 is configured to transmit data at a constant transmission cycle.
5, the transmission timing is given to the MPU 24.
Upon receiving the transmission timing, the MPU 24 suspends the arithmetic control up to that point and starts the data transfer control. First MPU
The data 24 is sent to the serial bus 9 via the serial bus output circuit 22 by setting the output data stored in the memory 26 in the register in the serial bus input / output control circuit 23. The MPU 24 starts arithmetic control again when the transfer of its own CPU is completed. When another PC sends data to the serial bus 9, the send data is unconditionally set in the register in the serial bus input / output control circuit 23 via the serial bus input circuit 21. When the data is set, the serial bus I / O control circuit 23
Notify U24 that there is received data. As a result, the MPU 24 interrupts the arithmetic control so far,
Start receiving data. The MPU 24 transfers the data set in the register in the serial bus input / output control circuit 23 to the memory 26, and repeats the above steps until the reception is completed. After that, the MPU 24 starts arithmetic control again.

第3図にシリアルバスに送出されるデータのフオーマツ
ト例を示す。送出データは、まず送信PCの番号(S
A)続いて送信データ量(DL)そして送信データ(D
ATA)により構成される。
FIG. 3 shows an example of the format of the data sent to the serial bus. First, the data sent is the sending PC number (S
A) Subsequently, the transmission data amount (DL) and the transmission data (D
ATA).

第4および5図にMPU24のデータ転送処理フローチ
ヤートを示す。CPU2内MPU24は、リセツトスタ
ート後、装置のイニシヤライズを行う。伝送制御のイニ
シヤライズ処理をリセツトスタート後行われる。第1に
MPU24は、設定装置27に、あらかじめ設定されて
いた自PC番号、送信時間間隔t、及び総PC数を読み
出しメモリ26に格納する。その後MPU24は、シリ
アルバス上に既にデータ転送を行つているPCが他にあ
ることを確認するため計時装置25に他のPCの送信時
間および制御処理時間を考慮した最大待時間を設定しバ
スモニタ状態となる。これは第4図のフローチヤートの
ステツプF5,F10およびF15に対応する。もし、
最大待時間内にシリアルバス上に既にデータ転送を行う
PCが存在しない場合、計時装置25からMPUに対し
最大待時間後送信タイミングが与えられデータ送信が開
始される。MPUは送信を行い送信終了後再び最大待時
間を計時装置24に設定し、演算制御を実行する。以下
これを繰り返す(第4図ステツプF15〜F30参
照)。
4 and 5 show a data transfer processing flow chart of the MPU 24. The MPU 24 in the CPU 2 initializes the device after the reset start. The transmission control initialization process is performed after the reset start. First, the MPU 24 reads the preset own PC number, the transmission time interval t, and the total number of PCs in the setting device 27 and stores them in the memory 26. After that, the MPU 24 sets the maximum waiting time in consideration of the transmission time and the control processing time of another PC in the time measuring device 25 to confirm that there is another PC that is already transferring data on the serial bus. It becomes a state. This corresponds to steps F5, F10 and F15 of the flow chart in FIG. if,
When there is no PC that already transfers data on the serial bus within the maximum waiting time, the timing device 25 gives the MPU a transmission timing after the maximum waiting time, and data transmission is started. The MPU transmits, sets the maximum waiting time again in the clock device 24 after the transmission is completed, and executes arithmetic control. This is repeated thereafter (see steps F15 to F30 in FIG. 4).

シリアルバス上に既にデータ転送を開始しているPCが
存在する場合、計時装置25により送信タイミングが与
えられる以前に、MPU24に対しデータ受信したこと
が、第1図信号線100によりシリアルバス入出力制御
回路23からMPUに出力され、MPUは受信処理を開
始する。受信が正常に完了したかどうかの判定は、デー
タの最終受信をもつて判定される。これは通常データの
最終部にCRC等のエラーチエツクコードが含まれてい
るからである。受信データ異常時、誤つたデータにより
送信待時間を設定した場合、データの衝突発生の可能性
が大であるため、計時装置25への送信待時間の設定
は、前々回のデータの正常受信確認後に算出した送信待
時間を用いる。受信データ異常時は、前々回の正常デー
タ受信のときに算出した送信待時間によつて決定され
る。
When there is a PC that has already started data transfer on the serial bus, the fact that data has been received by the MPU 24 before the transmission timing is given by the timer 25 means that the serial bus input / output by the signal line 100 in FIG. It is output from the control circuit 23 to the MPU, and the MPU starts the reception process. The determination of whether the reception has completed successfully is made with the final reception of the data. This is because an error check code such as CRC is included in the final part of the normal data. When the transmission waiting time is set due to incorrect data when the reception data is abnormal, there is a high possibility that a data collision will occur. Therefore, the transmission waiting time is set to the timekeeping device 25 after the confirmation of the normal reception of the data two times before. The calculated transmission waiting time is used. When the reception data is abnormal, it is determined by the transmission waiting time calculated when the normal data is received two times before.

計時装置25への送信待時間設定を受信終了時点で行う
ためもし、従来のように一定待時間をデータ受信後に付
加したとするとデータ量の変化に伴い伝送周期も変化し
てしまう。これを一定の伝送周期とするため送信待時間
に他のPCから前回受信したデータ量による補正を行
う。第6図に送信待時間Tの設定例を示す。送信待時間
Tは、第1図の設定回路27により設定される自PC番
号、総PC数、送信時間間隔t及び、受信データから得
られる送信PC番号、データ量により決定される。自P
C番号が前回データ送信したPCの番号より大である場
合、送信待時間TはT=(自PC番号−前回送信PC番
号)×t−τにて得られる。ここでτはシリアルバ
ス上に前回のデータが送出されている時間であり、デー
タ転送を一定伝送周期Tにて行うための補正時間であ
る。またtはいずれかのPCが送信を開始する送信時間
間隔である。τは、τ=(送信データ量)÷(伝送
速度)にて得られる。尚、簡略化しτの平均をτと
し、一律にτにより送信待時間の補正を行うことも可能
である。しかしこの場合は伝送周期Tはわずかながら
変化する可能性がある。
Since the transmission waiting time is set to the clock device 25 at the end of reception, if the constant waiting time is added after receiving the data as in the conventional case, the transmission cycle also changes with the change in the data amount. In order to make this a constant transmission cycle, correction is made by the amount of data previously received from another PC during the transmission waiting time. FIG. 6 shows an example of setting the transmission waiting time T. The transmission waiting time T is determined by the own PC number set by the setting circuit 27 in FIG. 1, the total number of PCs, the transmission time interval t, the transmission PC number obtained from the received data, and the data amount. Own P
When the C number is larger than the number of the PC that transmitted the data last time, the transmission waiting time T is obtained by T = (own PC number−previous transmission PC number) × t−τ i . Here, τ i is the time during which the previous data is sent out on the serial bus, and is the correction time for performing data transfer at the constant transmission cycle T t . Further, t is a transmission time interval at which any PC starts transmission. τ i is obtained by τ i = (transmission data amount) ÷ (transmission rate). Note that it is also possible to simply make the average of τ i τ and uniformly correct the transmission waiting time by τ. However, in this case, the transmission cycle T t may change slightly.

次に自PC番号が受信PC番号より小さい場合、送信待
時間Tは、T=(総PC数+自PC番号−受信PC番
号)×t−τにより得られる。これにより送信待時間
Tは常に正数となる。自PC送信後の送信待時間Tは補
正後の最大待時間であるT=総PC数×t−τにより
設定される。
Next, when the own PC number is smaller than the received PC number, the transmission waiting time T is obtained by T = (total number of PCs + own PC number−received PC number) × t−τ i . As a result, the transmission waiting time T is always a positive number. The transmission waiting time T after the transmission of the own PC is set by the corrected maximum waiting time T = total number of PCs × t−τ i .

以上手順にて得られた送信待時間を第1図計時装置25
に設定後第5図ステツプF61〜F63に示すPC抜け
チエツクを行う。
The transmission waiting time obtained by the above procedure is shown in FIG.
After setting to, the PC removal check shown in steps F61 to F63 in FIG. 5 is performed.

各PCは前回受信PC番号を記憶しており今回受信PC
番号との比較を行う。前回受信と今回受信のPC番号の
差が1以外であつた場合、前回受信と今回受信の間にP
Cの抜けが生じたことを示す。これは今まで使っていた
PCがダウンして急に送信しなくなつた場合が考えられ
る。抜けPC番号は、今回受信PC番号と前回受信PC
番号及びその差により逆算し、その番号を得ることがで
きる。この抜けPCの番号を知ることにより、プロセス
制御を止めたり、その抜けPCに対応する送信時間間隔
の間自己のPCのプロセス制御に専念できる。
Each PC remembers the last received PC number and this time received PC
Make a comparison with the number. If the difference between the PC number of the previous reception and the current reception is other than 1, P between the previous reception and the current reception
This indicates that C is missing. This may be because the PC that I have used so far goes down and suddenly stops transmitting. The missing PC numbers are the currently received PC number and the previously received PC number.
The number can be obtained by back-calculating the number and its difference. By knowing the number of the missing PC, it is possible to stop the process control or concentrate on the process control of the own PC during the transmission time interval corresponding to the missing PC.

次に受信データを第1図メモリ26上のワークエリアに
格納す。以上にて受信処理を受了し、送信待状態に入
り、中断されていた演算制御を再開する(第4図のステ
ツプF40〜F65)。以上PC内処理フローチヤート
を説明したが、次に第7図により全体の制御方式を以下
に説明する。前提条件としてPC♯2は停電により停止
しているものとする。
Next, the received data is stored in the work area on the memory 26 in FIG. As a result, the reception process is completed, the transmission waiting state is entered, and the suspended arithmetic control is restarted (steps F40 to F65 in FIG. 4). The processing flow chart in the PC has been described above. Next, the overall control system will be described below with reference to FIG. As a precondition, it is assumed that PC # 2 is stopped due to a power failure.

PC♯3に着目するとPC♯は演算制御実行中PC♯0
からデータを受信後データ受信処理を開始し正常受信判
定の後計時装置25に(3−0)×t−τ=3t−τ
を設定し送信待状態に入り演算制御を再開する。次に
t−τ時間経過後PC♯1が送信を開始しPC♯3は
再びデータ受信処理を開始する。データ正常受信後計時
装置25に送信待時間TをT=(3−1)×t−τ
2t−τと更新し送信待状態となり演算制御を再開す
る。ここでPC♯2は停電により停止しているため2t
−τ時間経過後PC♯3は、計時装置25からの送信
タイミングを受けとり送信処理を開始する。送信終了後
計時装置25には最大待時間が設定される。
Focusing on PC # 3, PC # is in execution of arithmetic control PC # 0
(3-0) × t−τ 0 = 3t−τ after the normal reception determination is started after the data is received from
Set 0 to enter the transmission wait state and restart arithmetic control. Then, after the lapse of t-τ 0 time, PC # 1 starts transmission and PC # 3 starts data reception processing again. The transmission waiting time T is set to T = (3-1) × t−τ I = in the time measuring device 25 after the normal reception of the data.
It is updated to 2t-τ 1 and the transmission waiting state is entered, and the arithmetic control is restarted. 2t since PC # 2 is stopped due to a power failure
After the lapse of −τ 1 hour, the PC # 3 receives the transmission timing from the timing device 25 and starts the transmission processing. The maximum waiting time is set in the time measuring device 25 after the transmission.

以上示す様に、送信待時間に他のPC送信時間τの補正
を加えることにより、伝送周期が一定となる。伝送周期
は、総PC数と送信間隔tにより決定され、伝送周期T
はT=総PC数×tと一定となる。総PC数及び送
信時間間隔tは、設定装置27により柔軟に設定可能で
あり、これによりいかなるシステムに応じられる伝送系
を構成することができる。1例として次の様なシステム
構成を挙げておく。伝送系は、5台のPCから成り、
0.2秒伝送周期Tで伝送及び制御を行わせたい場
合、総PC数を5、送信時間間隔tを0.04秒とする
ことにより容易に0.2秒の伝送周期Tを設定するこ
とができる。尚、制御は、伝送のあいまいに行い1伝送
周期で1回の制御を行う様に構成する。また、将来この
システムに3台のPCが追加される可能性があるという
場合には初めから余裕をもつて総PC数を10、送信間
隔tを、0.02秒にしておく。これにより総PC数が
10台になるまでが追加となつた場合にも、他のPCの
設定を変えることなくかつ伝送周期を一定としたままで
のPCの追加が可能となる。
As described above, the transmission cycle becomes constant by adding the correction of the other PC transmission time τ to the transmission waiting time. The transmission cycle is determined by the total number of PCs and the transmission interval t, and the transmission cycle T
t is constant such that T t = total number of PCs × t. The total number of PCs and the transmission time interval t can be flexibly set by the setting device 27, so that a transmission system suitable for any system can be configured. The following system configuration is given as an example. The transmission system consists of 5 PCs,
If you want to perform the transmission and control in 0.2 seconds transmission period T t, the total number of PC 5, easily set transmission period T t of 0.2 seconds by the 0.04 second transmission time interval t can do. Incidentally, the control is performed so that the transmission is ambiguous, and the control is performed once in one transmission cycle. If three PCs may be added to this system in the future, the total number of PCs is set to 10 and the transmission interval t is set to 0.02 seconds with a margin from the beginning. As a result, even when the total number of PCs is 10 and additional PCs are added, the PCs can be added without changing the settings of the other PCs and while keeping the transmission cycle constant.

〔発明の効果〕〔The invention's effect〕

本発明によれば、送出データフオーマツト内の送信PC
番号、設定装置により設定される送信時間間隔、及び、
送出データフオーマツト内の送信データ量により最適送
信待時間を求め、各PCの計時装置に設定することによ
り、システムに対応した一定の伝送周期にてバス上デー
タの衝突のないシリアルバス占有制御を実現する効果が
ある。
According to the present invention, the sending PC in the sending data format
Number, transmission time interval set by the setting device, and
The optimum transmission wait time is calculated from the amount of transmission data in the transmission data format, and is set in the clock device of each PC to enable serial bus occupation control without data collision on the bus at a constant transmission cycle corresponding to the system. There is an effect to be realized.

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

第1図はCPUの内部構成図、第2図は、本発明のPC
によるシステム構成例、第3図はシリアルバス上データ
フオーマツト、第4図および第5図は制御装置内伝送処
理フロー、第6図は、送信待時間の決定法、第7図はシ
リアルバス上及び各PCの処理タイムチヤートを示す。 1…PC、2…CPU、9…シリアルバス、24…MP
U、25…時計装置。
FIG. 1 is an internal configuration diagram of a CPU, and FIG. 2 is a PC of the present invention.
An example of system configuration according to FIG. 3, FIG. 3 is a data format on the serial bus, FIGS. 4 and 5 are transmission processing flows in the control device, FIG. 6 is a method for determining a transmission waiting time, and FIG. 7 is a serial bus. And the processing time chart of each PC is shown. 1 ... PC, 2 ... CPU, 9 ... Serial bus, 24 ... MP
U, 25 ... Clock device.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 斉藤 純寿 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (72)発明者 天日 康博 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (72)発明者 下山 和彦 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (56)参考文献 特開 昭56−54145(JP,A) 特開 昭59−167729(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Junju Saito 5-2-1 Omika-cho, Hitachi City, Ibaraki Prefecture Hitachi Ltd. Omika Plant, Ltd. (72) Inventor Yasuhiro Asahi 5 Omika-cho, Hitachi City, Ibaraki Prefecture 2-1-1, Hitachi Ltd. Omika Plant (72) Inventor Kazuhiko Shimoyama 5-2-1 Omika-cho, Hitachi City, Ibaraki Hitachi Ltd. Omika Plant (56) References JP-A-56- 54145 (JP, A) JP 59-167729 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数台の処理装置を共通バスに接続し、一
つの処理装置からサイクリツクにデータを共通バスに送
信し、その他の処理装置で受信するマスターレスシリア
ルバス占有制御方法において、 前記処理装置のそれぞれに番号を割り付ける段階と、 前記処理装置の数に対応した送信間隔時間を決定する段
階と、 自己の処理装置の番号と自己の処理装置が前回データを
受信した処理装置の番号との差に、前記送信間隔時間を
乗じ、該積から前記送信間隔時間より小さい前回データ
がシリアルバス上に送出されている時間を減じることに
よつて送信待時間を決定する段階と、 前記送信待時間経過後、自己の処理装置が共通バスにデ
ータを送信する段階と、を有し、 全処理装置が行うデータのサイクリツクの送信を一定の
伝送周期内で行うことを特徴とするマスターレスシリア
ルバス占有制御方法。
1. A masterless serial bus occupancy control method in which a plurality of processing devices are connected to a common bus, data is cyclically transmitted from one processing device to the common bus, and the data is received by another processing device. Assigning a number to each of the devices, determining a transmission interval time corresponding to the number of the processing devices, and the number of its own processing device and the number of the processing device the own processing device previously received data. Determining the transmission waiting time by multiplying the difference by the transmission interval time, and subtracting from this product the time during which previous data smaller than the transmission interval time is being sent out on the serial bus; and the transmission waiting time. After the lapse of time, the own processing device transmits data to the common bus, and the cyclic transmission of data performed by all processing devices is performed within a certain transmission cycle. Master-less serial bus occupation control method comprising the door.
JP61003434A 1986-01-13 1986-01-13 Masterless serial bus occupancy control method Expired - Fee Related JPH0648478B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP61003434A JPH0648478B2 (en) 1986-01-13 1986-01-13 Masterless serial bus occupancy control method
IN5/CAL/87A IN165881B (en) 1986-01-13 1987-01-01
CN 87100279 CN1008019B (en) 1986-01-13 1987-01-13 Method and device for masterless serial bus occupancy control of programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61003434A JPH0648478B2 (en) 1986-01-13 1986-01-13 Masterless serial bus occupancy control method

Publications (2)

Publication Number Publication Date
JPS62162159A JPS62162159A (en) 1987-07-18
JPH0648478B2 true JPH0648478B2 (en) 1994-06-22

Family

ID=11557255

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61003434A Expired - Fee Related JPH0648478B2 (en) 1986-01-13 1986-01-13 Masterless serial bus occupancy control method

Country Status (3)

Country Link
JP (1) JPH0648478B2 (en)
CN (1) CN1008019B (en)
IN (1) IN165881B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2566267B2 (en) * 1988-01-31 1996-12-25 松下電工株式会社 Entrance / exit display system using a telephone line
CN104243189B (en) * 2013-06-09 2018-07-20 海尔集团公司 A kind of more equipment communication means and its communication system based on same channel
DE102019214721A1 (en) * 2019-09-26 2021-04-01 Robert Bosch Gmbh Conflict detector for a subscriber station of a serial bus system and method for communication in a serial bus system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5654145A (en) * 1979-10-11 1981-05-14 Nec Corp Data transmission system between processors
JPS59167729A (en) * 1983-03-11 1984-09-21 Fuji Xerox Co Ltd Multi-cpu communication device

Also Published As

Publication number Publication date
CN1008019B (en) 1990-05-16
IN165881B (en) 1990-02-03
JPS62162159A (en) 1987-07-18
CN87100279A (en) 1987-08-12

Similar Documents

Publication Publication Date Title
US4432054A (en) Loop data transmission control method and system
JPS6324346A (en) Information transmission system
US6981063B1 (en) Method for time synchronization of a computer network, and computer network with time synchronization
JP3108393B2 (en) Control system using PLC
JPS6066538A (en) Method of synchronizing clock
US20160291556A1 (en) Controller
JPH06101732B2 (en) Communication control method
JPH0648478B2 (en) Masterless serial bus occupancy control method
JP2968733B2 (en) Serial bus controller
JP2007181207A (en) Synchronous multiplexing with subframes
CA2411788C (en) Device and method for synchronising a system of coupled data processing facilities
JP2004234098A (en) Time synchronization system
JPH0654445B2 (en) Data transmission control method for distributed controller
US20240219882A1 (en) Exchanging of a programmable logic controller
JPH09219714A (en) Transmission control system
JP2004133496A (en) Computer system
Ferreira et al. Enforcing consistency of communication requirements updates in FTT-CAN
JP2821091B2 (en) Remote monitoring control device and time synchronization device
US20250330298A1 (en) Control and monitoring signal transmission system
JP3381463B2 (en) Programmable controller
JPH116628A (en) Control device for heating and hot-water supplying machine
JP2000172658A (en) Masterless serial bus occupancy control method and distributed control system
JP2002041492A (en) Multiprocessor device
JPS63172301A (en) Multiplexing system controller
FI83467B (en) PROCESSORSYSTEM.

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees