JP2002333487A - Photoelectric sensor - Google Patents

Photoelectric sensor

Info

Publication number
JP2002333487A
JP2002333487A JP2001137305A JP2001137305A JP2002333487A JP 2002333487 A JP2002333487 A JP 2002333487A JP 2001137305 A JP2001137305 A JP 2001137305A JP 2001137305 A JP2001137305 A JP 2001137305A JP 2002333487 A JP2002333487 A JP 2002333487A
Authority
JP
Japan
Prior art keywords
light
light receiving
sampling
determined
signal
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
JP2001137305A
Other languages
Japanese (ja)
Inventor
Daisuke Hayakawa
代祐 早川
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 Industrial Devices SUNX Co Ltd
Original Assignee
Sunx 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 Sunx Ltd filed Critical Sunx Ltd
Priority to JP2001137305A priority Critical patent/JP2002333487A/en
Publication of JP2002333487A publication Critical patent/JP2002333487A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To make the presence of interference light judged even under a light projection period or just after the finish of light projection. SOLUTION: Sampling data from an A/D converter 7 are stored in a storage means 9 as reference data in plural sampling timings within a prescribed period including the light projection period under a detection condition of a detected object 5 in an environment not affected by the interference light in a setting operation. The sampling data from the A/D converter 7 are stored temporarily in the same sampling timings in a detection operation, the sampling data is compared with the reference data when an ON signal is output from the converter 7, detection is determined when both of them are consistent, and non- detection is judged when both of them are not consistent.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、パルス光を投光す
る投光手段と、この投光手段から投光されたパルス光を
受光して受光信号を出力する受光手段とを備え、この受
光手段からの受光信号に基づいて被検出物体の有無を判
断する光電センサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention comprises a light projecting means for projecting a pulse light, and a light receiving means for receiving the pulse light projected from the light projecting means and outputting a light receiving signal. The present invention relates to a photoelectric sensor that determines the presence or absence of an object to be detected based on a light receiving signal from a means.

【0002】[0002]

【発明が解決しようとする課題】この種の光電センサ
は、投光手段が投光した光を受光信号が受光することに
より被検出物体の有無を判断していることから、受光信
号に干渉光(ノイズ光)が入光する環境では、被検出物
体を検出していない状態であっても、受光手段から干渉
光の入光に応じた受光信号が出力されてしまうので、被
検出物体をあたかも検出している状態となり、被検出物
体を正しく検出することができない。
In this type of photoelectric sensor, the presence or absence of an object to be detected is determined by receiving the light emitted from the light emitting means by a light receiving signal. In an environment where (noise light) enters, even if the object to be detected is not detected, a light receiving signal is output from the light receiving means in accordance with the input of the interference light. It is in the detection state, and the detected object cannot be correctly detected.

【0003】そこで、特公昭62−7733号公報のも
のでは、投光直前のタイミングで受光レベルを検出し、
受光レベルに基づいて入光状態か否かを判断している。
このとき、入光状態であると判断したときは、干渉光が
入光していると判断して投光タイミングをずらすことに
より干渉防止を図るようにしている。
[0003] In Japanese Patent Publication No. 62-7733, the light receiving level is detected at a timing immediately before light emission.
It is determined based on the light receiving level whether or not the light is on.
At this time, when it is determined that the light is in the incident state, it is determined that the interference light is incident and the light emission timing is shifted to prevent the interference.

【0004】しかしながら、この特公昭62−7733
号公報のものは、投光直前のタイミングでのみ干渉光の
判断を行う構成であるので、投光直後に入光する干渉光
を検出することはできない。この場合、投光直後におい
ては通常の受光信号が生じているので、投光直後の受光
レベルに基づいて干渉光の有無を判断することはできな
いのが実情である。また、投光中においては通常の受光
信号が生じているので、受光信号の信号レベルに基づい
て干渉光の有無を判断することができないのは勿論であ
る。
However, this Japanese Patent Publication No. 62-7733.
In the device disclosed in Japanese Patent Application Laid-Open No. H11-157, the interference light is determined only at the timing immediately before the light is projected, so that the interference light that enters immediately after the light cannot be detected. In this case, since a normal light receiving signal is generated immediately after the light is projected, it is actually impossible to determine the presence or absence of the interference light based on the light receiving level immediately after the light is projected. In addition, since a normal light receiving signal is generated during light projection, it is needless to say that the presence or absence of interference light cannot be determined based on the signal level of the light receiving signal.

【0005】本発明は上記事情に鑑みてなされたもの
で、その目的は、投光期間中或いは投光終了直後であっ
ても干渉光の有無を判断することができる光電センサを
提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a photoelectric sensor capable of determining the presence or absence of interference light even during a light projection period or immediately after the light emission ends. is there.

【0006】[0006]

