JP2005295466A - Communication method - Google Patents

Communication method Download PDF

Info

Publication number
JP2005295466A
JP2005295466A JP2004111654A JP2004111654A JP2005295466A JP 2005295466 A JP2005295466 A JP 2005295466A JP 2004111654 A JP2004111654 A JP 2004111654A JP 2004111654 A JP2004111654 A JP 2004111654A JP 2005295466 A JP2005295466 A JP 2005295466A
Authority
JP
Japan
Prior art keywords
transmission right
transmission
time zone
devices
right acquisition
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
JP2004111654A
Other languages
Japanese (ja)
Inventor
Yuichi Yamamoto
祐一 山本
Akio Takeuchi
昭夫 竹内
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004111654A priority Critical patent/JP2005295466A/en
Publication of JP2005295466A publication Critical patent/JP2005295466A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bidirectional Digital Transmission (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

【課題】 半二重通信における通信衝突を防止することができる通信方法を提供する。
【解決手段】 半二重通信にてデータの送受信を実行する各機器に対して、データの送信権の獲得が可能となる送信権獲得時間帯を、電源同期信号の1周期毎に互いに重複しないように予め設定しておく。そして、各機器が、電源同期信号の周期の基点の検出毎にタイマを起動させ(ステップS201)、タイマの経過時間が自機器の送信権獲得時間帯の範囲内となって(ステップS206)、送信権を獲得した後(ステップS207)に、データ送信を実行するようにする。
【選択図】 図2
PROBLEM TO BE SOLVED: To provide a communication method capable of preventing a communication collision in half duplex communication.
A transmission right acquisition time zone in which a data transmission right can be acquired for each device that transmits and receives data by half-duplex communication does not overlap each other for each cycle of a power supply synchronization signal. It is set in advance as follows. Then, each device starts a timer every time the base point of the period of the power supply synchronization signal is detected (step S201), and the elapsed time of the timer falls within the transmission right acquisition time zone of the own device (step S206). After acquiring the transmission right (step S207), data transmission is executed.
[Selection] Figure 2

Description

本発明は、機器間の半二重通信において通信衝突が発生しないように通信を行う通信方法に関する。   The present invention relates to a communication method for performing communication so that communication collision does not occur in half-duplex communication between devices.

通常、機器間でデータ通信を行うシステムを設計する場合は、データを送信する方向を意識して設計する必要がある。すなわち、1つの通信伝送路上に各機器が同時にデータを送信すると、通信伝送路上にてデータの衝突が発生し、正常な通信が行えない場合が発生する。そこで、通信中にデータが衝突することのないように、通信する方向を予め決めておくなどの取り決め(通信方式)が必要となる。通信方式は、一般的に、単方向通信方式、半二重通信方式、全二重通信方式に分類される。   Normally, when designing a system that performs data communication between devices, it is necessary to design in consideration of the direction of data transmission. That is, if each device transmits data simultaneously on one communication transmission path, a data collision occurs on the communication transmission path and normal communication cannot be performed. In order to prevent data from colliding during communication, an arrangement (communication method) such as determining a communication direction in advance is required. Communication systems are generally classified into unidirectional communication systems, half-duplex communication systems, and full-duplex communication systems.

単方向通信方式は、送信側の機器と受信側の機器が一意に決定付けられているという理由から、また、全二重通信方式は、送信用と受信用の通信伝送路が独立しているという理由から、データの衝突が発生しない構成となっている。ただし、これら2つの通信方式には、データ衝突が発生しないという利点もあるが、一方で、単方向通信方式には双方向通信ができないという欠点があり、全二重通信方式には結線やハードウェア構成が送信用、受信用と個別に必要となり、高価になるという欠点がある。   The unidirectional communication method is uniquely determined by the transmitting device and the receiving device, and the full-duplex communication method has independent transmission and reception communication transmission paths. For this reason, there is no data collision. However, these two communication methods have the advantage that data collision does not occur. On the other hand, the unidirectional communication method has the disadvantage that bidirectional communication is not possible. There is a disadvantage that the hardware configuration is separately required for transmission and reception, and is expensive.

半二重通信方式は、送受信用ハードウェア(機器)が送信処理と受信処理を切り替えながら1つの通信伝送路を使用する方式である。各機器は、双方向のデータ通信が可能であるが、送信処理と受信処理を同時に行うことはできない。また、単一の通信伝送路を各機器にて共用するため、ある機器がデータ送信を行っているときに他の機器がデータ送信を行ってしまうと、データの衝突が発生し、正常な通信が行えなくなる。   The half-duplex communication method is a method in which transmission / reception hardware (device) uses one communication transmission line while switching between transmission processing and reception processing. Each device can perform bidirectional data communication, but cannot perform transmission processing and reception processing at the same time. Also, since a single communication transmission path is shared by each device, if one device transmits data while another device transmits data, a data collision occurs and normal communication is performed. Cannot be performed.

組み込み機器システムの分野においては、双方向通信を行うことができるシステムやハードウェア/LSI(例えば、マイクロコンピュータ)を設計する場合、送受信に関係する回路が全二重通信方式よりも簡単であり、安価にできることから半二重通信方式が多く採用されている。   In the field of embedded device systems, when designing a system or hardware / LSI (for example, a microcomputer) capable of bidirectional communication, the circuit related to transmission and reception is simpler than the full-duplex communication method. A half-duplex communication method is often used because it can be made inexpensively.

半二重通信方式にて通信を行う場合、前述した通信衝突の問題があるため、従来より、データ衝突を検出する機構を具備する半二重通信システムが提案されている(例えば、特許文献1参照。)。また、専用のハードウェア構成を利用してデータ衝突を防止する装置などが提案されている(例えば、特許文献2参照。)。   When communication is performed by the half-duplex communication method, there is a communication collision problem described above, and thus a half-duplex communication system including a mechanism for detecting a data collision has been conventionally proposed (for example, Patent Document 1). reference.). In addition, a device that prevents data collision using a dedicated hardware configuration has been proposed (see, for example, Patent Document 2).

しかしながら、衝突検出器を具備し、衝突検出時に、衝突判定・データ送信の中断やデータ内容の退避・データ再送処理などを行う従来の半二重通信システムでは、ハードウェア的にも、ソフトウェア的にも複雑な構成が必要であった。   However, in a conventional half-duplex communication system that includes a collision detector and performs collision determination, data transmission interruption, data content saving, data retransmission processing, etc. when a collision is detected, both in hardware and software Even a complicated configuration was required.

また、別の手法として、通信伝送路の他に、送信禁止信号や送信要求信号用の制御信号線を設けて通信制御を行う方法もあるが、専用信号線が余分に必要な上、ソフトウェアで処理する場合は、完全には相手側の送信を禁止することができないという問題が残る。   As another method, there is a method of performing communication control by providing a control signal line for a transmission prohibition signal or a transmission request signal in addition to a communication transmission line. However, an extra dedicated signal line is required and software is used. In the case of processing, there still remains a problem that the other party's transmission cannot be completely prohibited.

また、全二重通信方式によれば、衝突の課題はなくなるが、半二重通信方式のハードウェアに比べてコスト面での問題があった。
また、専用のハードウェアを追加して衝突を防止する手法もあるが、同様にコスト面の問題があった。
特表2002−502563号公報(第7−14頁、第2図) 特開平9−321737号公報(第5−6頁、第1図、第12図)
Moreover, according to the full-duplex communication method, the problem of collision is eliminated, but there is a problem in terms of cost compared to hardware of the half-duplex communication method.
In addition, there is a method for preventing collision by adding dedicated hardware, but there is also a cost problem.
JP 2002-502563 A (page 7-14, FIG. 2) Japanese Patent Laid-Open No. 9-321737 (page 5-6, FIGS. 1 and 12)

本発明は、上記問題点に鑑み、所定の通信方式でデータの送受信を実行する各機器に、データの送信権の獲得が可能となる送信権獲得時間帯を、図3、6、8に示すように周期性のある信号の周期の基点を基準として互いに重複しないように予め設定しておき、各機器が、自機器の送信権獲得時間帯において送信権を獲得した後に送信データを送信することにより、半二重通信における通信衝突を防止することができる通信方法を提供することを目的とする。   In view of the above problems, the present invention shows transmission right acquisition time zones in which data transmission right can be acquired for each device that transmits and receives data by a predetermined communication method, as shown in FIGS. As described above, it is set in advance so that they do not overlap each other with reference to the period base point of the periodic signal, and each device transmits transmission data after acquiring the transmission right in the transmission right acquisition time zone of its own device. Therefore, it aims at providing the communication method which can prevent the communication collision in half-duplex communication.

本発明の請求項1記載の通信方法は、複数の機器の間で通信が行われる通信システムにおいて、前記機器の各々には、データの送信権の獲得が可能となる送信権獲得時間帯が、周期性のある信号の1周期毎に互いに重複しない範囲で予め設定されており、前記機器の各々が、自機器の前記送信権獲得時間帯において前記送信権を獲得した後に送信データを送信する通信方法であって、前記機器の各々が、前記機器の各々に入力される前記周期性のある信号から周期の基点を検出する基点検出工程と、前記検出した前記基点を基準に経過時間を計時するタイマを起動するタイマ起動工程と、他の機器が既に前記送信権を獲得しているか否かを判定する判定工程と、他の機器が前記送信権を獲得していない場合に、自機器の前記送信権獲得時間帯と前記タイマの経過時間とを比較し、前記タイマの経過時間が自機器の前記送信権獲得時間帯の範囲内であれば、送信権獲得用のコマンドを他の機器に発行して前記送信権を獲得する送信権獲得工程と、を具備することを特徴とする。   In the communication method according to claim 1 of the present invention, in a communication system in which communication is performed between a plurality of devices, each of the devices has a transmission right acquisition time zone in which acquisition of data transmission right is possible. Communication that is preset in a range that does not overlap each other for each period of a periodic signal, and each of the devices transmits transmission data after acquiring the transmission right in the transmission right acquisition time zone of the own device A method in which each of the devices detects a base point of a period from the periodic signal input to each of the devices, and measures an elapsed time based on the detected base point A timer starting step of starting a timer, a determination step of determining whether or not another device has already acquired the transmission right, and when the other device has not acquired the transmission right, Transmission right acquisition time zone When the elapsed time of the timer is within the range of the transmission right acquisition time zone of the own device, a transmission right acquisition command is issued to another device to determine the transmission right. And a transmission right acquisition step to acquire.

また、本発明の請求項2記載の通信方法は、請求項1記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする。   The communication method according to claim 2 of the present invention is the communication method according to claim 1, further comprising a transmission right releasing step of releasing the transmission right when transmission of transmission data is completed. .

また、本発明の請求項3記載の通信方法は、請求項1もしくは2のいずれかに記載の通信方法であって、前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする。   A communication method according to claim 3 of the present invention is the communication method according to claim 1 or 2, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. It is characterized by that.

また、本発明の請求項4記載の通信方法は、請求項1ないし3のいずれかに記載の通信方法であって、前記送信権を獲得した機器がその他の機器へ前記機器の各々に設定されている前記送信権獲得時間帯を変更するコマンドを発行することにより、前記機器の各々の前記送信権獲得時間帯を任意に変更できることを特徴とする。   The communication method according to claim 4 of the present invention is the communication method according to any one of claims 1 to 3, wherein the device that has acquired the transmission right is set to each of the devices to other devices. The transmission right acquisition time zone of each of the devices can be arbitrarily changed by issuing a command for changing the transmission right acquisition time zone.

また、本発明の請求項5記載の通信方法は、2つの機器の間で通信が行われる通信システムにおいて、前記機器の各々には、データの送信権の獲得が可能となる送信権獲得時間帯が、周期性のある信号の周期の基点を基準に交互に設定されており、前記機器の各々が、自機器の前記送信権獲得時間帯において前記送信権を獲得した後に送信データを送信する通信方法であって、前記機器の各々が、他方の機器が既に前記送信権を獲得しているか否かを判定する判定工程と、他方の機器が前記送信権を獲得しておらず、かつ自機器の前記送信権獲得時間帯であれば、送信権獲得用のコマンドを他方の機器に発行して前記送信権を獲得する送信権獲得工程と、を具備することを特徴とする。   The communication method according to claim 5 of the present invention is a communication system in which communication is performed between two devices. Are alternately set with reference to the base point of the period of the periodic signal, and each of the devices transmits the transmission data after acquiring the transmission right in the transmission right acquisition time zone of the own device. A determination step of determining whether each of the devices has already acquired the transmission right, and the other device has not acquired the transmission right, and the own device And a transmission right acquisition step of acquiring the transmission right by issuing a transmission right acquisition command to the other device in the transmission right acquisition time period.

