JP2017022615A - Synchronous communication method - Google Patents

Synchronous communication method Download PDF

Info

Publication number
JP2017022615A
JP2017022615A JP2015140013A JP2015140013A JP2017022615A JP 2017022615 A JP2017022615 A JP 2017022615A JP 2015140013 A JP2015140013 A JP 2015140013A JP 2015140013 A JP2015140013 A JP 2015140013A JP 2017022615 A JP2017022615 A JP 2017022615A
Authority
JP
Japan
Prior art keywords
code
synchronization
control unit
synchronization code
sensor
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.)
Granted
Application number
JP2015140013A
Other languages
Japanese (ja)
Other versions
JP6512533B2 (en
Inventor
竹内 聡
Satoshi 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.)
Toto Ltd
Original Assignee
Toto 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 Toto Ltd filed Critical Toto Ltd
Priority to JP2015140013A priority Critical patent/JP6512533B2/en
Publication of JP2017022615A publication Critical patent/JP2017022615A/en
Application granted granted Critical
Publication of JP6512533B2 publication Critical patent/JP6512533B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a synchronous communication method for selecting a correct communication scheme in determining communication schemes compatible with new and old communication between a controller and a sensor.SOLUTION: At the time of starting synchronous communication, a first synchronous code C1 is transmitted from a control unit 30 to a sensor 20 before a second synchronous code C2. When the sensor 20 normally receives the first synchronous code C1 transmitted by the control unit 30, it transmits a reception success code A to the control unit 30, and when it succeeds the synchronization with the first synchronization code C1, it transmits a first establishment code as a synchronization state code B to the control unit 30. When the control unit 30 receives the reception success code A but does not receive the first establishment code as the synchronization state code B, it determines that the sensor 20 does not support a communication scheme based on the first synchronization code C1, and transmits a second synchronization code C2 to the sensor 20.SELECTED DRAWING: Figure 1A

Description

本発明は、同期通信方法に係わり、特に使用者が差し出した手をセンサにて検知して吐止水を行う自動水栓装置の同期通信方法に関する。   The present invention relates to a synchronous communication method, and more particularly, to a synchronous communication method for an automatic faucet device that detects water with a sensor by a user's hand out and stops water.

駅や飲食店、ホテル、大型商業施設などの公共施設のトイレや洗面所などにおいては、使用者が手を差し出したり、引っ込めたりすると自動的に吐水や止水を行う自動水栓装置が広く採用されている。   Automatic faucet devices that automatically discharge and stop water when a user puts out or retracts a hand in a toilet or washroom of public facilities such as stations, restaurants, hotels, and large commercial facilities are widely used. Has been.

この自動水栓装置の構成としては、センサの検知によって得られた人体の感知状態やLEDの表示状態、温度、学習結果などの情報をコントローラに対して通信し、センサとコントローラとの通常通信のやり取りによって自動水栓装置の吐水及び止水動作を制御し、利便性や節水性の向上を図ることができる。   The automatic faucet device communicates information such as the sensing state of the human body, LED display state, temperature, and learning result obtained by the sensor to the controller, and the normal communication between the sensor and the controller. It is possible to control the water discharge and water stop operation of the automatic water faucet device through the exchange, thereby improving convenience and water saving.

センサとコントローラとの通常通信における通信方式の一例について図5に示す。新センサ102は、旧センサ100の性能を変化・向上させたものである。また、旧コントローラ200は、旧センサ100との旧通信方式に対応したものであり、新コントローラ202は、新センサ102との新通信方式に対応したものである。対応した通信方式に基づいて通常通信が行われ、センサとコントローラはこの通信方式に含まれた機能を用いることができる。   An example of a communication method in normal communication between the sensor and the controller is shown in FIG. The new sensor 102 is obtained by changing or improving the performance of the old sensor 100. The old controller 200 corresponds to the old communication method with the old sensor 100, and the new controller 202 corresponds to the new communication method with the new sensor 102. Normal communication is performed based on the corresponding communication method, and the sensor and the controller can use the functions included in this communication method.

図5に示すように、新センサ102が旧コントローラ200との旧通信方式にも対応できるようにすることで、旧コントローラ200が搭載された製品において、旧センサ100を新センサ102にそのまま置き換えることができるため好ましい。また同様に、新コントローラ202が旧センサ100との旧通信方式にも対応できるようにすることで、旧センサ100が搭載された製品において、旧コントローラ200を新コントローラ202にそのまま置き換えることができるため好ましい。   As shown in FIG. 5, by allowing the new sensor 102 to support the old communication method with the old controller 200, the old sensor 100 is replaced with the new sensor 102 as it is in a product equipped with the old controller 200. Is preferable. Similarly, by enabling the new controller 202 to support the old communication method with the old sensor 100, the old controller 200 can be replaced with the new controller 202 as it is in a product in which the old sensor 100 is mounted. preferable.

このような、従来製品との互換性を保証するために、コントローラとセンサが共に旧通信方式と新通信方式を保証する制御方法が必要となる。 In order to ensure compatibility with such a conventional product, a control method is required in which both the controller and the sensor guarantee the old communication method and the new communication method.

コントローラとセンサとの互換性を確保するためには、同期通信を行うことでコントローラとセンサとを同期状態にする方法がある。同期通信としては、特許文献1のようなフレーム同期システムがある(特許文献1参照)。   In order to ensure compatibility between the controller and the sensor, there is a method of bringing the controller and the sensor into a synchronized state by performing synchronous communication. As synchronous communication, there is a frame synchronization system as in Patent Document 1 (see Patent Document 1).

また、センサとコントローラとの同期通信の一例を図6に示す。図6においては、新通信方式として同期させるための新同期コードと、旧通信方式として同期させるための旧同期コードをコントローラからセンサへ交互に送信することで、同期が成立した同期コードに基づいた通信方式にて通常通信を行う方法である。   An example of synchronous communication between the sensor and the controller is shown in FIG. In FIG. 6, the new synchronization code for synchronization as the new communication method and the old synchronization code for synchronization as the old communication method are alternately transmitted from the controller to the sensor, so that the synchronization is established. This is a method of performing normal communication by a communication method.

特許第2591296号公報Japanese Patent No. 2591296

しかしこの方法では、センサがコントローラから送信された新同期コードを正常に受信したかどうかコントローラが判断できない。ここで、新コントローラと新センサが接続された状態において、同期通信開始後コントローラから送信された新同期コードがノイズ等の影響により同期に失敗した場合、本来ならば新通信方式として同期させるべきものであるにも係らず、コントローラが旧同期コードを送信し、誤って旧通信方式として同期してしまう恐れがある。この場合、旧通信方式には新センサの情報が含まれていないため、新センサとしての機能を用いることができない。   However, in this method, the controller cannot determine whether the sensor has successfully received the new synchronization code transmitted from the controller. Here, when the new controller and the new sensor are connected, if the new synchronization code sent from the controller after synchronization communication fails due to noise, etc., it should be synchronized as a new communication method. Nevertheless, there is a possibility that the controller transmits the old synchronization code and mistakenly synchronizes as the old communication method. In this case, since the information of the new sensor is not included in the old communication method, the function as the new sensor cannot be used.

本発明は、上述した課題を解決するためになされたものであり、新旧通信互換のあるコントローラとセンサ間の通信方式を、正しい通信方式が選択されるようにすることを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to select a correct communication method as a communication method between a controller and a sensor compatible with old and new communication.