【課題を解決するための手段】本発明は、パルス光を投
光する投光手段と、この投光手段から投光されたパルス
光を受光して受光信号を出力する受光手段とを備え、こ
の受光手段からの受光信号に基づいて被検出物体の有無
を判断する光電センサにおいて、前記投光手段の投光期
間を含む所定期間における複数のサンプリングタイミン
グで前記受光手段から出力される受光信号の信号レベル
をサンプリングするサンプリング手段を設け、干渉光が
存在しない環境における被検出物体の検出状態で前記サ
ンプリング手段によるサンプリングデータを基準データ
として記憶する記憶手段を設け、所定の判定タイミング
で前記受光手段からの受光信号の信号レベルと所定の基
準レベルとを比較する比較手段を設け、この比較手段が
前記受光手段からの受光信号の信号レベルは所定の基準
レベルを上回ったと判定した場合は、前記サンプリング
手段によるサンプリングデータと当該サンプリングデー
タのサンプリングタイミングに対応して前記記憶手段に
記憶されている基準データとを比較し、両者の比較差の
うち少なくとも1つが設定値を上回ったときは干渉光を
受光したと判断する判断手段を設けたものである(請求
項1)。
SUMMARY OF THE INVENTION The present invention comprises a light projecting means for projecting pulse light, and a light receiving means for receiving the pulse light projected from the light projecting means and outputting a light receiving signal. In a photoelectric sensor that determines the presence or absence of an object to be detected based on a light receiving signal from the light receiving unit, the photoelectric sensor outputs the light receiving signal output from the light receiving unit at a plurality of sampling timings in a predetermined period including a light emitting period of the light emitting unit. Sampling means for sampling a signal level is provided, and storage means for storing sampling data by the sampling means as reference data in a detection state of an object to be detected in an environment in which no interference light exists, and from the light receiving means at a predetermined determination timing. Comparing means for comparing the signal level of the received light signal with a predetermined reference level. When it is determined that the signal level of the light receiving signal exceeds a predetermined reference level, the sampling data by the sampling unit is compared with the reference data stored in the storage unit corresponding to the sampling timing of the sampling data, When at least one of the comparison differences between the two exceeds a set value, a determination means for determining that interference light has been received is provided.

【0007】このような構成によれば、サンプリング手
段は、干渉光が存在しない環境における被検出物体の検
出状態で投光手段の投光期間を含む所定期間における複
数のサンプリングタイミングで受光手段から出力される
受光信号の信号レベルをサンプリングする。そして、記
憶手段は、サンプリング手段がサンプリングしたサンプ
リングデータを基準データとして記憶手段に記憶する。
これにより、記憶手段には、サンプリングタイミングに
対応して基準データが順に記憶されるようになる。
According to such a configuration, the sampling means outputs the signal from the light receiving means at a plurality of sampling timings in a predetermined period including the light emitting period of the light emitting means in a detection state of the detected object in the environment where no interference light exists. The signal level of the received light signal is sampled. Then, the storage means stores the sampling data sampled by the sampling means in the storage means as reference data.
Thus, the storage unit sequentially stores the reference data corresponding to the sampling timing.

【0008】さて、比較手段は、所定の判定タイミング
で受光手段からの受光信号の信号レベルが所定の基準レ
ベルを上回ったかを比較する。このとき、比較手段が受
光手段からの受光信号の信号レベルは所定の基準レベル
を上回ったと判定した場合は、被検出物体を正しく検出
している場合と、干渉光を受光している場合とがあるこ
とから、判断手段は、サンプリング手段によるサンプリ
ングデータが当該サンプリングデータのサンプリングタ
イミングに対応して記憶手段に記憶されている基準デー
タとを比較する。このとき、サンプリングデータと基準
データとの比較差のうち少なくとも1つが設定値を上回
ったときは干渉光を受光したと判断する。これにより、
投光期間中或いは投光終了直後であっても干渉光の有無
を判断することができる。
[0008] The comparing means compares at a predetermined judgment timing whether the signal level of the light receiving signal from the light receiving means exceeds a predetermined reference level. At this time, when the comparing means determines that the signal level of the light receiving signal from the light receiving means has exceeded a predetermined reference level, the case where the object to be detected is correctly detected and the case where the interference light is received are determined. Therefore, the judging unit compares the sampling data from the sampling unit with the reference data stored in the storage unit corresponding to the sampling timing of the sampling data. At this time, when at least one of the comparison differences between the sampling data and the reference data exceeds a set value, it is determined that the interference light has been received. This allows
It is possible to determine the presence or absence of interference light even during the light emitting period or immediately after the light emitting end.

【0009】上記構成において、前記判断手段は、前記
比較手段が前記受光手段からの受光信号の信号レベルは
所定の基準レベルを上回らなかったと判定した場合及び
上回ったと判定した場合において干渉光を受光したと判
断したときは非検出であると判断し、上回ったと判断し
た場合において干渉光を受光していないと判断したとき
は検出であると判断するのが望ましい(請求項2)。
In the above arrangement, the judging means receives the interference light when the comparing means judges that the signal level of the light receiving signal from the light receiving means has not exceeded a predetermined reference level and when it has judged that the signal level has exceeded the predetermined reference level. When it is determined that the interference light is not detected, when it is determined that the interference light is exceeded, when it is determined that the interference light is not received, it is preferable that the detection is determined (claim 2).

