JP2004101301A - Sensor dealing with differentiated value - Google Patents

Sensor dealing with differentiated value Download PDF

Info

Publication number
JP2004101301A
JP2004101301A JP2002262007A JP2002262007A JP2004101301A JP 2004101301 A JP2004101301 A JP 2004101301A JP 2002262007 A JP2002262007 A JP 2002262007A JP 2002262007 A JP2002262007 A JP 2002262007A JP 2004101301 A JP2004101301 A JP 2004101301A
Authority
JP
Japan
Prior art keywords
value
alarm
output
differential
threshold value
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
JP2002262007A
Other languages
Japanese (ja)
Other versions
JP4231994B2 (en
Inventor
Hiroyuki Inoue
井上 宏之
Kiyohiko Gondo
権藤 清彦
Takashi Kamei
亀井 隆
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2002262007A priority Critical patent/JP4231994B2/en
Publication of JP2004101301A publication Critical patent/JP2004101301A/en
Application granted granted Critical
Publication of JP4231994B2 publication Critical patent/JP4231994B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a sensor dealing with a differentiated value which can inform fact to a user through alarm, when an absolute value of characteristic amount which originates from contamination of a sensor head, temperature drift, element deterioration, etc. and is obtained from a detection object reduces gradually, so that the absolute value deviates from tolerance necessary for differentiated value decision. <P>SOLUTION: When variation is generated in the characteristic amount obtained from a detection object region, and the amount of variation exceeds a threshold value, the so-called sensor dealing with a differentiated value generates a decision output of presence or absence of an object in the detection object region. In the sensor, an alarm means is installed which decides that the value of obtained characteristic amount deviates from the tolerance necessary for decision of presence or absence of object, and performs alarm operation of the fact. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
この発明は、検出対象領域から得られた特徴量に変化が生じたとき、その変化分(微分値)が所定のしきい値を越えるときには、検出対象領域に物体有無を示す判定出力を発する所謂微分値対応型センサに関する。
【0002】
【従来の技術】
一般に、光電センサにあっては、所定周期又は任意のタイミングでサンプリングされる受光量を、予め設定された受光量しきい値と適宜に比較することにより、所定領域内における物体存在有無の判定を行っている。
【0003】
受光量しきい値は、例えば、物体存在状態において取得される受光量(物体存在有り状態への変化を主たる検出対象とする場合の動作レベル)と、物体未存在状態において取得される受光量(同様の場合の背景レベル)とを予め求めておき、それら2つの受光量の相関を考慮して、ユーザ等により、検出誤動作の起こりにくい適切な値(例えば、両受光量の中間値等)に設定される。判定方法としては、受光量が複数回連続して受光量しきい値を越えたか否かで判定を行うものや、受光量に所定の演算を施した上で受光量しきい値との比較を行い、その結果で判定を行うもの等様々である(例えば、特許文献1参照)。
【0004】
一般に、光電センサにあっては、周囲温度の変化やノイズ発生状況の悪化等の外部環境条件の変動や、センサ内部における温度変化等の影響により、内部回路の増幅率が変化して、物体存在有無とは無関係に、そのときどきの状況で受光量が変動しがちである。そのため、ユーザは、受光量のそのような変動を許容した検出が可能となるように、既知の背景レベルから十分な差が隔てられた値に受光量しきい値を設定することを余儀なくされている。このことは、センサの検出分解能の高精度化を妨げる一因ともなっている。
【0005】
このような不具合は、例えば、ガラス等の半透明物体や微小物体の存在有無を検出するような場合において特に顕著となる。すなわち、背景レベルと動作レベルとの差が微小である場合には、それに応じて背景レベルとしきい値レベルとの差も微小な値に保たねばならない。しかしながら、一方では、温度変化等による受光量変動を予め考慮して、上述したように背景レベルとしきい値レベルとの差を十分に確保しなければならず、結局は、上記誤動作の発生を免れない。
【0006】
なお、このような内部温度変化等の影響による信号レベルの変動は、光電センサのみならず、超音波センサ、近接センサ、圧力センサ、温度センサ、煙感知器(ガスセンサ)、pHセンサ等々、事象の発生と相関のある特徴量に基づき事象の発生有無を検出する種々のセンサにも共通に見られる問題である。
【0007】
そこで、本出願人は、先に特願2001−277239号において、検出対象領域から得られた特徴量に変化が生じたとき、その変化分がしきい値を越えると、検出対象領域に物体有無の判定出力を発する所謂微分値対応型センサを提案している。
【0008】
このような微分値対応型センサによれば、外部環境条件の変動やセンサ内部における温度変化等の影響による特徴量の変動に柔軟に対応して、正確な検出動作が可能となり、しかも背景レベルと動作レベルとの差が微小である場合にも、正確な検出が可能とされた。
【0009】
【特許文献1】
特開平5−206821号公報
【0010】
【発明が解決しようとする課題】
しかしながら、このような微分値対応型センサにあっても、例えば光電センサに適用した場合のように、特徴量である受光量絶対値が光学系への粉塵の付着等により徐々に低下すると、検出動作がなおも不安定になると言う問題点が知見された。
【0011】
すなわち、例えば透過型の光電センサを例にとり、光量値が5%変化したときにワーク有無の判定出力を発することを想定すると、ワークなし時の光量が『2000』であれば、判定対象となる5%変化は『100』(=2000×0.05)となるから、判定しきい値はその半分として『50』に設定される。このようなしきい値設定状態において、光学系への粉塵付着等によりワークなし時の光量値が『1000』まで低下すると、判定対象となる5%変化は『50』(=1000×0.05)となってしまうから、既に設定されたしきい値の『50』では安定した判定動作を行うことが困難となる。なお、言うまでもないが、このようなゆっくりとした光量値の変化は、微分値対応型センサそれ自体では検出不能である。
【0012】
この発明は、上述の問題点に着目してなされたものであり、その目的とするところは、センサヘッドの汚れ、温度ドリフト、素子劣化等に起因して検出対象領域から定常的に得られる特徴量が徐々に減少して、微分値判定に必要な許容範囲を外れたときには、そのことを手動操作を通じて又は自動的に検知可能として、不安定な判定出力状態にあることをユーザに警告等すること等を可能とした微分値対応型センサを提供することにある。
【0013】
この発明の他の目的とするところは、物体有無に起因する短期的な特徴量変化等に拘わらず、定常的に得られる特徴量が微分値判定に必要な許容範囲を外れたことを確実に検知可能とした微分値対応型センサを提供することにある。
【0014】
この発明のさらに他の目的並びに作用効果については、明細書の以下の説明を参照することにより、当業者であれば容易に理解される筈である。
【0015】
【課題を解決するための手段】
この発明の微分値対応型センサは、検出対象領域から物体有無と相関のある特徴量を取得する特徴量取得手段と、前記特徴量取得手段により取得された特徴量の微分値を演算により求める微分値演算手段と、前記微分値演算手段により求められた微分値が所定の微分しきい値を越えたか否かに基づいて物体検出有無を判定する微分値判定手段と、前記微分値判定手段による物体検出有無を示す判定結果に対応する出力動作を行う出力手段と、を有する。
【0016】
尚、ここで言う『微分値』は、繰り返しのサンプリングにより特徴量を取得する場合には、例えば「最新の特徴量と、それまでに得られた特徴量との差分」と定義することができる。尚、「それまでに得られた特徴量」としては、過去一定回数分の特徴量の平均値や、所定サンプリング回数分前に得られた特徴量等を採用することができる。
【0017】
本発明の微分値対応型センサにあっては、更に、上記の構成に加えて、前記特徴量取得手段より取得される特徴量の値が前記判定手段における微分値判定に必要な許容範囲を外れたことを判定してその旨のアラーム動作を行うアラーム手段を有している。
【0018】
ここで、『判定手段における微分値判定に必要な許容範囲』とは、背景特徴量に、物体の存在有無に伴う特徴量の変化幅に対する微分しきい値の割合を掛け併せることで得られる値を意味する。尚、この値(許容範囲)は、安全度を加味して、更に所定量分或いは所定比率分狭くなるように設定してもよいことは無論である。
【0019】
本発明の微分値対応型センサは、以上のように構成されたものであるから、先ず第1には、微分値対応型センサとしての基本的な作用効果を有する。すなわち、物体の存在有無に伴う特徴量の変動幅が僅かであっても、通常、検出対象物体の出現に伴う特徴量変化は急峻であるから、微分値において所定の微分しきい値と比較することにより、対象となる検出物体を確実に検知することができる。一方、検出状態の存在しない背景状態において、温度ドリフトや環境変化によって、特徴量が緩やかに変動する場合には、その変動幅が大きくても、通常、変化速度は緩やかであるから、これを微分して微分しきい値と比較すれば、微分しきい値を超えることはないので、これにより検出対象物体と背景状態とを確実に識別し、信頼性の高い検出信号を取得することができる。
【0020】
もっとも、このような微分値対応型センサにあっても、背景状態における特徴量の値が許容値を外れる程減少してしまえば、いかに微分値対応型のセンサであっても、予定された微分しきい値によって検出対象物体を確実に検出することは困難となる。
【0021】
しかし、このような場合、本発明の微分値対応型センサにあっては、アラーム手段を有することから、長期間の使用において、背景状態における特徴量の値が変動して、判定手段における微分値判定に必要な許容範囲を外れれば、その旨のアラーム動作が行われて、ユーザに対し修理や交換が促されることとなる。
【0022】
そのため、この発明の微分値対応型センサによれば、その検出有無に際して特徴量変化幅の小さい検出対象物を有効に検出することができることに加え、センサの作動条件が損なわれるような事態が生ずれば、直ちにその旨をユーザに知らせることができるから、不安定な検出状態を放置したまま、生産ラインの運転に支障を来すといった虞を未然に防止することができる。
【0023】
本発明の微分値対応型センサの好ましい実施の形態にあっては、前記アラーム手段として、前記特徴量取得手段により取得される特徴量を繰り返しサンプルするサンプリング手段と、前記サンプリング手段によりサンプルされた一連の特徴量の平均値を求める平均値演算手段と、前記平均値演算手段により逐次求められた平均値が所定のアラームしきい値を越えたか否かを判定する平均値判定手段と、前記平均値判定手段により平均値が所定のしきい値を越えたと判定されたことを少なくとも条件としてアラームのための出力動作を行う出力手段と、を具備することが考えられる。
【0024】
ここで、平均値演算手段により求められる『平均値』としては、一定時間毎若しくは一定サンプリング回数毎に更新される平均値や、移動平均値(特徴量を繰り返しサンプリングする場合にあっては、最新のサンプリング値と、所定サンプリング回数前までの複数のサンプリング値との平均値)を採用することができる。
【0025】
このような構成によれば、繰り返しサンプルされた一連の特徴量の平均値と所定のしきい値との大小比較に基づいて、アラームのための出力動作を行うようにしているため、特徴量の値が瞬時的に低下したとしても、平均値の値はさ程変動しないため、移動平均化時間や移動平均化処理に採用するサンプル数を適切に設定することによって、そのような特徴量の瞬時的な変化に伴う誤ったアラーム出力動作の発生を未然に防止することができる。
【0026】
加えて、平均値の演算において、移動平均化時間または移動平均用サンプル数を適切に設定すれば、実際に検出物体の通過に伴う特徴量の変動が生じたとしても、平均値についてはある程度少ない変動幅に維持できるから、このような移動平均化定数の適切な設定によれば、実際に検出対象物体が通過したことによって特徴量が大きく変動した場合にも、特徴量平均値の変動幅を抑制することによって、誤ったアラーム出力動作の発生を確実に防止することができる。
【0027】
このとき、アラームのための出力動作を行う出力手段としては、様々な実施の形態を採用することができる。1つの実施の形態における出力手段としては、前記逐次求められる平均値が前記アラームしきい値を連続して所定回数越えたと判定されることを少なくとも条件としてアラームのための出力動作を行うように構成することができる。
【0028】
このような出力手段によれば、たまたま平均値が瞬時的にアラームしきい値を超えたとしても、所定回数連続して超えない限りアラームのための出力動作は行われないから、移動平均化時間をさ程大きく取らずとも、誤ったアラーム出力動作の発生を未然に防止することができ、移動平均化処理における設計自由度を向上させることができる。
【0029】
前記出力手段の他の1つの実施の形態としては、前記微分値判定手段により物体検出ありの判定結果が得られているときには、前記平均値が前記アラームしきい値を越えたと判定されても、アラームのための出力動作を行わないように構成することが考えられる。
【0030】
このような構成によれば、実際に検出対象物体の通過により平均値の値が変化するような場合には、同時に微分値判定手段により物体検出有りの判定結果も得られるため、このように物体検出有りの判定結果が得られているときには、前記平均値が前記アラームしきい値を超えたと判定されたとしても、アラームのための出力動作を行わないようにすれば、誤ったアラーム出力動作の発生を確実に防止することができる。
【0031】
前記出力手段の他の1つの実施の形態としては、前記平均値判定手段により前記アラームしきい値を越えたと判定されても、一定のディレイタイマがタイムアップするまでの間は、アラームのための出力動作を行わないように構成することが考えられる。
【0032】
このような構成によれば、この種の微分値対応型センサにおいて、物体検出有りの判定結果が得られている期間というのは、特徴量が急激に変化している期間、換言すれば、検出対象物体が出現した直後の時点であるから、その後検出物体が通過しきる期間を予めディレイタイマに設定することによって、検出対小領域に検出物体が存在する状態にあっては、平均値が前記アラームしきい値を超えたと判定されても、アラームのための出力動作を行わないように構成することによって、物体通過に伴う特徴量の変動により、誤ったアラーム出力動作が行われることを未然に防止することができる。
【0033】
本発明の微分値対応型センサにおいて、本発明の要部であるところの前記アラーム手段の動作は、できる限り、誤ったアラーム動作が発生することがないよう、適切な動作タイミングを採用することが好ましい。このような観点からは、幾つかの適切な実行タイミングが考えられる。
【0034】
好ましい実施の一形態としては、前記アラーム手段の動作は、電源投入直後であることを少なくとも条件として実行されるように構成される。
【0035】
このような構成によれば、通常、電源投入直後においては、検出対象領域に物体が存在しないのが通例であるから、このような電源投入直後のタイミングを採用することによって、検出物体の存在による特徴量変動に影響を受けることなく、適切なアラーム判定を行うことが可能となる。
【0036】
好ましい他の一実施形態としては、前記アラーム手段の動作は、所定のタイミング設定手段にて設定されたタイミングが到来したことを少なくとも条件として実行されるように構成することが考えられる。
【0037】
このような構成によれば、予めユーザ側の設定操作によって、物体の存在しないタイミングや稼働時間が一定時間経過した時点のタイミング等を適切に設定し、以後タイマにより或いはカウンタによりそのようなタイミングの到来をセンサ側で判定することによって、アラームのための誤判定の生じにくい適切なタイミングにおいて、アラーム判定を実行させることができる。
【0038】
好ましい他の実施の一形態としては、前記アラーム手段の動作は、所定のオンオフ設定手段にてオン状態に設定されていることを少なくとも条件として実行されるように構成することが考えられる。
【0039】
このような構成によれば、例えば、生産ラインに物品が流れてセンサが稼働中にあるような状態においては、オンオフ設定手段によってオフ状態に設定することによって、不用意にアラーム判定処理が実行されて、誤ったアラーム出力動作が行われることを未然に防止することができる一方、ユーザにより検出対象領域に物体の存在しないことが確認された後において、オンオフ設定手段にてオン状態に設定することによって、適切なタイミングを選んで確実にアラーム判定処理を実行させることができる。
【0040】
次に、アラームのための出力動作としては、様々な動作を想定することができる。好ましい実施の一形態においては、前記アラーム手段におけるアラームのための出力動作が、物体検出用の出力信号ラインとは異なる所定の出力信号ラインに対して、アラーム用出力信号を送出する動作であるように構成することが考えられる。
【0041】
このような構成によれば、物体検出用の出力信号ラインから検出信号を受け取りつつ、これとは別の所定の出力信号ラインからアラーム用出力信号を受け取ることができるため、検出動作を実行しつつ、同時に特徴量取得手段により取得される特徴量の値が前記微分値判定手段における微分値判定に必要な許容範囲を外れたことをPLCやPC等に伝えることができ、即座にセンサ異常に対応したバックアップ処理等を実行させることが可能となる。
【0042】
すなわち、仮に同一の出力信号ラインを切り換えて物体検出用の出力信号とアラーム用出力信号とを取り出すものとすれば、何れかの処理が犠牲になるのに対し、このように別々の出力信号ラインを分離して設けたことによって、従前のセンサにおける検出機能を全く犠牲にすることなく、センサの検出状態が不安定である旨の状況をPLCやPC等に伝えることができるから、必要に応じて、生産ラインの運転都合等を考慮して、センサに対し必要なメンテナンスを実行させることができる。
【0043】
好ましい実施の一形態においては、前記アラーム手段におけるアラームのための出力動作が、所定の表示器に対してアラーム表示を行う動作であるように構成することが考えられる。
【0044】
このような構成によれば、ひとたびセンサにおいて、特徴量取得手段により取得される特徴量の値が判定手段における微分値判定に必要な許容範囲を外れるといった事態が生ずれば、その旨をセンサに備え付けの例えばデジタル表示器等を通して、目で確認することができるから、これに基づきメンテナンス要員や現場作業者においては、適切な時期を選んで、センサのメンテナンスや交換等を適切に実行することができる。
【0045】
以上述べた本発明のセンサにおいては、アラーム手段を適切に作動させる点が最も重要である。そのためには、平均値演算手段により逐次求められた平均値と比較されるべき所定のアラームしきい値の値を適切に設定することが重要である。このアラームしきい値の設定は、手動で又は自動で行わせることができる。
【0046】
すなわち、好ましい実施の形態においては、前記アラーム手段におけるアラーム用しきい値を任意に設定することが可能なアラームしきい値設定手段を設けることが考えられる。
【0047】
このような構成によれば、アラームしきい値の値を任意に調整することができるから、物体本来検出用の微分しきい値との関連を考慮して、ユーザはアラームしきい値の値を適切に設定することができる。
【0048】
好ましい実施の形態においては、前記アラーム手段におけるアラームしきい値を、電源投入直後に取得される特徴量に基づいて自動設定するアラームしきい値設定手段を設けることが考えられる。
【0049】
このような構成によれば、この種のセンサ(例えば光電センサ等)において、特徴量の定常的な変動は、1日毎又は数週間毎といった長いスパンで確認すればよいことが多いから、ユーザが電源を投入するたびに、自動的にアラーム判定が行われるように構成すれば、現場オペレータや保守員に意識させることなく、この種の特徴量異常の判定を実行させることができ、使い勝手が良好なものとなる。
【0050】
好ましい実施の一形態においては、前記アラーム手段におけるアラームしきい値を、微分しきい値設定操作に連動して自動設定するしきい値設定手段を設けるように構成することが考えられる。
【0051】
すなわち、アラームしきい値は、先述したように、『背景特徴量に、物体の存在有無に伴う特徴量の変化幅に対する微分しきい値の割合を掛け併せることで得られる値』に相当する(特定の検出対象領域並びに検出対象物体においては微分しきい値とアラームしきい値とは相関関係にある)ことから、微分しきい値設定操作に連動してアラームしきい値が自動的に設定されるようにすれば、適切なアラームしきい値の設定をユーザに意識させることなく自動的に行うことができ、使い勝手が良好なものとなる。
【0052】
アラーム手段におけるアラームのための出力動作としては、先に述べたように、アラーム用出力信号を送出する場合と、所定の表示器にアラーム表示を行う場合とが存在する。これらの出力動作は、事柄の性質上、所定のリセット操作が行われるまで出力保持されることが好ましい。すなわち、このようなアラーム用2値信号又はアラーム出力表示が行われた場合、現場作業員又は保守員がその場にいなければ、直後に適切な対応を取ることはできないから、そのような出力動作は継続的に維持されるようにして、現場作業員や保守員がそれに気づくのにかかる時間を確保することが好ましい。一方、アラームの対象となる異常状態が生じていたとしても、ひとたびそのことを確認した後にあっては、所定のリセット操作を行うことによって、そのような出力信号並びに出力表示をリセットできることが好ましいであろう。
【0053】
以上種々述べた内容は、実際に特徴量が大きく変動して、その値が判定手段における微分値判定に必要な許容範囲を外れた後の状況であるが、本発明のセンサにあっては、このような異常状態が生ずる以前であっても、所定の操作に応じて、現在特徴量のアラームしきい値に対する余裕度が所定の表示器に表示されるように構成することが好ましいであろう。
【0054】
このように本発明の微分値対応型センサは、微分値演算手段により求められた微分値が所定の微分しきい値を超えたか否かに基づいて物体検出有無を判定するという基本動作を有することに加え、特徴量取得手段により取得される特徴量の値が前記判定手段における微分値判定に必要な許容範囲を外れたときには、その旨を直ちに現場作業員や保守員、或いはPLCやPC等の上位機種に伝えることを可能としたものであって、これによりこの種の微分値対応型センサの信頼性乃至使い勝手を向上させたものである。
【0055】
【発明の実施の形態】
以下に、本発明の微分値対応型センサの好適な実施の一形態を添付図面に従って詳細に説明する。尚、言うまでもないことであるが、以下に述べる実施の一形態は、本発明に係る微分値対応型センサの一例を示すものに過ぎず、本発明センサの技術的範囲は特許請求の範囲によってのみ特定されるものである。
【0056】
殊に、以下に示す実施の一形態は、本発明をファイバ型光電センサに適用したものであるが、本発明センサの適用範囲はこれに限定されるものではなく、ファイバ型光電センサ以外にも、通常の光電センサの他、超音波センサ、近接センサ、圧力センサ、温度センサ、煙感知器(ガスセンサ)、pHセンサ等々、事象の発生と相関のある特徴量に基づき事象の発生有無を検出する種々のセンサにも適用が可能である。
【0057】
本発明の一実施形態における光電センサの上部カバーを開いた状態における外観斜視図が図1に示されている。同図に示されるように、光電センサ1は多連装型のプラスティック製筐体101を有する。筐体101の前部には、投光用ファイバ2と受光用ファイバ3とが挿入され、クランプレバー103の操作によって抜け止め固定される。筐体101の後部からは電気コード4が引き出されている。図示の電気コード4は、GND用の芯線41と、電源Vcc用の芯線42と、物体に関する検出出力用の芯線43と、本発明に関して新たに設けられたアラーム出力用の芯線44とを有する。
【0058】
筐体101は、制御盤等の取付面に対して図示しないDINレールを介して固定される。符号104で示されるものはDINレール嵌合溝である。筐体101の上部には、透明な上部カバー102が開閉可能に取り付けられている。上部カバー102を開いた状態で露出する筐体101の上面には、第1の表示器(メインデジタル表示器)105と、第2の表示器(サブデジタル表示器)106と、第1の操作ボタン(UP)107と、第2の操作ボタン(DOWN)108と、第3の操作ボタン(MODE)109と、第1のスライド操作子(SET/RUN)110と、第2のスライド操作子(L/D)111とが設けられている。
【0059】
本発明光電センサの操作・表示部の拡大図が図2に示されている。図1及び図2を参照して明らかなように、第1の表示器105及び第2の表示器106は、いずれも4桁の7セグメントデジタル表示器で構成されており、それぞれ4桁の数字、アルファベット更にはそれらの組合せを任意に表示可能となされている。第1の操作ボタン107、第2の操作ボタン108、及び第3の操作ボタン109は、いずれもモメンタリタイプの押しボタンスイッチを構成しており、図2に示されるように、第1の操作ボタン107は『UPキー』として、第2の操作ボタン108は『DOWNキー』として、第3の操作ボタン109は『MODEキー』としてそれぞれ機能するように構成されている。第1のスライド操作子110及び第2のスライド操作子111はいずれもスライドスイッチを構成するものであり、図2に示されるように、第1のスライド操作子110は『SET/RUN切り換えスイッチ』として、第2のスライド操作子111は『L/D切り換えスイッチ』として機能するように構成されている。
【0060】
図1に戻って筐体101の内部には、図1では図示しないが、物体検出用の発光素子と物体検出用の受光素子とが内蔵されている。投光用ファイバ2をファイバ挿入孔にしっかりと挿入すると、投光用ファイバ2の端面と検出用発光素子の発光部とがしっかりと光結合され、これにより検出量の発光素子から発生した光は、投光用ファイバ2を経由して、その先端の図示しないファイバヘッドから検出領域へと投光される。同様に、受光用ファイバ3をファイバ挿入孔にしっかりと挿入すると、受光用ファイバ3の端面と検出用受光素子とが光結合され、これにより図示しない受光用ファイバ3のファイバヘッドからファイバ内に導入された光は、受光用ファイバ3に案内されて、検出用の受光素子にたどり着くようになっている。以上述べた検出用の発光素子と検出用の受光素子との配置構成は従来のこの種のファイバ型光電スイッチに採用されたものと同様である。
【0061】
次に、本発明の一実施形態である光電センサの電気的ハードウェア構成の全体を示すブロック図が図3に示されている。同図に示されるように、この回路はマイクロプロセッサを主体として構成される制御部(CPU)200を中心として構成されている。CPU200内には、マイクロプロセッサの他に、システムプログラムを格納したROMやプログラムの実行に必要なワーキングRAM等が内蔵されている。このようなCPU200の具体的な構成については、各種の文献において種々公知であるから、その点についての詳細な説明は省略する。
【0062】
図において最も左側には、先に説明した発光素子を有する投光部と受光素子を有する受光部とが示されている。投光部には、検出用の発光素子である発光ダイオード(以下、LEDと称する)201と、LED201を駆動するための投光回路202とが含まれている。一方、受光部には、検出用の受光素子であるメイン受光フォトダイオード(以下、PDと称する)203と、メイン受光PD203の出力を増幅するための増幅回路204と、増幅回路204の増幅出力をA/D変換してCPU200に取り込むためのA/Dコンバータ205とが含まれている。
【0063】
そして、投光回路202の作用により検出用発光素子であるLED201から発生したパルス光は、投光用ファイバ2を介して検出領域へと導かれる。検出領域において透過又は反射したことにより受光用ファイバ3に導入された光は、受光用ファイバ3を経由して検出用受光素子であるメイン受光PD203へと辿り着く。メイン受光PD203で光電変換されて生じた出力信号は、増幅回路204で増幅された後、CPU200へとA/Dコンバータ205を介して取り込まれる。尚、これら投受光の基本的な構成についても、各種の文献において公知であるから、この点についての詳細な説明は省略する。
【0064】
図3の上部には、表示部を構成する幾つかの構成要素が示されている。すなわち、この表示部は、メインデジタル表示器として機能する第1の表示器105と、サブデジタル表示器として機能する第2の表示器106と、これら2つの表示器105,106を駆動するための表示駆動回路209とを含んでいる。そしてそれらの第1及び第2の表示器105,106には、後に詳細に説明するように、本発明のアラーム動作に関連した各種の情報が数値、アルファベット、それらの組合せ等により表示される。
【0065】
図3の右上には、入力部を構成する幾つかの構成要素が示されている。すなわち、この入力部は、UPボタンとして機能する第1の操作ボタン107と、DOWNボタンとして機能する第2の操作ボタン108と、MODEボタンとして機能する第3の操作ボタン109と、それらの操作ボタン107〜109の操作に対応して、エンコード処理を行う操作回路208とを含んでいる。これらの操作ボタン107〜109は、オペレータが手動操作で各種のデータを入力するために使用される。
【0066】
図3において右端には、出力部を構成する幾つかの構成要素が示されている。すなわち、この出力部は、第1の出力回路206と、第2の出力回路207とを含んでいる。すなわち、CPU200で生成された物体検出用の検出信号は、第1の出力回路206を介して電気コード4内の芯線43へと送り出される。同様にして、CPU200で生成されたアラーム用信号は、第2の出力回路207を介して電気コード4に含まれる芯線44へと送り出される。これらの電気コード4に含まれる芯線43,44は、一般的には、PLCやPC等の上位装置へと接続される。
【0067】
電源回路212は、図3に示されるCPU200、その他の回路要素に対して、それぞれ直流電源を供給するための電源安定化装置等で構成されており、この電源回路212に対する給電は電気コード4に含まれる芯線41及び42を介して行われる。この例では、芯線41はGNDに接続され、芯線42は電源Vccに接続されている。
【0068】
尚、符号210は出荷前にメーカ側において、又は出荷後にユーザ側において設定された各種のデータを格納するためのEEPROM、211はCPU200の動作基準クロックを生成するための水晶発振子、213はAPC用受光PD、214はAPC受光回路、215は電源投入時にCPUをリセットするためのCPUリセット回路である。
【0069】
次に、以上述べた機械的構成並びに電気的なハードウェア構成を前提として、この光電センサに備えられた様々な機能並びにそれらを実現するためにCPU200で実行されるシステムプログラムの構成について説明する。
【0070】
この光電センサには、選択的に実行(ON/OFF)可能な複数の機能が備えられている。それらの機能のそれぞれには、様々な選択肢が用意されている。それらの機能の選択(ON/OFF)並びに選択肢の選択は、この光電センサをSETモードに設定することで行うことができる。特定の選択肢に従ってON設定された機能を実現させる動作は、この光電センサをRUNモードに設定することで行うことができる。動作モードをSETモードとするかRUNモードとするかの指定は、図2に示されるように、第1のスライド操作子110を『SET』側とするか、『RUN』側とするかにより行うことができる。因みに、第2のスライド操作子111は、この光電センサの検出出力信号の論理極性を設定するためのもので、第2のスライド操作子111が『L』側に設定されると所謂ライトオンモードとなり、『D』側に設定されるとダークオンモードとなる。
【0071】
CPUで実行されるシステムプログラムの全体を概略的に示すゼネラルフローチャートが図4に示されている。このシステムプログラムは電源投入によって実行が開始される。
【0072】
同図において、処理が開始されると、先ず初期設定処理(ステップ401)が実行される。この初期設定処理(ステップ401)においては、後述するルーチン処理を開始するに先立って必要な各種の初期設定処理が実行される。この初期設定処理には、各種メモリ、表示灯、制御出力の初期化の実行や、EEPROM210から必要項目の読み出しとデータチェックを行う処理等が実行される。
【0073】
初期設定処理(ステップ401)が実行を完了すると、ルーチン処理への移行が行われ、その最初において先ず第1のスライド操作子110の設定状態が参照される(ステップ402)。ここで、第1のスライド操作子110が『SET』側へ設定されていれば(ステップ402SET)、続いてSETモード初期設定処理(ステップ403)が実行される。このSETモード初期設定処理(ステップ403)では、SETモード用設定値の初期化や機器機能番号Fの初期化(F=0)等が行われる。
【0074】
SETモード初期設定処理(ステップ403)が実行を完了すると、以後、第1のスライド操作子110が『SET』側へ設定された状態にある限り(ステップ405YES)、様々な機能(F)に関するSETモード処理(ステップ404)が実行される。この状態において、ユーザは、第1の操作ボタン107、第2の操作ボタン108、第3の操作ボタン109を適宜に操作することによって、当該光電センサに用意された様々な機能(F)のON/OFF設定、更には、各機能(F)別の個別設定処理を実行することができる。
【0075】
一方、第1のスライド操作子110の設定状態を参照した結果、『RUN』側へと設定されたと判定されると(ステップ402RUN)、続いて、RUNモード初期設定処理(ステップ406)が実行される。このRUNモード初期設定処理(ステップ406)においては、表示灯、制御出力の初期化、しきい値及び各種RUNモード用設定値の初期化等が行われる。
【0076】
RUNモード初期設定処理(ステップ406)が完了すると、続いて第1のスライド操作子110が『RUN』側へ設定されている限り(ステップ408YES)、RUNモード処理(ステップ407)が実行される。このRUNモード処理(ステップ407)においては、光電センサとして必要な基本的な動作の他に、ユーザにより選択的に設定された各種の機能が実現される。尚、このRUNモード処理の具体的な内容については、必要に応じて後に詳細に説明を行う。
【0077】
このように、CPU200で実行されるシステムプログラムは、所謂電源投入直後に行われるイニシャル処理である初期設定処理(ステップ401)と、ルーチン処理であるところの2つの処理、すなわちSETモード処理(ステップ404)及びRUNモード処理(ステップ407)に大別される。そして、本発明の要部であるところのアラームモードの実行は主としてRUNモード処理(ステップ407)において行われ、アラームモードにおける各種の機能設定は主としてSETモード処理(ステップ404)において行われる。その他後に詳細に説明するが、初期設定処理(ステップ401)においても、本発明のアラームモードに関連する各種の処理が実行される。
【0078】
SETモード処理の全体を示すフローチャートが図5に示されている。同図において処理が開始されると、先ず機能別表示処理(ステップ501)が実行される。この機能別表示処理(ステップ501)では、機能番号Fに該当する様々な表示処理が実行される。
【0079】
続いて、キー入力検知処理が実行され(ステップ502)、図1並びに図2に示される操作ボタン107〜109並びにスライド操作子110,111におけるキー入力操作の有無を待機する状態となる(ステップ503NO)。
【0080】
この状態において、キー入力有りと判定され(ステップ503YES)、しかも機能切り換えに相当するキー入力シーケンスが確認されると(ステップ504YES)、機能切り替え指令が確認される度に、機能番号Fの値は全機能数に達するまで+1ずつインクリメントされ(ステップ505,506NO)、全機能数に達すると共に(ステップ506YES)、再びゼロリセットされて(ステップ507)、機能(F)の循環切り替えが実行される。
【0081】
この状態において、そのとき設定されている機能Fに関する実行が指示されると(ステップ504NO,508YES)、機能別実行処理が実行され、機能番号Fに該当する処理が行われる(ステップ509)。
【0082】
本発明に関するアラームモードにおいては、この機能別実行処理(ステップ509)において、(1)アラームモードを実行させる(ON)又は実行させない(OFF)の設定、(2)アラームモードを、▲1▼電源投入直後のタイミング、▲2▼設定されたタイミング、▲3▼微分判定の都度のタイミングのいずれにおいて実行させるかの設定、(3)アラームしきい値として手動設定されたものか或いは自動設定されたものかのいずれを使用するかの設定、(4)アラームしきい値として自動設定されたものを使用するとした場合、電源投入直後に取得される特徴量に基づいて設定したものを使用するか、又は微分しきい値設定操作に連動して自動設定されたものを使用するかの設定、等々の設定が行われる。尚、これらの設定処理については、必要に応じ、後に詳細に説明する。
【0083】
尚、ここで設定されたアラームモード(ON/OFF)設定は、後に詳細に説明するように、図14に示される実行フラグ状態参照処理(ステップ1408)において参照される。同様に、このSETモードにおいて設定されたアラームしきい値(設定比=A%)は図15に示されるように、アラームしきい値算出処理(ステップ1502)において参照される。その他、微分しきい値に連動してアラームしきい値を自動設定すると設定した場合、図16に示されるしきい値自動設定処理が実行される。
【0084】
図5のフローチャートに戻って、機能切り替え指令でもなく(ステップ504NO)、及びいずれの機能実行でもないと判定されれば(ステップ508NO)、処理は終了して、以上の動作が繰り返し実行される(ステップ501〜508)。
【0085】
次に、図4に戻って、RUNモードの処理について説明する。RUNモードへの移行に先立ち、先ずRUNモード初期設定処理が実行される(ステップ406)。このRUNモード初期設定処理(ステップ406)においては、先に説明したSETモード処理(ステップ404)において、アラームしきい値を手動設定すると設定したか、又は自動設定すると設定したかに応じて、図15又は図16に示される処理が実行され、アラームしきい値の値が設定される。
【0086】
すなわち、アラームしきい値として手動設定したものを使用すると設定した場合、例えばその設定値が設定比(=A%)として与えられた場合、図15のフローチャートに示されるように、先ず投受光処理が実行されて(ステップ1501)、受光量のサンプリングが行われた後、先の手動設定処理(ステップ1503)にて設定された設定比(=A%)がEEPROM206から読み込まれ、次式に従ってアラームしきい値の決定が行われる。
【0087】
アラームしきい値=得られた受光量×A%   ・・・式1
【0088】
このように、図4のフローチャートにおいて、SETモード処理(ステップ404)において所定操作を行い、アラームしきい値に相当する設定比(=A%)を設定しておけば、RUNモード初期設定処理(ステップ406)において、その設定内容に基づき(ステップ1503)、アラームしきい値の設定が行われる(ステップ1502)。
【0089】
尚、図4に示されるSETモード処理(ステップ404)における所定操作によって、アラームしきい値を自動設定すると決めた場合には、図6を参照して後述する入力キー対応処理(ステップ604)において、図16に示される微分しきい値に連動するアラームしきい値設定処理が実行され、アラームしきい値の値は入力された微分しきい値の値に応じて自動的に決定される。
【0090】
すなわち、図16のフローチャートにおいて処理が開始されると、先ずユーザが手動により微分しきい値(x)を設定するのを待って(ステップ1601)、設定時の受光量(ワーク無し)(y)をサンプリングする処理が実行される(ステップ1602)。その後、微分しきい値(x)、設定時の受光量(y)並びに微分しきい値に対する余裕度(n)に基づき、微分検出変化率(z)(=x×n/y)が求められる(ステップ1603)。そして、最後にユーザが手動設定した微分しきい値(x)と演算により求められた微分検出変化率(z)を用いて、アラームしきい値(x/z)が求められる。以後、こうして求められたアラームしきい値(x/z)に基づいて、アラーム出力のための判定処理が実行される。
【0091】
図4に戻って、RUNモード初期設定処理(ステップ406)が実行完了すると、以後第1のスライド操作子110が(RUN)側に設定されている限り(ステップ408YES)、RUNモード処理(ステップ407)が繰り返し実行される。
【0092】
このRUNモード処理(ステップ407)の全体を示すフローチャートが図6に示されている。同図に示されるように、このRUNモード処理の全体は、通常処理(ステップ601〜605)と割り込み処理(ステップ606〜608)とに大別される。そして、割り込み処理(ステップ606〜608)は、時間Tsec毎(例えば、100μsec毎)にタイマ割り込みで実行される。
【0093】
先ず、通常処理(ステップ601〜605)について説明する。処理が開始されると、表示灯制御処理(ステップ601)が実行される。この表示灯制御処理(ステップ601)では、指定された表示内容に応じて、7セグメントデジタル表示器である第1及び第2の表示器105,106の点灯制御を行う。
【0094】
続いて、オートパワーコントロール(以下、APCという)処理(ステップ602)が実行される。このAPC処理(ステップ602)では、後述する計測用の投受光処理(ステップ606)で取得したモニタ受光量を監視し、一定期間毎に、APC補正を実施する。このAPC補正は、この例においては、投光電流のパワー制御により行われている。
【0095】
続いて、キー入力検知処理(ステップ603)が実行される。このキー入力検知処理(ステップ603)においては、一定期間毎にキー入力の検知を行い、入力を検知した場合は、該当処理が実行できるように設定を行う。続いて、キー入力対応処理(ステップ604)が実行されて、検知されたキー入力に対応する様々な処理が実行される。
【0096】
本発明の要部であるアラームモードにおいては、このキー入力検知処理(ステップ603)において、アラーム用信号をリセットするためのリセット入力の検知が行われ、ここでリセット入力が検知された場合には、続く入力キー対応処理(ステップ604)において、リセット処理が実行され、アラーム用信号の内容はON状態からOFF状態へとリセットされる。尚、この例では、投受光処理(ステップ606)で取得された光量値が微分値対応判定出力処理(ステップ607)における微分値判定に必要な許容範囲を外れたことが判定された場合、その旨のアラーム信号を、第2の出力回路207を介して電気コードに含まれた芯線44へと出力するのであるが、その際出力信号はON状態に保持される。そのため、このON状態にあるアラーム信号をOFF状態にリセットするために、キー入力検知処理(ステップ603)、及び入力キー対応処理(ステップ604)が機能する。その結果、これらキー入力検知処理(ステップ603)及び入力キー対応処理(ステップ604)が適切に実行される結果、ON状態に保持されたアラーム用信号は、操作ボタン107,108,109の何れかの操作によって、OFF状態にリセットされる。
【0097】
次に、時刻Tsec毎に実行される割り込み処理について説明する。割り込み処理が開始されると、先ず投受光処理(ステップ606)が実行される。この投受光処理(ステップ606)においては、図3に示されるLED201を投光回路202を介してパルス駆動することによって、可視光又は赤外線光を発生させ、これを投光用ファイバ2を通じて投光用ヘッド(図示せず)へと導き、投光用ヘッドから検出対象領域へと放出する。同時に、検出対象領域において反射又は透過した光を、受光用ファイバ3の先端に設けられた受光ヘッドから受光用ファイバ3内へと導入し、これを受光用ファイバ3を経由してメイン受光PD203へと導き、メイン受光PD203にて光電変換にて得られた信号を増幅回路204で増幅した後、A/Dコンバータ205を介してCPU200へと取り込む。これにより、検出対象領域の状況に対応する特徴量を含んだ受光量データが取得される。
【0098】
続いて微分値対応判定出力処理(ステップ607)が実行される。この微分値対応判定出力処理(ステップ607)においては、投受光処理(ステップ606)において取得された受光量の微分値を演算により求めると共に、求められた微分値が所定の微分しきい値を超えたか否かに基づいて物体検出有無を判定し、判定結果に対応する出力動作を行うものである。
【0099】
微分値対応・判定出力処理の詳細を示すフローチャートが図7に示されている。同図において処理が開始されると、先ず微分値演算処理(ステップ701)が実行される。この微分値演算処理(ステップ701)においては、投受光処理8ステップ606)を介して逐次取得される受光量データを繰り返しサンプルすると共に、サンプルされた一連の特徴量の移動平均値を求め、この求められた移動平均値と最新のサンプルにより得られた受光量との差演算を行うことによって微分値の生成が行われる。すなわち、この微分値演算処理は、投受光処理により取得される受光量を繰り返しサンプルするサンプリング手段と、前記サンプリング手段によりサンプルされた一連の受光量の移動平均値を求める移動平均値演算手段と、こうして求められた移動平均値と最新のサンプル値との差を求める差演算手段とを含んでいる。その結果、微分値演算処理で得られる微分値の値は、過去一定個数分の受光量の平均値と、最新の受光量との差分となり、所謂微分値(変化分)に相当するものとなる。尚、この微分値演算に利用する移動平均値処理においては、チャタリング防止のために、ノイズ成分の除去を行ったり、古いものから新しいものへと重み付けを増大させて加重平均とする等の様々な公知のノイズ除去手法が採用される場合もある。
【0100】
続く判定処理(ステップ702)においては、こうして得られた微分値と予め設定された微分しきい値との大小比較が行われる。ここで、取得された微分値が設定されている微分しきい値を超えていると判定されれば(ステップ702YES)、物体を検出したことを示す検出出力はON状態とされ、その状態が信号線及び表示器へと出力される。これに対して、判定処理(ステップ702)において、取得された微分値が設定されている微分しきい値を超えていないと判定されれば(ステップ702NO)、物体検出有無を示す検出出力はOFF状態とされ、その状態が信号線及び表示器へと出力される(ステップ704)。
【0101】
尚、ここで信号線への出力動作とは、図3のブロック図において、検出信号(ON/OFF)を第1の出力回路206を介して、電気コードに含まれる芯線43へと送り出すことである。また、表示器への出力動作とは、図1及び図2に示される第1の表示器105又は第2の表示器106に対して、物体検出の有無を示す表示(例えば、『ON』または『OFF』)を行うことを意味している。
【0102】
このように、本発明の光電センサにあっては、微分値対応・判定出力処理を有することから、逐次取得されてサンプルされる受光量は、微分値に変換された後、予め設定された微分しきい値と比較されるので、物体有無に伴う受光量変化が僅かであっても、検出領域に対象とする物体が出現したときの光量変化速度は大きいため、これと微分しきい値を比較することによって、対象物体を確実に検出することができる。殊に、透過型光電センサを用いて、ガラスやプラスティック等の透明体を検出する場合、物体有無に伴う受光光量の変化はかなり小さな変化幅となるが、にも拘わらず、微分値と微分しきい値との比較を介在させることによって、実際に検出物体が出現した場合とドリフトや外部光の影響で受光量がゆっくりと変動した場合とを明確に識別することができ、信頼性の高い物体検出動作を実現することができる。
【0103】
図6に戻って、微分値対応・判定出力処理(ステップ607)が終了すると、続いて本発明の要部であるところの、平均値対応判定出力処理(ステップ608)が実行される。この平均値対応判定出力処理(ステップ608)においては、投受光処理(ステップ606)により取得された受光量を繰り返しサンプルすると共に、サンプルされた一連の特徴量の移動平均値を求め、こうして得られた移動平均値が所定のアラームしきい値を超えたか否かを判定し、しきい値を超えたと判定されたことを少なくとも条件としてアラームのための出力動作を行うように構成される。
【0104】
平均値対応判定出力処理(ステップ608)の詳細が図8に示されている。同図において、処理が開始されると、先ず移動平均値演算処理(ステップ801)が実行される。この移動平均値演算処理(ステップ801)では、図6に示される投受光処理(ステップ606)において取得された受光量を繰り返しサンプルすると共に、このサンプルにより得られた一連の特徴量の移動平均値を演算により求める処理が実行される。先に述べたように、その際に、ノイズ除去のためのレベル弁別処理や、最新の受光量に近づくにつれて重要度を増すための重み付け処理等を採用しても良いことは勿論である。
【0105】
続く判定処理(ステップ802)においては、こうして得られた移動平均値と予め設定されたアラームしきい値とを大小比較することによって、取得された受光量の値が図7に示される微分値対応・判定出力処理における微分値判定に必要な許容範囲を外れたか否かの判定を行う。すなわち、先に説明したように、例えば透過型光電センサを例に取り、光量値が5%変化したときにワーク有無の判定出力を発することを想定すると、ワーク無し時の光量が『2000』であれば、判定対象となる5%変化は『100』(=2000×0.05)となるから、判定しきい値はその半分として『50』に設定される。このようなしきい値設定状態において、光学系への粉塵付着等によりワーク無し時の光量値が『1000』まで低下すると、判定対象となる5%変化は『50』(=1000×0.05)となってしまうから、既に設定されたしきい値の『50』では安定した判定動作を行うことは困難となる。本発明ではこのような不安定な判定状態にあることを、ステップ802において、移動平均値とアラームしきい値とを大小比較することによって判定するものである。
【0106】
ここで、移動平均値の値がアラームしきい値を超えているものと判定されれば(ステップ802YES)、アラーム出力ON動作が実行されて、信号線及び表示器に対し所定の出力動作が行われる。これに対して、移動平均値の値が設定されているアラームしきい値を超えていないと判定されれば(ステップ802NO)、アラーム出力OFF動作が実行されて、信号線及び表示器に対し所定の出力動作が行われる(ステップ804)。
【0107】
尚、ここで言う信号線に対する出力動作とは、図3のブロック図において、第2の出力回路207を介して電気コードに含まれる芯線44へとアラーム用出力信号(ON/OFF)を出力することを意味している。また、表示器に対する出力動作とは、図1及び図2に示される第1及び第2の表示器105,106の何れかに対し、アラームON又はアラームOFFに相当する表示(『A on』、『A off』等)を行うことを意味している。
【0108】
このように、図7及び図8に示される実施の形態によれば、微分値対応判定出力処理(ステップ607)及び平均値対応判定出力処理(ステップ608)の双方を有することから、光電センサとして透過型のものを採用し、かつガラス等の透明体を検出するような場合であっても、微分値対応・判定出力処理の作用に因って正確な検出を行うことができる。一方、投受光光学系に粉塵が付着して受光光量が微分値判定に必要な許容範囲を外れるような場合には、直ちに平均値対応・判定出力処理の作用によって、アラーム出力ON動作(ステップ803)が実行されて、電気コード4に含まれる芯線44を介してPCやPLC等にその旨が伝えられ、同時に筐体101に設けられた第1及び第2の表示器105,106の何れかには、受光光量の内容が微分値判定に必要な許容範囲を外れた旨の表示が行われ、これに基づき現場作業員又はメンテナンス要員等において、そのことを表示器105,106を介して目で見て直ちに確認し、センサの修復や交換等の適切な対応が可能となるのである。
【0109】
ところで、以上説明した図8のフローチャートにおいては、移動平均値演算処理(ステップ801)が採用されているため、取得された受光量の値が瞬時的に変動するような場合にも、ステップ802における比較処理において、移動平均値がアラームしきい値を誤って超えるといった事態はある程度回避されるが、それでも移動平均値演算処理に使用されるサンプル数或いは移動平均化時間と検出物体の通過速度並びにサイズとの関係では、移動平均値がかなり変動する場合も想定される。そのような場合には、できるだけ検出対象領域に検出対象物体が存在する場合において、ステップ802における移動平均値判定処理が実行されることを回避することが好ましい。
【0110】
このような点を考慮した平均値対応・判定出力処理の詳細を示すフローチャートが図9に示されている。この実施形態にあっては、逐次求められる移動平均値がアラームしきい値を連続して所定回数超えたと判定されることを少なくとも条件としてアラームのための出力動作を行うようにしている。
【0111】
すなわち、図9において処理が開始されると、先の場合と同様にして、移動平均値演算処理(ステップ901)が実行される。その後、こうして得られた移動平均値の値は、予め設定されているアラームしきい値と大小比較される(ステップ902)。
【0112】
ここで、移動平均値演算処理(ステップ901)において取得された移動平均値の値が、設定されているアラームしきい値を超えていると判定されると(ステップ902YES)、続いて、更に最初にアラームしきい値を超えてから一定回数連続でアラームしきい値を超えたかの判定処理が実行される(ステップ903)。
【0113】
ここで、最初にアラームしきい値を超えてから一定回数連続でアラームしきい値を超えたものと判定された場合には(ステップ903YES)、アラーム出力ON動作が実行されて、先の場合と同様に信号線並びに表示器に対して所定の出力動作が行われる。これに対して、移動平均値演算処理(ステップ901)において取得された移動平均値の値が、設定されているアラームしきい値を超えていても(ステップ902YES)、最初にアラームしきい値を超えてから一定回数連続でアラームしきい値を超えていなければ(ステップ903NO)、アラーム出力OFF動作が実行されて、信号線並びに表示器に対して所定の出力動作が行われる(ステップ905)。
【0114】
勿論、移動平均値の値が設定されているアラームしきい値を超えていなければ(ステップ902NO)、同様にアラーム出力OFF動作が実行され、信号線並びに表示器に対して所定の出力動作が行われる。
【0115】
このように、図9に示される実施の形態の場合、取得された移動平均値の値が設定されているアラームしきい値を超えていると判定された場合であっても(ステップ902YES)、最初にアラームしきい値を超えてから一定回数連続でアラームしきい値を超えない限り(ステップ903NO)、アラーム出力はOFF状態とされ(ステップ905)、アラーム出力がON状態とされることはない。そのため、検出対象領域を通過する物体の速度或いは大きさに従って、判定のための連続回数を適切に設定すれば、実際に検出対象領域に物体が存在することによって移動平均値の値がアラームしきい値を超えるといった事態が生じても、そのような状態は、規定回数以上判定されることはないため(ステップ903NO)、そのような瞬時的な受光量の変動に惑わされることなく、実際に受光光量の値が定常的に減少したような真のアラーム状態を確実に判別して(ステップ903YES)、アラーム出力ON動作を実行させることができる。
【0116】
すなわち、この実施形態にあっては、予定された検出物体が検出対象領域を通過する場合、ある一定時間以上に亘り受光光量の低下することは無いという前提の下に、それを超えるような長期的な受光光量の低下は、実際に投受光光学系の粉塵付着や投光素子の劣化等に基づくものであるとして、アラーム出力動作の実行を許可するものである。
【0117】
次に、判定手段により物体検出有りの判定結果が得られているときには、前記移動平均値が前記アラームしきい値を超えたと判定されても、アラームのための出力動作は行われないようにした実施形態が図10に示されている。
【0118】
すなわち、同図において処理が開始されると、先の例と同様にして移動平均値演算処理(ステップ1001)が実行され、ステップ606にて取得された受光量のサンプル値に対する移動平均値演算処理が実行される(ステップ1004)。
【0119】
続いて、こうして得られた移動平均値の値は、予め設定されたアラームしきい値の値と大小比較される(ステップ1002)。ここで、取得された移動平均値の値がアラームしきい値を超えているものと判定されれば(ステップ1002YES)、更に図7のフローチャートにおいて、ステップ703又は704において設定された検出出力の状態が参照される(ステップ1003)。
【0120】
ここで、検出出力がOFFと判定されると(ステップ1003YES)、アラーム出力ON動作が実行されて、信号線並びに表示器に対して所定の出力動作が行われる(ステップ1004)。これに対して、検出出力がON状態であると判定されると(ステップ1003NO)、アラーム出力OFF動作が実行されて、信号線及び表示器に対して所定の出力動作が行われる(ステップ1005)。ここで、信号線並びに表示器に対する出力動作は、先に説明したものと同様である。
【0121】
このように、この実施形態によれば、取得された移動平均値の値が設定されているアラームしきい値を超えていると判定された場合でも(ステップ1002YES)、検出出力がON状態と判定されれば(ステップ1003NO)、アラーム出力はOFF状態とされるため(ステップ1005)、検出対象領域を物体が検出中に受光光量が低下したものを、定常的な受光光量の低下であると誤って認識する虞を未然に防止することができる。つまり、この実施形態にあっては、検出対象領域に物体が存在するときには、検出出力がON状態となることに着目し、逆に検出出力がON状態のときには、移動平均値とアラームしきい値との大小判定結果を無視するという手法を採用することによって、検出対象領域を物体が通過したことによる瞬時的な移動平均値の低下で、誤ってアラーム出力が発生することを防止するようにしているのである。
【0122】
次に、平均値判定手段により前記移動平均値が前記アラームしきい値を越えたと判定されても、一定のディレイタイマがタイムアップするまでの間は、アラームのための出力動作を行わないようにした実施形態が図11に示されている。
【0123】
同図において、処理が開始されると、先の例と同様にして、移動平均値演算処理が実行される(ステップ1101)。この移動平均値演算処理(ステップ1101)においては、図6に示される投受光処理(ステップ606)において取得された受光量のサンプル値に基づき、移動平均値演算処理が行われる。
【0124】
ここで、取得された移動平均値の値が、設定されているアラームしきい値を超えていると判定されると(ステップ1102YES)、続いて、ディレイタイマが作動していないことを条件として(ステップ1104NO)、所定のディレイタイマにスタートがかけられる(ステップ1105)。
【0125】
その後、次回の判定処理において、尚も移動平均値の値がアラームしきい値を超えていると判定されると(ステップ1102YES)、ディレイタイマが作動していることを条件として(ステップ1104YES)、ディレイタイマがタイムアップしたかどうかの判定が行われ(ステップ1106)、以後ディレイタイマがタイムアップするまでの間(ステップ1106NO)、アラーム出力はOFF状態とされる(ステップ1107)。
【0126】
この状態において、移動平均値の値がアラームしきい値を超えている状態が継続すると(ステップ1102YES、1104YES)、ディレイタイマがタイムアップした時点において(ステップ1106YES)、アラーム出力ON動作が実行され(ステップ1108)、信号線並びに表示器に対して所定の出力動作が行われる。
【0127】
このように、この実施形態にあっては、取得された移動平均値が設定されたアラームしきい値を超える状態が出現したとしても(ステップ1102YES)、その状態がディレイタイマの設定時間以上に亘り継続しない限り(ステップ1106NO)、アラーム出力がON状態とされることはないため(ステップ1107)、ディレイタイマの設定時間として正常な検出物体が検出領域を通過し終わる最大時間を設定しておけば、検出対象領域を物体が通過したことによる受光量変動を、定常的な光量低下と誤って認識する虞を未然に防止することができる。
【0128】
すなわち、この実施形態にあっては、正常な検出物体が検出領域を通過した場合、それにより受光量が低下したとしても、その状態は一定時間以上継続することは無いという前提の下にそのような瞬時的な受光光量の低下と光学系への粉塵付着等による瞬時的な受光光量の低下と光学系への粉塵付着等による定常的な受光光量の低下とを確実に識別しようとするものである。
【0129】
以上説明した各実施形態においては、センサを用いてワークの検出を行いつつも、誤動作を生ずることがないように配慮して、信頼性の高いアラーム出力を得るようにしたものであるが、これとは全く別の考え方として、そもそも検出物体が存在しない時期を選んで、アラームモードを実行させることによって、誤ったアラーム出力動作が発生することを回避することもできる。
【0130】
このような考え方に基づく実施の形態が図12に示されている。同図に示されるように、この実施の形態においては、電源投入直後の初期設定処理の一部として、投受光並びに平均値対応判定出力処理(ステップ1202)を実行することによって、検出対象領域に物体が存在することによるアラーム出力の誤った発生を回避するものである。ここで、投受光並びに平均値対応判定出力処理(ステップ1202)は、図6に示される投受光処理(ステップ606)と平均値対応判定出力処理(ステップ608)とから構成されており、投受光処理で得られた受光光量に基づき、図8に示される平均値対応・判定出力処理を実行するようにしたものである。
【0131】
このような構成によれば、通常一般的なセンサの用途においては、電源投入直後においては、検出対象となる生産ライン上をワークが流れていないのが通常であるから、このような前提の下に、検出領域に物体が存在することによる誤ったアラーム出力の生成並びに出力を確実に回避することができる。
【0132】
次に、図13には、予めユーザにより設定されたタイミングが到来した場合に限り、平均値対応判定出力処理が実行されるようにして、検出物体の存在による誤ったアラーム出力の発生を回避するようにした例が示されている。
【0133】
すなわち、同図において割り込み処理が開始されると、先の説明と同様にして投受光処理(ステップ1306)並びに微分値対応判定出力処理(ステップ1307)が実行された後、ユーザにより設定されたタイミングの到来が判定される(ステップ1308)。ここで、設定タイミングが到来したと判定されれば(ステップ1308YES)、先の場合と同様にして平均値対応判定出力処理(ステップ1309)が実行されるのに対し、設定タイミングが到来していなければ(ステップ1308NO)、平均値対応判定出力処理(ステップ1309)はスキップされる。そのため、予め内蔵されたタイマ或いはカウンタ等によって、検出対象領域に物体の存在しない時期を設定したり、或いは実行インターバルを大きく取って、全体として検出物体の存在する確率を低く設定する等によって、誤ったアラーム出力の発生を回避することが可能となるのである。
【0134】
次に、図14には、予めユーザが実行フラグをON又はOFF状態に設定することによって、アラームモードそれ自体を選択的に実行させるようにした実施の形態が示されている。
【0135】
すなわち、図14において割り込み処理が開始されると、先の場合と同様にして、投受光処理(ステップ1406)並びに微分値対応判定出力処理(ステップ1407)が実行された後、続いて実行フラグの状態が判定される(ステップ1408)。ここで、実行フラグの状態がON状態と判定されれば(ステップ1408ON)、平均値対応判定出力処理(ステップ1409)が実行されて、受光光量が定常的に低下しているような異常が監視されるのに対し、実行フラグの状態がOFF状態とされていれば(ステップ1408OFF)、平均値対応判定出力処理(ステップ1409)はスキップされ、アラームモードは採用されない。従って、この実施の形態によれば、ユーザは、アラームモードの実行をON又はOFFに選択することができ、例えばセンサが購入したばかりで新しかったり、或いは検出環境がクリーンでレンズの汚れを気にする必要が内容な場合には、このアラームモードを実行する必要が無いから、それにより誤ったアラーム出力が発生する等の虞を回避することができる。
【0136】
次に図15には、手動によるアラームしきい値の操作と、これに伴うシステム側のアラームしきい値設定の関係が概略的に示されている。先に説明したように、アラームしきい値の設定は手動又は自動の何れにおいても行うことができる。手動にてアラームしきい値を設定する場合、この例では設定比(=A%)としてアラームしきい値の設定を行う(ステップ1503)。すると、初期設定処理(ステップ401)、SETモード処理(ステップ404)、RUNモード処理(ステップ407)等の適切なタイミングにおいて、サンプリングされた受光量に対し(ステップ1501)、設定比(A%)を適用することによって、アラームしきい値が求められ(ステップ1502)、以後こうして得られたアラームしきい値に基づき、本発明のアラームモードが実行される。尚、図15の例は、電源投入直後の初期設定処理(ステップ401)に対応するものであるが、このようなアラームしきい値設定処理それ自体は、図4に示されるフローチャートの何れのタイミングにおいても実行可能であることは言うまでもない。
【0137】
次に図16には、先に説明したように、微分しきい値に連動してアラームしきい値が自動的に設定されるようにした実施形態が示されている。すなわち、この種の微分値対応型センサにおいては、微分しきい値とアラームしきい値との間には一定の相関関係が成立するため、しきい値設定操作で入力された微分しきい値を利用して、所定の演算を施すことで、アラームしきい値を算出しこれを設定することができるのである。
【0138】
すなわち、微分しきい値(a)を設定すると(ステップ1601)、設定時の受光量(ワーク無し)(y)がサンプリングされ(ステップ1602)、その後微分検出変化率(z)が算出され(ステップ1603)、最後に微分しきい値(x)と微分検出変化率(z)とを用いてアラームしきい値(x/z)が求められる。以後、こうして求められたアラームしきい値(x/z)に基づいてアラームモードが実行される。
【0139】
例えば、微分しきい値を『50』、ワーク無しの受光量が『2000』とすると、微分しきい値に対する余裕度(n)を“2”とした場合(n=2)、変化量は『100』となり、ワーク無しの受光量が『2000』であるから、微分検出ができる変化率は、50×2/2000=5%となる。従って、安定検出できる受光レベル(アラームしきい値)はワーク無しの光量に対する5%の変化が『50』以上でなければならないため、50/0.05=1000として求められる。
【0140】
次に、図17には、アラームのための出力動作が、所定のリセット操作が行われるまで出力保持されるようにした実施の形態が示されている。すなわち、同図において処理が開始されると、移動平均値演算処理(ステップ1701)が実行された後、移動平均値と設定されているアラームしきい値との大小比較が行われ(ステップ1702)、移動平均値がアラームしきい値を超えていると判定されれば(ステップ1702YES)、アラーム出力ON動作が実行され、信号線並びに表示器に対し所定の出力動作が行われる(ステップ1706)。
【0141】
光学系に粉塵等が付着して光量が低下しついには光量の移動平均値がアラームしきい値を超えるような場合、当初はアラームしきい値を超えたり超えなかったりといった不安定な状態が継続する。そのため、一端アラームしきい値を超えたとしても、その後何回目かの判定処理においては、アラームしきい値を超えていないと判定される場合も想定される。このような場合(ステップ1702NO)、ひとたびアラーム出力がON状態となっていると(ステップ1703NO)、リセット入力が入ったかどうかの判定が行われる(ステップ1704)。ここで、リセット入力が入る迄の間は(ステップ1704NO)、尚もアラーム出力はON状態として維持される(ステップ1706)。これに対して、リセット入力が入ったかの判定において(ステップ1704)。オペレータがキー操作を行って、リセット入力が入ったものと判定されると(ステップ1704YES)、アラーム出力OFF動作が実行されて(ステップ1705)、アラーム出力の内容は初めてOFF状態に復帰される。尚、リセット入力が入ったかどうかの判定処理(ステップ1704)に対応するリセット操作については、適宜にキー操作を採用すればよく、例えばこの例にあっては、図1及び図2に示される第3の操作ボタン109のON操作をこれに対応させることができる。このようなON操作に対しては、例えば図6に示されるフローチャートにおいて、キー入力検知処理(ステップ603)及び入力キー対応処理(ステップ604)に適当な処理を組み込むことによってEEPROM210に設定したアラーム出力状態フラグをON状態からOFF状態にリセットすればよいのである。
【0142】
最後に、先に図9〜図11を参照して説明した3つの実施形態に対応する具体的な作用を説明する。
【0143】
図18には、連続判定回数を条件とする平均値対応・判定出力処理(図9参照)の作用説明図が示されている。同図(a)に示されるように、検出対象領域に対して投受光を繰り返し行うと、投光タイミングにおいてたまたま検出物体が存在すると、受光波形はアラームしきい値を瞬時超えることとなる。しかし、同図(a)に示されるように、このような検出物体に対応する受光波形の変動は、一般に、相連続する投光タイミングの各々において生ずることは稀であるから、仮に投光タイミングを3回に亘って連続的に受光波形がアラームしきい値を超えなければ、アラーム出力を発生しないものと設定すれば、同図(a)に示される検出物体の存在に起因するアラームしきい値を超える事態はカウント値が▲1▼となって、アラーム出力ONが発せられることはない。これに対して、同図(b)に示されるように、光学系に粉塵等が付着したり、投光素子が劣化したりして、受光波形がなだらかに継続的に低下する場合には、同図に▲1▼,▲2▼,▲3▼と示されるように、受光波形は3回以上に渡ってアラームしきい値を超えることとなるため、これに基づいて、アラーム出力ONを発生させるようにすれば、図(a)に示される誤った状態と同図(b)に示される正常な状態とを確実に識別し、信頼性の高いアラーム出力を生成することができる。
【0144】
次に、図19には、検出出力OFFを条件とする平均値対応・判定出力処理(図10参照)の作用説明図が示されている。同図に示されるように、ワークが存在する場合、投光タイミングにおいて受光波形は微分しきい値並びにアラームしきい値の双方を超えるが、アラームしきい値を超えている期間は必ず微分しきい値も超えているため、逆に微分しきい値を超えている期間については、アラームしきい値をマスクすることによって、誤ったアラーム出力の発生を確実に回避することができる。
【0145】
次に、図20には、ディレイタイマを有する平均値対応判定出力処理(図11参照)の作用説明図が示されている。同図から明らかなように、ワークが存在する場合、投光タイミングにおいて受光波形はアラームしきい値を超えることとなるが、その後ディレイタイマがタイムアップするまでの間マスキング処理を実行することによって、ワークが通過している間においては、受光波形が仮にアラームしきい値を超えたとしても無視されるから、これにより誤ったアラーム出力が発生されることを確実に回避することができる。
【0146】
以上説明したように、本発明の微分値対応型センサによれば、特徴量取得手段(投受光処理606)により取得される特徴量(受光量)の値が判定手段(ステップ702)における微分値判定に必要な許容範囲を外れたことを判定してその旨のアラーム動作を行うアラーム手段(ステップ802,803,804)を備えたものであるから、例えば光電センサに適用したような場合、光学系を構成するレンズや投受光素子に粉塵等が付着して光量が低下し、微分値対応判定処理が不安定になったような場合には、これを直ちに表示器(105,106)や信号線44を介して外部へ警告することによって、適切な対応を取ることが可能となるのである。
【0147】
尚、以上説明したアラームモードにおいては、移動平均値がアラームしきい値を超えるまで、表示器105,106には何の表示もなされないが、操作ボタン107,108,109の適宜な操作によって、2個の表示器105,106の何れかに、現在光量値のアラームしきい値に対する余裕度を表示可能とすれば、そのような定常的な光量低下が生じるに先立ち、表示器105,106上の光量余裕度を確認することによって、メンテナンス時期を適切に設定したり、製品の買い換え時期を考慮する等の便宜をユーザに与えることができるであろう。
【0148】
【発明の効果】
以上の説明で明らかなように、本発明の微分値対応型センサによれば、センサヘッドの汚れ、温度ドリフト、素子劣化等に起因して検出対象領域から定常的に得られる特徴量が徐々に減少して、微分値判定に必要な許容範囲を外れたときには、そのことを手動操作を通じて又は自動的に検知可能として、不安定な判定出力状態にあることをユーザに警告することができる。更に、本発明の微分値対応型の光電センサによれば、物体有無に起因する短期的な特徴量変化等に拘わらず、定常的に得られる特徴量が微分値判定に必要な許容範囲を外れたことを確実に検知することができる。そのため、この種の微分値対応型センサの欠点を補い、この種の微分値対応型センサの広く一般への普及に資するものである。
【図面の簡単な説明】
【図1】本発明の一実施形態における光電センサの上部カバーを開いた状態における外観斜視図である。
【図2】本発明の一実施形態である光電センサの操作・表示部の拡大図である。
【図3】本発明の一実施形態である光電センサの電気的ハードウェア構成の全体を示すブロック図である。
【図4】CPUで実行されるシステムプログラムの全体を概略的に示すゼネラルフローチャート(その1)である。
【図5】SETモード処理の内容を示すフローチャートである。
【図6】RUNモード処理の全体を示すフローチャート(その1)である。
【図7】微分値対応・判定出力処理の詳細を示すフローチャートである。
【図8】平均値対応・判定出力処理の詳細を示すフローチャート(その1)である。
【図9】平均値対応・判定出力処理の詳細を示すフローチャート(その2)である。
【図10】平均値対応・判定出力処理の詳細を示すフローチャート(その3)である。
【図11】平均値対応・判定出力処理の詳細を示すフローチャート(その4)である。
【図12】CPUで実行されるシステムプログラムの全体を概略的に示すゼネラルフローチャート(その2)である。
【図13】RUNモード処理の全体を示すフローチャート(その2)である。
【図14】RUNモード処理の全体を示すフローチャート(その3)である。
【図15】初期設定処理の詳細を示すフローチャートである。
【図16】微分しきい値に連動するアラームしきい値設定処理の詳細を示すフローチャートである。
【図17】平均値対応・判定出力処理の詳細を示すフローチャート(その5)である。
【図18】連続判定回数を条件とする平均値対応・判定出力処理の作用説明図である。
【図19】検出出力OFFを条件とする平均値対応・判定出力処理の作用説明図である。
【図20】ディレイタイマを有する平均値対応判定出力処理の作用説明図である。
【符号の説明】
1 光電センサ
2 投光用ファイバ
3 受光用ファイバ
4 電気コード
41 GND用芯線
42 Vcc用芯線
43 物体検出信号用芯線
44 アラーム信号用芯線
101 筐体
102 透明カバー
103 クランプレバー
104 DINレール嵌合溝
105 第1の表示器
106 第2の表示器
107 第1の操作ボタン
108 第2の操作ボタン
109 第3の操作ボタン
110 第1のスライド操作子
111 第2のスライド操作子
200 CPU
201 LED
202 投光回路
203 メイン受光PD
204 増幅回路
205 A/Dコンバータ
206 第1の出力回路
207 第2の出力回路
208 操作回路
209 表示駆動回路
210 EEPROM
211 発振子
212 電源回路
213 APC用受光PD
214 APC受光回路
215 CPUリセット回路
[0001]
BACKGROUND OF THE INVENTION
In the present invention, when a change occurs in the feature amount obtained from the detection target area, and the change (differential value) exceeds a predetermined threshold value, a so-called determination output indicating the presence / absence of an object is generated in the detection target area. The present invention relates to a differential value type sensor.
[0002]
[Prior art]
In general, in a photoelectric sensor, the presence / absence of an object in a predetermined region is determined by appropriately comparing the amount of received light sampled at a predetermined period or at an arbitrary timing with a preset threshold value of received light amount. Is going.
[0003]
The received light amount threshold value is, for example, the received light amount acquired in the object presence state (the operation level when the change to the object presence state is the main detection target) and the received light amount acquired in the object non-existing state ( The background level in the same case) is obtained in advance, and in consideration of the correlation between the two received light amounts, the user or the like sets an appropriate value (for example, an intermediate value between the two received light amounts) that is unlikely to cause a detection malfunction. Is set. As a determination method, a determination is made based on whether or not the received light amount exceeds the received light amount threshold value continuously several times, or a predetermined calculation is performed on the received light amount and then compared with the received light amount threshold value. There are various types of determinations based on the results of the determination (for example, see Patent Document 1).
[0004]
In general, in photoelectric sensors, the amplification factor of the internal circuit changes due to changes in external environmental conditions such as changes in ambient temperature and deterioration of noise generation, and changes in temperature inside the sensor. Regardless of the presence or absence, the amount of received light tends to fluctuate depending on the situation. Therefore, the user is forced to set the received light amount threshold to a value that is sufficiently different from the known background level so that detection that allows such fluctuations in received light amount is possible. Yes. This is one factor that hinders high accuracy of the detection resolution of the sensor.
[0005]
Such a defect becomes particularly noticeable in the case of detecting the presence or absence of a semi-transparent object such as glass or a minute object. That is, when the difference between the background level and the operation level is very small, the difference between the background level and the threshold level must be kept small accordingly. However, on the other hand, taking into account fluctuations in the amount of light received due to temperature changes, etc., it is necessary to ensure a sufficient difference between the background level and the threshold level as described above. Absent.
[0006]
In addition, the fluctuation of the signal level due to the influence of such an internal temperature change is not only a photoelectric sensor but also an ultrasonic sensor, a proximity sensor, a pressure sensor, a temperature sensor, a smoke detector (gas sensor), a pH sensor, etc. This is a problem commonly found in various sensors that detect the occurrence of an event based on a feature quantity correlated with the occurrence.
[0007]
Therefore, the applicant of the present application previously described in Japanese Patent Application No. 2001-277239, when a change has occurred in the feature amount obtained from the detection target area, if the change exceeds a threshold value, A so-called differential value type sensor that generates a determination output is proposed.
[0008]
According to such a differential value compatible sensor, it is possible to flexibly cope with fluctuations in feature values due to fluctuations in external environmental conditions and temperature changes inside the sensor, and an accurate detection operation is possible. Even when the difference from the operation level is very small, accurate detection is possible.
[0009]
[Patent Document 1]
JP-A-5-206821
[0010]
[Problems to be solved by the invention]
However, even in such a differential value compatible sensor, for example, when applied to a photoelectric sensor, if the absolute value of the received light quantity, which is a feature value, gradually decreases due to dust adhering to the optical system, etc., A problem has been found that the operation is still unstable.
[0011]
That is, for example, taking a transmission type photoelectric sensor as an example, and assuming that a workpiece output determination output is issued when the light amount value changes by 5%, if the light amount when there is no workpiece is “2000”, the determination is made. Since the 5% change is “100” (= 2000 × 0.05), the determination threshold value is set to “50” as a half thereof. In such a threshold setting state, when the light quantity value when there is no workpiece decreases to “1000” due to dust adhering to the optical system, the 5% change to be judged is “50” (= 1000 × 0.05). Therefore, it is difficult to perform a stable determination operation with the already set threshold value “50”. Needless to say, such a slow change in the light quantity value cannot be detected by the differential value sensor itself.
[0012]
The present invention has been made by paying attention to the above-mentioned problems, and the object of the present invention is a feature that is constantly obtained from the detection target region due to contamination of the sensor head, temperature drift, element deterioration, and the like. When the amount gradually decreases and falls outside the allowable range required for differential value judgment, this can be detected through manual operation or automatically, and a warning is given to the user that the judgment output state is unstable. It is an object of the present invention to provide a differential value compatible sensor that makes it possible.
[0013]
Another object of the present invention is to ensure that the feature quantity that is constantly obtained deviates from the allowable range necessary for the differential value determination, regardless of the short-term feature quantity change caused by the presence or absence of an object. An object of the present invention is to provide a differential value compatible sensor that can be detected.
[0014]
Still other objects and operational effects of the present invention should be easily understood by those skilled in the art by referring to the following description of the specification.
[0015]
[Means for Solving the Problems]
The differential value correspondence type sensor according to the present invention includes a feature amount acquisition unit that acquires a feature amount correlated with the presence or absence of an object from a detection target region, and a derivative that calculates a differential value of the feature amount acquired by the feature amount acquisition unit by calculation. Value calculating means, differential value determining means for determining whether or not an object is detected based on whether or not the differential value obtained by the differential value calculating means exceeds a predetermined differential threshold, and an object by the differential value determining means Output means for performing an output operation corresponding to a determination result indicating the presence or absence of detection.
[0016]
The “differential value” referred to here can be defined as, for example, “difference between the latest feature value and the feature value obtained so far” when the feature value is acquired by repeated sampling. . As the “feature amount obtained so far”, an average value of feature amounts for a certain past number of times, a feature amount obtained before a predetermined number of sampling times, or the like can be adopted.
[0017]
In the differential value correspondence type sensor of the present invention, in addition to the above-described configuration, the value of the feature value acquired from the feature value acquisition unit is outside the allowable range necessary for the differential value determination in the determination unit. It has an alarm means for judging that and performing an alarm operation to that effect.
[0018]
Here, the “allowable range required for the differential value determination in the determination means” is a value obtained by multiplying the background feature amount by the ratio of the differential threshold to the change amount of the feature amount due to the presence or absence of an object. Means. Needless to say, this value (allowable range) may be set to be narrower by a predetermined amount or a predetermined ratio in consideration of safety.
[0019]
Since the differential value correspondence type sensor of the present invention is configured as described above, first of all, it has a basic function and effect as a differential value correspondence type sensor. In other words, even if the fluctuation range of the feature amount due to the presence / absence of the object is small, the feature amount change accompanying the appearance of the detection target object is usually steep, so the differential value is compared with a predetermined differential threshold value. This makes it possible to reliably detect the target detection object. On the other hand, in the background state where the detection state does not exist, if the feature value changes slowly due to temperature drift or environmental change, the change rate is usually slow even if the fluctuation range is large. If compared with the differential threshold value, the differential threshold value is not exceeded, so that it is possible to reliably identify the detection target object and the background state and obtain a highly reliable detection signal.
[0020]
However, even with such a differential value-compatible sensor, if the value of the feature value in the background state decreases as it deviates from the allowable value, no matter how the differential value-compatible sensor, It is difficult to reliably detect the detection target object by the threshold value.
[0021]
However, in such a case, the differential value corresponding sensor of the present invention has the alarm means, so that the characteristic value in the background state fluctuates in long-term use, and the differential value in the determination means. If it falls outside the allowable range necessary for the determination, an alarm operation to that effect is performed, and the user is prompted to repair or replace.
[0022]
Therefore, according to the differential value correspondence type sensor of the present invention, it is possible to effectively detect a detection target having a small feature amount variation width in the presence / absence of detection, and in addition, a situation in which the operation condition of the sensor is impaired may occur. Accordingly, the user can be immediately notified of this, so that it is possible to prevent the possibility that the operation of the production line will be hindered while leaving the unstable detection state.
[0023]
In a preferred embodiment of the differential value correspondence type sensor of the present invention, as the alarm means, a sampling means for repeatedly sampling feature quantities acquired by the feature quantity acquisition means, and a series of samples sampled by the sampling means. Average value calculating means for calculating an average value of feature quantities of the image, average value determining means for determining whether the average value sequentially obtained by the average value calculating means exceeds a predetermined alarm threshold, and the average value It is conceivable to include output means for performing an output operation for an alarm at least on the condition that the determination means determines that the average value exceeds a predetermined threshold value.
[0024]
Here, as the “average value” obtained by the average value calculation means, an average value updated every certain time or every certain number of sampling times, a moving average value (in the case of repeatedly sampling feature values, the latest value) And an average value of a plurality of sampling values up to a predetermined number of sampling times) can be employed.
[0025]
According to such a configuration, an output operation for an alarm is performed based on a comparison of the average value of a series of repeatedly sampled feature values and a predetermined threshold value. Even if the value drops instantaneously, the average value does not fluctuate so much, so by appropriately setting the moving averaging time and the number of samples used for the moving averaging process, the instantaneous value of such features It is possible to prevent an erroneous alarm output operation from occurring due to a general change.
[0026]
In addition, in the calculation of the average value, if the moving averaging time or the number of samples for moving average is set appropriately, even if the feature amount fluctuates due to the passage of the detected object, the average value is somewhat small Since the fluctuation range can be maintained, according to such an appropriate setting of the moving average constant, even if the feature amount greatly fluctuates due to the actual passing of the detection target object, the fluctuation amount of the feature amount average value is reduced. By suppressing it, it is possible to reliably prevent the occurrence of an erroneous alarm output operation.
[0027]
At this time, various embodiments can be adopted as output means for performing an output operation for an alarm. In one embodiment, the output means is configured to perform an alarm output operation at least on the condition that it is determined that the successively obtained average value has continuously exceeded the alarm threshold value a predetermined number of times. can do.
[0028]
According to such an output means, even if the average value happens to exceed the alarm threshold value instantaneously, the output operation for the alarm is not performed unless it exceeds the predetermined number of times continuously. Even if it is not so large, the generation of an erroneous alarm output operation can be prevented in advance, and the degree of freedom in design in the moving averaging process can be improved.
[0029]
As another embodiment of the output means, when the determination result with the object detection is obtained by the differential value determination means, even if it is determined that the average value exceeds the alarm threshold value, It can be considered that an output operation for an alarm is not performed.
[0030]
According to such a configuration, when the average value changes due to the passage of the detection target object, the determination result with the object detection is also obtained by the differential value determination means at the same time. When a determination result with detection is obtained, even if it is determined that the average value exceeds the alarm threshold value, if an alarm output operation is not performed, an erroneous alarm output operation may be performed. Occurrence can be reliably prevented.
[0031]
As another embodiment of the output means, even if it is determined by the average value determination means that the alarm threshold value has been exceeded, an alarm is used until a certain delay timer expires. It can be considered that the output operation is not performed.
[0032]
According to such a configuration, in this type of differential value sensor, the period during which the determination result with object detection is obtained is the period during which the feature amount is changing rapidly, in other words, detection. Since it is the time immediately after the appearance of the target object, by setting the delay timer in advance for the period during which the detected object passes, the average value is the alarm value in the state where the detected object exists in the small detection area. Even if it is determined that the threshold value has been exceeded, an alarm output operation is not performed, so that an erroneous alarm output operation can be prevented from occurring due to fluctuations in the feature amount caused by the passage of an object. can do.
[0033]
In the differential value correspondence type sensor of the present invention, the operation of the alarm means, which is the main part of the present invention, may employ an appropriate operation timing so that an erroneous alarm operation does not occur as much as possible. preferable. From this point of view, several appropriate execution timings can be considered.
[0034]
As a preferred embodiment, the operation of the alarm means is configured to be executed at least on the condition that it is immediately after power-on.
[0035]
According to such a configuration, it is usual that an object does not exist in the detection target region immediately after power-on, and therefore, by adopting such timing immediately after power-on, the presence of a detected object Appropriate alarm determination can be performed without being affected by the fluctuation of the feature amount.
[0036]
In another preferred embodiment, the operation of the alarm means may be configured to be executed at least on the condition that the timing set by the predetermined timing setting means has arrived.
[0037]
According to such a configuration, the timing at which the object does not exist or the timing at which the operation time has elapsed is appropriately set in advance by a setting operation on the user side, and thereafter such timing is set by a timer or by a counter. By determining the arrival at the sensor side, the alarm determination can be executed at an appropriate timing at which an erroneous determination for an alarm is unlikely to occur.
[0038]
As another preferred embodiment, it is conceivable that the operation of the alarm means is executed at least on the condition that it is set to an on state by a predetermined on / off setting means.
[0039]
According to such a configuration, for example, in a state where articles flow on the production line and the sensor is in operation, the alarm determination process is inadvertently performed by setting the on / off setting unit to the off state. Thus, it is possible to prevent an erroneous alarm output operation from being performed, and to set the ON state by the ON / OFF setting means after the user confirms that no object is present in the detection target area. Thus, it is possible to select the appropriate timing and execute the alarm determination process with certainty.
[0040]
Next, various operations can be assumed as an output operation for an alarm. In a preferred embodiment, the alarm output operation of the alarm means is an operation of sending an alarm output signal to a predetermined output signal line different from the object detection output signal line. It is conceivable to configure.
[0041]
According to such a configuration, the detection signal can be received from the predetermined output signal line different from the detection signal while receiving the detection signal from the output signal line for detecting the object. At the same time, it can inform the PLC, PC, etc. that the feature value acquired by the feature value acquisition unit is outside the allowable range required for the differential value determination by the differential value determination unit, and can respond immediately to sensor abnormalities. It is possible to execute the backup processing and the like.
[0042]
That is, if the same output signal line is switched to extract the output signal for object detection and the output signal for alarm, either process is sacrificed. Since the sensor can be communicated to the PLC, PC, etc., as necessary, without sacrificing the detection function of the previous sensor, the sensor detection state is unstable. Thus, the necessary maintenance can be executed on the sensor in consideration of the operation convenience of the production line.
[0043]
In a preferred embodiment, it is conceivable that an output operation for an alarm in the alarm means is an operation for displaying an alarm on a predetermined display.
[0044]
According to such a configuration, once a situation occurs in the sensor in which the value of the feature quantity acquired by the feature quantity acquisition unit falls outside the allowable range necessary for the differential value determination in the determination unit, this is indicated to the sensor. Since it can be visually confirmed through a digital display, for example, it is possible for maintenance personnel and field workers to select the appropriate time and perform sensor maintenance and replacement appropriately based on this. it can.
[0045]
In the sensor of the present invention described above, it is most important to appropriately operate the alarm means. For this purpose, it is important to appropriately set a predetermined alarm threshold value to be compared with the average value sequentially obtained by the average value calculation means. The setting of the alarm threshold value can be performed manually or automatically.
[0046]
That is, in a preferred embodiment, it is conceivable to provide an alarm threshold value setting means capable of arbitrarily setting an alarm threshold value in the alarm means.
[0047]
According to such a configuration, since the alarm threshold value can be arbitrarily adjusted, the user can set the alarm threshold value in consideration of the relationship with the differential threshold value for original detection of the object. It can be set appropriately.
[0048]
In a preferred embodiment, it is conceivable to provide an alarm threshold value setting means for automatically setting the alarm threshold value in the alarm means based on a feature amount acquired immediately after power-on.
[0049]
According to such a configuration, in this type of sensor (e.g., a photoelectric sensor), the steady fluctuation of the feature amount may be confirmed in a long span such as every day or every few weeks. If it is configured so that an alarm judgment is automatically made every time the power is turned on, this type of feature abnormality judgment can be executed without making the operator or maintenance staff aware of this, making it easy to use. It will be something.
[0050]
In a preferred embodiment, it is conceivable to provide a threshold value setting means for automatically setting the alarm threshold value in the alarm means in conjunction with the differential threshold value setting operation.
[0051]
That is, as described above, the alarm threshold value corresponds to “a value obtained by multiplying the background feature value by the ratio of the differential threshold value to the change amount of the feature value according to the presence / absence of an object” ( The alarm threshold is automatically set in conjunction with the differential threshold setting operation because the differential threshold and the alarm threshold are correlated with each other in the specific detection target area and detection target object). By doing so, it is possible to automatically set an appropriate alarm threshold value without making the user aware of it, and it becomes easy to use.
[0052]
As described above, the alarm unit performs an alarm output operation when an alarm output signal is transmitted and when an alarm is displayed on a predetermined display. In view of the nature of the matter, these output operations are preferably held until a predetermined reset operation is performed. In other words, when such a binary signal for alarm or alarm output display is performed, an appropriate response cannot be taken immediately unless a field worker or maintenance staff is present at the site. It is preferable to ensure that the operation is continuously maintained to allow time for site workers and maintenance personnel to notice it. On the other hand, even if an abnormal state to be alarmed has occurred, it is preferable that after confirming that, such an output signal and output display can be reset by performing a predetermined reset operation. I will.
[0053]
What has been described above is the situation after the feature amount has actually fluctuated greatly and its value has deviated from the allowable range required for the differential value determination in the determination means. In the sensor of the present invention, Even before such an abnormal state occurs, it may be preferable that a margin with respect to the alarm threshold value of the current feature amount is displayed on a predetermined display according to a predetermined operation. .
[0054]
As described above, the differential value compatible sensor of the present invention has a basic operation of determining whether or not an object is detected based on whether or not the differential value obtained by the differential value calculation means exceeds a predetermined differential threshold value. In addition, when the value of the feature amount acquired by the feature amount acquisition unit is out of the allowable range necessary for the differential value determination in the determination unit, this is immediately notified to the on-site worker, maintenance worker, PLC, PC, etc. This makes it possible to communicate to a higher-order model, and this improves the reliability or usability of this type of differential value sensor.
[0055]
DETAILED DESCRIPTION OF THE INVENTION
In the following, a preferred embodiment of the differential value sensor of the present invention will be described in detail with reference to the accompanying drawings. Needless to say, the embodiment described below is merely an example of the differential value-compatible sensor according to the present invention, and the technical scope of the sensor of the present invention is limited only by the claims. It is specified.
[0056]
In particular, in the embodiment shown below, the present invention is applied to a fiber photoelectric sensor, but the scope of application of the sensor of the present invention is not limited to this, and other than the fiber photoelectric sensor. In addition to normal photoelectric sensors, ultrasonic sensors, proximity sensors, pressure sensors, temperature sensors, smoke detectors (gas sensors), pH sensors, etc., detect the presence / absence of an event based on the feature quantity correlated with the occurrence of the event. The present invention can also be applied to various sensors.
[0057]
FIG. 1 shows an external perspective view of the photoelectric sensor according to an embodiment of the present invention with the upper cover opened. As shown in the figure, the photoelectric sensor 1 has a multi-pack type plastic housing 101. The light projecting fiber 2 and the light receiving fiber 3 are inserted into the front portion of the housing 101 and are fixed to be detached by operating the clamp lever 103. The electric cord 4 is drawn out from the rear part of the casing 101. The illustrated electric cord 4 includes a GND core wire 41, a power source Vcc core wire 42, a detection output core wire 43 relating to an object, and an alarm output core wire 44 newly provided in the present invention.
[0058]
The casing 101 is fixed to a mounting surface such as a control panel via a DIN rail (not shown). What is indicated by reference numeral 104 is a DIN rail fitting groove. A transparent upper cover 102 is attached to the top of the housing 101 so as to be openable and closable. A first display (main digital display) 105, a second display (sub-digital display) 106, and a first operation are provided on the upper surface of the housing 101 exposed with the upper cover 102 opened. A button (UP) 107, a second operation button (DOWN) 108, a third operation button (MODE) 109, a first slide operator (SET / RUN) 110, and a second slide operator ( L / D) 111.
[0059]
An enlarged view of the operation / display unit of the photoelectric sensor of the present invention is shown in FIG. As will be apparent with reference to FIGS. 1 and 2, each of the first display 105 and the second display 106 is composed of a 4-digit 7-segment digital display, Further, alphabets and combinations thereof can be arbitrarily displayed. The first operation button 107, the second operation button 108, and the third operation button 109 all constitute a momentary type push button switch. As shown in FIG. 2, the first operation button Reference numeral 107 denotes an “UP key”, the second operation button 108 functions as a “DOWN key”, and the third operation button 109 functions as a “MODE key”. Each of the first slide operator 110 and the second slide operator 111 constitutes a slide switch. As shown in FIG. 2, the first slide operator 110 is a “SET / RUN switching switch”. As described above, the second slide operator 111 is configured to function as an “L / D switch”.
[0060]
Returning to FIG. 1, although not shown in FIG. 1, a light emitting element for detecting an object and a light receiving element for detecting an object are built in the housing 101. When the light projecting fiber 2 is firmly inserted into the fiber insertion hole, the end face of the light projecting fiber 2 and the light emitting portion of the light emitting element for detection are firmly coupled to each other. Then, the light is projected from a fiber head (not shown) at the tip thereof to the detection region via the light projecting fiber 2. Similarly, when the light-receiving fiber 3 is firmly inserted into the fiber insertion hole, the end face of the light-receiving fiber 3 and the light-receiving element for detection are optically coupled, and thereby introduced into the fiber from the fiber head of the light-receiving fiber 3 (not shown). The emitted light is guided by the light receiving fiber 3 and reaches the light receiving element for detection. The arrangement of the light emitting element for detection and the light receiving element for detection described above is the same as that employed in the conventional fiber type photoelectric switch of this type.
[0061]
Next, FIG. 3 shows a block diagram showing the entire electrical hardware configuration of the photoelectric sensor according to the embodiment of the present invention. As shown in the figure, this circuit is configured around a control unit (CPU) 200 mainly composed of a microprocessor. In addition to the microprocessor, the CPU 200 incorporates a ROM storing a system program, a working RAM necessary for executing the program, and the like. Such a specific configuration of the CPU 200 is well known in various documents, and thus detailed description thereof will be omitted.
[0062]
In the leftmost part of the figure, the light projecting unit having the light emitting element and the light receiving unit having the light receiving element described above are shown. The light projecting unit includes a light emitting diode (hereinafter referred to as an LED) 201 that is a light emitting element for detection, and a light projecting circuit 202 for driving the LED 201. On the other hand, in the light receiving section, a main light receiving photodiode (hereinafter referred to as PD) 203 which is a light receiving element for detection, an amplifier circuit 204 for amplifying the output of the main light receiving PD 203, and an amplified output of the amplifier circuit 204 are received. An A / D converter 205 for A / D conversion and loading into the CPU 200 is included.
[0063]
Then, the pulsed light generated from the LED 201 which is a light emitting element for detection by the action of the light projecting circuit 202 is guided to the detection region via the light projecting fiber 2. The light introduced into the light receiving fiber 3 by being transmitted or reflected in the detection region reaches the main light receiving PD 203 that is a light receiving element for detection via the light receiving fiber 3. An output signal generated by photoelectric conversion by the main light receiving PD 203 is amplified by the amplifier circuit 204 and then taken into the CPU 200 via the A / D converter 205. In addition, since the basic structure of these light projection / reception is also well-known in various literature, the detailed description about this point is abbreviate | omitted.
[0064]
In the upper part of FIG. 3, several components constituting the display unit are shown. In other words, the display unit drives the first display 105 that functions as a main digital display, the second display 106 that functions as a sub-digital display, and the two displays 105 and 106. A display drive circuit 209. In addition, as will be described in detail later, various information related to the alarm operation of the present invention is displayed on the first and second indicators 105 and 106 by numerical values, alphabets, combinations thereof, and the like.
[0065]
In the upper right of FIG. 3, several components that constitute the input unit are shown. That is, the input unit includes a first operation button 107 functioning as an UP button, a second operation button 108 functioning as a DOWN button, a third operation button 109 functioning as a MODE button, and these operation buttons. Corresponding to operations 107 to 109, an operation circuit 208 that performs encoding processing is included. These operation buttons 107 to 109 are used for the operator to input various data by manual operation.
[0066]
In FIG. 3, some components constituting the output unit are shown at the right end. That is, the output unit includes a first output circuit 206 and a second output circuit 207. That is, the detection signal for object detection generated by the CPU 200 is sent to the core wire 43 in the electric cord 4 via the first output circuit 206. Similarly, the alarm signal generated by the CPU 200 is sent to the core wire 44 included in the electric cord 4 via the second output circuit 207. The core wires 43 and 44 included in these electric cords 4 are generally connected to a host device such as a PLC or a PC.
[0067]
The power supply circuit 212 includes a power supply stabilization device for supplying direct current power to the CPU 200 and other circuit elements shown in FIG. This is done via included cores 41 and 42. In this example, the core wire 41 is connected to GND, and the core wire 42 is connected to the power source Vcc.
[0068]
Reference numeral 210 is an EEPROM for storing various data set on the manufacturer side before shipment or on the user side after shipment, 211 is a crystal oscillator for generating an operation reference clock for the CPU 200, and 213 is an APC. A light receiving PD, 214 is an APC light receiving circuit, and 215 is a CPU reset circuit for resetting the CPU when the power is turned on.
[0069]
Next, on the premise of the mechanical configuration and the electrical hardware configuration described above, various functions provided in the photoelectric sensor and the configuration of a system program executed by the CPU 200 to realize them will be described.
[0070]
This photoelectric sensor has a plurality of functions that can be selectively executed (ON / OFF). Various options are available for each of these functions. Selection of these functions (ON / OFF) and selection of options can be performed by setting the photoelectric sensor to the SET mode. The operation of realizing the function set to ON according to a specific option can be performed by setting the photoelectric sensor to the RUN mode. Whether the operation mode is the SET mode or the RUN mode is specified depending on whether the first slide operator 110 is set to the “SET” side or the “RUN” side, as shown in FIG. be able to. Incidentally, the second slide operator 111 is for setting the logical polarity of the detection output signal of the photoelectric sensor. When the second slide operator 111 is set to the “L” side, a so-called light-on mode is set. When the “D” side is set, the dark on mode is set.
[0071]
FIG. 4 shows a general flowchart schematically showing the entire system program executed by the CPU. Execution of this system program is started by turning on the power.
[0072]
In the figure, when the process is started, an initial setting process (step 401) is first executed. In this initial setting process (step 401), various initial setting processes necessary before starting a routine process to be described later are executed. In the initial setting process, various memories, indicator lamps, control outputs are initialized, necessary items are read from the EEPROM 210, data is checked, and the like.
[0073]
When the execution of the initial setting process (step 401) is completed, the routine shifts to a routine process. First, the setting state of the first slide operator 110 is first referred to (step 402). If the first slide operator 110 is set to the “SET” side (step 402 SET), then the SET mode initial setting process (step 403) is executed. In the SET mode initial setting process (step 403), initialization of the SET mode setting value, initialization of the device function number F (F = 0), and the like are performed.
[0074]
When the execution of the SET mode initial setting process (step 403) is completed, as long as the first slide operator 110 is set to the “SET” side (step 405 YES), the SET for various functions (F) is performed. Mode processing (step 404) is executed. In this state, by appropriately operating the first operation button 107, the second operation button 108, and the third operation button 109, the user turns on various functions (F) prepared for the photoelectric sensor. / OFF setting, and further, individual setting processing for each function (F) can be executed.
[0075]
On the other hand, as a result of referring to the setting state of the first slide operator 110, if it is determined that the setting is set to the “RUN” side (step 402RUN), then the RUN mode initial setting process (step 406) is executed. The In this RUN mode initial setting process (step 406), initialization of indicator lamps, control output, threshold values and various RUN mode setting values, and the like are performed.
[0076]
When the RUN mode initial setting process (step 406) is completed, the RUN mode process (step 407) is executed as long as the first slide operator 110 is set to the “RUN” side (YES in step 408). In the RUN mode process (step 407), various functions selectively set by the user are realized in addition to the basic operation necessary for the photoelectric sensor. The specific contents of the RUN mode process will be described later in detail as necessary.
[0077]
As described above, the system program executed by the CPU 200 is an initial setting process (step 401) that is an initial process performed immediately after power-on, and two processes that are routine processes, that is, a SET mode process (step 404). ) And RUN mode processing (step 407). The execution of the alarm mode, which is the main part of the present invention, is mainly performed in the RUN mode processing (step 407), and various function settings in the alarm mode are mainly performed in the SET mode processing (step 404). As will be described later in detail, various processes related to the alarm mode of the present invention are also executed in the initial setting process (step 401).
[0078]
A flowchart showing the entire SET mode processing is shown in FIG. When the process is started in the figure, first, a function-specific display process (step 501) is executed. In this function-specific display process (step 501), various display processes corresponding to the function number F are executed.
[0079]
Subsequently, a key input detection process is executed (step 502), and it is in a state of waiting for the presence or absence of a key input operation on the operation buttons 107 to 109 and the slide operators 110 and 111 shown in FIGS. 1 and 2 (NO in step 503). ).
[0080]
In this state, when it is determined that there is a key input (YES in step 503) and a key input sequence corresponding to function switching is confirmed (YES in step 504), the value of the function number F is calculated every time a function switching command is confirmed. The number is incremented by +1 until the total number of functions is reached (NO in steps 505 and 506), the total number of functions is reached (YES in step 506), zero reset is performed again (step 507), and cyclic switching of the function (F) is executed.
[0081]
In this state, when an execution related to the function F set at that time is instructed (NO in steps 504 and 508), an execution process for each function is executed, and a process corresponding to the function number F is performed (step 509).
[0082]
In the alarm mode according to the present invention, in this function-specific execution process (step 509), (1) the alarm mode is set to be executed (ON) or not to be executed (OFF), and (2) the alarm mode is set to (1) power supply. The timing immediately after the input, (2) the set timing, (3) the timing for each differential judgment, (3) either manually set as the alarm threshold or automatically set Setting of which one to use, (4) When using the automatically set alarm threshold, use the one set based on the feature value acquired immediately after power-on, Alternatively, settings are made such as whether to use automatically set in conjunction with the differential threshold setting operation. Note that these setting processes will be described later in detail if necessary.
[0083]
The alarm mode (ON / OFF) setting set here is referred to in the execution flag state reference process (step 1408) shown in FIG. 14, as will be described in detail later. Similarly, the alarm threshold value (setting ratio = A%) set in the SET mode is referred to in the alarm threshold value calculation process (step 1502) as shown in FIG. In addition, when the alarm threshold is automatically set in conjunction with the differential threshold, the threshold automatic setting process shown in FIG. 16 is executed.
[0084]
Returning to the flowchart of FIG. 5, if it is not a function switching command (NO in step 504) and it is determined that neither function is executed (NO in step 508), the process ends and the above operations are repeatedly executed ( Steps 501 to 508).
[0085]
Next, returning to FIG. 4, the processing in the RUN mode will be described. Prior to the transition to the RUN mode, the RUN mode initial setting process is first executed (step 406). In this RUN mode initial setting process (step 406), depending on whether the alarm threshold is set manually or automatically set in the SET mode process (step 404) described above, 15 or the process shown in FIG. 16 is executed to set the alarm threshold value.
[0086]
That is, when it is set to use a manually set alarm threshold value, for example, when the set value is given as a setting ratio (= A%), first, as shown in the flowchart of FIG. Is executed (step 1501), and the amount of received light is sampled. Then, the setting ratio (= A%) set in the previous manual setting process (step 1503) is read from the EEPROM 206, and an alarm is generated according to the following equation. A threshold determination is made.
[0087]
Alarm threshold = obtained received light amount × A% Formula 1
[0088]
As described above, in the flowchart of FIG. 4, if a predetermined operation is performed in the SET mode process (step 404) and a setting ratio (= A%) corresponding to the alarm threshold is set, the RUN mode initial setting process ( In step 406), an alarm threshold value is set (step 1502) based on the set content (step 1503).
[0089]
When it is determined that the alarm threshold value is automatically set by a predetermined operation in the SET mode process (step 404) shown in FIG. 4, in an input key corresponding process (step 604) described later with reference to FIG. The alarm threshold value setting process linked to the differential threshold value shown in FIG. 16 is executed, and the alarm threshold value is automatically determined according to the input differential threshold value.
[0090]
That is, when the process is started in the flowchart of FIG. 16, the user first waits for manually setting the differential threshold value (x) (step 1601), and the received light amount at the time of setting (no workpiece) (y) Is sampled (step 1602). Thereafter, the differential detection change rate (z) (= x × n / y) is obtained based on the differential threshold value (x), the received light amount (y) at the time of setting, and the margin (n) with respect to the differential threshold value. (Step 1603). Then, the alarm threshold value (x / z) is obtained using the differential threshold value (x) manually set by the user and the differential detection change rate (z) obtained by calculation. Thereafter, determination processing for alarm output is executed based on the alarm threshold value (x / z) thus obtained.
[0091]
Returning to FIG. 4, when the RUN mode initial setting process (step 406) is completed, the RUN mode process (step 407) is performed as long as the first slide operator 110 is set to the (RUN) side thereafter (step 408 YES). ) Is repeatedly executed.
[0092]
FIG. 6 shows a flowchart showing the entire RUN mode process (step 407). As shown in the figure, the entire RUN mode processing is roughly divided into normal processing (steps 601 to 605) and interrupt processing (steps 606 to 608). The interrupt process (steps 606 to 608) is executed by timer interrupt every time Tsec (for example, every 100 μsec).
[0093]
First, normal processing (steps 601 to 605) will be described. When the process is started, an indicator light control process (step 601) is executed. In this indicator lamp control process (step 601), lighting control of the first and second indicators 105 and 106, which are 7-segment digital indicators, is performed according to the designated display contents.
[0094]
Subsequently, an auto power control (hereinafter referred to as APC) process (step 602) is executed. In this APC process (step 602), the monitor received light amount acquired in the measurement light projecting / receiving process (step 606) described later is monitored, and APC correction is performed at regular intervals. In this example, the APC correction is performed by power control of the projection current.
[0095]
Subsequently, key input detection processing (step 603) is executed. In this key input detection process (step 603), a key input is detected every fixed period, and when an input is detected, a setting is made so that the corresponding process can be executed. Subsequently, a key input handling process (step 604) is executed, and various processes corresponding to the detected key input are executed.
[0096]
In the alarm mode which is the main part of the present invention, in this key input detection process (step 603), the reset input for resetting the alarm signal is detected, and when the reset input is detected here, In the subsequent input key handling process (step 604), the reset process is executed, and the content of the alarm signal is reset from the ON state to the OFF state. In this example, when it is determined that the light amount value acquired in the light projecting / receiving process (step 606) is outside the allowable range necessary for the differential value determination in the differential value correspondence determination output process (step 607), An alarm signal to that effect is output to the core wire 44 included in the electric cord via the second output circuit 207. At this time, the output signal is held in the ON state. Therefore, in order to reset the alarm signal in the ON state to the OFF state, the key input detection process (step 603) and the input key handling process (step 604) function. As a result, the key input detection process (step 603) and the input key handling process (step 604) are appropriately executed. As a result, the alarm signal held in the ON state is one of the operation buttons 107, 108, 109. The operation is reset to the OFF state.
[0097]
Next, interrupt processing executed every time Tsec will be described. When the interruption process is started, a light projecting / receiving process (step 606) is first executed. In this light projecting / receiving process (step 606), the LED 201 shown in FIG. 3 is pulse-driven through the light projecting circuit 202 to generate visible light or infrared light, which is projected through the light projecting fiber 2. The light is guided to a head (not shown) and emitted from the light projection head to the detection target region. At the same time, the light reflected or transmitted in the detection target region is introduced into the light receiving fiber 3 from the light receiving head provided at the tip of the light receiving fiber 3, and this is passed through the light receiving fiber 3 to the main light receiving PD 203. The signal obtained by photoelectric conversion by the main light receiving PD 203 is amplified by the amplifier circuit 204 and then taken into the CPU 200 via the A / D converter 205. Thereby, the received light amount data including the feature amount corresponding to the state of the detection target region is acquired.
[0098]
Subsequently, a differential value correspondence determination output process (step 607) is executed. In the differential value correspondence determination output process (step 607), the differential value of the received light amount acquired in the light projecting / receiving process (step 606) is obtained by calculation, and the obtained differential value exceeds a predetermined differential threshold value. The presence / absence of object detection is determined based on whether or not the object is detected, and an output operation corresponding to the determination result is performed.
[0099]
FIG. 7 shows a flowchart showing details of the differential value correspondence / determination output process. When the process is started in the figure, a differential value calculation process (step 701) is first executed. In this differential value calculation process (step 701), the received light amount data sequentially obtained through the light projection / reception process 8 step 606) is repeatedly sampled, and a moving average value of a series of sampled feature values is obtained. A differential value is generated by calculating a difference between the obtained moving average value and the amount of received light obtained from the latest sample. That is, the differential value calculation processing includes sampling means for repeatedly sampling the received light amount acquired by the light projecting / receiving process, moving average value calculating means for obtaining a moving average value of a series of received light amounts sampled by the sampling means, Difference calculating means for obtaining a difference between the moving average value thus obtained and the latest sample value is included. As a result, the value of the differential value obtained by the differential value calculation process is the difference between the average value of the received light amount for the past certain number and the latest received light amount, and corresponds to a so-called differential value (change). . In the moving average value processing used for the differential value calculation, various components such as removal of noise components and weighting from old to new ones are used to prevent chattering. A known noise removal method may be employed.
[0100]
In the subsequent determination process (step 702), the differential value thus obtained is compared with a preset differential threshold value. Here, if it is determined that the acquired differential value exceeds the set differential threshold (YES in step 702), the detection output indicating that the object has been detected is turned on, and the state is a signal. Output to line and display. On the other hand, if it is determined in the determination process (step 702) that the acquired differential value does not exceed the set differential threshold value (NO in step 702), the detection output indicating whether or not the object is detected is OFF. The state is output to the signal line and the display (step 704).
[0101]
Here, the output operation to the signal line means that the detection signal (ON / OFF) in the block diagram of FIG. 3 is sent to the core wire 43 included in the electric cord via the first output circuit 206. is there. Further, the output operation to the display means that the first display 105 or the second display 106 shown in FIG. 1 and FIG. 2 displays the presence / absence of object detection (for example, “ON” or "OFF").
[0102]
As described above, since the photoelectric sensor of the present invention has the differential value correspondence / determination output process, the received light amount that is sequentially acquired and sampled is converted into the differential value, and then the preset differential value is obtained. Compared with the threshold value, even if the amount of light received due to the presence or absence of the object is slight, the light intensity change rate when the target object appears in the detection area is large, so compare this with the differential threshold value By doing so, the target object can be reliably detected. In particular, when a transparent photoelectric sensor is used to detect a transparent object such as glass or plastic, the amount of received light due to the presence or absence of an object is considerably small, but nevertheless it is differentiated from the differential value. By intervening the comparison with the threshold value, it is possible to clearly distinguish between the case where the detection object actually appears and the case where the light reception amount fluctuates slowly due to the influence of drift or external light, and a highly reliable object A detection operation can be realized.
[0103]
Returning to FIG. 6, when the differential value correspondence / determination output process (step 607) is completed, the average value correspondence determination output process (step 608), which is the main part of the present invention, is subsequently executed. In the average value correspondence determination output process (step 608), the received light amount acquired by the light projecting / receiving process (step 606) is repeatedly sampled, and a moving average value of a series of sampled feature values is obtained and thus obtained. It is determined whether or not the moving average value exceeds a predetermined alarm threshold value, and an alarm output operation is performed at least on the condition that it is determined that the threshold value is exceeded.
[0104]
Details of the average value correspondence determination output process (step 608) are shown in FIG. In the figure, when the process is started, a moving average value calculation process (step 801) is first executed. In this moving average value calculation process (step 801), the received light amount acquired in the light projection / reception process (step 606) shown in FIG. 6 is repeatedly sampled, and the moving average value of a series of feature values obtained by this sample is obtained. Is obtained by calculation. As described above, of course, level discrimination processing for noise removal, weighting processing for increasing the importance as the light receiving amount approaches, may be adopted.
[0105]
In the subsequent determination process (step 802), by comparing the moving average value obtained in this way with a preset alarm threshold value, the value of the received light amount corresponds to the differential value shown in FIG. -It is determined whether or not the allowable range required for the differential value determination in the determination output process has been exceeded. That is, as described above, for example, assuming that a transmissive photoelectric sensor is used and a determination output for the presence or absence of a workpiece is issued when the light amount value changes by 5%, the light amount when there is no workpiece is “2000”. If there is, the 5% change to be determined is “100” (= 2000 × 0.05), so the determination threshold is set to “50” as half of that. In such a threshold setting state, if the light quantity value when there is no workpiece decreases to “1000” due to dust adhering to the optical system, the 5% change to be determined is “50” (= 1000 × 0.05). Therefore, it is difficult to perform a stable determination operation with the already set threshold value “50”. In the present invention, such an unstable determination state is determined in step 802 by comparing the moving average value with the alarm threshold value.
[0106]
If it is determined that the moving average value exceeds the alarm threshold value (YES in step 802), an alarm output ON operation is executed, and a predetermined output operation is performed on the signal line and the display. Is called. On the other hand, if it is determined that the moving average value does not exceed the set alarm threshold value (NO in step 802), an alarm output OFF operation is executed, and a predetermined value is applied to the signal line and the display. Is output (step 804).
[0107]
Note that the output operation for the signal line here refers to outputting an alarm output signal (ON / OFF) to the core wire 44 included in the electric cord via the second output circuit 207 in the block diagram of FIG. It means that. Further, the output operation to the display means a display corresponding to alarm ON or alarm OFF (“A on”, “OFF”) on any of the first and second displays 105 and 106 shown in FIG. 1 and FIG. "A off" etc.).
[0108]
As described above, according to the embodiment shown in FIGS. 7 and 8, since both the differential value correspondence determination output processing (step 607) and the average value correspondence determination output processing (step 608) are included, Even when a transparent type is used and a transparent body such as glass is detected, accurate detection can be performed due to the action of the differential value correspondence / determination output processing. On the other hand, if dust adheres to the light projecting / receiving optical system and the amount of received light deviates from the allowable range necessary for the differential value determination, the alarm output ON operation (step 803) is immediately performed by the action of the average value correspondence / determination output processing. ) Is transmitted to the PC or PLC or the like via the core wire 44 included in the electric cord 4, and at the same time, one of the first and second indicators 105 and 106 provided in the housing 101. Is displayed to the effect that the content of the received light amount is outside the allowable range necessary for the differential value determination, and this is indicated to the field worker or maintenance personnel via the indicators 105 and 106 based on this. This makes it possible to confirm immediately and take appropriate measures such as sensor repair or replacement.
[0109]
By the way, in the flowchart of FIG. 8 described above, the moving average value calculation process (step 801) is adopted. Therefore, even in the case where the value of the received light amount that is acquired fluctuates instantaneously, In the comparison process, the situation where the moving average value accidentally exceeds the alarm threshold is avoided to some extent, but the number of samples or moving average time used for the moving average value calculation process and the passing speed and size of the detected object are still used. Therefore, it is also assumed that the moving average varies considerably. In such a case, it is preferable to avoid the execution of the moving average value determination process in step 802 when the detection target object exists in the detection target region as much as possible.
[0110]
FIG. 9 shows a flowchart showing details of the average value correspondence / determination output process taking such points into consideration. In this embodiment, an output operation for an alarm is performed at least on the condition that it is determined that the moving average value sequentially obtained exceeds the alarm threshold value a predetermined number of times.
[0111]
That is, when the process is started in FIG. 9, the moving average value calculation process (step 901) is executed in the same manner as in the previous case. Thereafter, the moving average value thus obtained is compared with a preset alarm threshold value (step 902).
[0112]
Here, if it is determined that the value of the moving average value acquired in the moving average value calculation process (step 901) exceeds the set alarm threshold value (YES in step 902), In step 903, it is determined whether the alarm threshold value has been exceeded a predetermined number of times after the alarm threshold value has been exceeded.
[0113]
Here, when it is determined that the alarm threshold value has been exceeded for a certain number of times after the alarm threshold value has been exceeded for the first time (YES in step 903), the alarm output ON operation is executed, Similarly, a predetermined output operation is performed on the signal line and the display. On the other hand, even if the value of the moving average value acquired in the moving average value calculation process (step 901) exceeds the set alarm threshold value (step 902 YES), the alarm threshold value is set first. If the alarm threshold value has not been exceeded for a certain number of times after exceeding (NO in step 903), an alarm output OFF operation is executed, and a predetermined output operation is performed on the signal line and the display (step 905).
[0114]
Of course, if the moving average value does not exceed the set alarm threshold (NO in step 902), the alarm output OFF operation is executed in the same manner, and a predetermined output operation is performed for the signal line and the display. Is called.
[0115]
Thus, in the case of the embodiment shown in FIG. 9, even when it is determined that the acquired moving average value exceeds the set alarm threshold value (YES in step 902), As long as the alarm threshold is not exceeded for a certain number of times after first exceeding the alarm threshold (NO in step 903), the alarm output is turned off (step 905), and the alarm output is not turned on. . Therefore, if the number of consecutive determinations is appropriately set according to the speed or size of the object passing through the detection target area, the moving average value will be alarmed because the object actually exists in the detection target area. Even if a situation such as exceeding the value occurs, such a state is not determined more than the specified number of times (NO in step 903), so that the actual light reception is not disturbed by such instantaneous fluctuations in the amount of received light. It is possible to reliably determine a true alarm state in which the value of the light amount is steadily decreased (YES in step 903), and execute the alarm output ON operation.
[0116]
That is, in this embodiment, when a predetermined detection object passes through the detection target region, the amount of received light does not decrease over a certain period of time. The reduction in the amount of received light is based on the fact that dust is actually attached to the light projecting / receiving optical system, deterioration of the light projecting element, etc., and the execution of the alarm output operation is permitted.
[0117]
Next, when a determination result with object detection is obtained by the determination means, even if it is determined that the moving average value exceeds the alarm threshold value, an alarm output operation is not performed. An embodiment is shown in FIG.
[0118]
That is, when the process is started in the figure, the moving average value calculation process (step 1001) is executed as in the previous example, and the moving average value calculation process for the sample value of the received light amount acquired in step 606 is performed. Is executed (step 1004).
[0119]
Subsequently, the value of the moving average value thus obtained is compared with a preset alarm threshold value (step 1002). If it is determined that the acquired moving average value exceeds the alarm threshold value (YES in step 1002), the state of the detection output set in step 703 or 704 in the flowchart of FIG. Is referred to (step 1003).
[0120]
If it is determined that the detection output is OFF (step 1003 YES), an alarm output ON operation is executed, and a predetermined output operation is performed on the signal line and the display (step 1004). On the other hand, when it is determined that the detection output is in the ON state (NO in step 1003), an alarm output OFF operation is executed, and a predetermined output operation is performed on the signal line and the display (step 1005). . Here, the output operation to the signal line and the display is the same as described above.
[0121]
Thus, according to this embodiment, even when it is determined that the acquired moving average value exceeds the set alarm threshold value (YES in step 1002), the detection output is determined to be in the ON state. If this is done (NO in step 1003), the alarm output is turned off (step 1005). Can be prevented. That is, in this embodiment, attention is paid to the fact that the detection output is turned on when an object is present in the detection target region. Conversely, when the detection output is turned on, the moving average value and the alarm threshold value are set. By ignoring the magnitude judgment result, it is possible to prevent an alarm output from being accidentally generated due to an instantaneous drop in the moving average value due to an object passing through the detection target area. It is.
[0122]
Next, even if it is determined by the average value determination means that the moving average value has exceeded the alarm threshold value, an alarm output operation is not performed until a certain delay timer expires. This embodiment is shown in FIG.
[0123]
In the figure, when processing is started, moving average value calculation processing is executed in the same manner as in the previous example (step 1101). In the moving average value calculation process (step 1101), the moving average value calculation process is performed based on the sample value of the received light amount acquired in the light projection / reception process (step 606) shown in FIG.
[0124]
Here, if it is determined that the acquired moving average value exceeds the set alarm threshold value (step 1102 YES), then, on condition that the delay timer is not operating ( In step 1104, a predetermined delay timer is started (step 1105).
[0125]
Thereafter, in the next determination process, if it is determined that the moving average value still exceeds the alarm threshold value (step 1102 YES), on condition that the delay timer is operating (step 1104 YES), It is determined whether or not the delay timer has expired (step 1106), and the alarm output is turned off until the delay timer expires (NO in step 1106) (step 1107).
[0126]
In this state, if the state where the moving average value exceeds the alarm threshold value continues (YES in steps 1102 and 1104), the alarm output ON operation is executed when the delay timer expires (YES in step 1106) ( Step 1108), a predetermined output operation is performed on the signal line and the display.
[0127]
As described above, in this embodiment, even when a state in which the acquired moving average value exceeds the set alarm threshold value appears (YES in step 1102), the state is longer than the set time of the delay timer. Unless it continues (NO in step 1106), the alarm output will not be turned ON (step 1107), so if the maximum time for a normal detected object to pass through the detection area is set as the delay timer setting time Thus, it is possible to prevent the possibility that the variation in the amount of received light due to the passage of the object through the detection target region is erroneously recognized as a steady decrease in the light amount.
[0128]
That is, in this embodiment, when a normal detection object passes through the detection region, even if the amount of received light is reduced, the state does not continue for a certain period of time. It is intended to reliably distinguish between a momentary decrease in the amount of received light, a momentary decrease in the amount of received light due to dust adhering to the optical system, and a steady decrease in the amount of received light due to dust adhering to the optical system, etc. is there.
[0129]
In each of the embodiments described above, while detecting a workpiece using a sensor, in order not to cause a malfunction, a highly reliable alarm output is obtained. As a completely different idea, it is possible to avoid the occurrence of an erroneous alarm output operation by selecting a time when no detected object is present and executing the alarm mode.
[0130]
An embodiment based on such a concept is shown in FIG. As shown in the figure, in this embodiment, as a part of the initial setting process immediately after the power is turned on, the light emitting / receiving and the average value correspondence determination output process (step 1202) are executed, so that the detection target region is set. It is intended to avoid an erroneous generation of alarm output due to the presence of an object. Here, the light projection / reception and average value correspondence determination output processing (step 1202) is composed of the light projection / light reception processing (step 606) and the average value correspondence determination output processing (step 608) shown in FIG. The average value correspondence / determination output process shown in FIG. 8 is executed based on the amount of received light obtained by the process.
[0131]
According to such a configuration, in general, in general sensor applications, it is normal that a workpiece does not flow on the production line to be detected immediately after the power is turned on. In addition, it is possible to reliably avoid generation and output of an erroneous alarm output due to the presence of an object in the detection area.
[0132]
Next, in FIG. 13, only when the timing set in advance by the user has arrived, the average value correspondence determination output process is executed to avoid the generation of an erroneous alarm output due to the presence of the detected object. An example of this is shown.
[0133]
That is, when the interrupt process is started in the figure, the timing set by the user after the light projection / reception process (step 1306) and the differential value correspondence determination output process (step 1307) are executed in the same manner as described above. Is determined (step 1308). Here, if it is determined that the set timing has arrived (YES in step 1308), the average value correspondence determination output process (step 1309) is executed in the same manner as in the previous case, whereas the set timing must have arrived. If (step 1308 NO), the average value correspondence determination output process (step 1309) is skipped. For this reason, by setting a time when no object is present in the detection target area using a built-in timer or counter, or by taking a large execution interval and setting a low probability that the detected object exists as a whole, It is possible to avoid the occurrence of alarm output.
[0134]
Next, FIG. 14 shows an embodiment in which the alarm mode itself is selectively executed by setting the execution flag to ON or OFF in advance by the user.
[0135]
That is, when the interrupt process is started in FIG. 14, the light projecting / receiving process (step 1406) and the differential value correspondence determination output process (step 1407) are executed in the same manner as in the previous case. A state is determined (step 1408). Here, if it is determined that the execution flag is in the ON state (step 1408 ON), an average value correspondence determination output process (step 1409) is executed to monitor an abnormality in which the amount of received light is steadily decreasing. On the other hand, if the state of the execution flag is OFF (step 1408 OFF), the average value correspondence determination output process (step 1409) is skipped and the alarm mode is not adopted. Therefore, according to this embodiment, the user can select ON or OFF to execute the alarm mode. For example, the sensor has just been purchased or is new, or the detection environment is clean and the lens is worried. If it is necessary to do this, there is no need to execute this alarm mode, so that it is possible to avoid the possibility of an erroneous alarm output.
[0136]
Next, FIG. 15 schematically shows the relationship between the manual operation of the alarm threshold value and the system-side alarm threshold value setting associated therewith. As described above, the alarm threshold value can be set either manually or automatically. When manually setting the alarm threshold value, in this example, the alarm threshold value is set as a setting ratio (= A%) (step 1503). Then, at an appropriate timing such as initial setting processing (step 401), SET mode processing (step 404), and RUN mode processing (step 407), the set ratio (A%) with respect to the sampled received light amount (step 1501). Is applied (step 1502), and the alarm mode of the present invention is executed based on the alarm threshold thus obtained. The example of FIG. 15 corresponds to the initial setting process (step 401) immediately after the power is turned on, but such an alarm threshold value setting process itself is performed at any timing in the flowchart shown in FIG. Needless to say, it is feasible.
[0137]
Next, as described above, FIG. 16 shows an embodiment in which the alarm threshold is automatically set in conjunction with the differential threshold. That is, in this type of differential value type sensor, since a certain correlation is established between the differential threshold and the alarm threshold, the differential threshold input by the threshold setting operation is The alarm threshold value can be calculated and set by performing a predetermined calculation using it.
[0138]
That is, when the differential threshold value (a) is set (step 1601), the received light amount (no workpiece) (y) at the time of setting is sampled (step 1602), and thereafter, the differential detection change rate (z) is calculated (step). 1603) and finally, the alarm threshold value (x / z) is obtained using the differential threshold value (x) and the differential detection change rate (z). Thereafter, the alarm mode is executed based on the alarm threshold value (x / z) thus obtained.
[0139]
For example, if the differential threshold is “50” and the received light amount without work is “2000”, when the margin (n) with respect to the differential threshold is “2” (n = 2), the amount of change is “ 100 ”, and the amount of light received without a workpiece is“ 2000 ”, so the rate of change at which differential detection is possible is 50 × 2/2000 = 5%. Accordingly, the light reception level (alarm threshold value) that can be stably detected is obtained as 50 / 0.05 = 1000 because the change of 5% with respect to the light quantity without work must be “50” or more.
[0140]
Next, FIG. 17 shows an embodiment in which the output operation for alarm is held until a predetermined reset operation is performed. That is, when processing is started in the figure, after moving average value calculation processing (step 1701) is executed, the moving average value is compared with the set alarm threshold value (step 1702). If it is determined that the moving average value exceeds the alarm threshold value (YES in step 1702), an alarm output ON operation is executed, and a predetermined output operation is performed on the signal line and the display (step 1706).
[0141]
When dust or the like adheres to the optical system and the light intensity decreases, and eventually the moving average value of the light intensity exceeds the alarm threshold value, the unstable state continues at first or not exceeding the alarm threshold value. To do. For this reason, even if the alarm threshold value is exceeded, it may be assumed that it is determined that the alarm threshold value is not exceeded in the determination process several times thereafter. In such a case (NO in step 1702), once the alarm output is in the ON state (NO in step 1703), it is determined whether or not a reset input has been input (step 1704). Here, until the reset input is input (NO in step 1704), the alarm output is maintained in the ON state (step 1706). On the other hand, in determining whether a reset input has been received (step 1704). If it is determined that the operator has performed a key operation and a reset input has been entered (YES in step 1704), an alarm output OFF operation is executed (step 1705), and the content of the alarm output is returned to the OFF state for the first time. It should be noted that a key operation may be adopted as appropriate for the reset operation corresponding to the determination process (step 1704) of whether or not a reset input has been input. For example, in this example, the first operation shown in FIGS. The ON operation of the third operation button 109 can be made to correspond to this. For such an ON operation, for example, in the flowchart shown in FIG. 6, an alarm output set in the EEPROM 210 by incorporating appropriate processing into the key input detection processing (step 603) and the input key handling processing (step 604). The state flag may be reset from the ON state to the OFF state.
[0142]
Finally, specific actions corresponding to the three embodiments described above with reference to FIGS. 9 to 11 will be described.
[0143]
FIG. 18 is an operation explanatory diagram of the average value correspondence / determination output process (see FIG. 9) on the condition that the number of continuous determinations is a condition. As shown in FIG. 5A, when light projection / reception is repeatedly performed on the detection target region, if a detected object happens to be present at the light projection timing, the light reception waveform instantaneously exceeds the alarm threshold value. However, as shown in (a) of the figure, such fluctuations in the received light waveform corresponding to the detection object generally rarely occur at each of the successive light projection timings. If the received light waveform does not exceed the alarm threshold value continuously for three times and no alarm output is generated, the alarm threshold caused by the presence of the detected object shown in FIG. When the value exceeds the value, the count value becomes (1) and the alarm output ON is not issued. On the other hand, as shown in FIG. 5B, when the received light waveform gently decreases continuously due to dust or the like adhering to the optical system or deterioration of the light projecting element, As shown in (1), (2), and (3) in the figure, the received light waveform exceeds the alarm threshold value three times or more, so the alarm output is turned on based on this. By doing so, it is possible to reliably discriminate between the erroneous state shown in FIG. 1A and the normal state shown in FIG. 2B, and to generate a highly reliable alarm output.
[0144]
Next, FIG. 19 shows an operation explanatory diagram of the average value correspondence / determination output process (see FIG. 10) on condition that the detection output is OFF. As shown in the figure, when there is a workpiece, the received light waveform exceeds both the differential threshold and the alarm threshold at the light projection timing, but the differential threshold is always exceeded during the period exceeding the alarm threshold. Since the value is also exceeded, on the contrary, during the period when the differential threshold is exceeded, the generation of an erroneous alarm output can be surely avoided by masking the alarm threshold.
[0145]
Next, FIG. 20 shows an operation explanatory diagram of an average value correspondence determination output process (see FIG. 11) having a delay timer. As is clear from the figure, when there is a workpiece, the light reception waveform exceeds the alarm threshold at the light projection timing, but after that, by executing the masking process until the delay timer expires, While the workpiece is passing, even if the received light waveform exceeds the alarm threshold value, it is ignored, so that it is possible to reliably prevent an erroneous alarm output from being generated.
[0146]
As described above, according to the differential value correspondence type sensor of the present invention, the value of the feature amount (light reception amount) acquired by the feature amount acquisition unit (light projecting / receiving process 606) is the differential value in the determination unit (step 702). Since it is provided with alarm means (steps 802, 803, and 804) for determining that the allowable range necessary for the determination has been exceeded and performing an alarm operation to that effect, for example, when applied to a photoelectric sensor, optical When dust or the like adheres to the lenses and light emitting / receiving elements that make up the system and the light quantity decreases, and the differential value correspondence determination processing becomes unstable, this is immediately displayed on the display (105, 106) or signal. By giving a warning to the outside via the line 44, an appropriate response can be taken.
[0147]
In the alarm mode described above, nothing is displayed on the display units 105 and 106 until the moving average value exceeds the alarm threshold value, but by appropriate operation of the operation buttons 107, 108, and 109, If the margin of the current light amount value with respect to the alarm threshold value can be displayed on either of the two displays 105 and 106, the display on the displays 105 and 106 before such a steady decrease in light amount occurs. By confirming the light quantity margin, it is possible to give the user convenience such as appropriately setting the maintenance time and considering the replacement time of the product.
[0148]
【The invention's effect】
As is clear from the above description, according to the differential value-compatible sensor of the present invention, the characteristic amount that is constantly obtained from the detection target region due to contamination of the sensor head, temperature drift, element deterioration, and the like is gradually increased. When the value falls outside the allowable range necessary for the differential value determination, this can be detected through manual operation or automatically, and the user can be warned that the state is in an unstable determination output state. Furthermore, according to the differential value-compatible photoelectric sensor of the present invention, the feature value that is constantly obtained deviates from the allowable range necessary for the differential value determination, regardless of the short-term feature value change caused by the presence or absence of an object. This can be reliably detected. Therefore, it compensates for the disadvantages of this type of differential value sensor, and contributes to the widespread use of this type of differential value sensor.
[Brief description of the drawings]
FIG. 1 is an external perspective view of a photoelectric sensor according to an embodiment of the present invention with an upper cover opened.
FIG. 2 is an enlarged view of an operation / display unit of a photoelectric sensor according to an embodiment of the present invention.
FIG. 3 is a block diagram showing an overall electrical hardware configuration of a photoelectric sensor according to an embodiment of the present invention.
FIG. 4 is a general flowchart (part 1) schematically showing an entire system program executed by a CPU.
FIG. 5 is a flowchart showing the contents of SET mode processing.
FIG. 6 is a first flowchart illustrating the entire RUN mode process;
FIG. 7 is a flowchart showing details of differential value correspondence / determination output processing;
FIG. 8 is a flowchart (part 1) showing details of an average value correspondence / determination output process;
FIG. 9 is a flowchart (part 2) showing details of an average value handling / determination output process;
FIG. 10 is a flowchart (part 3) showing details of an average value correspondence / determination output process;
FIG. 11 is a flowchart (part 4) showing details of an average value handling / determination output process;
FIG. 12 is a general flowchart (part 2) schematically showing an entire system program executed by a CPU.
FIG. 13 is a flowchart (part 2) illustrating the entire RUN mode process;
FIG. 14 is a flowchart (part 3) illustrating the entire RUN mode process;
FIG. 15 is a flowchart showing details of initial setting processing;
FIG. 16 is a flowchart showing details of an alarm threshold setting process linked to a differential threshold.
FIG. 17 is a flowchart (part 5) showing details of the average value handling / determination output process;
FIG. 18 is an explanatory diagram of the operation of the average value correspondence / determination output process on condition of the number of continuous determinations.
FIG. 19 is an explanatory diagram of the operation of the average value correspondence / determination output process on condition that the detection output is OFF;
FIG. 20 is an operation explanatory diagram of an average value correspondence determination output process having a delay timer.
[Explanation of symbols]
1 Photoelectric sensor
2 Projection fiber
3 Receiving fiber
4 Electric cord
41 GND core wire
42 Vcc core wire
43 Core wire for object detection signal
44 Core wire for alarm signal
101 case
102 Transparent cover
103 Clamp lever
104 DIN rail fitting groove
105 First display
106 Second display
107 First operation button
108 Second operation button
109 Third operation button
110 First slide operator
111 Second slide operator
200 CPU
201 LED
202 Floodlight circuit
203 Main light receiving PD
204 Amplifier circuit
205 A / D converter
206 First output circuit
207 Second output circuit
208 Operation circuit
209 Display drive circuit
210 EEPROM
211 oscillator
212 Power supply circuit
213 Light receiving PD for APC
214 APC light receiving circuit
215 CPU reset circuit