また、本発明の請求項6記載の通信方法は、請求項5記載の通信方法であって、前記周期性のある信号は、1周期が前記送信権獲得用のコマンドの発行に要する時間以上の信号であることを特徴とする。   The communication method according to claim 6 of the present invention is the communication method according to claim 5, wherein the periodic signal has a period equal to or longer than a time required for issuing the transmission right acquisition command. It is a signal.

また、本発明の請求項7記載の通信方法は、請求項5もしくは6のいずれかに記載の通信方法であって、前記送信権獲得時間帯として、前記周期性のある信号の周期の基点を基準に交互に発生する電位レベルの異なる2種類の信号の発生期間が前記機器の各々に割り当てられており、前記送信権獲得工程において自機器の前記送信権獲得時間帯であるかどうかを判定する際に、前記2種類の信号のいずれの発生期間であるかを判定することを特徴とする。   A communication method according to claim 7 of the present invention is the communication method according to claim 5 or 6, wherein the transmission right acquisition time zone is a base point of the period of the periodic signal. It is determined whether or not the generation periods of two types of signals with different potential levels that are alternately generated based on the reference are assigned to each of the devices, and are within the transmission right acquisition time zone of the own device in the transmission right acquisition step. In this case, the generation period of the two kinds of signals is determined.

また、本発明の請求項8記載の通信方法は、請求項7記載の通信方法であって、前記2種類の信号は電位レベルがHレベルの信号と電位レベルがLレベルの信号であることを特徴とする。   The communication method according to claim 8 of the present invention is the communication method according to claim 7, wherein the two types of signals are a signal having a potential level of H level and a signal having a potential level of L level. Features.

また、本発明の請求項9記載の通信方法は、請求項8記載の通信方法であって、前記機器の各々は前記Hレベルの信号の立ち上がりエッジと前記Lレベルの信号の立ち下がりエッジを検出可能であり、前記送信権獲得工程において自機器の前記送信権獲得時間帯であるかどうかを判定する際に、直近に検出したエッジが前記Hレベルの信号の立ち上がりエッジと前記Lレベルの信号の立ち下がりエッジのいずれであるかを判定することを特徴とする。   The communication method according to claim 9 of the present invention is the communication method according to claim 8, wherein each of the devices detects a rising edge of the H level signal and a falling edge of the L level signal. When determining whether or not it is the transmission right acquisition time zone of its own device in the transmission right acquisition step, the most recently detected edges are the rising edge of the H level signal and the L level signal. It is characterized by determining which one of the falling edges.

また、本発明の請求項10記載の通信方法は、請求項5ないし9のいずれかに記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする。   A communication method according to claim 10 of the present invention is the communication method according to any one of claims 5 to 9, comprising a transmission right release step of releasing the transmission right when transmission of transmission data is completed. It is characterized by doing.

また、本発明の請求項11記載の通信方法は、請求項5ないし10のいずれかに記載の通信方法であって、前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする。   The communication method according to claim 11 of the present invention is the communication method according to any one of claims 5 to 10, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. It is characterized by that.

また、本発明の請求項12記載の通信方法は、複数の機器の間で通信が行われる通信システムにおいて、前記機器の各々には、自機器の識別子と送信可能機器の識別子の初期値と前記送信可能機器の識別子の遷移順序が予め設定されており、前記機器の各々が、自機器の前記識別子と前記送信可能機器の識別子とが一致し、かつ自機器に送信データが存在する場合に、データの送信権を獲得して送信データを送信する通信方法であって、前記機器の各々が、他の機器が既に前記送信権を獲得しているか否かを判定する第1の判定工程と、他の機器が前記送信権を獲得していない場合に、前記機器の各々に入力される周期性のある信号の周期の基点が所定の期間内に検出されたかどうかを判定する第2の判定工程と、前記基点が検出されている場合に、前記送信可能機器の識別子と自機器の前記識別子とが一致するか否か判定する第3の判定工程と、前記送信可能機器の識別子と自機器の前記識別子とが一致し、かつ自機器に送信データが存在しない場合に、前記送信可能機器の識別子の遷移順序に応じた次の前記送信可能機器の識別子を前記機器のそれぞれに設定する設定工程と、前記送信可能機器の識別子と自機器の前記識別子とが一致し、かつ自機器に送信データが存在する場合に、送信権獲得用のコマンドを他の機器に発行して前記送信権を獲得する送信権獲得工程と、を具備し、前記機器の各々に、前記送信可能機器の識別子と自機器の前記識別子とが一致して前記送信権の獲得が可能となる送信権獲得時間帯が前記周期性のある信号の1周期を単位として割り当てられることを特徴とする。   In the communication method according to claim 12 of the present invention, in the communication system in which communication is performed between a plurality of devices, each of the devices includes an initial value of an identifier of the own device, an identifier of a transmitter capable device, and the When the transition order of identifiers of transmittable devices is set in advance, each of the devices matches the identifier of the own device and the identifier of the transmittable device, and there is transmission data in the own device, A communication method for acquiring transmission right of data and transmitting transmission data, wherein each of the devices determines whether or not another device has already acquired the transmission right; A second determination step of determining whether or not a base point of a period of a periodic signal input to each of the devices is detected within a predetermined period when another device has not acquired the transmission right; And the base point is detected A third determination step for determining whether or not the identifier of the transmittable device and the identifier of the own device match, and the identifier of the transmittable device and the identifier of the own device match, and When there is no transmission data in the device, a setting step for setting the next identifier of the transmittable device in accordance with the transition order of the identifier of the transmittable device for each of the devices, and the identifier of the transmittable device A transmission right acquisition step of issuing a transmission right acquisition command to another device and acquiring the transmission right when the identifier of the device matches and the transmission data exists in the own device; In each of the devices, a transmission right acquisition time zone in which the identifier of the device capable of transmission matches the identifier of the device itself and the transmission right can be acquired is a unit of one period of the periodic signal. Assigned as And wherein the door.

また、本発明の請求項13記載の通信方法は、請求項12記載の通信方法であって、前記機器のうちの1つがマスタ機器として予め定められており、前記マスタ機器が、自機器もしくは他の機器からの要求に応じて前記送信可能機器の識別子の遷移順序を変更するコマンドを発行することにより、前記送信可能機器の識別子の遷移順序を任意に変更できることを特徴とする。   A communication method according to claim 13 of the present invention is the communication method according to claim 12, wherein one of the devices is predetermined as a master device, and the master device is the own device or other device. By issuing a command for changing the transition order of the identifiers of the transmittable devices in response to a request from the device, the transition order of the identifiers of the transmittable devices can be arbitrarily changed.

また、本発明の請求項14記載の通信方法は、請求項12もしくは13のいずれかに記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする。   A communication method according to claim 14 of the present invention is the communication method according to claim 12 or 13, further comprising a transmission right releasing step of releasing the transmission right when transmission of transmission data is completed. It is characterized by doing.

また、本発明の請求項15記載の通信方法は、請求項12ないし14のいずれかに記載の通信方法であって、前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする。   A communication method according to claim 15 of the present invention is the communication method according to any one of claims 12 to 14, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. It is characterized by that.

また、本発明の請求項16記載の通信方法は、請求項1ないし4のいずれかに記載の通信方法であって、既に前記送信権獲得時間帯が設定されている前記通信システムの機器と前記通信システムに追加される追加機器の各々には、前記追加機器が既に前記送信権獲得時間帯が設定されている機器に対して送信データを送信できる追加機器送信時間帯が、前記周期性のある信号の1周期毎に前記送信権獲得時間帯と重複しない範囲で予め設定されており、前記追加機器が、前記追加機器送信時間帯を検出すると、既に前記送信権獲得時間帯が設定されている機器に対して前記送信権獲得時間帯の提供を要求する送信権獲得時間帯提供要求工程と、既に前記送信権獲得時間帯が設定されている機器から前記送信権獲得時間帯を入手すると、自機器も含めた新規の送信権獲得時間帯を計算する計算工程と、前記追加機器送信時間帯を検出すると、既に前記送信権獲得時間帯が設定されている機器に対して前記新規の送信権獲得時間帯の設定を要求する新規送信権獲得時間帯設定要求工程と、を具備することを特徴とする。   A communication method according to a sixteenth aspect of the present invention is the communication method according to any one of the first to fourth aspects, wherein the transmission right acquisition time zone is already set, Each additional device added to the communication system has an additional device transmission time zone in which the additional device can transmit transmission data to a device for which the transmission right acquisition time zone has already been set. The transmission right acquisition time zone is set in advance within a range that does not overlap with the transmission right acquisition time zone for each cycle of the signal, and when the additional device detects the additional device transmission time zone, the transmission right acquisition time zone is already set. A transmission right acquisition time zone provision requesting step for requesting the device to provide the transmission right acquisition time zone; and obtaining the transmission right acquisition time zone from a device for which the transmission right acquisition time zone has already been set. machine A calculation step of calculating a new transmission right acquisition time zone, and when the additional device transmission time zone is detected, the new transmission right acquisition time zone for a device for which the transmission right acquisition time zone has already been set And a new transmission right acquisition time zone setting requesting step for requesting the setting of a new transmission right.

また、本発明の請求項17記載の通信方法は、請求項16記載の通信方法であって、前記送信権を獲得した機器がその他の機器へ追加機器送信時間帯変更のコマンドを発行することにより、前記追加機器送信時間帯を任意に変更できることを特徴とする。   The communication method according to claim 17 of the present invention is the communication method according to claim 16, wherein the device that has acquired the transmission right issues a command for changing an additional device transmission time zone to other devices. The additional device transmission time zone can be arbitrarily changed.

本発明によれば、安価な半二重通信方式のハードウェアを使用しても通信衝突が発生しない通信システムを構成することが可能となり、また、既存のマイクロコンピュータなどに搭載されている一般的なハードウェア機能を使用して実現できるため、特別なハードウェア機能の追加が不要であるという利点がある。加えて、通信衝突が発生しないことにより、衝突対策用の複雑なソフトウェア処理が不要となるので、組み込み機器システムにおいては、ROM/RAM容量やテスト工数の削減に効果がある。   According to the present invention, it is possible to configure a communication system in which communication collision does not occur even if inexpensive hardware for a half-duplex communication system is used. Therefore, there is an advantage that it is not necessary to add a special hardware function. In addition, since no communication collision occurs, complicated software processing for countermeasures against collision is not required, so that the embedded device system is effective in reducing ROM / RAM capacity and test man-hours.