【0010】このような構成によれば、所定の判定タイ
ミングにおいて受光手段が受光していない場合は、非検
出状態であることから、判断手段は、比較手段が受光手
段からの受光信号の信号レベルは所定の基準レベルを上
回らなかったと判定した場合は非検出と判断することが
できる。また、比較手段が受光手段からの受光信号の信
号レベルは所定の基準レベルを上回ったと判定した場合
は、被検出物体を正しく検出している場合と、干渉光を
受光している場合とがあることから、判断手段は、上述
したように干渉光を受光したと判断したときは非検出で
あると判断し、干渉光を受光していないと判断したとき
は検出であると判断することができる。これにより、干
渉光の影響を受けることなく被検出物体を正しく検出す
ることができる。
According to such a configuration, when the light receiving means does not receive light at the predetermined determination timing, it is in a non-detection state. Therefore, the determining means determines that the comparing means has a signal level of a light receiving signal from the light receiving means. If it is determined that the value does not exceed the predetermined reference level, it can be determined that no detection has occurred. Further, when the comparing means determines that the signal level of the light receiving signal from the light receiving means has exceeded a predetermined reference level, there are a case where the detected object is correctly detected and a case where the interference light is received. From the above, the determination means can determine that detection has not been performed when determining that interference light has been received as described above, and can determine that detection has been performed when determining that interference light has not been received as described above. . As a result, the detected object can be correctly detected without being affected by the interference light.

【0011】[0011]

【発明の実施の形態】以下、本発明を反射型の光電セン
サに適用した一実施の形態を図面を参照して説明する。
図1は光電センサの構成を概略的に示すブロック図であ
る。この図1において、光電センサ1は、CPU(サン
プリング手段、判断手段に相当)2を主体としてなる。
CPU2は、投光手段3に対して所定周期で駆動指令を
与える。この投光手段3は、図示しないLEDと駆動回
路とからなり、駆動回路がCPU2からの駆動指令を受
けてLEDに通電することによりLEDから例えば赤外
線のパルス光を投光するようになっている。受光手段4
は、投光手段3から投光されて被検出物体5で反射した
パルス光を受光し受光信号として出力するように設けら
れている。この受光手段4は、図示しないフォトトラン
ジスタと受光回路とからなり、受光回路がフォトトラン
ジスタからの受光信号から交流成分を弁別して増幅する
ことにより受光信号を出力するようになっている。この
受光手段4にはA/Dコンバータ6が接続されており、
受光手段4から出力される受光信号の信号レベルをデジ
タルデータに変換してCPU2に出力する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to a reflection type photoelectric sensor will be described below with reference to the drawings.
FIG. 1 is a block diagram schematically showing a configuration of the photoelectric sensor. In FIG. 1, a photoelectric sensor 1 mainly includes a CPU (corresponding to a sampling unit and a judgment unit) 2.
The CPU 2 gives a drive command to the light projecting means 3 at a predetermined cycle. The light projecting means 3 includes an LED (not shown) and a drive circuit, and the drive circuit receives a drive command from the CPU 2 and energizes the LED to emit, for example, infrared pulse light from the LED. . Light receiving means 4
Is provided so as to receive the pulse light projected from the light projecting means 3 and reflected by the detected object 5, and to output the received pulse light as a light receiving signal. The light receiving means 4 includes a phototransistor and a light receiving circuit (not shown). The light receiving circuit outputs a light receiving signal by discriminating and amplifying an AC component from a light receiving signal from the phototransistor. An A / D converter 6 is connected to the light receiving means 4.
The signal level of the light receiving signal output from the light receiving means 4 is converted into digital data and output to the CPU 2.

【0012】一方、受光手段4にはコンパレータ(比較
手段に相当)7が接続されている。このコンパレータ7
は、受光手段4からの受光信号レベルと所定の基準レベ
ルとを比較し、受光信号レベルが基準レベルを上回った
ときにCPU2にオン信号を出力する。この場合、基準
レベルとしては、被検出物体5が所定の検出位置に存在
している状態で受光信号レベルが十分に上回るレベルに
設定されている。
On the other hand, the light receiving means 4 is connected to a comparator (corresponding to a comparing means) 7. This comparator 7
Compares the light receiving signal level from the light receiving means 4 with a predetermined reference level, and outputs an ON signal to the CPU 2 when the light receiving signal level exceeds the reference level. In this case, the reference level is set to a level sufficiently higher than the light receiving signal level when the detected object 5 is at the predetermined detection position.

【0013】設定スイッチ8はスライドスイッチであ
り、RUN(検出状態)とSET(設定状態)の切換え
のために設けられている。この設定スイッチ8の切換位
置(RUN/SET)により、CPU2に対して初期設
定を行う設定状態と通常の検出動作を行う検出状態の切
換えが行われる。
The setting switch 8 is a slide switch, and is provided for switching between RUN (detection state) and SET (setting state). The switching position (RUN / SET) of the setting switch 8 switches between a setting state in which the CPU 2 is initialized and a detection state in which a normal detection operation is performed.

【0014】CPU2は、設定スイッチ8がSET位置
に切換えられた状態では、設定動作であると判断し、投
光手段3から所定周期でパルス光を投光すると共に、投
光期間を含む所定期間においてA/Dコンバータ6から
のデジタルデータを所定のサンプリングタイミングで基
準データとして記憶手段9に順に記憶するようになって
いる。
When the setting switch 8 is switched to the SET position, the CPU 2 determines that the operation is the setting operation, emits pulse light from the light projecting means 3 at a predetermined cycle, and sets a predetermined period including the light projecting period. , The digital data from the A / D converter 6 is sequentially stored in the storage means 9 as reference data at a predetermined sampling timing.