上記目的を達成するために、本発明の一態様に係る同期通信方法によれば、同期コードとして少なくとも第一同期コード及び第二同期コードを有する制御手段から検知手段へ同期コードを送信し、送信された同期コードが検知手段と同期可能であった場合に、送信された同期コードに基づいた設定を制御手段が行う同期通信方法であって、検知手段は、同期コードの受信に成功した場合に制御手段に向けて送信する受信成功コードと、同期コードの情報に応じて制御手段に向けて送信する同期可否コードと、を有し、制御手段は、同期通信開始時に、第一同期コードを検知手段へ送信する第一送信工程と、第一送信工程を行った後に、検知手段から送信された受信成功コードを受信する応答工程と、応答工程を行った後に、検知手段から送信された同期可否コードを受信して同期を成立させるか判定する同期成立工程と、同期成立工程が成立した場合に、第一同期コードに基づいた設定を行う第一設定工程と、応答工程が成立したが、同期成立工程が成立しなかった場合に、第二同期コードを検知手段へ送信する第二送信工程と、第二送信工程を行った後に、第二同期コードと同期可能であった場合に、第二同期コードに基づいた設定を行う第二設定工程と、を備えた同期通信方法。   In order to achieve the above object, according to a synchronous communication method according to an aspect of the present invention, a synchronization code is transmitted from a control unit having at least a first synchronization code and a second synchronization code as a synchronization code to a detection unit, and transmitted. A synchronization communication method in which the control unit performs setting based on the transmitted synchronization code when the synchronization code is synchronized with the detection unit, and the detection unit detects that the synchronization code has been successfully received. It has a reception success code transmitted to the control means and a synchronization propriety code transmitted to the control means according to the synchronization code information, and the control means detects the first synchronization code at the start of synchronous communication A first transmission step for transmitting to the means, a response step for receiving the reception success code transmitted from the detection means after performing the first transmission step, and a transmission from the detection means after performing the response step A synchronization establishment process for determining whether synchronization is established by receiving the synchronization enable / disable code, a first setting process for performing settings based on the first synchronization code when the synchronization establishment process is established, and a response process is established However, when the synchronization establishment process is not established, after the second transmission process for transmitting the second synchronization code to the detecting means and the second transmission process, the second synchronization code can be synchronized. And a second setting step for performing setting based on the second synchronization code.

この構成によれば、同期通信を行う際に、制御手段から検知手段へ送信される同期コードは、まず第二同期コードよりも先に第一同期コードから送信される。そして、検知手段は制御手段から送信された同期コードに応じて制御手段へ受信成功コード及び同期可否コードを送信するが、第一送信工程が行われた後に、応答工程が行われて同期成立工程が行われた場合、制御手段は検知手段が第一同期コードに基づいた通信方式に対応したものでないと判断し、次に第二同期コードを検知手段へ送信する。したがって、応答工程が行われなければ第二送信工程が行われないので、検知手段が第一同期コード及び第二同期コードのどちらにも同期し得るものであり、第二同期コードよりも第一同期コードと同期するのが好ましいものにおいて、誤って第二同期コードと同期が成立することを抑制することができる。   According to this configuration, when performing synchronous communication, the synchronization code transmitted from the control unit to the detection unit is first transmitted from the first synchronization code prior to the second synchronization code. The detecting means transmits the reception success code and the synchronization propriety code to the control means according to the synchronization code transmitted from the control means. After the first transmission process is performed, a response process is performed and a synchronization establishment process is performed. Is performed, the control means determines that the detection means does not correspond to the communication method based on the first synchronization code, and then transmits the second synchronization code to the detection means. Therefore, since the second transmission step is not performed unless the response step is performed, the detection means can synchronize with both the first synchronization code and the second synchronization code, and the first synchronization code is higher than the second synchronization code. In the case where it is preferable to synchronize with the synchronization code, it is possible to prevent erroneous synchronization with the second synchronization code.

また、本発明の一態様に係る同期通信方法は、制御手段は、第二送信工程を行う前に第一送信工程を複数回行ってもよい。   In the synchronous communication method according to one aspect of the present invention, the control unit may perform the first transmission step a plurality of times before performing the second transmission step.

このように構成された本発明においては、1回の送信で例えばデータ化けなどの影響により、検知手段が本来は第一同期コードと同期するべきであるにも係らず同期が成立しなかったとしても、第二送信工程に移る前に第一送信工程を複数回行うことで、そういった同期ミスが生じる確率を低減することができる。   In the present invention configured as described above, it is assumed that synchronization is not established due to the influence of, for example, garbled data in one transmission, although the detection means should be synchronized with the first synchronization code. However, by performing the first transmission step a plurality of times before moving to the second transmission step, it is possible to reduce the probability that such a synchronization error will occur.

また、本発明の一態様に係る同期通信方法は、第二送信工程によって検知手段と制御手段との同期が成立した後に、制御手段は再度第一送信工程を行う第三送信工程を備えてもよい。   The synchronous communication method according to one aspect of the present invention may further include a third transmission step in which the control unit performs the first transmission step again after the detection unit and the control unit are synchronized by the second transmission step. Good.

このように構成された本発明においては、誤って第二同期コードとの同期が成立してしまった場合においても、再び第一送信工程を行うことによって第一同期コードとの同期を成立させることができ、正しい通信方式に設定を更新することができる。   In the present invention configured as described above, even if synchronization with the second synchronization code is erroneously established, synchronization with the first synchronization code is established by performing the first transmission step again. And the settings can be updated to the correct communication method.

また、本発明の一態様に係る同期通信方法は、制御手段は、第三送信工程を所定期間だけ行ってもよい。   In the synchronous communication method according to one aspect of the present invention, the control unit may perform the third transmission step only for a predetermined period.

このように構成された本発明においては、制御手段は所定期間を経過すると第三送信工程を終了することで、不要な通信による電力消費を低減することができる。   In the present invention configured as described above, the control unit can reduce power consumption due to unnecessary communication by ending the third transmission step when a predetermined period has elapsed.

本発明によれば、新旧通信互換のあるコントローラとセンサ間の通信方式を、正しい通信方式が選択されるようにすることができる。   According to the present invention, the correct communication method can be selected as the communication method between the controller and the sensor compatible with the old and new communication.

本発明の実施形態による自動水栓装置の主構成を表すブロック図である。It is a block diagram showing the main structures of the automatic water faucet device by embodiment of this invention. 本発明の実施形態による同期通信に用いられるコードの関係図である。FIG. 4 is a relationship diagram of codes used for synchronous communication according to an embodiment of the present invention. 本発明の実施形態による同期通信のメイン処理における制御部のフローチャートである。It is a flowchart of the control part in the main process of the synchronous communication by embodiment of this invention. 本発明の実施形態による同期通信のサブ処理における制御部のフローチャートである。It is a flowchart of the control part in the sub process of the synchronous communication by embodiment of this invention. 本発明の変形例1による同期通信のメイン処理における制御部のフローチャートである。It is a flowchart of the control part in the main process of the synchronous communication by the modification 1 of this invention. 本発明の変形例1による同期通信のサブ処理における制御部のフローチャートである。It is a flowchart of the control part in the sub process of the synchronous communication by the modification 1 of this invention. 本発明の変形例2による同期通信のサブ処理における制御部のフローチャートである。It is a flowchart of the control part in the sub process of the synchronous communication by the modification 2 of this invention. センサとコントローラとの通常通信における通信方式の一例である。It is an example of the communication system in normal communication with a sensor and a controller. センサとコントローラとの同期通信の一例である。It is an example of the synchronous communication of a sensor and a controller.

添付資料を参照して、本発明の実施形態による同期通信方法を以下に説明する。   A synchronous communication method according to an embodiment of the present invention will be described below with reference to the attached materials.

<自動水栓装置の構成>
まず、図1Aを参照して、本発明の実施形態による同期通信方法を適用した自動水栓装置の構成について説明する。図1Aは、本発明の実施形態による自動水栓装置の主構成を表すブロック図である。
<Configuration of automatic faucet device>
First, a configuration of an automatic faucet device to which a synchronous communication method according to an embodiment of the present invention is applied will be described with reference to FIG. 1A. FIG. 1A is a block diagram showing a main configuration of an automatic water faucet device according to an embodiment of the present invention.