Claims (9)

検出対象領域から物体有無と相関のある特徴量を取得する特徴量取得手段と、前記特徴量取得手段により取得された特徴量の微分値を演算により求める微分値演算手段と、前記微分値演算手段により求められた微分値が所定の微分しきい値を越えたか否かに基づいて物体検出有無を判定する微分値判定手段と、前記微分値判定手段による物体検出有無を示す判定結果に対応する出力動作を行う出力手段と、を有する微分値対応型センサであって、
前記センサには、前記特徴量取得手段より取得される特徴量の値が前記微分値判定手段における微分値判定に必要な許容範囲を外れたことを判定してその旨のアラーム動作を行うアラーム手段を有する、ことを特徴とする微分値対応型センサ。
Feature quantity acquisition means for acquiring a feature quantity correlated with the presence / absence of an object from the detection target area, differential value calculation means for calculating a differential value of the feature quantity acquired by the feature quantity acquisition means, and the differential value calculation means Differential value determination means for determining the presence or absence of object detection based on whether or not the differential value obtained by the above exceeds a predetermined differential threshold, and an output corresponding to a determination result indicating the presence or absence of object detection by the differential value determination means An output means for performing an operation, and a differential value-compatible sensor comprising:
The sensor includes an alarm means for determining that the value of the feature value acquired from the feature value acquisition means is out of an allowable range necessary for the differential value determination in the differential value determination means and performing an alarm operation to that effect A differential value correspondence type sensor characterized by comprising:
前記アラーム手段が、
前記特徴量取得手段により取得される特徴量を繰り返しサンプルするサンプリング手段と、
前記サンプリング手段によりサンプルされた一連の特徴量の平均値を求める平均値演算手段と、
前記平均値演算手段により逐次求められた平均値が所定のアラームしきい値を越えたか否かを判定する平均値判定手段と、
前記平均値判定手段により平均値が所定のしきい値を越えたと判定されたことを少なくとも条件としてアラームのための出力動作を行う出力手段と、を具備する、ことを特徴とする請求項1に記載の微分値対応型センサ。
The alarm means is
Sampling means for repeatedly sampling the feature quantity acquired by the feature quantity acquisition means;
An average value calculating means for obtaining an average value of a series of feature values sampled by the sampling means;
Average value determining means for determining whether the average value sequentially obtained by the average value calculating means exceeds a predetermined alarm threshold value;
2. An output means for performing an output operation for an alarm at least on the condition that the average value is determined by the average value determination means to have exceeded a predetermined threshold value. Described differential value compatible sensor.
前記出力手段は、前記逐次求められる平均値が前記アラームしきい値を連続して所定回数越えたと判定されることを少なくとも条件としてアラームのための出力動作を行う、ことを特徴とする請求項2に記載の微分値対応型センサ。The output means performs an alarm output operation at least on the condition that it is determined that the sequentially obtained average value exceeds the alarm threshold value continuously a predetermined number of times. Sensor for differential value as described in 1. 前記出力手段は、前記微分値判定手段により物体検出ありの判定結果が得られいるときには、前記平均値が前記アラームしきい値を越えたと判定されても、アラームのための出力動作を行わない、ことを特徴とする請求項2に記載の微分値対応型センサ。The output means does not perform an output operation for an alarm even when it is determined that the average value exceeds the alarm threshold value when a determination result with object detection is obtained by the differential value determination means. The differential value compatible sensor according to claim 2, wherein: 前記出力手段は、前記平均値判定手段により前記平均値が前記アラームしきい値を越えたと判定されても、一定のディレイタイマがタイムアップするまでの間は、アラームのための出力動作を行わない、ことを特徴とする請求項2に記載の微分値対応型センサ。The output means does not perform an alarm output operation until a certain delay timer times out even if the average value determination means determines that the average value exceeds the alarm threshold value. The differential value compatible sensor according to claim 2, wherein 前記アラーム手段の動作は、電源投入直後であることを少なくとも条件として実行される、ことを特徴とする請求項1に記載の微分値対応型センサ。2. The differential value-corresponding sensor according to claim 1, wherein the operation of the alarm means is executed at least on the condition that it is immediately after power-on. 前記アラーム手段におけるアラームしきい値を、電源投入直後に取得される特徴量に基づいて自動設定するアラームしきい値設定手段を有する、ことを特徴とする請求項1に記載の微分値対応型センサ。2. The differential value corresponding sensor according to claim 1, further comprising an alarm threshold value setting means for automatically setting an alarm threshold value in the alarm means based on a feature amount acquired immediately after power-on. . 前記アラーム手段におけるアラームしきい値を、微分しきい値設定操作に連動して自動設定するしきい値設定手段を有する、ことを特徴とする請求項1に記載の微分値対応型センサ。2. The differential value corresponding sensor according to claim 1, further comprising threshold value setting means for automatically setting an alarm threshold value in the alarm means in conjunction with a differential threshold value setting operation. 所定の操作に応じて、現在特徴量のアラームしきい値に対する余裕度を所定の表示器に表示させる特徴量余裕度表示手段をさらに含む、ことを特徴とする請求項1に記載の微分値対応型センサ。The differential value correspondence unit according to claim 1, further comprising a feature amount margin display means for displaying a margin of the current feature amount with respect to the alarm threshold value on a predetermined display in accordance with a predetermined operation. Type sensor.
JP2002262007A 2002-09-06 2002-09-06 Differential value type sensor Expired - Lifetime JP4231994B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002262007A JP4231994B2 (en) 2002-09-06 2002-09-06 Differential value type sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002262007A JP4231994B2 (en) 2002-09-06 2002-09-06 Differential value type sensor