【0015】また、CPU2は、設定スイッチ8がRU
N位置に切換えられた状態では、検出動作であると判断
し、投光手段3から所定周期でパルス光を投光すると共
に、後述するように所定のサンプリングタイムでA/D
コンバータ6から入力したデジタルデータと記憶手段9
に記憶されている基準データとの比較結果に基づいて干
渉光の存在を判断するようになっており、このような判
断動作による被検出物体5の有無を最終的に判断するこ
とが本発明の特徴となっている。
The CPU 2 sets the setting switch 8 to RU.
In the state where the position has been switched to the N position, it is determined that the detection operation is being performed, and pulse light is emitted from the light projecting means 3 at a predetermined cycle, and A / D is performed at a predetermined sampling time as described later.
Digital data input from converter 6 and storage means 9
The presence of the interference light is determined based on the result of comparison with the reference data stored in the storage device. It is a feature.

【0016】次に上記構成の作用について説明する。図
2は各信号を示すタイミングチャートである。この図2
において、CPU2は、クロックを基準にして投光手段
3に対して投光指令を与える。これにより、同図に示す
ように投光手段3からは所定周期のパルス光が投光され
る。
Next, the operation of the above configuration will be described. FIG. 2 is a timing chart showing each signal. This figure 2
, The CPU 2 gives a light emitting command to the light emitting means 3 based on the clock. As a result, as shown in the figure, the light projecting means 3 emits pulse light of a predetermined period.

【0017】また、受光手段4は、投光手段3から投光
されて被検出物体5で反射したパルス光を受光し、その
受光レベルに応じた受光信号を出力する。この場合、受
光手段4は受光信号のうちから交流成分のみを弁別して
増幅するように構成されているので、受光手段4から出
力される受光信号は投光信号を微分した波形となると共
に、投光終了時は零レベルよりもアンダーシュートす
る。このような光電センサ1の動作に基づいて初期設定
動作と通常の検出動作とが行われることになる。
The light receiving means 4 receives the pulse light emitted from the light emitting means 3 and reflected by the detected object 5, and outputs a light receiving signal corresponding to the light receiving level. In this case, since the light receiving means 4 is configured to discriminate and amplify only the AC component of the light receiving signal, the light receiving signal output from the light receiving means 4 has a waveform obtained by differentiating the light emitting signal and the light emitting signal. At the end of light, it undershoots below zero level. The initial setting operation and the normal detection operation are performed based on the operation of the photoelectric sensor 1 as described above.

【0018】さて、被検出物体5の通常の検出動作を行
うには、それに先立って、まず、初期設定を行う必要が
ある。この初期設定とは干渉光の存在を判断するために
必要となるもので、干渉光の影響を全く受けない環境に
おいて所定の検出位置に被検出物体5を位置させ、設定
スイッチ8をSET位置に切換えた状態で光電センサ1
を動作させる。このような環境条件においては、受光手
段4が受光する光は、投光手段3から投光されてから被
検出物体5で反射した光のみであり、受光手段4が干渉
光を受光することはない。
In order to perform a normal detection operation of the detected object 5, it is necessary to first perform an initial setting before the operation. This initial setting is necessary for judging the presence of the interference light. In the environment not affected by the interference light, the detected object 5 is located at a predetermined detection position, and the setting switch 8 is set to the SET position. Photoelectric sensor 1 in the switched state
To work. Under such environmental conditions, the light received by the light receiving means 4 is only light reflected from the detected object 5 after being emitted from the light emitting means 3, and the light receiving means 4 may not receive the interference light. Absent.

【0019】図3はCPU2の初期設定動作を示すフロ
ーチャートである。この図3において、CPU2は、タ
イミングT1〜T5の何れかのタイミングとなったかを
判断しており(S101)、タイミングT1となったと
きは(S101:YES)、A/Dコンバータ6からの
入力データをサンプリングして基準データM1として記
憶手段9に記憶する(S102)。このタイミングT1
は、図2に示すように投光タイミングよりも1クロック
分だけ進んだタイミングに設定されている。この場合、
タイミングT1においては受光手段4には投光手段3か
らのパルス光及び干渉光の何れも入光することはないの
で、基準データM1は零レベルとなる。また、CPU2
は、タイミングT2となったときは(S103:YE
S)、投光パルスの送信を開始すると共に(S10
4)、A/Dコンバータ6からの入力データをサンプリ
ングして基準データM2として記憶手段9に記憶する
(S105)。つまり、タイミングT2は、図2に示す
ように投光開始タイミングに設定されているのである。
この場合、タイミングT2においては受光手段4には投
光手段3からのパルス光及び干渉光の何れも入光しない
のが一般的であるので、基準データM2は零レベルとな
っている。
FIG. 3 is a flowchart showing the initial setting operation of the CPU 2. In FIG. 3, the CPU 2 determines whether any of the timings T1 to T5 has come (S101), and when it comes to the timing T1 (S101: YES), the input from the A / D converter 6 is received. The data is sampled and stored in the storage means 9 as the reference data M1 (S102). This timing T1
Is set to a timing advanced by one clock from the light projection timing as shown in FIG. in this case,
At timing T1, neither the pulse light nor the interference light from the light projecting means 3 enters the light receiving means 4, so that the reference data M1 is at the zero level. Also, CPU2
Is the timing T2 (S103: YE
S), the transmission of the light emission pulse is started (S10).
4) The input data from the A / D converter 6 is sampled and stored in the storage means 9 as the reference data M2 (S105). That is, the timing T2 is set to the light emission start timing as shown in FIG.
In this case, at timing T2, it is general that neither the pulse light nor the interference light from the light projecting means 3 enters the light receiving means 4, so that the reference data M2 is at the zero level.