以下、本発明の実施の形態について図面を交えて説明する。
図1は、本実施の形態における所定の通信方式による通信システムの一例であって、1つの通信伝送路(UART通信ライン)に複数の機器(機器A、B、C)が接続されており、機器の各々が任意のタイミングで所定のコマンドを発行し、そのコマンドに応じたデータ送受信処理を所定の通信方式により実行する通信システムを示す。本実施の形態における通信方法によれば、後述するように、データの送信権を獲得した機器のみがデータ送信処理を実行できるので、‘通信伝送路上でのデータ(コマンドも含む。)の衝突(通信衝突)’の発生を回避することができる。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is an example of a communication system using a predetermined communication method in the present embodiment, and a plurality of devices (devices A, B, and C) are connected to one communication transmission path (UART communication line). 1 shows a communication system in which each device issues a predetermined command at an arbitrary timing and executes data transmission / reception processing according to the command by a predetermined communication method. According to the communication method of the present embodiment, as will be described later, since only the device that has acquired the right to transmit data can execute the data transmission process, the collision of data (including commands) on the communication transmission line ( Occurrence of 'communication collision)' can be avoided.

機器Aと機器Bと機器Cは、半二重通信方式にてUART通信を行い、それぞれACゼロクロス検出手段を有している。
ACゼロクロス検出手段は、商用電源波形(西日本:60Hz、東日本:50Hz)の電圧0[V]を検知する手段であり、例えば家電用マイクロコンピュータであれば、ACゼロクロス検出回路として内蔵していることが多く、電圧0[V]検出に同期する電源同期信号を生成する。この電源同期信号は家電機器では、例えば、トライアックやリレーのON/OFF制御の基準信号として汎用的に多用されている。
Device A, device B, and device C perform UART communication using a half-duplex communication method, and each have AC zero-cross detection means.
The AC zero-cross detection means is means for detecting a voltage 0 [V] of a commercial power waveform (West Japan: 60 Hz, East Japan: 50 Hz). The power supply synchronization signal is generated in synchronization with the detection of the voltage 0 [V]. This power supply synchronization signal is widely used in home appliances, for example, as a reference signal for ON / OFF control of a triac or relay.

機器Aと機器Bと機器Cは、同じ商用電源ラインから電力供給を受けるので、各々には同じ商用電源波形が入力されることになる。したがって、機器Aと機器Bと機器Cに入力される電源同期信号(周期性のある信号)は一致し、機器Aと機器Bと機器Cは同じ同期タイミングを得ることができる。   Since device A, device B, and device C are supplied with power from the same commercial power line, the same commercial power waveform is input to each. Therefore, the power supply synchronization signals (periodic signals) input to the devices A, B, and C match, and the devices A, B, and C can obtain the same synchronization timing.

(実施の形態1)
以下、本実施の形態1における通信方法について、図2と図3を用いて説明する。
但し、ここでは説明を容易にするために、機器Aと機器Bの2つの機器のみが通信を行うものとして説明する。
(Embodiment 1)
Hereinafter, the communication method according to the first embodiment will be described with reference to FIGS.
However, here, for ease of explanation, it is assumed that only two devices, device A and device B, communicate.

図2は本実施の形態1における各機器のデータ送受信処理のフローチャートを示す図である。
また、図3は、本実施の形態1における各機器の送信権獲得時間帯の概念図である。図3に示すように、各機器の送信権獲得時間帯が電源同期信号1周期毎に互いに重複しないように予め設定されている。
FIG. 2 is a diagram showing a flowchart of data transmission / reception processing of each device in the first embodiment.
FIG. 3 is a conceptual diagram of a transmission right acquisition time zone of each device according to the first embodiment. As shown in FIG. 3, the transmission right acquisition time zones of the respective devices are set in advance so as not to overlap each other for each cycle of the power supply synchronization signal.

本実施の形態1〜6における通信方法では、各機器は、電源同期信号の周期の基点(電源同期信号検出点)を基準に設定される他の機器とは重複しない自機器に固有の送信権獲得時間帯において、他の機器が送信権を獲得していない場合にのみ送信権を獲得することができ、送信権を獲得した後にのみ送信データを送信することができる。また、送信権の獲得は、送信権獲得用のコマンドを発行することで可能となる。したがって、任意の機器が送信権を獲得している間は他の機器はデータ送信できないので、データが通信伝送路上で衝突することはない。また、送信権獲得用コマンドの発行は、各機器に固有の送信権獲得時間帯でのみ実行されるので、この送信権獲得用コマンドの通信伝送路上での衝突も発生しない。   In the communication methods according to the first to sixth embodiments, each device has a transmission right specific to its own device that does not overlap with other devices set with reference to the base point of the cycle of the power supply synchronization signal (power supply synchronization signal detection point). In the acquisition time period, the transmission right can be acquired only when the other device has not acquired the transmission right, and the transmission data can be transmitted only after the transmission right is acquired. The transmission right can be acquired by issuing a transmission right acquisition command. Therefore, while an arbitrary device has acquired the transmission right, other devices cannot transmit data, so that data does not collide on the communication transmission path. In addition, since the transmission right acquisition command is issued only in the transmission right acquisition time zone unique to each device, the transmission right acquisition command does not collide on the communication transmission path.

以下、本実施の形態1における通信方法について機器Aを用いて説明する。機器Aは、図2に示すデータ送受信処理の動作を繰り返すことで、データの送受信を行う。
機器Aは、電圧同期信号から周期の基点(電圧同期信号検出点)を検出すると(ステップS200:基点検出工程)、その周期の基点からの経過時間を計時するためにタイマ(計時機構。なお計数器であっても同様である。)を起動させる(ステップS201:タイマ起動工程)。このように、本実施の形態1における通信方法では、各機器は、電圧同期信号の周期の基点を検出する毎にタイマを起動させる。
Hereinafter, the communication method in the first embodiment will be described using the device A. The device A transmits / receives data by repeating the data transmission / reception processing operation shown in FIG.
When the device A detects the base point (voltage synchronization signal detection point) of the cycle from the voltage synchronization signal (step S200: base point detection step), a timer (timer mechanism; counting) is used to count the elapsed time from the base point of the cycle. This is the same for a container.) (Step S201: Timer activation step). As described above, in the communication method according to the first embodiment, each device starts the timer every time it detects the base point of the period of the voltage synchronization signal.

そして、他の機器Bが既に送信権を獲得しているか否かについて判定する(ステップS202:判定工程)。なお、この処理フローの開始点(START)において電圧同期信号の周期の基点が検出されない間は、このステップS202の処理より実行されることになる。   Then, it is determined whether another device B has already acquired the transmission right (step S202: determination step). In addition, while the base point of the period of a voltage synchronous signal is not detected in the starting point (START) of this processing flow, it will be performed by the process of this step S202.

他の機器Bが送信権を獲得している場合は、受信処理を実行して(ステップS208)この処理フローを再開する(START)。したがって、他の機器Bが送信権を獲得している間は、機器Aは受信処理のみを実行する(ステップS208)。   If another device B has acquired the transmission right, the receiving process is executed (step S208), and this process flow is restarted (START). Therefore, while the other device B has acquired the transmission right, the device A executes only the reception process (step S208).

他の機器Bが送信権を獲得していない場合は、自機器Aが既に送信権を獲得しているか否かについて判定する(ステップS203)。
自機器Aも送信権を獲得していない場合には、これから送信したいデータがあるか否かについて判定を行い(ステップS204)、送信したいデータがない場合は受信処理を実行して(ステップS208)、再度この処理フローを開始する(START)。
If the other device B has not acquired the transmission right, it is determined whether or not the own device A has already acquired the transmission right (step S203).
If the own device A has not acquired the transmission right, it is determined whether or not there is data to be transmitted (step S204). If there is no data to be transmitted, reception processing is executed (step S208). This processing flow is started again (START).

送信したいデータがある場合には、自機器Aの管理テーブルから自機器Aの送信権獲得時間帯の設定値を取得し(ステップS205)、ステップS201で起動させたタイマの経過時間と比較して、経過時間がその送信権獲得時間帯の範囲内にあるか否かを判定する(ステップS206)。   When there is data to be transmitted, the setting value of the transmission right acquisition time zone of the own device A is acquired from the management table of the own device A (step S205), and compared with the elapsed time of the timer activated in step S201. Then, it is determined whether or not the elapsed time is within the transmission right acquisition time zone (step S206).

その結果、範囲内でなければ、受信処理を実行して(ステップS208)再度この処理フローを開始し(START)、タイマの経過時間が自機器Aの送信権獲得時間帯の範囲に入るまで、この処理フロー(ステップS200〜ステップS206、ステップS208の処理)を繰り返す。   As a result, if it is not within the range, the reception process is executed (step S208) and this processing flow is started again (START) until the elapsed time of the timer falls within the range of the transmission right acquisition time zone of the own device A. This processing flow (steps S200 to S206 and step S208) is repeated.

範囲内であれば、送信権獲得用コマンドを発行して送信権を獲得し(ステップS207)この処理フローを再開する(START)。
本実施の形態1では、送信権獲得工程はステップS205〜ステップS207からなる。なお、送信権獲得時間帯には、少なくとも送信権獲得用コマンドの発行処理を実行可能な時間幅が必要である。
If it is within the range, a transmission right acquisition command is issued to acquire the transmission right (step S207), and this processing flow is restarted (START).
In the first embodiment, the transmission right acquisition process includes steps S205 to S207. The transmission right acquisition time zone needs to have at least a time width in which the transmission right acquisition command issuance process can be executed.

送信権を獲得している間、機器Aは、ステップS209において送信データの送信完了を判定するまで、ステップS211の送信処理を繰り返す。つまり、ステップS200〜ステップS203、ステップS209、ステップS211の処理を繰り返す。   While acquiring the transmission right, the device A repeats the transmission process in step S211 until it is determined in step S209 that transmission of transmission data has been completed. That is, the processes of step S200 to step S203, step S209, and step S211 are repeated.

そして、送信データを残らず送信した後は、送信権を解放する処理を実行し(ステップS210:送信権解放工程)再度この処理フローを開始する(START)。
機器Bについても同様の処理が実施されるが、機器Bの送信権獲得時間帯を機器Aと重複しないように設定しておくことによって、送信権獲得用コマンドの通信伝送路上での衝突を回避することが可能となる。
Then, after transmitting all the transmission data, a process for releasing the transmission right is executed (step S210: transmission right releasing step), and this processing flow is started again (START).
The same processing is performed for the device B, but by setting the transmission right acquisition time zone of the device B so as not to overlap with the device A, a transmission right acquisition command collision on the communication transmission path is avoided. It becomes possible to do.

ここで、それぞれの機器の送信権獲得時間帯の設定例としては、商用電源周波数が60Hzの場合、電源同期信号の周期が約8.3msであるため、電源同期信号検出点(周期の基点)から1〜3msは機器A用、5〜7msは機器B用というように設定を行う。但し、このように設定した場合、少なくとも電源同期信号検出点から1〜3msの間に機器AがステップS200〜ステップS207の処理を実行できなければならない。   Here, as an example of setting the transmission right acquisition time zone of each device, when the commercial power supply frequency is 60 Hz, the cycle of the power supply synchronization signal is about 8.3 ms, so the power supply synchronization signal detection point (the base point of the cycle) 1 to 3 ms is set for device A, and 5 to 7 ms is set for device B. However, when set in this way, the device A must be able to execute the processing of step S200 to step S207 at least 1 to 3 ms from the power synchronization signal detection point.

なお、機器Aと機器Bの2機器による例を挙げたが、送信権獲得時間帯を重複しないように、かつ、電源同期信号の1周期内に収まるように、各機器に予め定めることによって、3つ以上の機器の場合についても同様に実施することが可能となる。   In addition, although the example by two apparatuses of apparatus A and apparatus B was given, by predetermining to each apparatus so that a transmission right acquisition time zone may not overlap and be within one cycle of a power supply synchronization signal, The same can be applied to the case of three or more devices.

(実施の形態2)
以下、本実施の形態2における通信方法について、図2と図4を用いて説明する。
但し、ここでは説明を容易にするために、機器Aと機器Bの2つの機器のみが通信を行うものとして説明するが、3つ以上の機器で通信を行う場合であっても同様である。
(Embodiment 2)
Hereinafter, the communication method according to the second embodiment will be described with reference to FIGS.
However, here, for ease of explanation, it is assumed that only two devices, device A and device B, communicate, but the same applies to the case where communication is performed by three or more devices.

図4は、本実施の形態2における各機器の送信権獲得時間帯の概念図である。図4に示すように、各機器の送信権獲得時間帯が、特殊コマンド(送信権獲得時間帯を変更するコマンド)によって変更可能である点が、実施の形態1における通信方法と異なる。   FIG. 4 is a conceptual diagram of a transmission right acquisition time zone of each device according to the second embodiment. As shown in FIG. 4, the transmission right acquisition time zone of each device is different from the communication method in the first embodiment in that it can be changed by a special command (command for changing the transmission right acquisition time zone).

上記特殊コマンドの送信は、送信権を獲得している機器が行うようにする。つまり、送信権を獲得している機器が特殊コマンドを送信することで、その他の機器の送信権獲得時間帯の設定値の書き換えが行われる。   The special command is transmitted by a device that has acquired the transmission right. That is, when the device that has acquired the transmission right transmits a special command, the setting value of the transmission right acquisition time zone of other devices is rewritten.