Publications (2)

Publication Number Publication Date
JP2004101301A true JP2004101301A (en) 2004-04-02
JP4231994B2 JP4231994B2 (en) 2009-03-04

Family

ID=32262203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002262007A Expired - Lifetime JP4231994B2 (en) 2002-09-06 2002-09-06 Differential value type sensor

Country Status (1)

Country Link
JP (1) JP4231994B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007013557A (en) * 2005-06-30 2007-01-18 Sunx Ltd Photoelectric sensor
JP2007101188A (en) * 2005-09-30 2007-04-19 Sunx Ltd Detection sensor and sensor system
JP2007309917A (en) * 2006-04-19 2007-11-29 Sick Optex Kk Photoelectric sensor with automatic sensitivity correction
JP2008089386A (en) * 2006-09-29 2008-04-17 Sunx Ltd Detection sensor
JP2009300111A (en) * 2008-06-10 2009-12-24 Omron Corp Photoelectric sensor
JP2011173140A (en) * 2010-02-24 2011-09-08 Yamada Dobby Co Ltd Correction method for bottom dead center position of press and press apparatus
JP2012083195A (en) * 2010-10-12 2012-04-26 Yamatake Corp Photoelectric sensor
US20210287051A1 (en) * 2020-03-11 2021-09-16 Research & Business Foundation Sungkyunkwan University Methods and systems for recognizing object using machine learning model

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007013557A (en) * 2005-06-30 2007-01-18 Sunx Ltd Photoelectric sensor
JP2007101188A (en) * 2005-09-30 2007-04-19 Sunx Ltd Detection sensor and sensor system
JP4559334B2 (en) * 2005-09-30 2010-10-06 サンクス株式会社 Detection sensor and sensor system
JP2007309917A (en) * 2006-04-19 2007-11-29 Sick Optex Kk Photoelectric sensor with automatic sensitivity correction
JP2008089386A (en) * 2006-09-29 2008-04-17 Sunx Ltd Detection sensor
JP2009300111A (en) * 2008-06-10 2009-12-24 Omron Corp Photoelectric sensor
JP2011173140A (en) * 2010-02-24 2011-09-08 Yamada Dobby Co Ltd Correction method for bottom dead center position of press and press apparatus
JP2012083195A (en) * 2010-10-12 2012-04-26 Yamatake Corp Photoelectric sensor
US20210287051A1 (en) * 2020-03-11 2021-09-16 Research & Business Foundation Sungkyunkwan University Methods and systems for recognizing object using machine learning model
US11620360B2 (en) * 2020-03-11 2023-04-04 Research & Business Foundation Sungkyunkwan University Methods and systems for recognizing object using machine learning model