【0020】また、CPU2は、タイミングT3となっ
たときは(S106:YES)、投光パルスの送信を終
了すると共に(S107)、A/Dコンバータ6からの
入力データをサンプリングして基準データM3として記
憶手段9に記憶する(S108)。つまり、タイミング
T3は、図2に示すように投光終了タイミングに設定さ
れているのである。この場合、タイミングT3において
は投光手段3からの投光が終了するタイミングであるも
のの、受光手段4の電気的構成、特に微分回路の動作に
より受光信号の略ピークレベルとなっているので、基準
データM3は受光信号の信号レベルの略最大値となって
いる。
When the timing T3 has come (S106: YES), the CPU 2 terminates the transmission of the light projection pulse (S107), samples the input data from the A / D converter 6, and outputs the reference data M3. Is stored in the storage means 9 (S108). That is, the timing T3 is set to the light emission end timing as shown in FIG. In this case, although the timing at which the light emission from the light emitting means 3 ends at the timing T3, since the electrical configuration of the light receiving means 4, especially the operation of the differentiating circuit, has substantially reached the peak level of the light receiving signal, Data M3 is substantially the maximum signal level of the light receiving signal.

【0021】また、CPU2は、タイミングT4となっ
たときは(S109:YES)、A/Dコンバータ6か
らの入力データをサンプリングして基準データM4とし
て記憶手段9に記憶する(S110)。このタイミング
T4は、図2に示すように投光終了タイミングよりも1
クロック分だけ遅れたタイミングとなるように設定され
ている。この場合、タイミングT4においては投光手段
3からの投光が終了しているタイミングであるものの、
受光手段4の電気的構成、特に微分回路の動作のために
受光信号は零レベルをアンダーシュートしており、基準
データM4は負レベルのデータとなっている。
When the timing T4 has come (S109: YES), the CPU 2 samples the input data from the A / D converter 6 and stores it in the storage means 9 as reference data M4 (S110). This timing T4 is one time later than the light emission end timing as shown in FIG.
The timing is set to be delayed by the clock. In this case, the timing T4 is a timing when the light emission from the light emitting means 3 is finished,
The light receiving signal undershoots the zero level due to the electrical configuration of the light receiving means 4, particularly the operation of the differentiating circuit, and the reference data M4 is negative level data.

【0022】そして、CPU2は、タイミングT5とな
ったときは(S111:YES)、A/Dコンバータ6
からの入力データをサンプリングして基準データM5と
して記憶手段9に記憶する。このタイミングT5は、図
2に示すように投光終了タイミングよりも2クロック分
だけ遅れたタイミングとなるように設定されている。こ
の場合、タイミングT5においては受光手段4の電気的
特性の影響は解消されているので、基準データM5は零
レベルとなっている。以上のようにして、初期設定を行
うことにより、タイミングT1〜T5における基準デー
タM1〜M5を記憶手段9に順に記憶することができ
る。
Then, when it is time T5 (S111: YES), the CPU 2 turns on the A / D converter 6.
Is sampled and stored in the storage means 9 as reference data M5. The timing T5 is set so as to be two clocks later than the light emission end timing as shown in FIG. In this case, at timing T5, the influence of the electrical characteristics of the light receiving means 4 has been eliminated, so that the reference data M5 is at the zero level. By performing the initial setting as described above, the reference data M1 to M5 at the timings T1 to T5 can be sequentially stored in the storage unit 9.

【0023】さて、被検出物体5が所定の検出位置に存
在したことを検出するには、設定スイッチ8をRUN位
置に切換えた状態で光電センサ1を動作させる。図4は
CPU2の検出動作を示している。この図4において、
光電センサ1は、タイミングT1〜T5の何れかのタイ
ミングとなったかを判断しており、タイミングT1とな
ったときは(S201:YES)、A/Dコンバータ6
からの入力データをサンプリングすることによりサンプ
リングデータD1として記憶手段9に一時記憶する(S
202)。
Now, in order to detect that the detected object 5 is at a predetermined detection position, the photoelectric sensor 1 is operated with the setting switch 8 switched to the RUN position. FIG. 4 shows a detection operation of the CPU 2. In FIG.
The photoelectric sensor 1 determines whether any of the timings T1 to T5 has been reached, and when the timing T1 has been reached (S201: YES), the A / D converter 6
, And temporarily stores the data as sampling data D1 in the storage unit 9 (S
202).

【0024】同様にして、タイミングT2〜T5となる
毎に(S203:YES、S206:YES、S20
9:YES、S211:YES)、A/Dコンバータ6
からの入力データをサンプリングすることによりサンプ
リングデータD2〜D5として記憶手段9に一時記憶す
る(S205、S208、S210、S212)。この
場合、タイミングT2では投光パルスの送信を開始し
(S204)、タイミングT3では投光パルスの送信を
終了する(S207)。
Similarly, every time the timing T2 to T5 is reached (S203: YES, S206: YES, S20
9: YES, S211: YES), A / D converter 6
Is sampled and temporarily stored in the storage means 9 as sampling data D2 to D5 (S205, S208, S210, S212). In this case, transmission of the light emission pulse is started at timing T2 (S204), and transmission of the light emission pulse is ended at timing T3 (S207).