図1Aに示すように、自動水栓装置1は、水栓本体の先端部に設けた吐水口12と、開閉することによって吐水口12からの水の吐止水を行う開閉弁14と、人体を感知するセンサ(検知手段)20と、センサ20の感知に応じて開閉弁14の開閉を制御する制御部(制御手段)30と、を備えている。制御部30は、電源40より電力供給を受けて制御動作を行っている。   As shown in FIG. 1A, the automatic faucet device 1 includes a spout 12 provided at the front end of a faucet body, an on-off valve 14 that opens and closes water from the spout 12 by opening and closing, and a human body. And a control unit (control unit) 30 for controlling the opening / closing of the on-off valve 14 in response to the detection of the sensor 20. The control unit 30 receives power supply from the power supply 40 and performs a control operation.

センサ20は、人体の検出結果の信号を制御部30へと送信し、制御部30は、その検出結果の信号に応じて開閉弁14を開閉させ、吐水口12から水を吐水及び止水させる、通常通信を行う。   The sensor 20 transmits a detection result signal of the human body to the control unit 30, and the control unit 30 opens and closes the on-off valve 14 in accordance with the detection result signal, and discharges and stops water from the outlet 12. Normal communication.

<制御部とセンサの同期通信>
次に、図1Bを参照して、本発明の実施形態による同期通信によって設定される通信方式について説明する。図1Bは、本発明の実施形態による同期通信に用いられるコードの関係図である。
<Synchronous communication between controller and sensor>
Next, with reference to FIG. 1B, a communication method set by synchronous communication according to an embodiment of the present invention will be described. FIG. 1B is a relationship diagram of codes used for synchronous communication according to an embodiment of the present invention.

図1Aに示すように、制御部30は同期コードCを有する。また、センサ20は受信成功コードAと同期可否コードBを有する。電源40からの電力供給によって制御部30が起動した場合、制御部30とセンサ20との通常通信を行う前に、制御部30が同期コードCをセンサに送信することで同期通信を行う。   As shown in FIG. 1A, the control unit 30 has a synchronization code C. The sensor 20 has a reception success code A and a synchronization enable / disable code B. When the control unit 30 is activated by supplying power from the power supply 40, the control unit 30 performs synchronous communication by transmitting the synchronization code C to the sensor before performing normal communication between the control unit 30 and the sensor 20.

センサ20は、制御部30から送信された同期コードCに対して適正に受信した場合は、制御部30へ受信成功コードAを送信する。また、センサ20は制御部30に対して、制御部30から送信された同期コードCの内容に応じた同期可否コードBを送信する。   If the sensor 20 properly receives the synchronization code C transmitted from the control unit 30, the sensor 20 transmits a reception success code A to the control unit 30. Further, the sensor 20 transmits a synchronization propriety code B corresponding to the content of the synchronization code C transmitted from the control unit 30 to the control unit 30.

ここで、制御部30として、新制御部30aと旧制御部30b、センサ20として、新センサ20aと旧センサ20bがあるとして、これらの同期通信における通信内容について説明する。   Here, assuming that there are the new control unit 30a and the old control unit 30b as the control unit 30 and the new sensor 20a and the old sensor 20b as the sensor 20, the communication contents in these synchronous communications will be described.

図1Bに示すように、旧制御部30bは同期コードCとして、第二同期コードC2を有し、旧センサ20bは同期可否コードBとして、第二成立コードB2を有する。また、新制御部30aは同期コードCとして、第一同期コードC1及び第二同期コードC2を有し、新センサ20aは同期可否コードBとして、第一成立コードB1及び第二成立コードB2を有する。   As shown in FIG. 1B, the old control unit 30b has the second synchronization code C2 as the synchronization code C, and the old sensor 20b has the second establishment code B2 as the synchronization availability code B. Further, the new control unit 30a has the first synchronization code C1 and the second synchronization code C2 as the synchronization code C, and the new sensor 20a has the first formation code B1 and the second formation code B2 as the synchronization availability code B. .

同期通信において、旧制御部30bから旧センサ20bへ第二同期コードC2が送信されると、旧センサ20bは同期可否コードBとして第二成立コードB2を旧制御部30bへ送信する。この第二成立コードB2を旧制御部30bが受信すると、旧制御部30bは旧センサ20bが第二同期コードC2に対応したものと判断し、第二同期コードC2に基づいた通信方式に設定する。   In the synchronous communication, when the second synchronization code C2 is transmitted from the old control unit 30b to the old sensor 20b, the old sensor 20b transmits the second establishment code B2 as the synchronization availability code B to the old control unit 30b. When the old control unit 30b receives the second establishment code B2, the old control unit 30b determines that the old sensor 20b corresponds to the second synchronization code C2, and sets the communication method based on the second synchronization code C2. .

また、同期通信において、新制御部30aから新センサ20aへ第一同期コードC1が送信されると、新センサ20aは同期可否コードBとして第一成立コードB1を新制御部30aへ送信する。この第一成立コードB1を新制御部30aが受信すると、新制御部30aは新センサ20aが第一同期コードC1に対応したものと判断し、第一同期コードC1に基づいた通信方式に設定する。   In the synchronous communication, when the first synchronization code C1 is transmitted from the new control unit 30a to the new sensor 20a, the new sensor 20a transmits the first establishment code B1 to the new control unit 30a as the synchronization availability code B. When the new control unit 30a receives the first establishment code B1, the new control unit 30a determines that the new sensor 20a corresponds to the first synchronization code C1, and sets the communication method based on the first synchronization code C1. .

さらに、同期通信において、新制御部30aから旧センサ20bへ第二同期コードC2が送信されると、旧センサ20bは同期可否コードBとして第二成立コードB2を新制御部30aへ送信する。この第二成立コードB2を新制御部30aが受信すると、新制御部30aは旧センサ20bが第二同期コードC2に対応したものと判断し、第二同期コードC2に基づいた通信方式に設定する。   Furthermore, in the synchronous communication, when the second synchronization code C2 is transmitted from the new control unit 30a to the old sensor 20b, the old sensor 20b transmits the second establishment code B2 as the synchronization availability code B to the new control unit 30a. When the new control unit 30a receives the second establishment code B2, the new control unit 30a determines that the old sensor 20b corresponds to the second synchronization code C2, and sets the communication method based on the second synchronization code C2. .

なお、同期通信において、旧センサ20bは第一同期コードC1に対応していないため、新制御部30aから旧センサ20bへ第一同期コードC1が送信されたとしても、第一成立コードB1が旧センサ20bから新制御部30aへ送信することはない。そのため、新制御部30aと旧センサ20bとでは、第一同期コードC1に基づいた通信方式に設定されることはない。   In the synchronous communication, since the old sensor 20b does not support the first synchronization code C1, even if the first synchronization code C1 is transmitted from the new control unit 30a to the old sensor 20b, the first establishment code B1 is old. There is no transmission from the sensor 20b to the new controller 30a. Therefore, the new control unit 30a and the old sensor 20b are not set to the communication method based on the first synchronization code C1.

また、旧制御部30bは同期コードCとして第一同期コードC1を有していないため、旧制御部30bと旧センサ20b及び旧制御部30bと新センサ20aとでは、第一同期コードC1に基づいた通信方式に設定されることはない。   Since the old control unit 30b does not have the first synchronization code C1 as the synchronization code C, the old control unit 30b and the old sensor 20b and the old control unit 30b and the new sensor 20a are based on the first synchronization code C1. The communication method is not set.

このようにすることで、旧制御部30bと新センサ20a及び新制御部30aと旧センサ20bという組み合わせにおいても、第二同期コードC2に基づいた通信方式に設定でき、その通信方式としての機能を用いることができる。   By doing in this way, even in the combination of the old control unit 30b and the new sensor 20a and the new control unit 30a and the old sensor 20b, the communication method based on the second synchronization code C2 can be set, and the function as the communication method can be set. Can be used.