ある機器が送信権を獲得している間は、その他の機器は受信処理のみを実行し(ステップS202からステップS208への移行)、送信権獲得時間帯とタイマの経過時間との比較判定処理(ステップS206)を実行しないので、この送信権獲得時間帯の変更による不整合は発生しない。   While a certain device has acquired the transmission right, the other device performs only the reception process (transition from step S202 to step S208), and a comparison determination process between the transmission right acquisition time zone and the elapsed time of the timer ( Since step S206) is not executed, inconsistency due to the change in the transmission right acquisition time zone does not occur.

本実施の形態2のように、各機器の送信権獲得時間帯の設定値を書き換えることにより、図4に示すように、電源同期信号1周期内での送信権獲得の優先順位を入れ替えることが可能となる。   As shown in the second embodiment, by rewriting the setting value of the transmission right acquisition time zone of each device, the priority of transmission right acquisition within one cycle of the power synchronization signal can be changed as shown in FIG. It becomes possible.

また、送信権獲得のための送信情報に付加情報をつけて送信するなど、送信権獲得用コマンドの送信にかかる時間が機器毎に異なる場合などに、図4に示すように、各機器の割り当て時間幅(送信権獲得時間帯の時間幅)を最適値にする書き換えも可能となる。   In addition, as shown in FIG. 4, the allocation of each device is performed when the time required for transmitting the transmission right acquisition command varies depending on the device, such as transmission with additional information added to the transmission information for acquiring the transmission right. Rewriting to optimize the time width (time width of the transmission right acquisition time zone) is also possible.

(実施の形態3)
以下、本実施の形態3における通信方法ついて、図5と図6を用いて説明する。
但し、本実施の形態3における通信方法は、2つの機器が通信を行う場合に限られる。
(Embodiment 3)
Hereinafter, the communication method according to the third embodiment will be described with reference to FIGS.
However, the communication method in Embodiment 3 is limited to the case where two devices communicate.

図5は本実施の形態3における各機器のデータ送受信処理のフローチャートを示す図である。
また、図6は、本実施の形態3における各機器の送信権獲得時間帯の概念図である。ここでは、図6に示すように、電源同期信号検出点毎に交互に発生する電位レベルがHレベルの信号と電位レベルがLレベルの信号を用いる。そして、例えば送信権獲得時間帯として機器AにはHレベル信号の発生期間を、機器BにはLレベル信号の発生期間を割り当てる。
FIG. 5 is a diagram showing a flowchart of data transmission / reception processing of each device in the third embodiment.
FIG. 6 is a conceptual diagram of a transmission right acquisition time zone of each device according to the third embodiment. Here, as shown in FIG. 6, a signal having a potential level of H level and a signal having a potential level of L level, which are alternately generated at each power synchronization signal detection point, are used. For example, as a transmission right acquisition time zone, the generation period of the H level signal is allocated to the device A, and the generation period of the L level signal is allocated to the device B.

電源同期信号からH/Lレベル信号を生成することは、ACゼロクロス検出回路に搭載された機能により生成したり、外部回路にて生成するなど、従来からの手法によって実現可能である。   Generation of the H / L level signal from the power supply synchronization signal can be realized by a conventional method such as generation by a function mounted on the AC zero cross detection circuit or generation by an external circuit.

以下、本実施の形態3における通信方法について機器Aを用いて説明する。但し、送信権獲得時間帯として機器AにはHレベル信号の発生期間が割り当てられており、機器BにはLレベル信号の発生期間が割り当てられているものとする。機器Aは、図5に示すデータ送受信処理の動作を繰り返すことで、データの送受信を行う。   Hereinafter, the communication method in the third embodiment will be described using the device A. However, it is assumed that the device A is assigned an H level signal generation period and the device B is assigned an L level signal generation period as the transmission right acquisition time zone. The device A transmits and receives data by repeating the data transmission / reception processing operation shown in FIG.

まず、機器Aは、他方の機器Bが既に送信権を獲得しているか否かについて判定する(ステップS500:判定工程)。
他方の機器Bが送信権を獲得している場合は、受信処理を実行し(ステップS505)この処理フローを再開する(START)。したがって、他方の機器Bが送信権を獲得している間は、機器Aは受信処理のみを実行する(ステップS505)。
First, the device A determines whether or not the other device B has already acquired the transmission right (step S500: determination step).
If the other device B has acquired the transmission right, a reception process is executed (step S505), and this process flow is restarted (START). Accordingly, while the other device B has acquired the transmission right, the device A executes only the reception process (step S505).

他方の機器Bが送信権を獲得していない場合は、自機器Aが既に送信権を獲得しているか否かについて判定する(ステップS501)。
自機器Aも送信権を獲得していない場合には、これから送信したいデータがあるか否かについて判定を行い(ステップS502)、送信したいデータがない場合は受信処理を実行して(ステップS505)、再度この処理フローを開始する(START)。
If the other device B has not acquired the transmission right, it is determined whether or not the own device A has already acquired the transmission right (step S501).
If the own device A has not acquired the transmission right, it is determined whether or not there is data to be transmitted (step S502). If there is no data to be transmitted, reception processing is executed (step S505). This processing flow is started again (START).

送信したいデータがある場合には、現在、Hレベル信号の期間(自機器Aの送信権獲得時間帯)であるか否かについて判定する(ステップS503)。Hレベル信号の発生期間であるか否かの判定は、Hレベル信号の立ち上がりエッジとLレベル信号の立ち下がりエッジを検出することで判定できる。つまり、Hレベル信号の立ち上がりエッジを検出してからLレベル信号の立ち下がりエッジを検出するまでの間がHレベル信号の発生期間であるので、直近の検出がHレベル信号の立ち上がりエッジ検出であったかどうかによって判定できる。   If there is data to be transmitted, it is determined whether or not it is currently the period of the H level signal (the transmission right acquisition time zone of the own device A) (step S503). Whether or not it is the generation period of the H level signal can be determined by detecting the rising edge of the H level signal and the falling edge of the L level signal. That is, since the period from the detection of the rising edge of the H level signal to the detection of the falling edge of the L level signal is the generation period of the H level signal, was the most recent detection being the detection of the rising edge of the H level signal? Judgment can be made depending on whether

その結果、Lレベル信号の立ち下がりエッジ検出であった場合は、受信処理を実行して(ステップS505)再度この処理フローを開始し(START)、Hレベル信号の立ち上がりエッジを検出するまでこの処理フロー(ステップS500〜ステップS503、ステップ505の処理)を繰り返す。   As a result, when the falling edge of the L level signal is detected, the reception process is executed (step S505), and this processing flow is started again (START). This process is performed until the rising edge of the H level signal is detected. The flow (steps S500 to S503 and step 505) is repeated.

Hレベル信号の立ち上がりエッジ検出であった場合は、Hレベル信号の発生期間であるので、送信権獲得用コマンドを発行して送信権を獲得し(ステップS504)この処理フローを再開する(START)。   If the rising edge detection of the H level signal is detected, it is the generation period of the H level signal, so a transmission right acquisition command is issued to acquire the transmission right (step S504), and this processing flow is restarted (START). .

本実施の形態3では、送信権獲得工程はステップS503とステップS504からなる。なお、無論、電源同期信号の1周期には、少なくとも送信権獲得用コマンドの発行処理を実行可能な時間幅が必要である。   In the third embodiment, the transmission right acquisition process includes step S503 and step S504. Of course, at least one time period in which the transmission right acquisition command issuance process can be executed in one cycle of the power supply synchronization signal.

送信権を獲得している間、機器Aは、ステップS506において送信データの送信完了を判定するまで、ステップS508の送信処理を繰り返す。つまり、ステップS500、ステップS501、ステップS506、ステップS508の処理を繰り返す。   While acquiring the transmission right, the device A repeats the transmission processing in step S508 until it is determined in step S506 that transmission of transmission data has been completed. That is, the process of step S500, step S501, step S506, and step S508 is repeated.

そして、送信データを残らず送信した後は、送信権を解放する処理を実行し(ステップS507:送信権解放工程)再度この処理フローを開始する(START)。
一方、機器Bについても同様の処理が実施される。つまり、機器BにはLレベル信号の発生期間が割り当てられているので、ステップS503における判定処理がLレベル信号の発生期間であるか否かについての判定処理、すなわち直近の検出がLレベル信号の立ち下がりエッジ検出であったかどうかの判定処理となる以外は、機器Aと同様である。
Then, after transmitting all the transmission data, processing for releasing the transmission right is executed (step S507: transmission right releasing step), and this processing flow is started again (START).
On the other hand, the same processing is performed for the device B. That is, since the generation period of the L level signal is assigned to the device B, the determination process in step S503 determines whether the determination process is the generation period of the L level signal, that is, the most recent detection is the L level signal generation period. The process is the same as that of the device A except that the process determines whether or not the falling edge has been detected.

実施の形態1との相違点は、基点からの経過時間を計時するタイマが不要な点であり、タイマ資源が節約できるという利点がある。
本実施の形態3における通信方法は、2つの機器の通信にのみ対応し、図6に示すように、電源同期信号検出点毎に、交互に送信権獲得時間帯が割り当てられる。したがって、両機器においてエッジ検出の判定タイミングに誤差が生じたとしても、その誤差を十分吸収することができる。判定タイミングの誤差としては、別タスクにて処理時間が占有され、この処理フローの開始(START)が待たされる場合などが考えられる。
The difference from the first embodiment is that a timer for measuring the elapsed time from the base point is unnecessary, and there is an advantage that timer resources can be saved.
The communication method according to the third embodiment only supports communication between two devices, and as shown in FIG. 6, transmission right acquisition time zones are alternately assigned to each power synchronization signal detection point. Therefore, even if an error occurs in the determination timing of edge detection in both devices, the error can be sufficiently absorbed. As an error in the determination timing, there may be a case where the processing time is occupied by another task and the start of this processing flow (START) is awaited.

なお、ここでは、Hレベル信号とLレベル信号を用いるが、電位レベルの異なる2種類の信号であればよく、例えば、上述したように2種類の信号の立ち上がりエッジと立ち下がりエッジを検出することで実施できる。   Here, an H level signal and an L level signal are used, but two types of signals having different potential levels may be used. For example, as described above, rising edges and falling edges of two types of signals are detected. Can be implemented.

また、例えば、電源同期信号の周期の基点毎に電位レベルが切り替わる信号をしきい値で分割することにより、いずれの電位レベルの期間であるかを検知するようにしてもよい。   Further, for example, a potential level period may be detected by dividing a signal whose potential level switches at each base point of the period of the power supply synchronization signal by a threshold value.

また、3段階以上の電位レベルを用いれば、3つ以上の機器間で通信を行う場合であっても同様に実施することができる。例えば、電源同期信号検出点毎に、電位レベルが“H”→“M”→“L”を繰り返す信号を発生することにより、3つの機器でも実施可能となる。   Further, if three or more potential levels are used, even when communication is performed between three or more devices, the same can be implemented. For example, by generating a signal in which the potential level repeats “H” → “M” → “L” at each power supply synchronization signal detection point, the present invention can be implemented with three devices.

(実施の形態4)
以下、本実施の形態4における通信方法ついて、図7と図8を用いて説明する。
ここでは、機器Aと機器Bと機器Cの3つの機器が通信を行うものとして説明する。
(Embodiment 4)
Hereinafter, the communication method according to the fourth embodiment will be described with reference to FIGS.
Here, description will be made on the assumption that three devices, device A, device B, and device C, communicate.

図7は本実施の形態4における各機器のデータ送受信処理のフローチャートを示す図である。
また、図8は、本実施の形態4における各機器の送信権獲得時間帯の概念図である。
FIG. 7 is a diagram illustrating a flowchart of data transmission / reception processing of each device according to the fourth embodiment.
FIG. 8 is a conceptual diagram of the transmission right acquisition time zone of each device in the fourth embodiment.

ここでは、機器AのID(識別子)を“1”、機器BのIDを“2”、機器CのIDを“3”とし、マスタ機器をIDが一番小さい機器Aとする。なお、マスタ機器の決め方は、IDに依存せず、例えば、外部スイッチにより決定する方法でもよい。   Here, the ID (identifier) of the device A is “1”, the ID of the device B is “2”, the ID of the device C is “3”, and the master device is the device A with the smallest ID. The method of determining the master device does not depend on the ID, and may be determined by an external switch, for example.