【0025】一方、CPU2は、コンパレータ7からの
出力状態を検出して一時記憶するようになっている(S
213)。この場合、被検出物体5が所定の検出位置に
存在しているときは、コンパレータ7からの出力はオン
状態となっている。また、被検出物体5が存在しない場
合であっても、タイミングT3で干渉光が入光するよう
なときはコンパレータ7からの出力はオン状態となって
いる。
On the other hand, the CPU 2 detects the state of the output from the comparator 7 and temporarily stores the state (S
213). In this case, when the detected object 5 is at the predetermined detection position, the output from the comparator 7 is in the ON state. Even when the detected object 5 does not exist, the output from the comparator 7 is in the ON state when the interference light enters at the timing T3.

【0026】以上のようにして、CPU2は、検出動作
時においては所定のタイミングT1〜T5において受光
信号をサンプリングしてサンプリングデータD1〜D5
として記憶手段9に一時記憶すると共に、コンパレータ
7からの出力状態を一時記憶している。
As described above, during the detection operation, the CPU 2 samples the light receiving signal at the predetermined timings T1 to T5 to sample data D1 to D5.
And the output state from the comparator 7 is temporarily stored.

【0027】そして、CPU2は、タイミングT5にお
いてコンパレータ7からの出力がオン状態となったかを
判断し(S214)、オフ状態であったときは(S21
4:NO)、被検出物体5は存在しない非検出であると
判断する(S220)。一方、コンパレータ7からの出
力状態がオン状態であったときは(S214:YE
S)、被検出物体5が存在するか、若しくは被検出物体
5が存在せず干渉光が入光しているかの何れかであると
判断し、比較処理を実行する(S215)。
At timing T5, the CPU 2 determines whether the output from the comparator 7 has been turned on (S214), and if it is off (S21).
4: NO), it is determined that the detected object 5 does not exist and is not detected (S220). On the other hand, when the output state from the comparator 7 is the ON state (S214: YE
S), it is determined that either the detected object 5 exists or the detected object 5 does not exist and the interference light is incident, and a comparison process is performed (S215).

【0028】図5はCPU2の比較処理を示すフローチ
ャートである。この図5において、CPU2は、まず、
サンプリングデータD1が基準データM1と一致してい
るかを判断する。つまり、記憶手段9からサンプリング
データD1と基準データM1とを呼出し、D1−M1を
実行することにより差分データS1を演算してから(S
301)、その差分データS1の絶対値と所定の誤差範
囲SMとを比較する(S302)。このとき、差分デー
タS1の絶対値が所定の誤差範囲SMよりも小さい場合
は、サンプリングデータD1は基準データM1に一致し
ていると判断する。
FIG. 5 is a flowchart showing the comparison processing of the CPU 2. In FIG. 5, the CPU 2 first
It is determined whether the sampling data D1 matches the reference data M1. That is, the sampling data D1 and the reference data M1 are called out from the storage means 9 and the difference data S1 is calculated by executing D1-M1 (S1).
301), the absolute value of the difference data S1 is compared with a predetermined error range SM (S302). At this time, if the absolute value of the difference data S1 is smaller than the predetermined error range SM, it is determined that the sampling data D1 matches the reference data M1.

【0029】このようにしてサンプリングデータD1は
基準データM1に一致していると判断したときは、同様
にして、サンプリングデータD2〜D5が基準データM
2〜M5とそれぞれ一致しているかを判定し(S304
〜S315)、全て一致していると判断したときは比較
結果をOKとし(S316)、1つでも一致していない
と判断したときは比較結果をNGとする(S317)。
When it is determined that the sampling data D1 matches the reference data M1, the sampling data D2 to D5 are similarly converted to the reference data M1.
It is determined whether or not each of them matches with M2 to M5 (S304).
To S315), when it is determined that they all match, the comparison result is OK (S316), and when it is determined that at least one does not match, the comparison result is NG (S317).

【0030】そして、CPU2は、以上のような比較処
理の実行の結果、比較結果がOKと判断したときは(図
4のS216:YES)、最終的に検出であると判断す
る(S219)。これに対して、比較結果がNGである
と判断したときは(S216:NO)、干渉光を検出し
ていると判断し(S217)、最終的に非検出であると
判断する(S218)。
Then, when the CPU 2 determines that the comparison result is OK as a result of the execution of the above-described comparison processing (S216: YES in FIG. 4), the CPU 2 finally determines that the detection has been made (S219). On the other hand, when it is determined that the comparison result is NG (S216: NO), it is determined that the interference light is detected (S217), and it is finally determined that the interference light is not detected (S218).

【0031】以上のようにして投光タイミングで干渉光
を受光していると判断したときは、投光パルスの周期を
変更したり、投光タイミングをずらしたりすることによ
り干渉光の影響を回避することができる。また、干渉光
を検出したことを外部出力することにより、干渉光を受
光していることを報知することができる。
As described above, when it is determined that the interference light is received at the light emission timing, the influence of the interference light is avoided by changing the period of the light emission pulse or shifting the light emission timing. can do. Further, by outputting the detection of the interference light to the outside, it can be notified that the interference light is received.