一方で、新制御部30aは第二同期コードC2を有しており、新センサ20aは第二同期コードC2に対応しているため、通信方式が設定されていない状態で新制御部30aから新センサ20aへ第二同期コードC2が送信された場合は、新制御部30aと新センサ20aとの間で、第二同期コードC2に基づいた通信方式に設定されることがある。その場合は、第一同期コードC1に基づいた通信方式としての機能を用いることができない。   On the other hand, since the new control unit 30a has the second synchronization code C2 and the new sensor 20a corresponds to the second synchronization code C2, the new control unit 30a starts the new control unit 30a in a state where no communication method is set. When the second synchronization code C2 is transmitted to the sensor 20a, the communication method based on the second synchronization code C2 may be set between the new control unit 30a and the new sensor 20a. In that case, a function as a communication method based on the first synchronization code C1 cannot be used.

同期通信によって通信方式が設定されるまでは通常通信が行われず、通信方式が設定されると、センサ20と制御部30は設定された通信方式にて通常通信を行い、設定された通信方式に含まれた機能を用いて自動水栓装置1の吐止水制御を行うことができる。   Normal communication is not performed until the communication method is set by synchronous communication. When the communication method is set, the sensor 20 and the control unit 30 perform normal communication using the set communication method, and the communication method is set to the set communication method. The water stopping control of the automatic faucet device 1 can be performed using the included function.

さらに、制御部30は、カウンタ36とタイマ38を有する。後述するように、カウンタ36はセンサ20から受信したコードに基づいてカウントが行われ、タイマ38は同期通信を終了するまでの時間をカウントするものである。なお、同期通信開始時は、カウンタ36及びタイマ38のカウントは0である。   Further, the control unit 30 includes a counter 36 and a timer 38. As will be described later, the counter 36 counts based on the code received from the sensor 20, and the timer 38 counts the time until the synchronous communication is terminated. At the start of synchronous communication, the counter 36 and the timer 38 are zero.

<同期通信の通信フロー>
次に、図2A、図2Bを参照して、本発明の実施形態による同期通信の制御フローについて説明する。図2Aは、本発明の実施形態による同期通信のメイン処理における制御部のフローチャートである。図2Bは、本発明の実施形態による同期通信のサブ処理における制御部のフローチャートである。
<Communication communication flow>
Next, a control flow of synchronous communication according to the embodiment of the present invention will be described with reference to FIGS. 2A and 2B. FIG. 2A is a flowchart of the control unit in the main process of synchronous communication according to the embodiment of the present invention. FIG. 2B is a flowchart of the control unit in the synchronous communication sub-process according to the embodiment of the present invention.

同期通信は、通常通信における通信方式の設定を行うメイン処理と、メイン処理において誤った通信方式に設定されていないか確認を行うサブ処理の、大きく2つに分けられる。   Synchronous communication is roughly divided into two types: a main process for setting a communication method in normal communication and a sub-process for confirming whether an incorrect communication method is set in the main process.

<メイン処理>
まず、同期通信が始まると、制御部30はメイン処理から開始する。図2Aに示すように、制御部30はカウンタ36のカウントが+3未満であるか否かを判断する(S1)。
<Main processing>
First, when synchronous communication starts, the control unit 30 starts from the main process. As shown in FIG. 2A, the control unit 30 determines whether or not the count of the counter 36 is less than +3 (S1).

ステップS1において、カウンタ36のカウントが+3未満であれば、制御部30はセンサ20に対して第一同期コードC1を送信する(S2)。   In step S1, if the count of the counter 36 is less than +3, the control unit 30 transmits the first synchronization code C1 to the sensor 20 (S2).

センサ20は、ステップS2において制御部30から第一同期コードC1が送信されると、第一同期コードC1を適正に受信した場合は受信成功コードAを制御部30へ送信し、さらにこのときのセンサ20が第一同期コードC1に対応したものであれば、同期可否コードBとして第一成立コードB1を制御部30へ送信する。   When the first synchronization code C1 is transmitted from the control unit 30 in step S2, the sensor 20 transmits the reception success code A to the control unit 30 when the first synchronization code C1 is properly received. If the sensor 20 corresponds to the first synchronization code C1, the first establishment code B1 is transmitted to the control unit 30 as the synchronization availability code B.

制御部30は、ステップS2を行った後、まずセンサ20からの受信成功コードAを受信したか否かを判断する(S3)。ステップS3において、受信成功コードAを受信したと判断した場合は、次にセンサ20から第一成立コードB1を受信したか否かを判断する(S4)。そして、ステップS4において、第一成立コードB1を受信したと判断した場合は、制御部30は第一同期コードC1に基づいた通信方式に設定すると同時に、カウンタ36のカウントをリセットする(S6)。そして、同期通信におけるメイン処理を終了する。   After performing step S2, the control unit 30 first determines whether or not the reception success code A from the sensor 20 has been received (S3). If it is determined in step S3 that the reception success code A has been received, it is next determined whether or not the first establishment code B1 has been received from the sensor 20 (S4). If it is determined in step S4 that the first establishment code B1 has been received, the control unit 30 sets the communication method based on the first synchronization code C1, and simultaneously resets the count of the counter 36 (S6). And the main process in synchronous communication is complete | finished.

ステップS3において、制御部30が受信成功コードAを受信したと判断されなかった場合は、カウンタ36のカウントをリセットして(S6)、ステップS1へと折り返す。   If it is not determined in step S3 that the control unit 30 has received the reception success code A, the count of the counter 36 is reset (S6), and the process returns to step S1.

また、ステップS4において、制御部30が第一成立コードB1を受信したと判断されなかった場合は、制御部30はカウンタ36のカウントを+1増やして(S7)、ステップS1へと折り返す。   If it is not determined in step S4 that the control unit 30 has received the first establishment code B1, the control unit 30 increments the count of the counter 36 by 1 (S7) and returns to step S1.

続いて、ステップS1においてカウンタ36のカウントが+3以上であると判断された場合、つまり同期通信開始後にセンサ20が第一同期コードC1を3回連続で適正に受信していずれも同期が成立しなかった場合、制御部30はセンサ20に対して第二同期コードC2を送信すると同時に、カウンタ36のカウントをリセットする(S8)。   Subsequently, when it is determined in step S1 that the count of the counter 36 is +3 or more, that is, after the synchronous communication is started, the sensor 20 properly receives the first synchronization code C1 three times in succession and synchronization is established. If not, the control unit 30 transmits the second synchronization code C2 to the sensor 20 and simultaneously resets the count of the counter 36 (S8).

センサ20は、ステップS8において制御部30から第二同期コードC2が送信されると、このときのセンサ20が第二同期コードC2に対応したものであれば、同期可否コードBとして第二成立コードB2を制御部30へ送信する。   When the sensor 20 receives the second synchronization code C2 from the control unit 30 in step S8, if the sensor 20 at this time corresponds to the second synchronization code C2, the second establishment code is set as the synchronization availability code B. B2 is transmitted to the control unit 30.

制御部30は、ステップS8を行った後、センサ20から第二成立コードB2を受信したか否かを判断する(S9)。そして、ステップS9において、第二成立コードB2を受信したと判断した場合、制御部30は、第二同期コードC2に基づいた通信方式に設定する(S10)。そして、同期通信におけるメイン処理を終了する。   After performing step S8, the control unit 30 determines whether or not the second formation code B2 is received from the sensor 20 (S9). If it is determined in step S9 that the second establishment code B2 has been received, the control unit 30 sets the communication method based on the second synchronization code C2 (S10). And the main process in synchronous communication is complete | finished.

ステップS9において第二成立コードB2を受信しなかったと判断された場合、ステップS1へと折り返す。   If it is determined in step S9 that the second formation code B2 has not been received, the process returns to step S1.