また、機器A、機器B、機器Cには、それぞれのIDとともに、送信可能機器のIDの初期値と送信可能機器のIDの遷移順序が予め設定されている。機器A、機器B、機器Cは、自機器のIDと現在の送信可能機器のIDが一致する場合に送信権を獲得できる。なお、送信可能機器のIDの遷移順序としては、全ての遷移順序を設定してもよいし、次に遷移すべきIDのみを設定してもよい。   In addition, for each of the devices A, B, and C, the initial value of the ID of the transmittable device and the transition order of the ID of the transmittable device are set in advance together with the IDs. The device A, device B, and device C can acquire the transmission right when the ID of the own device and the ID of the current transmittable device match. It should be noted that all transition orders may be set as the ID transition order of transmittable devices, or only the ID to be transitioned next may be set.

以下、本実施の形態4における通信方法について機器A(マスタ機器)を用いて説明する。機器Aは、図7に示すデータ送受信処理の動作を繰り返すことで、データの送受信を行う。   Hereinafter, the communication method according to the fourth embodiment will be described using device A (master device). The device A transmits / receives data by repeating the data transmission / reception processing operation shown in FIG.

まず、機器Aは、他の機器Bもしくは機器Cが既に送信権を獲得しているか否かについて判定する(ステップS700:第1の判定工程)。
他の機器Bもしくは機器Cが送信権を獲得している場合は、受信処理を実行し(ステップS707)この処理フローを再開する(START)。したがって、他の機器Bもしくは機器Cが送信権を獲得している間は、機器Aは受信処理のみを実行する(ステップS707)。
First, the device A determines whether another device B or device C has already acquired the transmission right (step S700: first determination step).
If another device B or device C has acquired the transmission right, a reception process is executed (step S707), and this process flow is restarted (START). Therefore, while the other device B or device C acquires the transmission right, the device A executes only the reception process (step S707).

他の機器B、Cが送信権を獲得していない場合は、自機器Aが既に送信権を獲得しているか否かについて判定する(ステップS701)。
自機器Aも送信権を獲得していない場合には、この処理フローの開始(START)からこの処理までの間(所定の期間)に電源同期信号の周期の基点が検出されたかどうかについて判定する(ステップS702:第2の判定工程)。なお、無論、所定の期間はこれに限られるものではない。
If the other devices B and C have not acquired the transmission right, it is determined whether or not the own device A has already acquired the transmission right (step S701).
If the own device A has not acquired the transmission right, it is determined whether or not the base point of the period of the power supply synchronization signal has been detected between the start of this processing flow (START) and this processing (predetermined period). (Step S702: Second determination step). Of course, the predetermined period is not limited to this.

その結果、検出されていない場合は、受信処理を実行して(ステップS707)再度この処理フローを開始し(START)、周期の基点が検出されるまで、この処理フロー(ステップS700〜ステップS702、ステップS707の処理)を繰り返す。   As a result, if it is not detected, the reception process is executed (step S707), the process flow is started again (START), and this process flow (steps S700 to S702, until the base point of the cycle is detected). Step S707) is repeated.

検出されていた場合には、現在の送信可能機器のIDと自機器AのIDとが一致するか否かについて判定する(ステップS703:第3の判定工程)。
その結果、一致しない場合は、受信処理を実行して(ステップS707)、再度この処理フローを開始する(START)。したがって、一致しない場合は、少なくとも次の基点まで受信処理を行うことになる。
If it has been detected, it is determined whether or not the ID of the current transmittable device and the ID of the own device A match (step S703: third determination step).
As a result, if they do not match, the reception process is executed (step S707), and this process flow is started again (START). Therefore, if they do not match, the reception processing is performed up to at least the next base point.

一致した場合は、これから送信したいデータがあるか否かについて判定を行い(ステップS704)、送信したいデータが存在しない場合は、自機器の管理テーブルに設定されている現在の送信可能機器のIDを予め決められている次のIDに設定し、かつ他の機器B、Cへその次の送信可能機器のIDの情報を送信して(ステップS706)、再度この処理フローを開始する(START)。次の送信可能機器のIDの情報を受信した機器B、Cは、自機器の管理テーブルに設定されている送信可能機器のIDをその次のIDに設定する。   If there is a match, a determination is made as to whether there is data to be transmitted (step S704). If there is no data to be transmitted, the ID of the current transmittable device set in the management table of the own device is determined. The next ID set in advance is set, and the ID information of the next transmittable device is transmitted to the other devices B and C (step S706), and this processing flow is started again (START). The devices B and C that have received the ID information of the next transmittable device set the ID of the transmittable device set in the management table of the own device as the next ID.

なお、次の送信可能機器のID情報の送信は、現在の送信可能機器のIDに該当する機器のみが実行するので、通信伝送路上でこの送信データの衝突は発生しない。
送信したいデータが存在する場合は、送信権獲得用コマンドを発行して送信権を獲得し(ステップS705)この処理フローを再開する(START)。
Note that the transmission of the ID information of the next transmittable device is executed only by the device corresponding to the ID of the current transmittable device, so this transmission data collision does not occur on the communication transmission path.
If there is data to be transmitted, a transmission right acquisition command is issued to acquire the transmission right (step S705), and this processing flow is restarted (START).

本実施の形態4では、設定工程はステップS704とステップS706からなり、送信権獲得工程はステップS704とステップS705からなる。
なお、無論、電源同期信号の1周期には、少なくとも送信権獲得用コマンドの発行処理を実行可能な時間幅が必要である。
In the fourth embodiment, the setting process includes steps S704 and S706, and the transmission right acquisition process includes steps S704 and S705.
Of course, at least one time period in which the transmission right acquisition command issuance process can be executed in one cycle of the power supply synchronization signal.

ステップS707の受信処理中に受信するデータには、機器Bと機器Cが送信する送信可能機器のIDの情報も含まれる。この受信した送信可能機器のIDがステップS703における判定処理に使用される。   The data received during the reception process in step S707 includes information on IDs of transmittable devices transmitted by the devices B and C. The received ID of the transmittable device is used for the determination process in step S703.

送信権を獲得している間、機器Aは、ステップS708において送信データの送信完了を判定するまで、ステップS710の送信処理を繰り返す。つまり、ステップS700、ステップS701、ステップS708、ステップS710の処理を繰り返す。   While acquiring the transmission right, the device A repeats the transmission process of step S710 until it determines transmission completion of transmission data in step S708. That is, the process of step S700, step S701, step S708, and step S710 is repeated.

そして、送信データを残らず送信した後は、送信権を解放する処理を実行し(ステップS709:送信権解放工程)再度この処理フローを開始する(START)。
機器B、Cについても同様の処理が実施される。
Then, after transmitting all the transmission data, processing for releasing the transmission right is executed (step S709: transmission right releasing step). This processing flow is started again (START).
The same processing is performed for the devices B and C.

なお、送信可能機器のIDの初期値としてマスタ機器である機器AのIDを各機器に設定すれば、機器Aがマスタ機器として、最初にステップS706の処理を実行することになる。   If the ID of the device A, which is the master device, is set in each device as the initial value of the ID of the device capable of transmission, the device A first executes the process of step S706 as the master device.

以上のように、本実施の形態4によれば、所定の期間に電源同期信号の周期の基点を検出したとき、送信可能機器のIDと自機器のIDとが一致するかどうかを判定するので、図8に示すように、各機器には、電源同期信号の1周期を単位として送信権獲得時間帯が割り当てられることになる。   As described above, according to the fourth embodiment, when the base point of the period of the power supply synchronization signal is detected in a predetermined period, it is determined whether the ID of the device capable of transmission matches the ID of the own device. As shown in FIG. 8, a transmission right acquisition time zone is assigned to each device in units of one cycle of the power supply synchronization signal.

また、本実施の形態4によれば、3つ以上の機器の通信に対応することが可能となる。
また、実施の形態3と同様に、各機器において基点が検出されたかどうかの判定(第2の判定工程)のタイミングに誤差が生じたとしても、その誤差を十分吸収することができる。
Further, according to the fourth embodiment, it is possible to cope with communication of three or more devices.
Similarly to the third embodiment, even if an error occurs in the timing of whether or not the base point has been detected in each device (second determination step), the error can be sufficiently absorbed.

(実施の形態5)
以下、本実施の形態5における通信方法ついて、図9と図10を用いて説明する。
ここでは、機器Aと機器Bと機器Cの3つの機器が通信を行うものとして説明する。
(Embodiment 5)
Hereinafter, the communication method according to the fifth embodiment will be described with reference to FIGS.
Here, description will be made on the assumption that three devices, device A, device B, and device C, communicate.

図9は本実施の形態5における機器Bと機器C、すなわちマスタ機器以外の機器のデータ送受信処理のフローチャートを示す図である。但し、実施の形態4において説明した工程(ステップ)については同一の符号を付して、説明を省略する。   FIG. 9 is a diagram showing a flowchart of data transmission / reception processing of devices B and C, that is, devices other than the master device in the fifth embodiment. However, the steps (steps) described in the fourth embodiment are denoted by the same reference numerals, and description thereof is omitted.

また、図10は、本実施の形態5における各機器の送信権獲得時間帯の概念図である。図10に示すように、送信権獲得時間帯の遷移順序が、送信可能機器のIDの遷移順序を変更することによって変更可能である点が、実施の形態4における通信方法と異なる。   FIG. 10 is a conceptual diagram of the transmission right acquisition time zone of each device in the fifth embodiment. As shown in FIG. 10, the transmission order acquisition time zone transition order is different from the communication method according to the fourth embodiment in that it can be changed by changing the transmission order ID transition order.

以下、本実施の形態5における通信方法について、送信可能機器のIDの遷移順序を変更する処理に絞って説明する。
機器B、Cは、受信処理(ステップS707)にて送信可能機器のIDの情報を受信すると、管理テーブルに格納する(ステップS901)。この情報は、ステップS902で読み出され、ステップS706にて送信される。
Hereinafter, the communication method according to the fifth embodiment will be described focusing on the process of changing the transition order of IDs of transmittable devices.
When the devices B and C receive the ID information of the transmittable device in the reception process (step S707), they are stored in the management table (step S901). This information is read in step S902 and transmitted in step S706.

ここで、送信可能機器IDの遷移順序の変更については、マスタ機器のみが指示可能とすることにより、不整合が発生しないようにする。つまり、マスタ機器Aが、自機器Aもしくは他の機器B、Cからの要求に応じて他の機器B、Cへ送信可能機器のIDの遷移順序を変更するコマンドを発行することにより、送信可能機器のIDの遷移順序を変更する。   Here, regarding the change of the transition order of the transmittable device IDs, only the master device can be instructed to prevent inconsistency. That is, transmission is possible when the master device A issues a command to change the ID transition order of devices that can be transmitted to the other devices B and C in response to a request from the own device A or other devices B and C. Change the transition order of device IDs.

機器B、Cは、送信可能機器IDの遷移順序の変更要求を行う場合(ステップS903)、マスタ機器Aに変更要求を送信する(ステップS904)。
この送信可能機器IDの遷移順序の変更要求の処理工程(ステップS903とステップS904)については、マスタ機器A以外の機器B、Cのみが実行する。つまり、ステップS903とステップS904を除いた処理が、マスタ機器Aの処理フローとなる。
When the devices B and C make a request for changing the transition order of the device IDs that can be transmitted (step S903), the devices B and C transmit the change request to the master device A (step S904).
Only the devices B and C other than the master device A execute the process for changing the transmission order of the device IDs that can be transmitted (steps S903 and S904). That is, the process except for step S903 and step S904 is the process flow of the master device A.

マスタ機器Aは、その変更要求情報を受信し(ステップS707)、不整合が発生しない場合は、送信権獲得用コマンドを発行して送信権を獲得した後(ステップS705)、
その要求に応じた新たな遷移順序を自機器に設定するとともに、他の機器B、Cにその新たな遷移順序の情報を送信する(ステップS710)。
The master device A receives the change request information (step S707). If no inconsistency occurs, the master device A issues a transmission right acquisition command to acquire the transmission right (step S705).
A new transition order corresponding to the request is set in the own device, and information on the new transition order is transmitted to the other devices B and C (step S710).