Also Published As

Publication number Publication date
JP4231994B2 (en) 2009-03-04

Similar Documents

Publication Publication Date Title
JP3669352B2 (en) Photoelectric sensor
JP4231994B2 (en) Differential value type sensor
US20120032812A1 (en) Multiple optical axis photoelectric sensor
AU2010202665B2 (en) Circuitry to monitor and control source of radiant energy in smoke detector
WO2012081265A1 (en) Multi-axis photoelectric sensor
JP2008298614A (en) Sensor
JP6020033B2 (en) Photoelectric sensor
JP4009838B2 (en) Photoelectric sensor
US11169301B2 (en) Determination device, multiple optical-axis photoelectric sensor, determination device control method, information processing program, and recording medium
JP2008089386A (en) Detection sensor
JP5139049B2 (en) Photoelectric sensor
JP4103111B2 (en) Photoelectric sensor device
JP4702871B2 (en) Fire alarm system
JP3945756B2 (en) Fire detector
JP4855623B2 (en) Sensor
JP4281866B2 (en) Fire alarm equipment and fire detector
KR20160000602U (en) Boiler flame monitoring system
JP5322884B2 (en) Alarm
KR970003523B1 (en) Method and apparatus for detecting the defect of laser diode
JP4323360B2 (en) Status information acquisition system for fire detectors
JP5152397B1 (en) PHOTOELECTRIC SENSOR AND METHOD FOR SUPPORTING WORK CHECKING LIGHT EMITTING STATUS OF PHOTOELECTRIC SENSOR
JP2006238189A (en) Photoelectric switch
JP2007102260A (en) Alarm
JP5124622B2 (en) Fire detectors and fire alarm equipment
JP2000013210A (en) Electronic equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050527

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080723

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080918

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: 20081112

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081125

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4231994

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131219

Year of fee payment: 5

EXPY Cancellation because of completion of term