<サブ処理>
同期通信においてメイン処理が終了すると、次にサブ処理へと移行する。図2Bに示すように、サブ処理が開始すると、制御部30はメイン処理において第二同期コードC2に基づいた通信方式に設定されたか否かを判断する(S11)。
<Sub processing>
When the main process is completed in the synchronous communication, the process proceeds to the sub process. As shown in FIG. 2B, when the sub-process is started, the control unit 30 determines whether or not the communication method based on the second synchronization code C2 is set in the main process (S11).

ステップS11において、第二同期コードC2に基づいた通信方式に設定されていると判断した場合、制御部30は、タイマ38をスタートさせる(S12)。ステップS11において、第二同期コードC2に基づいた通信方式に設定されていないと判断した場合、つまり、第一同期コードC1に基づいた通信方式に設定されていると判断した場合、制御部30は同期通信におけるサブ処理を終了する。   If it is determined in step S11 that the communication method based on the second synchronization code C2 is set, the control unit 30 starts the timer 38 (S12). In step S11, when it is determined that the communication method based on the second synchronization code C2 is not set, that is, when it is determined that the communication method based on the first synchronization code C1 is set, the control unit 30 The sub-process in the synchronous communication is finished.

制御部30は、ステップS12においてタイマ38をスタートさせた後、タイマ38のカウントが所定時間Xを経過しているか否かを判断する(S13)。タイマ38のカウントが所定時間Xを経過していると判断した場合、タイマ38のカウントをクリアして(S14)、同期通信におけるサブ処理を終了する。   After starting the timer 38 in step S12, the control unit 30 determines whether the count of the timer 38 has passed the predetermined time X (S13). When it is determined that the count of the timer 38 has passed the predetermined time X, the count of the timer 38 is cleared (S14), and the sub-process in the synchronous communication is terminated.

ステップS13において、タイマ38のカウントが所定時間Xを経過していないと判断した場合、制御部30はセンサ20に対して、第一同期コードC1を送信する(S15)。   In step S13, when it is determined that the count of the timer 38 has not passed the predetermined time X, the control unit 30 transmits the first synchronization code C1 to the sensor 20 (S15).

センサ20は、ステップS15において制御部30から第一同期コードC1が送信されると、このときのセンサ20が第一同期コードC1に対応したものであれば、同期可否コードBとして第一成立コードB1を制御部30へ送信する。   When the first synchronization code C1 is transmitted from the control unit 30 in step S15, the sensor 20 is the first establishment code as the synchronization availability code B if the sensor 20 corresponds to the first synchronization code C1. B1 is transmitted to the control unit 30.

制御部30は、ステップS15を行った後、センサ20から第一成立コードB1を受信したか否かを判断する(S16)。ステップS16において、第一成立コードB1を受信したと判断した場合、制御部30は、第一同期コードC1に基づいた通信方式に設定を変更すると同時に、タイマ38のカウントをクリアする(S17)。そして、同期通信におけるサブ処理を終了する。   After performing Step S15, the control unit 30 determines whether or not the first establishment code B1 is received from the sensor 20 (S16). If it is determined in step S16 that the first establishment code B1 has been received, the control unit 30 changes the setting to the communication method based on the first synchronization code C1, and simultaneously clears the count of the timer 38 (S17). Then, the sub-process in the synchronous communication is finished.

ステップS16において、第一成立コードB1を受信したと判断しなかった場合、ステップS13へと折り返す。   If it is not determined in step S16 that the first formation code B1 has been received, the process returns to step S13.

同期通信におけるサブ処理が終了すると、センサ20と制御部30は、設定された通信方式に基づいて通常通信を開始する。   When the sub-process in the synchronous communication is completed, the sensor 20 and the control unit 30 start normal communication based on the set communication method.

<作用・効果>
次に、本発明の実施形態による同期通信の作用効果を説明する。
<Action and effect>
Next, the effect of the synchronous communication according to the embodiment of the present invention will be described.

本発明の実施形態においては、同期通信の開始時には、まず第二同期コードC2よりも先に第一同期コードC1が制御部30からセンサ20へ送信される。そして、センサ20は、制御部30から送信された第一同期コードC1を適正に受信した場合は受信成功コードAを制御部30へ送信し、その上で第一同期コードC1との同期に成功した場合は同期可否コードBを制御部30へ送信することになる。このとき制御部30は、受信成功コードAを受信したものの、第一成立コードB1を受信しなかった場合、センサ20が第一同期コードC1に基づいた通信方式に対応するものではないと判断し、その後に第二同期コードC2をセンサ20へ送信する。したがって、センサ20が第一同期コードC1及び第二同期コードC2のどちらにも同期し得るものであり、第二同期コードC2よりも第一同期コードC1と同期するのが好ましいものにおいて、誤って第二同期コードC2と同期が成立することを抑制することができる。   In the embodiment of the present invention, at the start of synchronous communication, the first synchronization code C1 is first transmitted from the control unit 30 to the sensor 20 before the second synchronization code C2. When the sensor 20 properly receives the first synchronization code C1 transmitted from the control unit 30, the sensor 20 transmits a reception success code A to the control unit 30, and then succeeds in synchronization with the first synchronization code C1. In this case, the synchronization availability code B is transmitted to the control unit 30. At this time, when the control unit 30 receives the reception success code A but does not receive the first establishment code B1, the control unit 30 determines that the sensor 20 does not correspond to the communication method based on the first synchronization code C1. Thereafter, the second synchronization code C2 is transmitted to the sensor 20. Accordingly, the sensor 20 can be synchronized with both the first synchronization code C1 and the second synchronization code C2, and it is preferable that the sensor 20 be synchronized with the first synchronization code C1 rather than the second synchronization code C2. The establishment of synchronization with the second synchronization code C2 can be suppressed.

また、制御部30は、第一同期コードC1の送信を複数回行い、3回連続で適正に受信したものの、いずれも同期が成立しなかった場合に第二同期コードC2の送信を行う。これにより、1回の送信で例えばデータ化けなどの影響により、センサ20が本来は第一同期コードC1と同期するべきであるにも係らず同期が成立しなかったとしても、第二同期コードC2の送信を行う前に第一同期コードC1の送信を複数回行うことで、そういった同期ミスが生じる確率を低減することができる。   Further, the control unit 30 transmits the first synchronization code C1 a plurality of times, and transmits the second synchronization code C2 when the synchronization is not established in all cases, although it has been properly received three times in succession. As a result, even if the synchronization is not established despite the fact that the sensor 20 should originally synchronize with the first synchronization code C1 due to, for example, data corruption in one transmission, the second synchronization code C2 By performing the transmission of the first synchronization code C1 a plurality of times before transmitting the above, it is possible to reduce the probability that such a synchronization error will occur.

さらに、制御部30は、第二同期コードC2との同期が成立した場合、タイマ38のカウントが所定時間Xを経過するまで同期通信を継続する。これにより、誤って第二同期コードC2との同期が成立してしまった場合においても、再び第一同期コードC1の送信を行うことによって第一同期コードC1との同期を成立させることができ、正しい通信方式に設定を更新することができる。   Furthermore, when the synchronization with the second synchronization code C2 is established, the control unit 30 continues the synchronous communication until the count of the timer 38 elapses the predetermined time X. Thereby, even if the synchronization with the second synchronization code C2 is erroneously established, the synchronization with the first synchronization code C1 can be established by transmitting the first synchronization code C1 again, Settings can be updated to the correct communication method.

さらに、制御部30は、タイマ38のカウントが所定時間Xを経過すると同期通信を終了する。これにより、不要な通信による電力消費を低減することができる。   Further, the control unit 30 ends the synchronous communication when the count of the timer 38 has passed the predetermined time X. Thereby, the power consumption by unnecessary communication can be reduced.

<変形例>
以上、本願の開示する技術の実施形態について説明したが、本願の開示する技術は、上記に限定されるものではない。
<Modification>
As mentioned above, although embodiment of the technique which this application discloses was described, the technique which this application discloses is not limited above.