【0032】このような実施の形態によれば、CPU2
は、投光期間を含む所定期間におけるサンプリングデー
タを基準データとして記憶手段9に記憶しておき、検出
動作時において受光信号の信号レベルが所定の基準レベ
ルを上回っていると判断した場合は、サンプリングデー
タと基準データとを比較することにより干渉光による影
響を判断し、干渉光の影響を受けていると判断したとき
は最終的に非検出であると判断するようにしたので、投
光直前のみに干渉光の判断を行う従来構成のものと違っ
て、投光期間中或いは投光終了直後であっても干渉光の
存在を判断でき、干渉光による影響を回避することが可
能となる。
According to such an embodiment, the CPU 2
Means that the sampling data in a predetermined period including the light emitting period is stored in the storage means 9 as reference data, and if it is determined that the signal level of the received light signal exceeds the predetermined reference level during the detection operation, the sampling is performed. By comparing the data with the reference data, the influence of the interference light is determined, and when it is determined that the interference light is affected, it is finally determined that the light is not detected. Unlike the conventional configuration in which the interference light is determined, the presence of the interference light can be determined even during the light projection period or immediately after the light emission ends, and the influence of the interference light can be avoided.

【0033】本発明は、上記実施の形態に限定されるも
のではなく、次のように変形または拡張できる。サンプ
リングデータと基準データとの比較処理の結果、最終的
に検出であると判定したときは、そのときのサンプリン
グデータを基準データとして更新記憶するようにしても
よい。設定動作及び検出動作の切換えを外部からの指令
に応じて自動的に実行するようにしてもよい。本発明を
透過型センサに適用するようにしてもよい。
The present invention is not limited to the above embodiment, but can be modified or expanded as follows. As a result of the comparison processing between the sampling data and the reference data, when it is finally determined that the detection is performed, the sampling data at that time may be updated and stored as the reference data. Switching between the setting operation and the detection operation may be automatically executed in response to an external command. The present invention may be applied to a transmission sensor.

【0034】[0034]

【発明の効果】以上の説明から明らかなように、本発明
の光電センサによれば、干渉光が存在しない環境におけ
る被検出物体の検出状態で投光手段の投光期間を含む所
定期間における複数のサンプリングタイミングで受光手
段からの受光信号の信号レベルをサンプリングして基準
データとして記憶すると共に、所定の判定タイミングで
受光手段からの受光信号の信号レベルと所定の基準レベ
ルとを比較し、受光信号の信号レベルが所定の基準レベ
ルを上回った場合は、サンプリングデータと当該サンプ
リングデータのサンプリングタイミングに対応して記憶
されている基準データとを比較し、両者の比較差のうち
少なくとも1つが設定値を上回ったときは干渉光を受光
したと判断するようにしたので、投光期間中或いは投光
終了直後であっても干渉光の有無を判断することがで
き、干渉光の影響に確実に対応することが可能となると
いう優れた効果を奏する。
As is apparent from the above description, according to the photoelectric sensor of the present invention, in the state where the object to be detected is detected in the environment where no interference light exists, a plurality of light beams in a predetermined period including the light emitting period of the light emitting means are detected. At the sampling timing, the signal level of the light receiving signal from the light receiving means is sampled and stored as reference data. At a predetermined judgment timing, the signal level of the light receiving signal from the light receiving means is compared with a predetermined reference level. If the signal level exceeds a predetermined reference level, the sampling data is compared with reference data stored corresponding to the sampling timing of the sampling data, and at least one of the comparison differences between the two sets the set value. When it exceeds the threshold, it is determined that the interference light has been received. It can determine the presence or absence of the interference light, an excellent effect that reliably and it is possible to correspond to the influence of the interference light.

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

【図1】本発明の一実施の形態における全体構成を概略
的な示すブロック図
FIG. 1 is a block diagram schematically showing an entire configuration according to an embodiment of the present invention.

【図2】各信号の出力タイミングを示すタイミングチャ
ート
FIG. 2 is a timing chart showing output timing of each signal.

【図3】CPUの設定動作を示すフローチャートFIG. 3 is a flowchart showing a setting operation of a CPU.

【図4】CPUの検出動作を示すフローチャートFIG. 4 is a flowchart showing a detection operation of the CPU.

【図5】CPUの比較処理動作を示すフローチャートFIG. 5 is a flowchart showing a comparison processing operation of the CPU;

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