なお、各機器に設定されている遷移順序が、全ての遷移順序であっても、次に遷移すべきID(つまり自機器の次に送信権を獲得できる機器のID)のみが設定されている場合であっても、同様に実施可能である。また、無論、マスタ機器Aが自ら変更させることもできる。   Even if the transition order set for each device is all transition orders, only the ID to be transitioned next (that is, the ID of the device that can acquire the transmission right next to the own device) is set. Even if it is a case, it can be implemented similarly. Of course, the master device A can also change the device itself.

本実施の形態5によれば、例えば、図10に示すように、機器Cの送信権獲得の優先順位を上げたい場合に、機器A→機器B→機器Cといった順番から、機器A→機器C→機器Bといった順番への優先順位の変更が可能となる。   According to the fifth embodiment, for example, as shown in FIG. 10, when it is desired to increase the priority of transmission right acquisition for device C, device A → device C from the order of device A → device B → device C. → The priority can be changed to the order of device B.

(実施の形態6)
以下、本実施の形態6における通信方法について、図11と図12を用いて説明する。
図11は本実施の形態6における追加機器の機器追加処理のフローチャートを示す図である。この処理は機器の追加が完了するまで行われる処理であり、追加完了後は、実施の形態1で説明したデータ送受信処理を実行する。
(Embodiment 6)
Hereinafter, the communication method according to the sixth embodiment will be described with reference to FIGS. 11 and 12.
FIG. 11 is a diagram illustrating a flowchart of the device addition process of the additional device according to the sixth embodiment. This process is performed until the addition of the device is completed. After the addition is completed, the data transmission / reception process described in the first embodiment is executed.

また、図12は、本実施の形態6における各機器の送信権獲得時間帯および追加機器送信時間帯の概念図である。ここでは、機器Aと機器Bがこの通信システムにおいて既に送信権獲得時間帯が設定されている機器(以下、既機器と称す。)であり、機器Cが追加機器であるものとして説明する。   FIG. 12 is a conceptual diagram of a transmission right acquisition time zone and an additional device transmission time zone of each device in the sixth embodiment. Here, description will be made assuming that the device A and the device B are devices for which a transmission right acquisition time zone has already been set in this communication system (hereinafter referred to as an existing device), and the device C is an additional device.

また、ここでは、電源同期信号検出点から一定の時間帯、例えば2msを、追加機器送信時間帯に規定し、この時間帯には既機器の送信権獲得時間帯を設定しない。追加機器Cはこの時間帯に追加処理にかかる送信データを既機器A、Bへ送信する。この追加機器Cが送信するデータは、送信にかかる時間がこの追加機器送信時間帯に収まるコマンドである。   Here, a certain time period from the power synchronization signal detection point, for example, 2 ms, is defined as the additional apparatus transmission time period, and the transmission right acquisition time period of the existing apparatus is not set in this time period. The additional device C transmits the transmission data for the additional processing to the existing devices A and B during this time period. The data transmitted by the additional device C is a command in which the time required for transmission falls within this additional device transmission time zone.

以下、追加機器Cにおける処理を中心に説明する。
追加された機器Cは、電圧同期信号から周期の基点を検出すると(ステップS1100:基点検出工程)、その周期の基点からの経過時間を計時するためにタイマを起動させる(ステップS1101:タイマ起動工程)。
Hereinafter, the process in the additional device C will be mainly described.
When the added device C detects the base point of the cycle from the voltage synchronization signal (step S1100: base point detection step), the device C starts a timer to measure the elapsed time from the base point of the cycle (step S1101: timer start step). ).

そして、自機器Cの管理テーブルから追加機器送信時間帯の設定値を取得し、タイマの経過時間と比較して、経過時間が追加機器送信時間帯の範囲内にあるか否かを判定する(ステップS1102)。本実施の形態6では、電源同期信号検出点からの一定の時間帯を追加機器送信時間帯と規定しているので、ステップS1100で電源同期信号が検出された場合には、タイマの経過時間は追加機器送信時間帯の範囲内にあり、追加機器Cは、自機器Cが設定変更確認待ち状態か否かについて判定を行う(ステップS1103)。   Then, the setting value of the additional device transmission time zone is acquired from the management table of the own device C, and compared with the elapsed time of the timer, it is determined whether or not the elapsed time is within the range of the additional device transmission time zone ( Step S1102). In the sixth embodiment, since a certain time period from the power synchronization signal detection point is defined as the additional device transmission time period, when the power synchronization signal is detected in step S1100, the elapsed time of the timer is The additional device C is within the range of the additional device transmission time zone, and the additional device C determines whether or not the own device C is in a setting change confirmation waiting state (step S1103).

当初は、設定変更確認待ち状態ではないため、既機器A、Bに対して、追加要求および送信権獲得時間帯の提供の要求のためのコマンドを発行して(ステップS1104)、再度この処理フローを開始する(START)。   Initially, since it is not in a setting change confirmation waiting state, a command for an addition request and a request to provide a transmission right acquisition time zone is issued to the existing devices A and B (step S1104), and this processing flow is performed again. Is started (START).

本実施の形態6では、送信権獲得時間帯要求工程はステップS1100〜ステップS1104からなる。なお、このステップS1100〜ステップS1104までの処理は、追加機器送信時間帯に収まるようにする。   In the sixth embodiment, the transmission right acquisition time zone request process includes steps S1100 to S1104. Note that the processing from step S1100 to step S1104 is made to fall within the additional device transmission time zone.

既機器A、Bは、追加機器送信時間帯では受信処理を実行するので、追加機器Cから上記コマンドを受信する。そして既機器A、Bは、実施の形態1で説明した工程により送信権を獲得すると、そのコマンドに対する応答として追加許可応答および送信権獲得情報の設定値の情報を返す。   Since the existing devices A and B execute the reception process in the additional device transmission time zone, they receive the command from the additional device C. When the existing devices A and B acquire the transmission right by the process described in the first embodiment, they return the additional permission response and the information on the set value of the transmission right acquisition information as a response to the command.

追加機器Cは、ステップS1108において既機器A、Bからの応答の入手完了を判定するまで、ステップS1106の受信処理を繰り返す。つまり、未だ設定変更確認待ち状態ではないので、ステップS1100〜ステップS1102、ステップS1106〜ステップS1108の処理を繰り返す。   The additional device C repeats the reception process in step S1106 until it is determined in step S1108 that the responses from the existing devices A and B are completely obtained. That is, since it is not yet in the setting change confirmation waiting state, the processes in steps S1100 to S1102 and steps S1106 to S1108 are repeated.

なお、この処理フローを繰り返すことなく、1度の受信処理(ステップS1106)によって既機器A、Bからの応答の入手を完了できるように設計してもよい。
ステップS1108において既機器A、Bからの応答の入手完了を判定すると、追加機器も含めた新規の送信権獲得時間帯の設定値を計算し(ステップS1109:計算工程)、設定変更確認待ち状態へ遷移し(ステップS1110)、この処理フローを再開する(START)。
In addition, you may design so that acquisition of the response from the existing apparatuses A and B can be completed by one reception process (step S1106), without repeating this process flow.
If it is determined in step S1108 that the responses from the existing devices A and B have been completely obtained, the set value of the new transmission right acquisition time zone including the additional device is calculated (step S1109: calculation process), and the setting change confirmation wait state is entered. A transition is made (step S1110), and this processing flow is restarted (START).

例えば、西日本(60Hz地域)にて、既機器である機器Aの送信権獲得時間帯の設定値が2.5〜5ms、機器Bの送信権獲得時間帯の設定値が5.5〜7.5msであった場合には、機器Aの送信権獲得時間帯の設定値を2.5〜4ms、機器Bの送信権獲得時間帯の設定値を4.5〜6ms、機器Cの送信権獲得時間帯の設定値を6.5〜8msなどと割り当てる。   For example, in Western Japan (60 Hz region), the setting value of the transmission right acquisition time zone of the existing device A is 2.5 to 5 ms, and the setting value of the transmission right acquisition time zone of the device B is 5.5 to 7. In the case of 5 ms, the setting value of the transmission right acquisition time zone of the device A is 2.5 to 4 ms, the setting value of the transmission right acquisition time zone of the device B is 4.5 to 6 ms, and the transmission right acquisition of the device C is acquired. The set value of the time zone is assigned as 6.5 to 8 ms.

設定変更確認待ち状態への遷移(ステップS1110)後は、ステップS1111の判定結果が“NO”となり、電源同期信号の次の周期の基点を検出すると、ステップS1103の判定結果が“YES”となる。   After the transition to the setting change confirmation waiting state (step S1110), the determination result of step S1111 is “NO”, and when the base point of the next cycle of the power supply synchronization signal is detected, the determination result of step S1103 is “YES”. .

但し、電源同期信号の周期の基点の検出(ステップS1100)から設定変更確認待ち状態への遷移(ステップS1110)までの処理を、電源同期信号の1周期に収まるようにする必要がある。もしくは、既機器A、Bに対して追加要求および送信権獲得時間帯の提供の要求のためのコマンドを一度発行(ステップS1104)した後は、既機器A、Bからの応答を入手するまでステップS1104の処理を実行しないなどの工夫をする必要がある。また、所定の時間が経過しても(例えば電源同期信号の周期の基点が5回検出されても)、未だ各機器から応答がない場合には、再度、追加要求および送信権獲得時間帯の提供の要求を行うようにしてもよい。   However, the processing from the detection of the base point of the cycle of the power supply synchronization signal (step S1100) to the transition to the setting change confirmation wait state (step S1110) needs to be within one cycle of the power supply synchronization signal. Alternatively, after issuing a command for requesting provision of an additional request and a transmission right acquisition time zone to the existing devices A and B once (step S1104), steps are taken until responses from the existing devices A and B are obtained. It is necessary to devise such as not executing the processing of S1104. In addition, even if a predetermined time has elapsed (for example, the base point of the period of the power supply synchronization signal is detected five times), if there is still no response from each device, the additional request and the transmission right acquisition time zone A request for provision may be made.

なお、設定変更確認待ち状態への遷移後、電源同期信号の次の周期の基点の検出まで、処理を中断するようにしてもよい。
ステップS1110にて設定変更確認待ち状態に遷移し、次の周期の基点を検出すると、既機器A、Bに対して、ステップS1109において計算した新規の送信権獲得時間帯への設定値の変更要求のためのコマンドを発行して(ステップS1105)、再度この処理フローを開始する(START)。
Note that the processing may be suspended after the transition to the setting change confirmation wait state until the base point of the next cycle of the power supply synchronization signal is detected.
When a transition to the setting change confirmation wait state is made in step S1110 and the base point of the next cycle is detected, a request for changing the set value to the new transmission right acquisition time zone calculated in step S1109 is sent to the existing devices A and B Is issued (step S1105), and this processing flow is started again (START).

既機器A、Bは、追加機器送信時間帯では受信処理を実行するので、追加機器Cから上記コマンドを受信して設定値を変更する。そして既機器A、Bは、実施の形態1で説明した工程により送信権を獲得すると、設定値変更完了の応答を返す。   Since the existing devices A and B execute the reception process in the additional device transmission time zone, they receive the command from the additional device C and change the setting value. When the existing devices A and B acquire the transmission right by the process described in the first embodiment, they return a response indicating that the setting value has been changed.

追加機器Cは、ステップS1111において既機器A、Bからの応答の入手完了を判定するまで、ステップS1106の受信処理を繰り返す。つまり、ここでは、設定変更確認待ち状態へ遷移しているので、ステップS1100〜ステップS1102、ステップS1106、ステップS1107、ステップS1111の処理を繰り返す。   The additional device C repeats the reception process in step S1106 until it is determined in step S1111 that acquisition of responses from the existing devices A and B is complete. That is, here, since the state is changed to the setting change confirmation waiting state, the processing of step S1100 to step S1102, step S1106, step S1107, and step S1111 is repeated.

なお、この処理フローを繰り返すことなく、1度の受信処理(ステップS1106)によって既機器A、Bからの応答の入手を完了できるように設計してもよい。
ステップS1111において既機器A、Bからの応答の入手完了を判定すると、自機器Cの送信権獲得時間帯の設定値を更新し(ステップS1112)、追加完了状態へ遷移して(ステップS1113)、この追加処理のフローを終了する。その後は他の既機器A、Bと同様に、通常のデータ送受信処理を実施する。
In addition, you may design so that acquisition of the response from the existing apparatuses A and B can be completed by one reception process (step S1106), without repeating this process flow.
If it is determined in step S1111 that the response from the existing devices A and B is completely obtained, the setting value of the transmission right acquisition time zone of the own device C is updated (step S1112), and a transition is made to the addition completion state (step S1113). The flow of this additional process is terminated. Thereafter, normal data transmission / reception processing is performed in the same manner as the other existing devices A and B.