<変形例1>
例えば、上記実施形態においては、制御部30は、同期コードCとして第一同期コードC1と第二同期コードC2を有していたが、本発明はこれに限らず、さらに第三同期コードC3を有していてもよい。図3Aは、本発明の変形例1による同期通信のメイン処理における制御部のフローチャートである。図3Bは、本発明の変形例1による同期通信のサブ処理における制御部のフローチャートである。
<Modification 1>
For example, in the above embodiment, the control unit 30 has the first synchronization code C1 and the second synchronization code C2 as the synchronization code C. However, the present invention is not limited to this, and the third synchronization code C3 is further provided. You may have. FIG. 3A is a flowchart of the control unit in the main process of synchronous communication according to the first modification of the present invention. FIG. 3B is a flowchart of the control unit in the synchronous communication sub-process according to the first modification of the present invention.

ここで、センサ20が第三同期コードC3に基づいた通信方式に対応するものであれば、同期通信において第三同期コードC3を制御部30から適正に受信すると、同期可否コードBとして第三成立コードB3を制御部30へ送信する。   Here, if the sensor 20 is compatible with the communication method based on the third synchronization code C3, the third synchronization code C3 is established as the synchronization availability code B when the third synchronization code C3 is properly received from the control unit 30 in the synchronous communication. The code B3 is transmitted to the control unit 30.

変形例1において、第二同期コードC2は、第三同期コードC3と同一のコードが含まれている。そのため、センサ20が第一同期コードC1又は第二同期コードC2に基づいた通信方式に対応するものであったとしても、同期通信において、制御部30からセンサ20へ第三同期コードC3が送信されると同期が成立し、第三同期コードC3に基づいた通信方式に設定されることがある。   In the first modification, the second synchronization code C2 includes the same code as the third synchronization code C3. Therefore, even if the sensor 20 corresponds to the communication method based on the first synchronization code C1 or the second synchronization code C2, the third synchronization code C3 is transmitted from the control unit 30 to the sensor 20 in the synchronous communication. Then, synchronization is established and the communication method based on the third synchronization code C3 may be set.

変形例1におけるメイン処理では、図3Aに示すように、ステップS’8において、制御部30はカウンタ36のカウントが+6未満であるか否かを判断する(S’8)。ステップS’8において、カウンタ36のカウントが+6未満であれば、制御部30はセンサ20に対して第二同期コードC2を送信する(S’9)。   In the main process in the first modification, as shown in FIG. 3A, in step S′8, the control unit 30 determines whether or not the count of the counter 36 is less than +6 (S′8). In step S′8, if the count of the counter 36 is less than +6, the control unit 30 transmits the second synchronization code C2 to the sensor 20 (S′9).

センサ20は、ステップS’9において制御部30から第二同期コードC2が送信されると、第二同期コードC2を適正に受信した場合は受信成功コードAを制御部30へ送信し、さらにこのときのセンサ20が第二同期コードC2に対応したものであれば、同期可否コードBとして第二成立コードB2を制御部30へ送信する。   When the second synchronization code C2 is transmitted from the control unit 30 in step S′9, the sensor 20 transmits a reception success code A to the control unit 30 when the second synchronization code C2 is properly received. If the current sensor 20 corresponds to the second synchronization code C2, the second establishment code B2 is transmitted to the control unit 30 as the synchronization availability code B.

制御部30は、ステップS’9を行った後、まずセンサ20からの受信成功コードAを受信したか否かを判断する(S’10)。ステップS’10において、受信成功コードAを受信したと判断した場合は、次にセンサ20から第二成立コードB2を受信したか否かを判断する(S’11)。そして、ステップS’11において、第二成立コードB2を受信したと判断した場合は、制御部30は第二同期コードC2に基づいた通信方式に設定すると同時に、カウンタ36のカウントをリセットする(S’12)。そして、同期通信におけるメイン処理を終了する。   After performing step S'9, the control unit 30 first determines whether or not the reception success code A from the sensor 20 has been received (S'10). If it is determined in step S'10 that the reception success code A has been received, it is next determined whether or not the second formation code B2 has been received from the sensor 20 (S'11). If it is determined in step S′11 that the second establishment code B2 has been received, the control unit 30 sets the communication method based on the second synchronization code C2 and simultaneously resets the count of the counter 36 (S '12). And the main process in synchronous communication is complete | finished.

ステップS’10において、制御部30が受信成功コードAを受信したと判断されなかった場合は、カウンタ36のカウントを+3へとして(S’13)、ステップS1へと折り返す。   If it is not determined in step S'10 that the control unit 30 has received the reception success code A, the count of the counter 36 is set to +3 (S'13), and the process returns to step S1.

また、ステップS’11において、制御部30が第二成立コードB2を受信したと判断されなかった場合は、制御部30は、カウンタ36のカウントを+1増やして(S’14)、ステップS1へと折り返す。   If it is not determined in step S′11 that the control unit 30 has received the second formation code B2, the control unit 30 increases the count of the counter 36 by +1 (S′14), and proceeds to step S1. And turn back.