1は光電センサ、2はCPU(サンプリング手段、判断
手段)、3は投光手段、4は受光手段、7はコンパレー
タ(比較手段)、9は記憶手段である。
1 is a photoelectric sensor, 2 is a CPU (sampling means, judgment means), 3 is a light emitting means, 4 is a light receiving means, 7 is a comparator (comparing means), and 9 is a storage means.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 パルス光を投光する投光手段と、この投
光手段から投光されたパルス光を受光して受光信号を出
力する受光手段とを備え、この受光手段からの受光信号
に基づいて被検出物体の有無を判断する光電センサにお
いて、 前記投光手段の投光期間を含む所定期間における複数の
サンプリングタイミングで前記受光手段から出力される
受光信号の信号レベルをサンプリングするサンプリング
手段と、 干渉光が存在しない環境における被検出物体の検出状態
で前記サンプリング手段によるサンプリングデータを基
準データとして記憶する記憶手段と、 所定の判定タイミングで前記受光手段からの受光信号の
信号レベルと所定の基準レベルとを比較する比較手段
と、 この比較手段が前記受光手段からの受光信号の信号レベ
ルは所定の基準レベルを上回ったと判定した場合は、前
記サンプリング手段によるサンプリングデータと当該サ
ンプリングデータのサンプリングタイミングに対応して
前記記憶手段に記憶されている基準データとを比較し、
両者の比較差のうち少なくとも1つが設定値を上回った
ときは干渉光を受光したと判断する判断手段とを備えた
ことを特徴とする光電センサ。
A light projecting means for projecting pulse light; and a light receiving means for receiving the pulse light projected from the light projecting means and outputting a light receiving signal. A photoelectric sensor that determines the presence or absence of an object to be detected based on a sampling unit that samples a signal level of a light receiving signal output from the light receiving unit at a plurality of sampling timings in a predetermined period including a light emitting period of the light emitting unit; A storage means for storing sampling data by the sampling means as reference data in a detection state of an object to be detected in an environment where no interference light exists; a signal level of a light reception signal from the light receiving means at a predetermined determination timing and a predetermined reference Comparing means for comparing the signal level of the light receiving signal from the light receiving means with a predetermined reference If it is determined that exceeds the level is compared with the reference data corresponding to the sampling timing of the sampling data and the sampling data stored in the storage means according to said sampling means,
A photoelectric conversion device comprising: a determination unit configured to determine that interference light has been received when at least one of the comparison differences between the two exceeds a set value.
【請求項2】 前記判断手段は、前記比較手段が前記受
光手段からの受光信号の信号レベルは所定の基準レベル
を上回らなかったと判定した場合及び上回ったと判定し
た場合において干渉光を受光したと判断したときは非検
出であると判断し、上回ったと判断した場合において干
渉光を受光していないと判断したときは検出であると判
断することを特徴とする請求項1記載の光電センサ。
2. The method according to claim 1, wherein the comparing unit determines that the interference light is received when the comparing unit determines that the signal level of the light receiving signal from the light receiving unit does not exceed a predetermined reference level and when it determines that the signal level exceeds the predetermined reference level. 2. The photoelectric sensor according to claim 1, wherein it is determined that the detection is not detected when the detection is performed, and when it is determined that the interference light is not received when it is determined that the interference is exceeded, the detection is determined that the detection is performed.
JP2001137305A 2001-05-08 2001-05-08 Photoelectric sensor Pending JP2002333487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001137305A JP2002333487A (en) 2001-05-08 2001-05-08 Photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001137305A JP2002333487A (en) 2001-05-08 2001-05-08 Photoelectric sensor

Publications (1)

Publication Number Publication Date
JP2002333487A true JP2002333487A (en) 2002-11-22

Family

ID=18984427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001137305A Pending JP2002333487A (en) 2001-05-08 2001-05-08 Photoelectric sensor

Country Status (1)

Country Link
JP (1) JP2002333487A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011007805A (en) * 2010-08-23 2011-01-13 Panasonic Electric Works Co Ltd Space information detector
JP2015227781A (en) * 2014-05-30 2015-12-17 株式会社デンソー Light-of-flight ranging device
JP2017062169A (en) * 2015-09-25 2017-03-30 株式会社リコー Circuit device, light detection device, object detection device, sensing device, moving body device, light detection method and object detection method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011007805A (en) * 2010-08-23 2011-01-13 Panasonic Electric Works Co Ltd Space information detector
JP2015227781A (en) * 2014-05-30 2015-12-17 株式会社デンソー Light-of-flight ranging device
JP2017062169A (en) * 2015-09-25 2017-03-30 株式会社リコー Circuit device, light detection device, object detection device, sensing device, moving body device, light detection method and object detection method

Similar Documents

Publication Publication Date Title
JP2002333487A (en) Photoelectric sensor
US6759644B2 (en) Sensor using radiation pulses
JP4645476B2 (en) Slave device
WO2003065568A3 (en) Additive dc component detection included in an input burst signal
JP3076616B2 (en) Photoelectric switch and control method thereof
JP2680977B2 (en) Photoelectric switch
JP2002204151A (en) Many optic axes photoelectric sensor
JP3372328B2 (en) Photoelectric sensor
JP2003133934A (en) Photoelectric switch
JP3351816B2 (en) Photoelectric switch
JPH0964713A (en) Touch key
JP3062265B2 (en) Photoelectric switch
JP4018515B2 (en) Multi-optical axis photoelectric switch and interference state canceling method of multi-optical axis photoelectric switch
JP3857607B2 (en) Multi-axis photoelectric sensor
JP4394591B2 (en) Multi-axis photoelectric sensor
JP2002243440A (en) Method for setting operation mode of optical detector and optical multi-mode detector
JP2001276321A (en) Winning ball detection switch circuit for pachinko machine
JP2002040160A (en) Photoconductive switch
CN114623851A (en) Photoelectric sensor and control method thereof
JPH05308270A (en) Photoelectric switch
JP2005191926A (en) Remote control receiver
JP2003186863A (en) Reception circuit
JPH07209420A (en) Photoelectric sensor
JPH05206822A (en) Control circuit for photoelectric switch
JP2000172521A (en) Abnormality detecting method for cpu