但し、2回目の電源同期信号の周期の基点の検出(ステップS1100)から追加完了状態への遷移(ステップS1113)までの処理を、電源同期信号の1周期に収まるようにする必要がある。もしくは、既機器A、Bに対して新規の送信権獲得時間帯への設定値の変更要求のためのコマンドを一度発行(ステップS1105)した後は、既機器A、Bからの応答を入手するまでステップS1105の処理を実行しないなどの工夫をする必要がある。また、所定の時間が経過しても(例えば電源同期信号の周期の基点が5回検出されても)、未だ各機器から応答がない場合には、再度、新規の送信権獲得時間帯への設定値の変更要求を行うようにしてもよい。   However, the processing from the detection of the base point of the cycle of the second power supply synchronization signal (step S1100) to the transition to the addition completion state (step S1113) needs to be within one cycle of the power supply synchronization signal. Alternatively, after issuing a command for changing the set value to the new transmission right acquisition time zone to the existing devices A and B once (step S1105), the responses from the existing devices A and B are obtained. It is necessary to devise such as not to execute the process of step S1105 until. In addition, even if a predetermined time has elapsed (for example, the base point of the period of the power supply synchronization signal is detected five times), if there is still no response from each device, a new transmission right acquisition time zone is again entered. A setting value change request may be made.

以上のように、本実施の形態6によれば、電源同期信号の2周期で機器Cを追加することができる。
ここで、追加機器送信時間帯を、周期の基点(電源同期信号検知点)から計時して、例えば、2ms以内というように、基点からとしているのは、追加機器送信時間帯を、各々の機器が同期が取れる箇所に設定する必要があるためである。本実施の形態6によると、図12に示すように、動的に機器の追加が可能となる。
As described above, according to the sixth embodiment, the device C can be added in two cycles of the power supply synchronization signal.
Here, the additional device transmission time zone is counted from the base point (power synchronization signal detection point) of the cycle, for example, within 2 ms. This is because it is necessary to set a location where synchronization can be achieved. According to the sixth embodiment, it is possible to dynamically add devices as shown in FIG.

なお、追加機器送信時間帯は、送信権を獲得した機器が他の機器へ追加機器送信時間帯変更のコマンドを発行することにより、任意に変更することができる。
また、実施の形態1で説明した通信システムを例に説明したが、実施の形態4における通信システムでも同様に実施できる。すなわち、電源同期信号の1周期毎に追加機器送信時間帯を設定しておき、この追加機器送信時間帯に追加機器が既機器に対して固有のID情報と送信可能機器IDの遷移順序の情報の要求コマンドや、追加機器のIDを含めた新規の送信可能機器IDの遷移順序の設定要求コマンドを送信するようにすればよい。
The additional device transmission time zone can be arbitrarily changed by the device that has acquired the transmission right issuing a command for changing the additional device transmission time zone to another device.
Further, although the communication system described in the first embodiment has been described as an example, the communication system in the fourth embodiment can be similarly implemented. That is, an additional device transmission time zone is set for each cycle of the power supply synchronization signal, and the additional device transmits unique ID information to the existing device and information on the transition order of the transmittable device ID in the additional device transmission time zone. And a command for requesting a transition order setting of a new transmittable device ID including the ID of the additional device may be transmitted.

上記実施の形態1〜6の説明においては、電源同期信号を使用しているが、この場合、通信中に停電が発生した場合の対応が必要となる。上記実施の形態1〜6における通信方法を実現するためには、周期性のある信号であればよく、そのため、いずれかの機器が周期性のある基準信号を全機器に送信したり、外部回路(IC等)が周期性のある信号を送信したりすることにより、停電などに関係なく、また、電池駆動の状態においても、上記実施の形態1〜6への応用が可能となる。   In the description of the first to sixth embodiments, the power supply synchronization signal is used. However, in this case, it is necessary to cope with a case where a power failure occurs during communication. In order to realize the communication method in the first to sixth embodiments, any signal may be used as long as the signal is periodic. For this reason, any device transmits a periodic reference signal to all devices, or an external circuit. (IC or the like) transmits a signal having periodicity, so that the present invention can be applied to the first to sixth embodiments regardless of a power failure or the like, and even in a battery-driven state.

また、上記実施の形態1〜6においては、送信権獲得用コマンドの送信を行うことにより、送信権を獲得したが、送信権獲得用コマンドの送信後、各機器からの受信応答を得たとき、自機器の送信権が確立されたと判断する方法もある。この場合、他機器との送信権取得に関する整合性をより保つことが可能となる。   In the first to sixth embodiments, the transmission right is acquired by transmitting the transmission right acquisition command. However, after the transmission right acquisition command is transmitted, the reception response from each device is obtained. There is also a method of determining that the transmission right of the own device has been established. In this case, it is possible to further maintain consistency with respect to acquisition of transmission rights with other devices.

以上のように、実施の形態1〜6によれば、電源同期信号の周期の基点を基準に通信を行うので、同一電源ラインである宅内における電源同期信号は一定として扱えることから、宅内ネットワーク家電機器における通信方法・手段として有用である。また、複数のLSIから構成される商用電源を使用する電器製品単体においても、コンセントより供給される商用電源波形(電源同期信号)を利用することにより、各LSI間の通信方法・手段として有用となる。   As described above, according to the first to sixth embodiments, since communication is performed based on the base point of the period of the power supply synchronization signal, the power supply synchronization signal in the house that is the same power supply line can be treated as constant. It is useful as a communication method and means in equipment. In addition, even in a single electric appliance using a commercial power source composed of a plurality of LSIs, it is useful as a communication method and means between LSIs by using a commercial power waveform (power synchronization signal) supplied from an outlet. Become.

また、定期的な周期信号を送出するIC/LSI等の回路を具備すれば、電池駆動の電器製品内の各LSI間の通信方法・手段としても有用となる。
また、既存の一般的なLSI/マイクロコンピュータのハードウェア機能を使用して、半二重通信におけるデータ衝突を防止することができる。
In addition, if a circuit such as an IC / LSI that sends out periodic signals is provided, it will be useful as a communication method and means between LSIs in battery-powered electrical products.
In addition, data collision in half-duplex communication can be prevented by using the hardware function of an existing general LSI / microcomputer.

本発明にかかる通信方法は、半二重通信方式による通信システムにおいて通信衝突を防止できるので、例えば、宅内ネットワーク家電機器間の通信や、複数のLSIから構成される電器製品単体における各LSI間の通信、電池駆動の電器製品における各LSI間の通信などに有用である。   The communication method according to the present invention can prevent a communication collision in a communication system using a half-duplex communication method. For example, communication between home network home appliances, or between LSIs in a single electric appliance composed of a plurality of LSIs. This is useful for communication and communication between LSIs in battery-powered electrical products.

本発明の実施の形態1〜6における所定の通信方式による通信システムの一例を示す図The figure which shows an example of the communication system by the predetermined communication system in Embodiment 1-6 of this invention 本発明の実施の形態1における各機器のデータ送受信処理のフローチャートを示す図The figure which shows the flowchart of the data transmission / reception process of each apparatus in Embodiment 1 of this invention. 本発明の実施の形態1における各機器の送信権獲得時間帯の概念図Conceptual diagram of transmission right acquisition time zone of each device in Embodiment 1 of the present invention 本発明の実施の形態2における各機器の送信権獲得時間帯の概念図Conceptual diagram of transmission right acquisition time zone of each device in Embodiment 2 of the present invention 本発明の実施の形態3における各機器のデータ送受信処理のフローチャートを示す図The figure which shows the flowchart of the data transmission / reception process of each apparatus in Embodiment 3 of this invention. 本発明の実施の形態3における各機器の送信権獲得時間帯の概念図Conceptual diagram of transmission right acquisition time zone of each device in Embodiment 3 of the present invention 本発明の実施の形態4における各機器のデータ送受信処理のフローチャートを示す図The figure which shows the flowchart of the data transmission / reception process of each apparatus in Embodiment 4 of this invention. 本発明の実施の形態4における各機器の送信権獲得時間帯の概念図Conceptual diagram of transmission right acquisition time zone of each device in Embodiment 4 of the present invention 本発明の実施の形態5におけるマスタ機器以外の機器のデータ送受信処理のフローチャートを示す図The figure which shows the flowchart of the data transmission / reception process of apparatuses other than the master apparatus in Embodiment 5 of this invention. 本発明の実施の形態5における各機器の送信権獲得時間帯の概念図Conceptual diagram of transmission right acquisition time zone of each device in Embodiment 5 of the present invention 本発明の実施の形態6における追加機器の機器追加処理のフローチャートを示す図The figure which shows the flowchart of the apparatus addition process of the additional apparatus in Embodiment 6 of this invention. 本発明の実施の形態6における各機器の送信権獲得時間帯および追加機器送信時間帯の概念図Conceptual diagram of transmission right acquisition time zone and additional device transmission time zone of each device in Embodiment 6 of the present invention

Claims (17)