ステップS’8において、カウンタ36のカウントが+6未満でないと判断した場合、つまり同期通信開始後にセンサ20が第一同期コードC1及び第二同期コードC2をそれぞれ3回ずつ連続で適正に受信したもののいずれも同期が成立しなかった場合、制御部30はセンサ20に対して第三同期コードC3を送信すると同時に、カウンタ36のカウントをリセットする(S’15)。その後は、第三同期コードC3の送信に応じたフローとなる(S’16、17)。   If it is determined in step S′8 that the count of the counter 36 is not less than +6, that is, the sensor 20 has received the first synchronization code C1 and the second synchronization code C2 three times in succession after the start of synchronous communication. If none of the synchronization is established, the control unit 30 transmits the third synchronization code C3 to the sensor 20 and simultaneously resets the count of the counter 36 (S′15). Thereafter, the flow corresponds to the transmission of the third synchronization code C3 (S'16, 17).

変形例1におけるサブ処理では、図3Bに示すように、メイン処理において第二同期コードC2に基づいた通信方式に設定された場合は、上記実施形態と同様に第一同期コードC1の送信を所定時間行い(S’19〜S’24)、メイン処理において第三同期コードC3に基づいた通信方式に設定された場合は、第一同期コードC1及び第二同期コードC2の送信を所定時間行う(S’19〜S’27)。   In the sub-process in the first modification, as shown in FIG. 3B, when the communication method based on the second synchronization code C2 is set in the main process, the first synchronization code C1 is transmitted in the same manner as in the above embodiment. If the communication method based on the third synchronization code C3 is set in the main process (S′19 to S′24), the first synchronization code C1 and the second synchronization code C2 are transmitted for a predetermined time ( S'19 to S'27).

このように、制御部30は第三同期コードC3よりも先に第二同期コードC2をセンサ20へ送信し、受信成功コードAを受信したものの第二成立コードB2を受信しなかった場合、センサ20が第二同期コードC2に基づいた通信方式に対応するものでないと判断し、第三同期コードC3をセンサ20へ送信する。これにより、第二同期コードC2に第三同期コードC3と同一のコードが含まれ、センサ20が第二同期コードC2及び第三同期コードC3のどちらにも同期し得るものであり、第三同期コードC3よりも第二同期コードC2と同期するのが好ましいものにおいて、誤って第三同期コードC3と同期が成立することを抑制することができる。   As described above, when the control unit 30 transmits the second synchronization code C2 to the sensor 20 before the third synchronization code C3 and receives the reception success code A but does not receive the second formation code B2, the sensor 30 20 is determined not to correspond to the communication method based on the second synchronization code C2, and the third synchronization code C3 is transmitted to the sensor 20. As a result, the second synchronization code C2 includes the same code as the third synchronization code C3, and the sensor 20 can be synchronized with both the second synchronization code C2 and the third synchronization code C3. In the case where it is preferable to synchronize with the second synchronization code C2 rather than the code C3, it is possible to prevent erroneous synchronization with the third synchronization code C3.

<変形例2>
また、上記実施形態においては、制御部30は、サブ処理において同期通信を終了するまでの時間をカウントするためのタイマ38を有していたが、本発明はこれに限らず、制御部30はタイマ38の代わりにカウンタ36を用いてもよい。図4は、本発明の変形例2による同期通信のサブ処理における制御部のフローチャートである。
<Modification 2>
Moreover, in the said embodiment, although the control part 30 had the timer 38 for counting time until a synchronous communication is complete | finished in a sub process, this invention is not limited to this, The control part 30 is A counter 36 may be used instead of the timer 38. FIG. 4 is a flowchart of the control unit in the synchronous communication sub-process according to the second modification of the present invention.

変形例2による同期通信のメイン処理は、図2Aに示す上記実施形態と同様とする。   The main process of synchronous communication according to the second modification is the same as that in the above embodiment shown in FIG. 2A.

図4に示すように、サブ処理が開始すると、制御部30はメイン処理において第二同期コードC2に基づいた通信方式に設定されたか否かを判断する(S”11)。   As shown in FIG. 4, when the sub process is started, the control unit 30 determines whether or not the communication method based on the second synchronization code C2 is set in the main process (S ″ 11).

ステップS”11において、第二同期コードC2に基づいた通信方式に設定されていると判断した場合、制御部30は、カウンタ36のカウントが+5であるか否かを判断する(S”12)。カウンタ36のカウントが+5であると判断した場合、カウンタ36のカウントをクリアして(S”13)、同期通信におけるサブ処理を終了する。   When determining in step S ″ 11 that the communication method based on the second synchronization code C2 is set, the control unit 30 determines whether or not the count of the counter 36 is +5 (S ″ 12). . When it is determined that the count of the counter 36 is +5, the count of the counter 36 is cleared (S ″ 13), and the sub-process in the synchronous communication is ended.

ステップS”11において、第二同期コードC2に基づいた通信方式に設定されていないと判断した場合、つまり、第一同期コードC1に基づいた通信方式に設定されていると判断した場合、制御部30は同期通信におけるサブ処理を終了する。   When it is determined in step S ″ 11 that the communication method based on the second synchronization code C2 is not set, that is, when it is determined that the communication method based on the first synchronization code C1 is set, the control unit 30 ends the sub-process in the synchronous communication.

ステップS”11において、カウンタ36のカウントが+5未満であると判断した場合、制御部30はセンサ20に対して、第一同期コードC1を送信する(S”14)。   When determining in step S ″ 11 that the count of the counter 36 is less than +5, the control unit 30 transmits the first synchronization code C1 to the sensor 20 (S ″ 14).

センサ20は、制御部30から第一同期コードC1が送信されると、センサ20が第一同期コードC1に対応したものであれば、同期可否コードBとして第一成立コードB1を制御部30へ送信する。   When the first synchronization code C1 is transmitted from the control unit 30, the sensor 20 transmits the first establishment code B1 to the control unit 30 as the synchronization availability code B if the sensor 20 corresponds to the first synchronization code C1. Send.

制御部30は、ステップS”14を行った後、センサ20から第一成立コードB1を受信したか否かを判断する(S”15)。ステップS”15において、第一成立コードB1を受信したと判断した場合、制御部30は、第一同期コードC1に基づいた通信方式に設定を変更すると同時に、カウンタ36のカウントをクリアする(S”16)。そして、同期通信におけるサブ処理を終了する。   After performing step S ″ 14, the control unit 30 determines whether or not the first establishment code B1 is received from the sensor 20 (S ″ 15). If it is determined in step S ″ 15 that the first establishment code B1 has been received, the control unit 30 changes the setting to the communication method based on the first synchronization code C1, and simultaneously clears the count of the counter 36 (S "16). Then, the sub-process in the synchronous communication is finished.

ステップS”15において、第一成立コードB1を受信したと判断しなかった場合、制御部30はカウンタ36のカウントを+1増やし(S”17)、ステップS”12へと折り返す。   If it is not determined in step S ″ 15 that the first formation code B1 has been received, the control unit 30 increases the count of the counter 36 by +1 (S ″ 17), and returns to step S ″ 12.

このように、制御部30は、第二同期コードC2との同期が成立した場合、カウンタ36のカウントが+5であると判断する、つまり第二同期コードC2との同期成立後に第一同期コードC1の送信を5回行うまで同期通信を継続することで、誤って第二同期コードC2との同期が成立してしまった場合においても、再び第一同期コードC1の送信を行うことによって第一同期コードC1との同期を成立させることができ、正しい通信方式に設定を更新することができる。   Thus, when the synchronization with the second synchronization code C2 is established, the control unit 30 determines that the count of the counter 36 is +5, that is, after the synchronization with the second synchronization code C2 is established, the first synchronization code C1. If the synchronization with the second synchronization code C2 is mistakenly established by continuing the synchronous communication until the first transmission is performed five times, the first synchronization code C1 is transmitted again to perform the first synchronization. Synchronization with the code C1 can be established, and the setting can be updated to the correct communication method.

さらに、制御部30は、カウンタ36のカウントが所定回数の5回行われると同期通信を終了することで、不要な通信による電力消費を低減することができる。   Furthermore, the control unit 30 can reduce power consumption due to unnecessary communication by terminating the synchronous communication when the counter 36 is counted five times.

また、上記変形例2においては、同期通信を終了させるカウンタ36のカウントを+5としたが、本発明はこれに限らず、用途に応じて適宜変更してもよい。   Moreover, in the said modification 2, although the count of the counter 36 which complete | finishes synchronous communication was set to +5, this invention is not restricted to this, You may change suitably according to a use.

また、上記実施形態においては、制御部30が第二同期コードC2の送信を行うS7に移行するためのカウンタ36のカウントを+3としたが、本発明はこれに限らず、用途に応じて適宜変更してもよい。   In the above embodiment, the count of the counter 36 for shifting to S7 in which the control unit 30 transmits the second synchronization code C2 is set to +3. However, the present invention is not limited to this. It may be changed.

前述した各実施の形態が備える各要素は、技術的に可能な限りにおいて組み合わせることができ、これらを組み合わせたものも本発明の特徴を含む限り本発明の範囲に包含される。   The elements included in each of the embodiments described above can be combined as much as technically possible, and combinations thereof are also included in the scope of the present invention as long as they include the features of the present invention.

1 自動水栓装置
12 吐水口
14 開閉弁
20 センサ(検知手段)
20a 新センサ
20b 旧センサ
30 制御部(制御手段)
30a 新制御部
30b 旧制御部
36 カウンタ
38 タイマ
40 電源
A 受信成功コード
B 同期可否コード
B1 第一成立コード
B2 第二成立コード
B3 第三成立コード
C 同期コード
C1 第一同期コード
C2 第二同期コード
C3 第三同期コード
DESCRIPTION OF SYMBOLS 1 Automatic faucet device 12 Water outlet 14 On-off valve 20 Sensor (detection means)
20a New sensor 20b Old sensor 30 Control unit (control means)
30a New control unit 30b Old control unit 36 Counter 38 Timer 40 Power supply A Reception success code B Synchronization enable / disable code B1 First formation code B2 Second formation code B3 Third formation code C Synchronization code C1 First synchronization code C2 Second synchronization code C3 Third synchronization code

Claims (4)

同期コードとして少なくとも第一同期コード及び第二同期コードを有する制御手段から検知手段へ前記同期コードを送信し、送信された同期コードが前記検知手段と同期可能であった場合に、前記送信された同期コードに基づいた設定を前記制御手段が行う同期通信方法であって、
前記検知手段は、
前記同期コードの受信に成功した場合に前記制御手段に向けて送信する受信成功コードと、
前記同期コードの情報に応じて前記制御手段に向けて送信する同期可否コードと、を有し、
前記制御手段は、
同期通信開始時に、前記第一同期コードを前記検知手段へ送信する第一送信工程と、
前記第一送信工程を行った後に、前記検知手段から送信された前記受信成功コードを受信する応答工程と、
前記応答工程を行った後に、前記検知手段から送信された前記同期可否コードを受信して同期を成立させるか判定する同期成立工程と、
前記同期成立工程が成立した場合に、前記第一同期コードに基づいた設定を行う第一設定工程と、
前記応答工程が成功したが、前記同期成立工程が成立しなかった場合に、前記第二同期コードを前記検知手段へ送信する第二送信工程と、
前記第二送信工程を行った後に、前記第二同期コードと同期可能であった場合に、前記第二同期コードに基づいた設定を行う第二設定工程と、
を備えた同期通信方法。
When the synchronization code is transmitted from the control means having at least the first synchronization code and the second synchronization code as the synchronization code to the detection means, and the transmitted synchronization code can be synchronized with the detection means, the transmitted A synchronous communication method in which the control means performs setting based on a synchronization code,
The detection means includes
A reception success code to be transmitted to the control means when the synchronization code is successfully received;
A synchronization propriety code to be transmitted to the control means according to the information of the synchronization code,
The control means includes
A first transmission step of transmitting the first synchronization code to the detection means at the start of synchronous communication;
A response step of receiving the reception success code transmitted from the detection means after performing the first transmission step;
A synchronization establishment step for determining whether synchronization is established by receiving the synchronization propriety code transmitted from the detection means after performing the response step;
When the synchronization establishment step is established, a first setting step for performing setting based on the first synchronization code;
A second transmission step of transmitting the second synchronization code to the detection means when the response step is successful but the synchronization establishment step is not established;
After performing the second transmission step, if it is possible to synchronize with the second synchronization code, a second setting step for performing setting based on the second synchronization code;
A synchronous communication method comprising:
前記制御手段は、前記第二送信工程を行う前に前記第一送信工程を複数回行う、
請求項1に記載の同期通信方法。
The control means performs the first transmission step a plurality of times before performing the second transmission step.
The synchronous communication method according to claim 1.
前記第二送信工程によって前記検知手段と前記制御手段との同期が成立した後に、前記制御手段は、再度前記第一送信工程を行う第三送信工程を備えた、
請求項1又は2に記載の同期通信方法。
After the synchronization between the detection unit and the control unit is established by the second transmission step, the control unit includes a third transmission step for performing the first transmission step again.
The synchronous communication method according to claim 1 or 2.
前記制御手段は、前記第三送信工程を所定期間だけ行う、
請求項3に記載の同期通信方法。
The control means performs the third transmission step for a predetermined period;
The synchronous communication method according to claim 3.
JP2015140013A 2015-07-13 2015-07-13 Synchronous communication method Active JP6512533B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015140013A JP6512533B2 (en) 2015-07-13 2015-07-13 Synchronous communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015140013A JP6512533B2 (en) 2015-07-13 2015-07-13 Synchronous communication method

Publications (2)

Publication Number Publication Date
JP2017022615A true JP2017022615A (en) 2017-01-26
JP6512533B2 JP6512533B2 (en) 2019-05-15

Family

ID=57888525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015140013A Active JP6512533B2 (en) 2015-07-13 2015-07-13 Synchronous communication method

Country Status (1)

Country Link
JP (1) JP6512533B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04129435A (en) * 1990-09-20 1992-04-30 Nec Corp Frame synchronization system
JPH07107074A (en) * 1993-09-02 1995-04-21 Sgs Thomson Microelectron Sa Correction method of message at inside of equipment
JP2001119737A (en) * 1999-10-19 2001-04-27 Toshiba Corp Private branch exchange system, and its exchange and terminal
JP2001154763A (en) * 1999-11-30 2001-06-08 Nec Shizuoka Ltd Power saving device for local area network board
JP2001515305A (en) * 1997-08-29 2001-09-18 シーメンス アクチエンゲゼルシヤフト Method and communication system for synchronizing two devices to one predetermined data transmission method
JP2002358731A (en) * 2001-05-31 2002-12-13 Toshiba Corp Data scrambling/descrambling method, device using the method and medium storing data by the method
JP2004265469A (en) * 2003-02-19 2004-09-24 Sony Corp Data recording method and device, data recording medium, data reproducing method and device, data transmitting method and device, data receiving method and device
JP2011029801A (en) * 2009-07-23 2011-02-10 Nakayo Telecommun Inc Telephone main device having two or more communication protocol versions and extension telephone

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04129435A (en) * 1990-09-20 1992-04-30 Nec Corp Frame synchronization system
JPH07107074A (en) * 1993-09-02 1995-04-21 Sgs Thomson Microelectron Sa Correction method of message at inside of equipment
JP2001515305A (en) * 1997-08-29 2001-09-18 シーメンス アクチエンゲゼルシヤフト Method and communication system for synchronizing two devices to one predetermined data transmission method
JP2001119737A (en) * 1999-10-19 2001-04-27 Toshiba Corp Private branch exchange system, and its exchange and terminal
JP2001154763A (en) * 1999-11-30 2001-06-08 Nec Shizuoka Ltd Power saving device for local area network board
JP2002358731A (en) * 2001-05-31 2002-12-13 Toshiba Corp Data scrambling/descrambling method, device using the method and medium storing data by the method
JP2004265469A (en) * 2003-02-19 2004-09-24 Sony Corp Data recording method and device, data recording medium, data reproducing method and device, data transmitting method and device, data receiving method and device
JP2011029801A (en) * 2009-07-23 2011-02-10 Nakayo Telecommun Inc Telephone main device having two or more communication protocol versions and extension telephone

Also Published As

Publication number Publication date
JP6512533B2 (en) 2019-05-15

Similar Documents

Publication Publication Date Title
US7656793B2 (en) Collision detection in a non-dominant bit radio network communication system
CN110546614B (en) Apparatus and method for transmitting events over a serial communication link with uniform delay
EP2602945A1 (en) Wireless communication system and wireless communication apparatus
WO2012114436A1 (en) Communication device and communication method
CN201976219U (en) General three-dimensional spectacles
KR20130100780A (en) Apparatus and method for providing global time information in event-controlled bus communication
KR101247234B1 (en) Stereographic glasses
CN106462533A (en) Synchronization method for multi-symbol words
JP6512533B2 (en) Synchronous communication method
US9871616B2 (en) Error detection and recovery in a DMX512 network
EP2278570B1 (en) Switch module and lighting control system comprising the switch module
FR2843846B1 (en) METHOD FOR CONTROLLING A DOMESTIC NETWORK SYSTEM
RU2018139330A (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM AND COMMUNICATION SYSTEM
KR20110128730A (en) Apparatus and method for transmitting and receiving for the body implantable medical devices
CN104735551A (en) ADVB fault tolerance receiving and processing method
JP4501695B2 (en) COMMUNICATION METHOD, RECEPTION DEVICE, TRANSMISSION DEVICE, AND COMMUNICATION SYSTEM
JP2018152643A (en) Data receiving circuit of start-stop synchronization serial data communication device
EP3542353B1 (en) Remote-control device and user device using an identification signal
TW201844056A (en) Devices and methods for prioritizing transmission of events on serial communication links
JP2010130596A (en) Real-time control network system
JP2009021687A (en) Remote control signal reception device and image display device equipped with the same
CN102739271B (en) receiver, shutter glasses and communication system
JPH11177654A (en) Data transmission reception method
JP2004116099A (en) Toilet device
JP2004257730A (en) Cordless remote controlled water heater

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180619

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190311

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190318

R150 Certificate of patent or registration of utility model

Ref document number: 6512533

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190331