複数の機器の間で通信が行われる通信システムにおいて、前記機器の各々には、データの送信権の獲得が可能となる送信権獲得時間帯が、周期性のある信号の1周期毎に互いに重複しない範囲で予め設定されており、前記機器の各々が、自機器の前記送信権獲得時間帯において前記送信権を獲得した後に送信データを送信する通信方法であって、
前記機器の各々が、
前記機器の各々に入力される前記周期性のある信号から周期の基点を検出する基点検出工程と、
前記検出した前記基点を基準に経過時間を計時するタイマを起動するタイマ起動工程と、
他の機器が既に前記送信権を獲得しているか否かを判定する判定工程と、
他の機器が前記送信権を獲得していない場合に、自機器の前記送信権獲得時間帯と前記タイマの経過時間とを比較し、前記タイマの経過時間が自機器の前記送信権獲得時間帯の範囲内であれば、送信権獲得用のコマンドを他の機器に発行して前記送信権を獲得する送信権獲得工程と、
を具備することを特徴とする通信方法。
In a communication system in which communication is performed between a plurality of devices, each of the devices has a transmission right acquisition time zone in which a data transmission right can be acquired, which overlap each other for each period of a periodic signal. Is a communication method in which each of the devices transmits transmission data after acquiring the transmission right in the transmission right acquisition time zone of the device,
Each of the devices is
A base point detection step of detecting a base point of the period from the periodic signal input to each of the devices;
A timer starting step of starting a timer for measuring an elapsed time based on the detected base point;
A determination step of determining whether another device has already acquired the transmission right;
When another device has not acquired the transmission right, the transmission right acquisition time zone of the own device is compared with the elapsed time of the timer, and the elapsed time of the timer is the transmission right acquisition time zone of the own device. A transmission right acquisition step of acquiring a transmission right by issuing a transmission right acquisition command to another device,
A communication method comprising:
請求項1記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする通信方法。   The communication method according to claim 1, further comprising a transmission right releasing step of releasing the transmission right when transmission of transmission data is completed. 前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする請求項1もしくは2のいずれかに記載の通信方法。   The communication method according to claim 1, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. 請求項1ないし3のいずれかに記載の通信方法であって、前記送信権を獲得した機器がその他の機器へ前記機器の各々に設定されている前記送信権獲得時間帯を変更するコマンドを発行することにより、前記機器の各々の前記送信権獲得時間帯を任意に変更できることを特徴とする通信方法。   4. The communication method according to claim 1, wherein the device that has acquired the transmission right issues a command for changing the transmission right acquisition time zone set for each of the devices to other devices. By doing so, the transmission right acquisition time zone of each of the devices can be arbitrarily changed. 2つの機器の間で通信が行われる通信システムにおいて、前記機器の各々には、データの送信権の獲得が可能となる送信権獲得時間帯が、周期性のある信号の周期の基点を基準に交互に設定されており、前記機器の各々が、自機器の前記送信権獲得時間帯において前記送信権を獲得した後に送信データを送信する通信方法であって、
前記機器の各々が、
他方の機器が既に前記送信権を獲得しているか否かを判定する判定工程と、
他方の機器が前記送信権を獲得しておらず、かつ自機器の前記送信権獲得時間帯であれば、送信権獲得用のコマンドを他方の機器に発行して前記送信権を獲得する送信権獲得工程と、
を具備することを特徴とする通信方法。
In a communication system in which communication is performed between two devices, each of the devices has a transmission right acquisition time zone in which a data transmission right can be acquired, based on the base point of the periodic signal cycle. The communication method is set alternately, and each of the devices transmits transmission data after acquiring the transmission right in the transmission right acquisition time zone of the own device,
Each of the devices is
A determination step of determining whether the other device has already acquired the transmission right;
If the other device has not acquired the transmission right and is in the transmission right acquisition time zone of its own device, a transmission right for acquiring the transmission right by issuing a transmission right acquisition command to the other device Acquisition process,
A communication method comprising:
前記周期性のある信号は、1周期が前記送信権獲得用のコマンドの発行に要する時間以上の信号であることを特徴とする請求項5記載の通信方法。   6. The communication method according to claim 5, wherein the periodic signal is a signal having one period longer than a time required for issuing the transmission right acquisition command. 請求項5もしくは6のいずれかに記載の通信方法であって、前記送信権獲得時間帯として、前記周期性のある信号の周期の基点を基準に交互に発生する電位レベルの異なる2種類の信号の発生期間が前記機器の各々に割り当てられており、前記送信権獲得工程において自機器の前記送信権獲得時間帯であるかどうかを判定する際に、前記2種類の信号のいずれの発生期間であるかを判定することを特徴とする通信方法。   7. The communication method according to claim 5, wherein two types of signals having different potential levels are generated alternately based on a base point of a period of the periodic signal as the transmission right acquisition time zone. The generation period is assigned to each of the devices, and when determining whether the transmission right acquisition time zone of the own device in the transmission right acquisition step, in any generation period of the two types of signals, A communication method characterized by determining whether or not there is. 前記2種類の信号は電位レベルがHレベルの信号と電位レベルがLレベルの信号であることを特徴とする請求項7記載の通信方法。   8. The communication method according to claim 7, wherein the two types of signals are a signal having a potential level of H level and a signal having a potential level of L level. 請求項8記載の通信方法であって、前記機器の各々は前記Hレベルの信号の立ち上がりエッジと前記Lレベルの信号の立ち下がりエッジを検出可能であり、前記送信権獲得工程において自機器の前記送信権獲得時間帯であるかどうかを判定する際に、直近に検出したエッジが前記Hレベルの信号の立ち上がりエッジと前記Lレベルの信号の立ち下がりエッジのいずれであるかを判定することを特徴とする通信方法。   9. The communication method according to claim 8, wherein each of the devices is capable of detecting a rising edge of the H-level signal and a falling edge of the L-level signal. When determining whether it is a transmission right acquisition time zone, it is determined whether the most recently detected edge is a rising edge of the H level signal or a falling edge of the L level signal. Communication method. 請求項5ないし9のいずれかに記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする通信方法。   10. The communication method according to claim 5, further comprising a transmission right releasing step of releasing the transmission right when transmission of transmission data is completed. 前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする請求項5ないし10のいずれかに記載の通信方法。   The communication method according to claim 5, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. 複数の機器の間で通信が行われる通信システムにおいて、前記機器の各々には、自機器の識別子と送信可能機器の識別子の初期値と前記送信可能機器の識別子の遷移順序が予め設定されており、前記機器の各々が、自機器の前記識別子と前記送信可能機器の識別子とが一致し、かつ自機器に送信データが存在する場合に、データの送信権を獲得して送信データを送信する通信方法であって、
前記機器の各々が、
他の機器が既に前記送信権を獲得しているか否かを判定する第1の判定工程と、
他の機器が前記送信権を獲得していない場合に、前記機器の各々に入力される周期性のある信号の周期の基点が所定の期間内に検出されたかどうかを判定する第2の判定工程と、
前記基点が検出されている場合に、前記送信可能機器の識別子と自機器の前記識別子とが一致するか否か判定する第3の判定工程と、
前記送信可能機器の識別子と自機器の前記識別子とが一致し、かつ自機器に送信データが存在しない場合に、前記送信可能機器の識別子の遷移順序に応じた次の前記送信可能機器の識別子を前記機器のそれぞれに設定する設定工程と、
前記送信可能機器の識別子と自機器の前記識別子とが一致し、かつ自機器に送信データが存在する場合に、送信権獲得用のコマンドを他の機器に発行して前記送信権を獲得する送信権獲得工程と、
を具備し、前記機器の各々に、前記送信可能機器の識別子と自機器の前記識別子とが一致して前記送信権の獲得が可能となる送信権獲得時間帯が前記周期性のある信号の1周期を単位として割り当てられることを特徴とする通信方法。
In a communication system in which communication is performed between a plurality of devices, each of the devices is preset with an identifier of the own device, an initial value of the identifier of the transmittable device, and a transition order of the identifiers of the transmittable device. Communication in which each of the devices acquires the right to transmit data and transmits the transmission data when the identifier of the device matches the identifier of the device capable of transmission and transmission data exists in the device. A method,
Each of the devices is
A first determination step of determining whether another device has already acquired the transmission right;
A second determination step of determining whether or not a base point of a period of a periodic signal input to each of the devices is detected within a predetermined period when another device has not acquired the transmission right; When,
A third determination step of determining whether or not the identifier of the transmittable device and the identifier of the own device match when the base point is detected;
When the identifier of the transmittable device and the identifier of the own device match and there is no transmission data in the own device, the identifier of the next transmittable device according to the transition sequence of the identifier of the transmittable device is A setting step for setting each of the devices;
A transmission for acquiring a transmission right by issuing a transmission right acquisition command to another device when the identifier of the device capable of transmission matches the identifier of the own device and transmission data exists in the own device. Rights acquisition process,
Each of the devices has a transmission right acquisition time zone in which the transmission right acquisition time can be acquired by matching the identifier of the device capable of transmission with the identifier of the own device, and is one of the periodic signals. A communication method characterized by being assigned in units of periods.
請求項12記載の通信方法であって、前記機器のうちの1つがマスタ機器として予め定められており、前記マスタ機器が、自機器もしくは他の機器からの要求に応じて前記送信可能機器の識別子の遷移順序を変更するコマンドを発行することにより、前記送信可能機器の識別子の遷移順序を任意に変更できることを特徴とする通信方法。   13. The communication method according to claim 12, wherein one of the devices is determined in advance as a master device, and the master device identifies the transmittable device in response to a request from the own device or another device. A communication method characterized in that the transition order of identifiers of the transmittable devices can be arbitrarily changed by issuing a command for changing the transition order. 請求項12もしくは13のいずれかに記載の通信方法であって、送信データの送信を完了すると前記送信権を解放する送信権解放工程を具備することを特徴とする通信方法。   14. The communication method according to claim 12, further comprising a transmission right releasing step of releasing the transmission right when transmission of transmission data is completed. 前記周期性のある信号が、商用電源から生成される電源同期信号であることを特徴とする請求項12ないし14のいずれかに記載の通信方法。   15. The communication method according to claim 12, wherein the periodic signal is a power supply synchronization signal generated from a commercial power supply. 請求項1ないし4のいずれかに記載の通信方法であって、
既に前記送信権獲得時間帯が設定されている前記通信システムの機器と前記通信システムに追加される追加機器の各々には、前記追加機器が既に前記送信権獲得時間帯が設定されている機器に対して送信データを送信できる追加機器送信時間帯が、前記周期性のある信号の1周期毎に前記送信権獲得時間帯と重複しない範囲で予め設定されており、
前記追加機器が、
前記追加機器送信時間帯を検出すると、既に前記送信権獲得時間帯が設定されている機器に対して前記送信権獲得時間帯の提供を要求する送信権獲得時間帯提供要求工程と、
既に前記送信権獲得時間帯が設定されている機器から前記送信権獲得時間帯を入手すると、自機器も含めた新規の送信権獲得時間帯を計算する計算工程と、
前記追加機器送信時間帯を検出すると、既に前記送信権獲得時間帯が設定されている機器に対して前記新規の送信権獲得時間帯の設定を要求する新規送信権獲得時間帯設定要求工程と、
を具備することを特徴とする通信方法。
The communication method according to any one of claims 1 to 4,
For each device of the communication system for which the transmission right acquisition time zone has already been set and each additional device to be added to the communication system, the additional device is a device for which the transmission right acquisition time zone has already been set. On the other hand, an additional device transmission time zone in which transmission data can be transmitted is preset in a range that does not overlap with the transmission right acquisition time zone for each cycle of the periodic signal,
The additional equipment is
When detecting the additional device transmission time zone, a transmission right acquisition time zone provision requesting step for requesting provision of the transmission right acquisition time zone to a device for which the transmission right acquisition time zone has already been set;
When obtaining the transmission right acquisition time zone from a device for which the transmission right acquisition time zone has already been set, a calculation step of calculating a new transmission right acquisition time zone including the own device;
When detecting the additional device transmission time zone, a new transmission right acquisition time zone setting requesting step for requesting the device for which the transmission right acquisition time zone has already been set to request setting of the new transmission right acquisition time zone;
A communication method comprising:
請求項16記載の通信方法であって、前記送信権を獲得した機器がその他の機器へ追加機器送信時間帯変更のコマンドを発行することにより、前記追加機器送信時間帯を任意に変更できることを特徴とする通信方法。   17. The communication method according to claim 16, wherein the device that has acquired the transmission right can arbitrarily change the additional device transmission time zone by issuing a command for changing the additional device transmission time zone to another device. Communication method.
JP2004111654A 2004-04-06 2004-04-06 Communication method Pending JP2005295466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004111654A JP2005295466A (en) 2004-04-06 2004-04-06 Communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004111654A JP2005295466A (en) 2004-04-06 2004-04-06 Communication method

Publications (1)

Publication Number Publication Date
JP2005295466A true JP2005295466A (en) 2005-10-20

Family

ID=35327864

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004111654A Pending JP2005295466A (en) 2004-04-06 2004-04-06 Communication method

Country Status (1)

Country Link
JP (1) JP2005295466A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011524678A (en) * 2008-06-11 2011-09-01 ジエマルト・エス・アー High speed data transmission method and corresponding apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011524678A (en) * 2008-06-11 2011-09-01 ジエマルト・エス・アー High speed data transmission method and corresponding apparatus

Similar Documents

Publication Publication Date Title
JP4393510B2 (en) Device, method and program for executing master / slave exchange
KR100565487B1 (en) Home appliance network system and its operation method
EP1233538A2 (en) Power line communications system
CN107949067A (en) The control method and relevant apparatus of a kind of Channel Detection
CN110535733B (en) Control method and device of household appliance, computer equipment and storage medium
CN103813039A (en) Home appliance control method, home server, and home appliance control system
WO2019062048A1 (en) Running control method, resource sharing apparatus, and computer-readable storage medium
WO2014175438A1 (en) Control system, control device, control method, and program
JP2017092565A (en) Sleep control method
US20130145030A1 (en) Control device, terminal apparatus, and communication system
KR101558084B1 (en) Plc system having a plurality of cpu modules and control method thereof
JP2005295466A (en) Communication method
US7539206B2 (en) Communication apparatus and method for supporting carrier sense multiple access/collision detection
CN113048615B (en) Air conditioning system, communication control method and device thereof, storage medium and processor
JP4889968B2 (en) Power line carrier communication system, power line carrier communication method, and communication device
Ma et al. A sensor network for buildings based on the DALI bus
US9852603B2 (en) Locating a remote control device
CN110136424B (en) Equipment control method and equipment
CN110608502A (en) Air conditioner communication method and air conditioner based on single-wire half-duplex communication
CN207150561U (en) Input unit and household electrical appliance
KR101588048B1 (en) Method and device for resolving data collision in home network system
CN112968819A (en) Household appliance control method and device based on TOF
JP4236650B2 (en) Network system
JP4258334B2 (en) Communication device
JP7749865B2 (en) Air conditioning control system, air conditioning control method and program