[go: up one dir, main page]

JP4107254B2 - Object detector - Google Patents

Object detector Download PDF

Info

Publication number
JP4107254B2
JP4107254B2 JP2004073483A JP2004073483A JP4107254B2 JP 4107254 B2 JP4107254 B2 JP 4107254B2 JP 2004073483 A JP2004073483 A JP 2004073483A JP 2004073483 A JP2004073483 A JP 2004073483A JP 4107254 B2 JP4107254 B2 JP 4107254B2
Authority
JP
Japan
Prior art keywords
value
margin
display
teaching
reference point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2004073483A
Other languages
Japanese (ja)
Other versions
JP2005260888A (en
Inventor
秀智 大槻
知史 元氏
信裕 藤森
清彦 権藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
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 filed Critical Omron Corp
Priority to JP2004073483A priority Critical patent/JP4107254B2/en
Publication of JP2005260888A publication Critical patent/JP2005260888A/en
Application granted granted Critical
Publication of JP4107254B2 publication Critical patent/JP4107254B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Geophysics And Detection Of Objects (AREA)
  • Switches That Are Operated By Magnetic Or Electric Fields (AREA)
  • Electronic Switches (AREA)

Description

この発明は、検出対象の物体の位置によって変化する物理量を測定し、その測定結果に基づき、前記物体を非接触で検出する物体検出器に関する。   The present invention relates to an object detector that measures a physical quantity that varies depending on the position of an object to be detected and detects the object in a non-contact manner based on the measurement result.

この種の物体検出器の代表的なものとして、近接スイッチや光電スイッチがある。近接スイッチは、コイルや発振回路を含む検出部を有する。一般的な近接スイッチは、検出対象の金属体とコイルとの電磁結合により金属体が近づくにつれて発振振幅が小さくなる現象を利用して、発振振幅が所定のしきい値より小さくなったときにオン状態(物体を検出した状態である。以下も同じ。)となる。このほか、発振の周波数の変化を用いて物体を検出するタイプの近接スイッチもある。   Typical examples of this type of object detector include a proximity switch and a photoelectric switch. The proximity switch has a detection unit including a coil and an oscillation circuit. A general proximity switch uses a phenomenon in which the oscillation amplitude decreases as the metal body approaches due to electromagnetic coupling between the metal body to be detected and the coil, and turns on when the oscillation amplitude becomes smaller than a predetermined threshold value. State (the state in which an object is detected. The same applies to the following). In addition, there is a type of proximity switch that detects an object using a change in oscillation frequency.

光電スイッチには、投光部および受光部を対向配備した透過型のスイッチと、投光部と受光部とを同じ側に配備した反射型のスイッチの2種類がある。透過型のスイッチは、受光部側の受光量がしきい値より大きい値からしきい値より小さい値に移行したことに応じてオン状態となる。他方、反射型のスイッチは、受光量がしきい値より小さい値からしきい値より大きい値に移行したことに応じてオン状態となる。   There are two types of photoelectric switches: a transmission type switch in which a light projecting unit and a light receiving unit are arranged to face each other, and a reflection type switch in which a light projecting unit and a light receiving unit are arranged on the same side. The transmission type switch is turned on in response to the amount of light received on the light receiving unit side shifting from a value larger than the threshold value to a value smaller than the threshold value. On the other hand, the reflection type switch is turned on when the amount of received light has shifted from a value smaller than the threshold value to a value larger than the threshold value.

上記の近接スイッチや光電スイッチには、物体検出のためのしきい値を変動設定できるようにしたものがある。その公知例として、下記の特許文献1をあげる。   Some of the proximity switches and photoelectric switches described above can change the threshold value for object detection. The following patent document 1 is mention | raise | lifted as the well-known example.

特許第3040518号Patent 3040518

上記の特許文献1には、検出すべき第1の基準位置および非検出位置とすべき第2の基準位置にそれぞれ被検出物体を設置し、各基準位置で得られた測定値(実測データ)を用いて物体検出の比較判定基準となる基準データを求めることが記載されている。基準データは、前記したしきい値に相当するものであり、特許文献1には、具体例として、2つの実測データの平均値をしきい値として設定する点が記載されている。さらに、この特許文献1には、前記しきい値の設定時に、前記2つの測定値の差の大きさに応じた余裕度データを作成し、これを表示することが記載されている。   In the above-mentioned Patent Document 1, objects to be detected are installed at a first reference position to be detected and a second reference position to be detected, and measured values (actual measurement data) obtained at the respective reference positions. Is used to obtain reference data as a comparison determination reference for object detection. The reference data corresponds to the above-described threshold value, and Patent Document 1 describes that an average value of two actually measured data is set as a threshold value as a specific example. Further, Patent Document 1 describes that margin data corresponding to the magnitude of the difference between the two measured values is created and displayed when the threshold value is set.

特許文献1に記載された発明によれば、余裕度の表示により、設定されたしきい値により十分な検出精度が確保できているかどうかを確認することができる。しかしながら、この表示は、しきい値の設定後に行われるので、表示された余裕度が十分でない場合には、ユーザーは、第1または第2の基準位置を変更して、再度設定を行う必要がある。しかしながら、第1、第2の基準位置間の距離をどの程度にすれば余裕度が十分になるか、という点について、一般ユーザーが見当を付けるのは容易なことではない。   According to the invention described in Patent Document 1, it is possible to confirm whether or not sufficient detection accuracy can be ensured by the set threshold value by displaying the margin. However, since this display is performed after setting the threshold value, if the displayed margin is not sufficient, the user needs to change the first or second reference position and perform setting again. is there. However, it is not easy for a general user to find out how much the margin is sufficient when the distance between the first and second reference positions is sufficient.

上記の問題を解決するために、第1、第2の基準位置間の距離として最低限確保すべき距離をユーザーに提示することが考えられる。しかしながら、物体検出器における測定値は、被検出物体の位置が一定であっても、種々のノイズ成分によって変動する可能性がある。たとえば、近接スイッチの場合であれば、その近接スイッチが設置される装置の振動や、周辺で発生した電磁波の影響を受ける。また、光電スイッチの場合であれば、外乱光や被検出物体の表面の反射率の影響を受ける。これらのノイズによる測定値の変動幅は、物体検出器の設置環境や使用目的などにより変動するから、前記第1、第2の基準位置間の距離について、ユーザーに推奨する距離を示すのは、きわめて困難である。   In order to solve the above-described problem, it is conceivable to present the user with a minimum distance that should be secured as the distance between the first and second reference positions. However, the measured value in the object detector may vary depending on various noise components even if the position of the detected object is constant. For example, in the case of a proximity switch, it is affected by the vibration of the device in which the proximity switch is installed and the electromagnetic waves generated in the vicinity. In the case of a photoelectric switch, it is affected by ambient light and the reflectance of the surface of the object to be detected. Since the fluctuation range of the measurement value due to these noises varies depending on the installation environment or purpose of use of the object detector, the distance recommended between the first and second reference positions is indicated to the user. It is extremely difficult.

この発明は上記の問題に着目してなされたもので、物体検出用のしきい値を設定するために、2つの基準位置に物体を順に配置して各位置で教示操作を行う場合に、ユーザーの教示作業を効率良く進めることで、適切なしきい値を簡単に設定できるようにすることを目的とする。   The present invention has been made paying attention to the above-mentioned problem. In order to set a threshold value for object detection, an object is arranged in order at two reference positions and a teaching operation is performed at each position. It is an object of the present invention to make it possible to easily set an appropriate threshold value by efficiently advancing the teaching work of (1).

この発明にかかる物体検出器は、検出対象の物体の位置によって変化する物理量を測定する測定手段と、この測定手段による測定値を所定のしきい値と比較することにより物体の有無を検出する検出手段と、前記物体が検出位置にある旨を示す第1の教示信号および前記物体が非検出位置にある旨を示す第2の教示信号を、第1,第2または第2,第1の順に入力し、各教示信号の入力時点での前記測定手段の測定値を用いて前記しきい値を設定する設定手段とを具備する。さらに、この発明の物体検出器は、機体の適所に表示部が設けられており、前記設定手段は、1回目の教示信号の入力から2回目の教示信号の入力までの間に、前記1回目の教示信号を入力した時点での測定値に対する現時点の測定値の余裕度を算出する処理と、算出された余裕度の大きさを示す情報を前記表示部に表示する処理とを実行することを特徴とする。   An object detector according to the present invention includes a measurement unit that measures a physical quantity that varies depending on the position of an object to be detected, and a detection that detects the presence or absence of an object by comparing a measurement value by the measurement unit with a predetermined threshold value. Means, a first teaching signal indicating that the object is at a detection position, and a second teaching signal indicating that the object is at a non-detection position, in the order of first, second or second, first Setting means for inputting and setting the threshold value using the measurement value of the measurement means at the time of input of each teaching signal. Furthermore, the object detector of the present invention is provided with a display unit at an appropriate position of the machine body, and the setting means performs the first time between the input of the first teaching signal and the input of the second teaching signal. Performing a process of calculating a margin of the current measured value with respect to a measured value when the teaching signal is input, and a process of displaying information indicating the magnitude of the calculated margin on the display unit. Features.

上記の物体検出器が近接スイッチである場合には、前記測定手段には、検出用のコイル、発振回路、検波回路などを含めることができる。また、物体検出器が光電スイッチである場合の測定手段には、LEDなどによる投光部やフォトダイオードなどによる受光部を含めることができる。これらの構成により、物体の位置に応じて大きさが変化するアナログ信号(発振振幅、発振周波数、受光量などを示す信号である。以下、これを「検出信号」という。)を得ることができる。さらに、測定手段には、前記検出信号を平滑化する積分回路や、検出信号をディジタル変換するためのA/D変換回路を含めることができる。
なお、測定手段のうち、前記検出信号を生成する構成の一部または全体をヘッド部として、物体検出器の本体から独立させることもできる。
When the object detector is a proximity switch, the measurement means can include a detection coil, an oscillation circuit, a detection circuit, and the like. Further, when the object detector is a photoelectric switch, the measuring means can include a light projecting unit such as an LED or a light receiving unit such as a photodiode. With these configurations, an analog signal (a signal indicating an oscillation amplitude, an oscillation frequency, an amount of received light, etc., which is changed in accordance with the position of the object, hereinafter referred to as a “detection signal”) can be obtained. . Further, the measurement means can include an integration circuit for smoothing the detection signal and an A / D conversion circuit for digitally converting the detection signal.
It should be noted that a part or the whole of the configuration for generating the detection signal in the measurement means can be made independent from the main body of the object detector with the head part.

検出手段は、コンパレータなどを含む論理演算回路として構成することができるが、好ましくは、比較処理のためのプログラムが組み込まれたコンピュータにより構成するとよい。
設定手段も同様に、この手段の機能を実現するためのプログラムが組み込まれたコンピュータにより構成することができる。
The detection means can be configured as a logical operation circuit including a comparator or the like, but is preferably configured by a computer in which a program for comparison processing is incorporated.
Similarly, the setting means can be constituted by a computer in which a program for realizing the function of this means is incorporated.

第1、第2の各教示信号は、物体検出器を構成する機体の適所に設けられた操作部の操作によって入力されるのが望ましい。ただし、これに限らず、各教示信号を、それぞれ入力端子を介して外部から入力するようにしてもよい。   It is desirable that the first and second teaching signals are input by operating an operation unit provided at an appropriate position of the machine body constituting the object detector. However, the present invention is not limited to this, and each teaching signal may be input from the outside via an input terminal.

第1の教示信号は、検出対象の物体が、その物体を確実に検出すべき位置(物体検出器をオン動作させるべき位置)に置かれていることを示すものと考えることができる。以下、この第1の教示信号が示す物体の位置を「動作側基準点」という。この動作側基準点は、特許文献1の第1の基準位置に相当すると考えることができる。   The first teaching signal can be considered to indicate that the object to be detected is placed at a position where the object should be reliably detected (position where the object detector should be turned on). Hereinafter, the position of the object indicated by the first teaching signal is referred to as an “operation side reference point”. This operation-side reference point can be considered to correspond to the first reference position of Patent Document 1.

第2の教示信号は、検出対象の物体が、その物体を検出すべきでない位置(物体検出器をオフ動作させるべき位置)に置かれていることを示すものと考えることができる。以下、この第2の教示信号が示す物体の位置を「復帰側基準点」という。この復帰側基準点は、特許文献1の第2の基準位置に相当すると考えることができる。   The second teaching signal can be considered to indicate that the object to be detected is placed at a position where the object should not be detected (a position where the object detector should be turned off). Hereinafter, the position of the object indicated by the second teaching signal is referred to as “return-side reference point”. This return-side reference point can be considered to correspond to the second reference position of Patent Document 1.

ユーザーは、検出対象の物体を動作側基準点に配置して第1の教示信号を入力した後、この物体を復帰側基準点まで移動させて、第2の教示信号を入力することにより、各基準位置を教示することができる。または、前記物体を復帰側基準点に配置して第2の教示信号を入力した後、この物体を動作側基準点まで移動させて、第1の教示信号を入力してもよい。   The user places the object to be detected at the operation-side reference point, inputs the first teaching signal, moves the object to the return-side reference point, and inputs the second teaching signal. A reference position can be taught. Alternatively, after the object is placed at the return side reference point and the second teaching signal is input, the object may be moved to the operation side reference point and the first teaching signal may be input.

以下では、ユーザが教示信号を入力するために行う操作のことを、「教示操作」という。また、物体が動作側基準点または復帰側基準点に置かれている旨の教示を行うことを、「基準点を教示する」と表現する。
なお、好ましい教示作業では、物体検出器を固定設置して、物体を移動させるが、これに限らず、物体を所定位置に固定配置し、物体検出器のヘッド部または機体全体を動かしながら、各基準点を教示するようにしてもよい。
Hereinafter, an operation performed by the user to input a teaching signal is referred to as a “teaching operation”. In addition, teaching that an object is placed at the operation-side reference point or the return-side reference point is expressed as “teach reference point”.
In the preferred teaching work, the object detector is fixedly installed and the object is moved. However, the present invention is not limited to this, and the object is fixedly arranged at a predetermined position, and the object detector head unit or the entire body is moved, A reference point may be taught.

なお、「1回目の教示信号を入力した時点での測定値に対する現時点の測定値の余裕度」には、上記2つの測定値の差と測定値の有するノイズ幅との比、または両者の差に基づく値が含まれる。
測定値が有するノイズ幅には、その発生起源が検出器自体にあり(たとえば、CPUのクロックノイズや内部電源のリップルなど)、外部環境とは無関係に測定値にのっている内部ノイズによるものと、検出器の外部から到来して検出器の測定値にのってくる外乱ノイズなどが考えられる。ここでは、内部ノイズ、外乱ノイズのいずれか一方、あるいは両方のノイズが合成されたものをノイズ幅とすることができる。
Note that “the margin of the current measured value relative to the measured value when the first teaching signal is input” is the ratio of the difference between the two measured values and the noise width of the measured value, or the difference between the two. A value based on is included.
The noise width of the measured value originates from the detector itself (for example, CPU clock noise or internal power supply ripple), and is due to the internal noise on the measured value regardless of the external environment. The disturbance noise that comes from the outside of the detector and comes on the measured value of the detector can be considered. Here, the noise width can be any of internal noise, disturbance noise, or a combination of both.

この発明によれば、ユーザーが動作側基準点または復帰側基準点を教示した後に、他方の基準点の方向に物体を移動させると、前記教示の時点で得られた測定値と現在の物体の位置を反映した測定値とにより、前者の測定値に対する後者の余裕度が算出され、その大きさを示す情報が表示部に表示される。ここで前記教示された基準点と物体との距離が大きくなるにつれて、前記余裕度の値も大きくなるから、ユーザーは、表示部に十分に大きな余裕度が示されたことをもって、他方の基準点とするのに適した位置を認識することができる。よって、その認識した位置に物体を配置して2回目の教示操作を行うことによって、最初の教示操作に応じて取得した測定値と、2回目の教示操作に応じて取得した測定値とに基づき、適切なしきい値を設定することができる。   According to the present invention, when the user moves the object in the direction of the other reference point after teaching the operation-side reference point or the return-side reference point, the measurement value obtained at the time of the teaching and the current object The latter margin with respect to the former measurement value is calculated based on the measurement value reflecting the position, and information indicating the magnitude is displayed on the display unit. Here, as the distance between the taught reference point and the object increases, the value of the margin also increases, so that the user can indicate that the display unit has a sufficiently large margin and the other reference point. It is possible to recognize a position suitable for Therefore, by placing the object at the recognized position and performing the second teaching operation, based on the measured value acquired according to the first teaching operation and the measured value acquired according to the second teaching operation. Appropriate threshold can be set.

この発明の物体検出器の好ましい態様では、前記設定手段は、前記余裕度を算出する毎にその算出値を所定の基準値と比較し、余裕度が前記基準値を下回る状態から上回る状態に移行したときに、前記表示部における表示の態様を変化させるようにしている。たとえば、余裕度が基準値を上回る状態になったときに、表示色を変えたり、余裕度の表示の近傍に、所定のマークを表示したり、報知用のランプを点灯させるなどの方法を採用することができる。このような方法によれば、設定に不慣れなユーザーでも、第2の教示操作に適切な位置を容易に判断することができる。   In a preferred aspect of the object detector of the present invention, the setting means compares the calculated value with a predetermined reference value every time the margin is calculated, and shifts from a state where the margin is lower than the reference value to a state where the margin is higher. In this case, the display mode on the display unit is changed. For example, when the margin exceeds the reference value, the display color is changed, a predetermined mark is displayed near the margin display, or a notification lamp is turned on. can do. According to such a method, even a user who is unfamiliar with the setting can easily determine an appropriate position for the second teaching operation.

他の好ましい態様にかかる物体検出器では、前記表示部は、前記余裕度を示す数字を表示することが可能な数値表示器を含むものとして構成される。このようにすれば、余裕度の具体的な大きさを把握することができる。
このほか、前記表示部には、余裕度とともに、現時点での測定値を表示させたり、現時点でしきい値を設定した場合のその設定値の大きさなどを表示させることもできる。
In the object detector according to another preferred aspect, the display unit includes a numerical display capable of displaying a number indicating the margin. In this way, the specific size of the margin can be grasped.
In addition, the display unit can display the measured value at the present time, the magnitude of the set value when the threshold value is set at the current time, and the like together with the margin.

この発明によれば、物体検出用のしきい値を設定するための動作側基準点および復帰側基準点を教示する場合に、一方の基準点を教示した後、表示部の表示により十分な余裕度を確保できる位置を確認して、他方の基準点を教示することができる。よって、ユーザーは、しきい値の設定のための教示作業を効率良く行うことができるから、適切なしきい値を簡単に設定することが可能となる。   According to the present invention, when teaching the operation-side reference point and the return-side reference point for setting the threshold for object detection, after teaching one of the reference points, a sufficient margin can be obtained by displaying on the display unit. The other reference point can be taught by checking the position where the degree can be secured. Therefore, since the user can efficiently perform the teaching work for setting the threshold value, it is possible to easily set an appropriate threshold value.

図1は、この発明の一実施例にかかる近接スイッチの外観を示す。この実施例の近接スイッチは、検出用コイルが収容されたヘッド部1Aと、発振回路や検波回路などが収容されたプリアンプ部1Bと、CPUを含むアンプ部2とを、それぞれシールドケーブル3,4を介して接続して成る。ヘッド部1Aおよびプリアンプ部1Bは、後記する検出部1として機能するもので、ヘッド部1Aの検出面(前面)から検出対象の金属体(以下、「物体」という。)までの距離に応じて大きさが変化する検出信号(発振振幅を表すもの)を出力する。アンプ部2は、この検出信号を用いて物体の有無を判別し、その判別結果を外部に出力する。   FIG. 1 shows the appearance of a proximity switch according to an embodiment of the present invention. In the proximity switch of this embodiment, a head part 1A in which a detection coil is accommodated, a preamplifier part 1B in which an oscillation circuit, a detection circuit, and the like are accommodated, and an amplifier part 2 including a CPU are respectively connected to shield cables 3 and 4. Connected through. The head unit 1A and the preamplifier unit 1B function as a detection unit 1 which will be described later, depending on the distance from the detection surface (front surface) of the head unit 1A to a metal object to be detected (hereinafter referred to as “object”). A detection signal (representing oscillation amplitude) whose magnitude changes is output. The amplifier unit 2 determines the presence or absence of an object using this detection signal, and outputs the determination result to the outside.

この実施例のアンプ部2の上面には、複数のスイッチを含む操作部や表示部が設けられ、その上方が蓋部20により保護されている。図2は、蓋部20を取り外したときの上面の詳細な構成を示すもので、図中、左手に表示部21が、右手に操作部22が、それぞれ設けられる。   An operation unit and a display unit including a plurality of switches are provided on the upper surface of the amplifier unit 2 of this embodiment, and the upper part thereof is protected by the lid unit 20. FIG. 2 shows a detailed configuration of the upper surface when the lid 20 is removed. In the figure, a display unit 21 is provided on the left hand, and an operation unit 22 is provided on the right hand.

表示部21は、LEDランプ211(以下、単に「ランプ211」という。)と4個のLED表示器212とを1組として、この組み合わせを、2組、並べたものである(以下、1組目のランプ211およびLED表示器212の組み合わせを「表示部21a」,2組目のランプ211およびLED表示器212の組み合わせを「表示部21b」という。)。なお、1組目の表示部21aは赤色のLEDにより構成され、2組目の表示部21bは緑色のLEDにより構成される。   The display unit 21 includes an LED lamp 211 (hereinafter simply referred to as “lamp 211”) and four LED displays 212, and two sets of these combinations are arranged (hereinafter referred to as one set). (The combination of the eye lamp 211 and the LED display 212 is referred to as “display unit 21a”, and the combination of the second set of lamp 211 and the LED display 212 is referred to as “display unit 21b”.) The first set of display units 21a is configured by red LEDs, and the second set of display units 21b is configured by green LEDs.

前記操作部22には、2個の選択キー221,222、確定キー223、切替スイッチ224,225などが設けられる。選択キー221,222や確定キー223は、設定モードで使用されるものである。また、切替スイッチ224は、前記設定モードと通常の動作モードとを切り替えるためのものであり、他方の切替スイッチ225は、物体検出時に後記する出力回路29の動作(出力回路29からのオン/オフ信号)を切り替えるためのものである。なお、設定モードでは、前記表示部21に設定用の項目を示す文字列や設定値を表す数値を表示し、選択キー221,222の操作に応じて表示を切り替えつつ、確定キー223の操作に応じて項目の選択や設定値を確定するようにしている。また、設定モードでは、物体を検出するためのしきい値を設定する処理が行われるが、この設定の際には、各選択キー221,222が、動作側基準点および復帰側基準点を教示するための教示操作用のキーとして機能する。   The operation unit 22 is provided with two selection keys 221, 222, a confirmation key 223, changeover switches 224, 225, and the like. The selection keys 221 and 222 and the confirmation key 223 are used in the setting mode. The changeover switch 224 is for switching between the setting mode and the normal operation mode, and the other changeover switch 225 is an operation of the output circuit 29 (on / off from the output circuit 29) to be described later when an object is detected. Signal). In the setting mode, a character string indicating a setting item or a numerical value indicating a setting value is displayed on the display unit 21, and the display is switched according to the operation of the selection keys 221 and 222, and the confirmation key 223 is operated. The selection of items and set values are determined accordingly. In the setting mode, a process for setting a threshold value for detecting an object is performed. In this setting, the selection keys 221 and 222 teach the operation-side reference point and the return-side reference point. Functions as a teaching operation key.

図3は、前記近接スイッチの回路構成を示す。
この図3では、ヘッド部1Aの検出用コイル10と、プリアンプ部1Bの発振回路11および検波回路12を、検出部1として1つのブロック内に示す。なお、この図3では、プリアンプ部1Bとアンプ部2とを接続するシールドケーブル4までを、検出部1に含めている。また図中の201は、前記シールドケーブル4に対するアンプ部2側のコネクタであり、202は、アンプ部2内の電源回路である。この電源回路202は、外部から直流電源の供給を受けて、アンプ部2および検出部1の各回路に駆動用電源を供給する。
FIG. 3 shows a circuit configuration of the proximity switch.
In FIG. 3, the detection coil 10 of the head unit 1 </ b> A and the oscillation circuit 11 and the detection circuit 12 of the preamplifier unit 1 </ b> B are shown as a detection unit 1 in one block. In FIG. 3, the detection unit 1 includes the shielded cable 4 that connects the preamplifier unit 1 </ b> B and the amplifier unit 2. Reference numeral 201 in the figure denotes a connector on the amplifier unit 2 side with respect to the shielded cable 4, and 202 denotes a power supply circuit in the amplifier unit 2. The power supply circuit 202 is supplied with DC power from outside and supplies driving power to the circuits of the amplifier unit 2 and the detection unit 1.

アンプ部2には、CPU23のほか、積分回路24、A/D変換回路25、EEPROM26、通信回路27、入力回路28、出力回路29などが設けられる。また、CPU23には、前記した操作部22(各種スイッチ221〜225を含む。)や、表示部21(前記各LED表示器212やランプ211を含む。)が接続される。   In addition to the CPU 23, the amplifier unit 2 includes an integration circuit 24, an A / D conversion circuit 25, an EEPROM 26, a communication circuit 27, an input circuit 28, an output circuit 29, and the like. The CPU 23 is connected to the operation unit 22 (including various switches 221 to 225) and the display unit 21 (including the LED indicators 212 and the lamp 211).

前記CPU23は、プログラムが格納されたROMを含むものである。EEPROM26には、物体検出のためのしきい値などの設定データが格納される。出力回路29は、物体検出処理による判別結果を示すオン/オフ信号(たとえば、「物体あり」のときにハイレベルとなるディジタル信号)を出力する。入力回路28は、物体の検出処理をトリガ信号に応じて開始する際などに、外部からの信号を入力するために使用される。通信回路27は、設定モードで詳細な設定を行う場合や、測定値を用いて詳細な処理を行う場合などに、パーソナルコンピュータなどの外部機器と情報をやりとりするためのものである。   The CPU 23 includes a ROM in which a program is stored. The EEPROM 26 stores setting data such as a threshold value for object detection. The output circuit 29 outputs an on / off signal (for example, a digital signal that becomes a high level when “there is an object”) indicating the determination result obtained by the object detection process. The input circuit 28 is used to input a signal from the outside when starting the object detection process in response to the trigger signal. The communication circuit 27 is used for exchanging information with an external device such as a personal computer when performing detailed settings in the setting mode or when performing detailed processing using measured values.

上記において、発振回路11の発振振幅は、前記検出用コイル10に物体が近づくにつれて小さくなる。検波回路12は、この発振振幅の大きさを示す検出信号をアンプ部2に出力する。この検出信号は、アンプ部2側の積分回路24により平滑化された後、A/D変換回路25によりディジタル変換されて、CPU23に入力される。このデータ入力は、図示しないタイミング発生回路からの出力パルスに基づき、一定の時間間隔毎に行われるもので、CPU23は、毎時の入力データをその時点の発振振幅の測定値として取り込み、この測定値を所定数単位毎に平均化する。そして、この平均化された測定値(以下、「平均測定値」という。)を前記EEPROM26内のしきい値と比較することにより、物体の有無を判別し、その判別結果を出力回路29から出力する。   In the above description, the oscillation amplitude of the oscillation circuit 11 decreases as an object approaches the detection coil 10. The detection circuit 12 outputs a detection signal indicating the magnitude of the oscillation amplitude to the amplifier unit 2. This detection signal is smoothed by the integration circuit 24 on the amplifier unit 2 side, then digitally converted by the A / D conversion circuit 25 and input to the CPU 23. This data input is performed at regular time intervals based on an output pulse from a timing generation circuit (not shown), and the CPU 23 takes in the input data every hour as a measured value of the oscillation amplitude at that time, and this measured value. Are averaged every predetermined number of units. Then, the averaged measurement value (hereinafter referred to as “average measurement value”) is compared with a threshold value in the EEPROM 26 to determine the presence or absence of an object, and the determination result is output from the output circuit 29. To do.

図4は、ヘッド部1Aの検出面に対する検出対象の物体の位置と前記測定値との関係を表す理論曲線を示す。なお、図4において、位置を表す横軸では、紙面の右から左に向かう方向がヘッド部1Aに近づく方向となる。また、測定値を示す縦軸では、紙面の下から上に向かう方向に沿って、値が大きくなる。   FIG. 4 shows a theoretical curve representing the relationship between the position of the object to be detected with respect to the detection surface of the head unit 1A and the measured value. In FIG. 4, on the horizontal axis representing the position, the direction from the right to the left of the page is the direction approaching the head portion 1A. On the vertical axis indicating the measurement value, the value increases along the direction from the bottom to the top of the page.

さらにこの図4には、物体検出用のしきい値の設定の原理が示してある。この設定方法は、従来の近接スイッチと同様に、動作側基準点L1および復帰側基準点L2の2点を教示する操作に応じて行われるものである。なお、この教示操作の際には、前記操作部22の選択キー224,225のいずれを操作しても良いように設定されている。   Further, FIG. 4 shows the principle of setting a threshold for object detection. Similar to the conventional proximity switch, this setting method is performed in accordance with an operation for teaching two points of the operation side reference point L1 and the return side reference point L2. In this teaching operation, the selection keys 224 and 225 of the operation unit 22 are set to be operated.

ユーザーは、検出対象の物体を確実に検出する必要があると考える範囲の境界位置を動作側基準点L1として、この動作側基準点L1の位置に物体を設置し、選択キー224または225を用いて第1の教示操作を行う。つぎに、ユーザーは、前記ヘッド部1Aに対し、動作側基準点L1から所定距離だけ離れた位置L2を復帰側基準点として、その復帰側基準点L2まで物体を移動させ、選択キー224または225により第2の教示操作を行う。また、上記とは逆に、まず復帰側基準点L2の位置に物体を設置して、第1の教示操作を行った後、動作側基準点L1まで物体を移動させて、第2の教示操作を行う場合もある。   The user sets an object at the position of the operation side reference point L1 with the boundary position of the range considered to be necessary to reliably detect the object to be detected, and uses the selection key 224 or 225. To perform the first teaching operation. Next, the user moves the object to the return side reference point L2 using the position L2 that is a predetermined distance away from the operation side reference point L1 as the return side reference point with respect to the head portion 1A, and selects the selection key 224 or 225. To perform the second teaching operation. Contrary to the above, first, an object is set at the position of the return side reference point L2, and after performing the first teaching operation, the object is moved to the operation side reference point L1, and then the second teaching operation is performed. May be performed.

前記CPU23は、第1、第2の各教示操作に応じて、それぞれ所定数の測定値をサンプリングしてこれらの平均値を求める。そして値の小さい方の平均値を動作側基準点L1に対応する平均測定値AD1として、値の大きい方の平均値を復帰側基準点L2に対応する平均測定値AD2として、それぞれ認識する。さらに、CPU23は、これらの平均測定値AD1,AD2の間の値AD0(AD1とAD2との平均値であるのが望ましい。)を求め、このAD0をしきい値として設定する。   The CPU 23 samples a predetermined number of measurement values in accordance with the first and second teaching operations and obtains an average value thereof. The smaller average value is recognized as the average measured value AD1 corresponding to the operation side reference point L1, and the larger average value is recognized as the average measured value AD2 corresponding to the return side reference point L2. Further, the CPU 23 obtains a value AD0 (desirably an average value of AD1 and AD2) between these average measured values AD1 and AD2, and sets this AD0 as a threshold value.

図4の理論曲線によれば、物体が前記しきい値AD0に対応する位置L0よりヘッド部1A側に位置する場合には、測定値はしきい値AD0を下回り、「物体あり」と判断される。また、ヘッド部1Aに対し、物体が前記位置L0より遠くに位置する場合には、測定値はしきい値AD0を上回り、「物体なし」と判断される。   According to the theoretical curve of FIG. 4, when the object is located on the head portion 1A side from the position L0 corresponding to the threshold value AD0, the measured value falls below the threshold value AD0 and is determined to be “object present”. The When the object is located farther than the position L0 with respect to the head unit 1A, the measured value exceeds the threshold value AD0, and it is determined that “no object”.

ただし、前記動作側基準点L1と復帰側基準点L2との距離が小さい場合には、平均測定値AD1とAD2との差が前記AD変換回路25の分解能より小さいか、分解能をわずかに上回る程度となる可能性がある。このような場合には、しきい値AD0を設定することが実質的に不可能な状態になる。   However, when the distance between the operation side reference point L1 and the return side reference point L2 is small, the difference between the average measured values AD1 and AD2 is smaller than the resolution of the AD conversion circuit 25 or slightly higher than the resolution. There is a possibility. In such a case, it is substantially impossible to set the threshold value AD0.

また、実際の測定では、物体の位置が変化していない場合でも、近接スイッチが設置された装置の振動や周囲からのノイズなどにより、測定値に変動が生じる。この変動の幅は、近接スイッチの設置環境によって異なるものとなる。このため、前記平均測定値AD1,AD2の差がAD変換回路25の分解能を上回っても、この差が周囲環境による測定値の変動幅よりも小さくなるようであれば、物体が動作側基準点L1にある場合と復帰側基準点L2にある場合とを確実に切り分けて判断するのは困難である。   In actual measurement, even when the position of the object has not changed, the measurement value varies due to vibrations of the device in which the proximity switch is installed, noise from the surroundings, and the like. The width of this variation varies depending on the installation environment of the proximity switch. Therefore, even if the difference between the average measured values AD1 and AD2 exceeds the resolution of the AD conversion circuit 25, if the difference is smaller than the fluctuation range of the measured value due to the surrounding environment, the object is moved to the operation side reference point. It is difficult to reliably determine and determine the case of being at L1 and the case of being at the return side reference point L2.

したがって、物体が前記動作側基準点L1にある場合にはオン状態になり、復帰側基準点L2にある場合にはオフ状態になる動作を、近接スイッチに安定して実行させるには、前記平均測定値AD1,AD2の差が測定値の変動幅より十分に大きな値になるように、各点L1,L2の位置を調整する必要がある。しかしながら、前記したように、測定値の変動幅は近接スイッチの設置環境によって異なるから、動作側基準点L1と復帰側基準点L2との好ましい距離も設置環境によって異なるものとなる。しかも、各点L1,L2間にどの程度の距離を持たせれば良いかについて、一般ユーザーが判断するのは困難である。   Therefore, in order for the proximity switch to stably execute the operation that is turned on when the object is at the operation side reference point L1 and is turned off when the object is at the return side reference point L2, the average is used. It is necessary to adjust the positions of the points L1 and L2 so that the difference between the measured values AD1 and AD2 is sufficiently larger than the fluctuation range of the measured values. However, as described above, since the fluctuation range of the measured value varies depending on the installation environment of the proximity switch, the preferable distance between the operation side reference point L1 and the return side reference point L2 also varies depending on the installation environment. Moreover, it is difficult for a general user to determine how much distance should be provided between the points L1 and L2.

上記の点に鑑み、この実施例では、1回目の教示操作を受け付けた後、2回目の教示操作が行われるまでの間、所定の時間間隔毎に、その時点における測定値につき、1回目の教示操作の時点での測定値に対する余裕度を求めて表示部21に表示するようにしている。   In view of the above points, in this embodiment, after receiving the first teaching operation, until the second teaching operation is performed, the first measurement operation is performed for each measurement value at a predetermined time interval. A margin for the measurement value at the time of the teaching operation is obtained and displayed on the display unit 21.

この実施例の余裕度は、1回目の教示操作時にサンプリングした測定値の平均値および変動幅に基づき算出される。ここで、説明を簡単にするために、1回目の教示操作で動作側基準点L1が教示されるものとし、この教示操作時に得た平均測定値をAD1、測定値の変動幅をΔD1、余裕度算出の際に得た平均測定値をADとすると、余裕度Qはつぎの(1)式により求められる。なお、変動幅ΔD1は、サンプリングされた測定値の最大値と最小値との差である。
Q=(AD−AD1)/ΔD1 ・・・(1)
The margin of this embodiment is calculated based on the average value and fluctuation range of the measured values sampled during the first teaching operation. Here, to simplify the explanation, it is assumed that the operation-side reference point L1 is taught in the first teaching operation, the average measured value obtained during this teaching operation is AD1, the fluctuation range of the measured value is ΔD1, and the margin If the average measured value obtained at the time of calculating the degree is AD, the margin Q is obtained by the following equation (1). Note that the fluctuation range ΔD1 is a difference between the maximum value and the minimum value of the sampled measurement values.
Q = (AD−AD1) / ΔD1 (1)

図5は、上記した近接スイッチにおいて、動作側基準点L1にあった物体がヘッド部1Aから遠ざかる方向に移動した場合に、その位置の変化を検出できる能力を模式的に示す。
図中のVは、近接スイッチの分解能に相当する測定値の差を示すもので、以下、このVを「基準値V」という。また、Wは前記(1)式により求めた余裕度Qの適否を判断するための基準値であり、前記(1)式のΔD1より大きい値に設定される。
FIG. 5 schematically shows the ability of the proximity switch described above to detect a change in position when an object located at the operation-side reference point L1 moves in a direction away from the head unit 1A.
V in the figure indicates a difference in measured value corresponding to the resolution of the proximity switch. Hereinafter, this V is referred to as a “reference value V”. W is a reference value for determining the suitability of the margin Q obtained by the equation (1), and is set to a value larger than ΔD1 of the equation (1).

図中の検出不可能領域は、平均測定値ADと前記動作側基準点L1における平均測定値AD1との差が基準値V以下となる範囲である。移動後の物体がこの範囲に位置する場合には、ADとAD1との切り分けは実施的に不可能であり、物体が動作側基準点L1から移動したことを判断できない状態となる。   The non-detectable region in the figure is a range where the difference between the average measured value AD and the average measured value AD1 at the operation side reference point L1 is equal to or less than the reference value V. When the moved object is located within this range, the separation between AD and AD1 is practically impossible, and it cannot be determined that the object has moved from the operation-side reference point L1.

また、図中の不安定領域は、平均測定値ADと動作側基準点L1における平均測定値AD1との差は基準値Vより大きいが、前記(1)式による余裕度Qは基準値Wより小さくなる範囲である。移動後の物体がこの範囲に位置する場合には、物体が動作側基準点L1に留まっている場合でも同程度の測定値が得られる可能性があり、物体が確実に移動していると判断するのは困難となる。   In the unstable region in the figure, the difference between the average measured value AD and the average measured value AD1 at the operation-side reference point L1 is larger than the reference value V, but the margin Q according to the above equation (1) is larger than the reference value W. It is a range that becomes smaller. When the moved object is located in this range, there is a possibility that the same measurement value may be obtained even when the object remains at the operation-side reference point L1, and it is determined that the object is moving reliably. It becomes difficult to do.

上記2つの領域に対し、安定領域は、前記余裕度Qが前記基準値Wを上回る状態になる範囲である。移動後の物体がこの範囲に位置する場合には、常に、動作側基準点L1での最大の測定値を上回る測定値が得られ、物体が動作側基準点L1から離れたことを確実に判断することができる。   With respect to the above two areas, the stable area is a range in which the margin Q exceeds the reference value W. When the object after movement is located within this range, a measurement value exceeding the maximum measurement value at the operation side reference point L1 is always obtained, and it is reliably determined that the object has moved away from the operation side reference point L1. can do.

この実施例の近接スイッチでは、1回目の教示操作を受け付けた後に、前記(1)式に基づく余裕度Qを求めて表示部21に表示するようにしたので、ユーザーは、この表示を確認しながらヘッド部1Aに近づく方向またはヘッド部1Aから遠ざかる方向のいずれかに沿って物体を移動させ、前記基準値Wを超える値が表示された時点で第2の教示操作を行うことができる。これにより、物体が動作側基準点L1に位置する場合の測定値と復帰側基準点L2に位置する場合の測定値との間に、周囲環境に起因する変動幅((1)式のΔD1)よりも大きな差が生じるようにして各基準点を教示することができる。   In the proximity switch of this embodiment, after accepting the first teaching operation, the margin Q based on the equation (1) is obtained and displayed on the display unit 21, so the user confirms this display. However, the second teaching operation can be performed when a value exceeding the reference value W is displayed by moving the object along either the direction approaching the head unit 1A or the direction moving away from the head unit 1A. As a result, the fluctuation range caused by the surrounding environment (ΔD1 in the equation (1)) between the measured value when the object is located at the operation side reference point L1 and the measured value when the object is located at the return side reference point L2. Each reference point can be taught in such a way that a larger difference occurs.

なお、物体の有無判別はしきい値AD0に基づいて行われるので、各基準点L1,L2における平均測定値AD1,AD2と前記しきい値AD0との間にも、それぞれ前記変動幅ΔD1を上回る差が生じるようにするのが望ましい。よって、前記基準値WをΔD1の2倍以上の値とすれば、物体が動作側基準点L1にある場合には安定してオン状態となり、物体が復帰側基準点L2にある場合には安定してオフ状態となるように、しきい値AD0を設定することができる。   Since the presence / absence determination of the object is performed based on the threshold value AD0, the average measured values AD1, AD2 at the reference points L1, L2 and the threshold value AD0 also exceed the fluctuation range ΔD1, respectively. It is desirable to make a difference. Therefore, if the reference value W is set to a value that is twice or more than ΔD1, the object is stably turned on when the object is at the operation side reference point L1, and stable when the object is at the return side reference point L2. Then, the threshold value AD0 can be set so as to be turned off.

この実施例の近接スイッチでは、しきい値の設定モードにおいて、表示部21a,21bの一方に前記余裕度Qを表示するとともに、他方の表示部に、その余裕度Qを得たときの測定値(前記した平均測定値ADに相当する。以下では、これを現在値ADという。)を表示するようにしている。さらに、この実施例では、上記の表示を行うに際し、表示される現在値ADや余裕度Qの値が前記図5の検出不可能領域、不安定領域、安定領域のいずれに該当するかを判別し、その判別結果によって表示のパターンを変化させるようにしている。   In the proximity switch of this embodiment, in the threshold setting mode, the margin Q is displayed on one of the display portions 21a and 21b, and the measured value when the margin Q is obtained on the other display portion. (Corresponding to the above-mentioned average measured value AD. In the following, this is referred to as the current value AD). Furthermore, in this embodiment, when performing the above display, it is determined whether the displayed current value AD or margin Q corresponds to the undetectable region, unstable region, or stable region in FIG. The display pattern is changed according to the determination result.

たとえば、検出不可能領域に該当すると判別したときには、現在値ADおよび余裕度Qを示す数値表示、および前記ランプ211の双方を点滅表示する(以下、この表示のパターンを表示パターンAという。)。また、不安定領域に該当すると判別したときには、現在値ADを固定表示にするが、余裕度Qおよびランプ211を点滅させる(以下、この表示のパターンを表示パターンBという。)。また、安定領域に該当すると判別したときには、現在値ADおよび余裕度Qの双方を固定表示するとともに、各ランプ211も連続点灯させる(以下、この表示のパターンを表示パターンCという。)。このように表示のパターンを変化させることにより、設定に不慣れなユーザーでも、2回目の教示操作を行うのに適した位置を容易に判別することができ、教示作業を効率良く行うことができる。   For example, when it is determined that the area falls under the undetectable region, both the numerical value display indicating the current value AD and the margin Q and the lamp 211 are displayed blinking (hereinafter, this display pattern is referred to as a display pattern A). If the current value AD is determined to be an unstable region, the current value AD is fixedly displayed, but the margin Q and the lamp 211 are blinked (hereinafter, this display pattern is referred to as a display pattern B). In addition, when it is determined that it falls within the stable region, both the current value AD and the margin Q are fixedly displayed, and the respective lamps 211 are continuously lit (hereinafter, this display pattern is referred to as a display pattern C). By changing the display pattern in this manner, even a user unfamiliar with the setting can easily determine a position suitable for performing the second teaching operation, and the teaching work can be performed efficiently.

図6は、上記の近接スイッチにおけるしきい値の設定処理にかかる手順を示し、図7は、この設定処理時における前記表示部21の表示例を示す。以下、図7を参照しつつ、図6の流れに沿って、しきい値の設定にかかる詳細な流れを説明する。なお、図6および以下の説明における「ST」は、ステップ(STEP)を意味する。また、図7では、表示部21に対する符号を(1)の図のみに記載し、(2)以下の図の符号を省略する。   FIG. 6 shows a procedure related to the threshold value setting process in the proximity switch, and FIG. 7 shows a display example of the display unit 21 during the setting process. Hereinafter, a detailed flow for setting a threshold value will be described along the flow of FIG. 6 with reference to FIG. Note that “ST” in FIG. 6 and the following description means a step (STEP). Moreover, in FIG. 7, the code | symbol with respect to the display part 21 is described only in the figure of (1), (2) The code | symbol of the following figures is abbreviate | omitted.

図6の手順は、前記設定モードにおいて、各種設定項目の中からしきい値の設定処理を選択する操作が行われることによってスタートする。
最初のST1では、所定数の測定値をサンプリングする。つぎのST2で、サンプリングした測定値を平均し、得られた測定平均値を現在値として既存のしきい値とともに表示する。なお、この既存のしきい値とは、現時点でEEPROM26に格納されているしきい値であり、初期状態の近接スイッチでは、デフォルトのしきい値となる。
The procedure of FIG. 6 starts when an operation for selecting a threshold setting process from various setting items is performed in the setting mode.
In the first ST1, a predetermined number of measurement values are sampled. In the next ST2, the sampled measurement values are averaged, and the obtained measurement average value is displayed as the current value together with the existing threshold value. The existing threshold value is a threshold value currently stored in the EEPROM 26 and is a default threshold value in the proximity switch in the initial state.

ST3では、第1の教示操作の有無をチェックし、第1の教示操作が行われていない場合には、ST1に戻る。以下、1回目の教示操作が行われるまで、ST1〜3のループが繰り返し実行される。
図7の(1)は、前記ST2での表示例を示すもので、第1の表示部21aに現在値を示す数値が、第2の表示部21bにしきい値を示す数値が、それぞれ表示されている。前記ST1〜3のループが繰り返される間に物体の位置が変化すると、これに応じて第1の表示部21aの表示も変化する。
In ST3, the presence / absence of the first teaching operation is checked. If the first teaching operation is not performed, the process returns to ST1. Thereafter, the loop of ST1 to ST3 is repeatedly executed until the first teaching operation is performed.
(1) in FIG. 7 shows a display example in ST2. The numerical value indicating the current value is displayed on the first display portion 21a, and the numerical value indicating the threshold value is displayed on the second display portion 21b. ing. If the position of the object changes while the loops of ST1 to ST3 are repeated, the display on the first display unit 21a also changes accordingly.

ここで、ユーザーが検出対象の物体を適当な位置に配置して、1回目の教示操作を行うと、ST3が「YES」となり、ST4以下の手順に進む。   Here, when the user places the object to be detected at an appropriate position and performs the first teaching operation, ST3 becomes “YES”, and the process proceeds to ST4 and subsequent steps.

ST4では、ST1と同じ数だけ測定値をサンプリングし、つぎのST5で、平均測定値および変動幅を算出する。なお、図6には示していないが、このST4およびST5の実行に応じて、表示部21の表示は、所定時間の間、図7の(2)に示す状態となる。この表示状態は、「ティーチング中」を意味するものであり、第1の表示部21aには、英語の「teach」を意味する文字列「tEch」が、第2の表示部21bには「2Point」を意味する文字列「2Pnt」が、それぞれ表示される。   In ST4, the same number of measurement values as in ST1 are sampled, and in ST5, the average measurement value and the fluctuation range are calculated. Although not shown in FIG. 6, according to the execution of ST4 and ST5, the display on the display unit 21 is in the state shown in (2) of FIG. 7 for a predetermined time. This display state means “teaching in progress”, the first display portion 21a has a character string “tEch” meaning “teach” in English, and the second display portion 21b has “2Point”. A character string “2Pnt” meaning “is displayed.

ST4,5の処理が完了すると、以下、第2の教示操作が行われるまで、ST6〜10のステップを繰り返し実行する。ST6では、ST1やST4と同じ数の測定値をサンプリングし、つぎのST7で、これらの測定値を平均し、得られた平均測定値を現在値ADとして設定する。   When the processes of ST4 and ST5 are completed, the steps of ST6 to ST10 are repeated until the second teaching operation is performed. In ST6, the same number of measurement values as in ST1 and ST4 are sampled. In ST7, these measurement values are averaged, and the obtained average measurement value is set as the current value AD.

つぎのST8では、前記現在値AD、およびST5で求めた平均測定値および変動幅を用いて、余裕度Qを算出する。なお、この余裕度Qの算出処理では、前記した(1)式に準じて、前記ST5で得た平均測定値と現在値ADとの差の絶対値を求めた後、その結果を前記変動幅で除算する演算を実行する。   In the next ST8, the margin Q is calculated using the current value AD and the average measured value and fluctuation range obtained in ST5. In the calculation process of the margin Q, after obtaining the absolute value of the difference between the average measured value obtained in ST5 and the current value AD in accordance with the above-described equation (1), the result is used as the fluctuation range. Performs an operation that divides by.

ST9では、前記現在値ADおよび余裕度Qの値により、現在の物体が前記図5に示した3つの領域のいずれに含まれるかを判別し、その判別結果に基づき、表示パターンA,B,Cのいずれかを選択する。すなわち、現在値ADとST5で求めた平均測定値との差が基準値V以下である場合には、物体は検出不可能領域にあるものと判別し、表示パターンAを選択する。また、現在値ADとST5で求めた平均測定値との差が基準値Vより大きく、余裕度Qが基準値Wより小さい場合には、物体は不安定領域にあるものと判別し、表示パターンBを選択する。さらに、余裕度Qが基準値W以上である場合には、物体は安定領域にあるものと判別し、表示パターンCを選択する。   In ST9, the current value AD and the margin Q are used to determine which of the three regions shown in FIG. 5 is included in the current object, and display patterns A, B, Select one of C. That is, when the difference between the current value AD and the average measured value obtained in ST5 is equal to or less than the reference value V, it is determined that the object is in the undetectable region, and the display pattern A is selected. When the difference between the current value AD and the average measured value obtained in ST5 is larger than the reference value V and the margin Q is smaller than the reference value W, it is determined that the object is in an unstable region, and the display pattern Select B. Further, when the margin Q is equal to or greater than the reference value W, it is determined that the object is in the stable region, and the display pattern C is selected.

このようにして表示パターンを選択すると、ST10では、選択した表示パターンにより現在値および余裕度を表示する。
図7の(3)は、ST10における表示例である。この例は、最終段階の表示パターンCによるものであり、第1の表示部21aに現在値が、第2の表示部21bに余裕度をが、それぞれ固定表示されるとともに、各表示部21a,21bのランプ211が点灯した状態となっている。なお、図示例の余裕度は、%の単位で表示されている。
When the display pattern is selected in this way, in ST10, the current value and the margin are displayed according to the selected display pattern.
(3) of FIG. 7 is a display example in ST10. This example is based on the display pattern C at the final stage. The current value is fixedly displayed on the first display unit 21a, and the margin is displayed on the second display unit 21b. The lamp 211 of 21b is lit. In the illustrated example, the margin is displayed in units of%.

所定の時点で第2の教示操作が行われると、ST11が「YES」となってST12に進み、ST1,4,6と同じ数の測定値をサンプリングする。つぎのST13では、各測定値の平均を求め、得られた値を前記第2の教示操作に対応する平均測定値とする。   When the second teaching operation is performed at a predetermined time, ST11 becomes “YES” and the process proceeds to ST12, and the same number of measurement values as ST1, 4, 6 are sampled. In the next ST13, the average of the respective measured values is obtained, and the obtained value is set as the average measured value corresponding to the second teaching operation.

つぎのST14では、前記ST5で求めた平均測定値とST13で求めた平均測定値とを比較する。そして、小さい方の値を動作側基準点L1に対応する平均測定値AD1、大きい方の値を復帰側基準点L2に対応する平均測定値AD2として、AD2からAD1を差し引く演算を実行し、得られた差の値を前記基準値Vと比較する。   In the next ST14, the average measured value obtained in ST5 is compared with the average measured value obtained in ST13. Then, the calculation is performed by subtracting AD1 from AD2 with the smaller value as the average measured value AD1 corresponding to the operation side reference point L1 and the larger value as the average measured value AD2 corresponding to the return side reference point L2. The obtained difference value is compared with the reference value V.

前記の差の値がVより大きい場合には、ST14からST15に進み、各平均測定値AD1,AD2の平均を求め、その平均値をしきい値AD0とする。つぎのST16では、現在値(ここではST13で求めた平均測定値をいう。)および前記しきい値AD0を、表示部21に表示する。さらに、ST17では、EEPROM26内の既存のしきい値を前記しきい値AD0に更新し、しかる後に処理を終了する。   When the value of the difference is larger than V, the process proceeds from ST14 to ST15, an average of the average measured values AD1, AD2 is obtained, and the average value is set as a threshold value AD0. In the next ST16, the current value (here, the average measured value obtained in ST13) and the threshold value AD0 are displayed on the display unit 21. Further, in ST17, the existing threshold value in the EEPROM 26 is updated to the threshold value AD0, and then the process is terminated.

図7の(4)および(5)は、前記ST16の表示処理の詳細な例を示す。(4)は、ST15でしきい値が算出された直後の状態であり、第1の表示部21aには、「2Point」を意味する文字列「2Pnt」が、第2の表示部21bには、前記しきい値AD0を示す数値(1730)が、それぞれ表示される。また、ランプ211は、第1の表示部21aのみで点灯した状態となっている。
(5)は、(4)の表示から所定時間が経過した時点のもので、第1の表示部21aの表示が、現在値を示す数値に切り替えられるとともに、両方の表示部21a,21bとも、ランプ211が点灯した状態となる。
(4) and (5) of FIG. 7 show a detailed example of the display process of ST16. (4) is a state immediately after the threshold value is calculated in ST15. The character string “2Pnt” meaning “2Point” is displayed on the first display portion 21a, and the second display portion 21b is displayed on the second display portion 21b. A numerical value (1730) indicating the threshold value AD0 is displayed. In addition, the lamp 211 is in a state of being lit only by the first display unit 21a.
(5) is the time when a predetermined time has elapsed from the display of (4). The display on the first display unit 21a is switched to a numerical value indicating the current value, and both the display units 21a and 21b are The lamp 211 is turned on.

なお、ユーザーは、余裕度Qの値に関わらず、任意の位置で2回目の教示操作を行うことができるので、教示操作を誤った場合などに、測定平均値AD2とAD1との差が前記基準値V以下になる可能性がある。この場合には、ST14が「NO」となってST18に進み、前記表示部21で所定のエラー表示が実行される(たとえば、各表示部21a,21bに「EEEE」と表示する。)。この場合には、表示から所定時間が経過すると、ST1に戻るので、ユーザーは、教示作業を初めからやり直すことができる。   Since the user can perform the second teaching operation at an arbitrary position regardless of the value of the margin Q, the difference between the measurement average values AD2 and AD1 is the difference between the measured average values AD2 and AD1 when the teaching operation is incorrect. There is a possibility that the reference value V or less. In this case, ST14 is “NO” and the process proceeds to ST18, and a predetermined error display is executed on the display unit 21 (for example, “EEEE” is displayed on each display unit 21a, 21b). In this case, when a predetermined time elapses from the display, the process returns to ST1, so that the user can redo the teaching work from the beginning.

上記の手順によれば、動作側基準点L1または復帰側基準点L2のいずれかに物体を配置して1回目の教示操作を実行した後、表示部21の表示を確認しながら物体を移動させ、前記図7の(3)のような表示状態になった時点で2回目の教示操作を行うことで、しきい値AD0を適切な値に設定することができる。   According to the above procedure, after the object is placed at either the operation side reference point L1 or the return side reference point L2 and the first teaching operation is executed, the object is moved while checking the display on the display unit 21. The threshold value AD0 can be set to an appropriate value by performing the second teaching operation when the display state as shown in FIG.

前出の特許文献1に開示された近接スイッチでは、動作側基準点L1や復帰側基準点L2を教示し終えなければ、余裕度を確認することができないので、余裕度が適切でない場合には、再度、教示作業をやり直さなければならない。しかも、2回目の教示操作を行う位置については、感覚的に選択するしかないから、教示作業を何度も繰り返さなければならない可能性がある。   In the proximity switch disclosed in the above-mentioned Patent Document 1, the margin cannot be confirmed unless the operation side reference point L1 and the return side reference point L2 are taught. The teaching work must be performed again. In addition, since the position where the second teaching operation is performed can only be selected sensibly, there is a possibility that the teaching work must be repeated many times.

これに対し、この実施例の近接スイッチによれば、ユーザーは、目的に応じて動作側基準点L1または復帰側基準点L2のいずれかを設定し、その設定位置で1回目の教示操作を行った後は、表示部21の表示に基づき2回目の教示操作に適した位置を判別することができる。よって、1回の教示作業で適切なしきい値を定めることが可能となり、しきい値の設定にかかる手間を大幅に削減することができる。   On the other hand, according to the proximity switch of this embodiment, the user sets either the operation-side reference point L1 or the return-side reference point L2 according to the purpose, and performs the first teaching operation at the set position. After that, the position suitable for the second teaching operation can be determined based on the display on the display unit 21. Therefore, it is possible to set an appropriate threshold value in one teaching operation, and it is possible to greatly reduce the labor for setting the threshold value.

また、特許文献1には、各教示操作時に得た測定値の差を測定値の最小単位(すなわち分解能)で除算したものを余裕度として算出することしか開示されていないが、このような余裕度では、ノイズによる測定値の変動の方が余裕度よりも大きくなり、検出に誤動作が生じる虞がある。これに対し、この実施例では、1回目の教示操作に応じて測定値の変動幅を求め、この変動幅が大きいほど小さくなるような余裕度を算出するから、いずれの基準点L1,L2においても、その位置における物体の有無判別を安定して行うことができる。   Further, Patent Document 1 only discloses that the difference between the measurement values obtained during each teaching operation is divided by the minimum unit of measurement values (that is, resolution), and is calculated as a margin. In this case, the fluctuation of the measured value due to noise becomes larger than the margin, and there is a possibility that malfunction may occur in detection. On the other hand, in this embodiment, the fluctuation range of the measured value is obtained in accordance with the first teaching operation, and the margin that becomes smaller as the fluctuation range is larger is calculated, so at any reference point L1, L2. In addition, the presence / absence determination of the object at the position can be performed stably.

なお、図6,7の例では、1回目の教示操作から2回目の教示操作までの間に、余裕度とともに現在値を表示するようにしたが、現在値の表示に代えて、その現在値を採用した場合のしきい値を表示するようにしてもよい。   In the example of FIGS. 6 and 7, the current value is displayed together with the margin between the first teaching operation and the second teaching operation. However, instead of displaying the current value, the current value is displayed. You may make it display the threshold value at the time of employ | adopting.

また、上記図6の手順では、1回目の教示操作を実行した後は、平均測定値ADを求める都度、余裕度の算出および表示を行うようにしているが、これに限定されるものではない。たとえば、所定時間内の平均測定値ADの変動量を抽出し、この変動量が前記ST5で求めた変動幅以下となったときを物体が停止したときとみなして、余裕度の算出および出力を行うようにしてもよい。この場合、ユーザーが2回目の教示操作を行うために物体を停止させたときに、余裕度が表示されるようになるから、その停止位置が教示操作に適した位置であるかどうかを判断した上で教示操作を行うことができる。   In the procedure shown in FIG. 6, after the first teaching operation is performed, the margin is calculated and displayed every time the average measured value AD is obtained. However, the present invention is not limited to this. . For example, the fluctuation amount of the average measured value AD within a predetermined time is extracted, and when the fluctuation amount is equal to or less than the fluctuation width obtained in ST5, it is considered that the object has stopped, and the calculation and output of the margin are performed. You may make it perform. In this case, since the margin is displayed when the user stops the object to perform the second teaching operation, it is determined whether or not the stop position is suitable for the teaching operation. The teaching operation can be performed above.

また、この実施例の余裕度の算出では、1回目の教示操作時にサンプリングした測定値の平均値および変動幅と、余裕度算出時点にサンプリングした測定値の平均値とを使用したが、変動幅は、余裕度算出時点にサンプリングした測定値から求めてもよい。また、教示操作時以外のとき、たとえば、電源投入直後に取得した測定値の変動幅を用いて余裕度を算出してもよい。
また、外部環境に起因するノイズの変動が大きくない場合には、測定値の変動幅に代えて、近接スイッチの内部ノイズ(たとえば電源のリップルやCPUのクロックノイズなどに起因する信号ノイズ)など、あらかじめ定めた固定値を用いて余裕度を算出してもよい。
In addition, in the calculation of the margin in this embodiment, the average value and the fluctuation range of the measurement values sampled at the first teaching operation and the average value of the measurement values sampled at the margin calculation time are used. May be obtained from measured values sampled at the time of margin calculation. Further, when the teaching operation is not performed, for example, the margin may be calculated using the fluctuation range of the measured value acquired immediately after the power is turned on.
In addition, when the fluctuation of noise due to the external environment is not large, instead of the fluctuation range of the measured value, the internal noise of the proximity switch (for example, signal noise due to power supply ripple, CPU clock noise, etc.), etc. The margin may be calculated using a predetermined fixed value.

この発明が適用された近接スイッチの外観を示す斜視図である。It is a perspective view which shows the external appearance of the proximity switch to which this invention was applied. アンプ部2の表示部21および操作部の詳細な構成を示す上面図である。3 is a top view illustrating a detailed configuration of a display unit 21 and an operation unit of the amplifier unit 2. FIG. 近接スイッチの電気構成を示すブロック図である。It is a block diagram which shows the electric constitution of a proximity switch. ヘッド部1Aに対する物体の位置と測定値との関係を、しきい値の設定処理にかかる原理とともに示すグラフである。It is a graph which shows the relationship between the position of the object with respect to 1 A of head parts, and a measured value with the principle concerning the setting process of a threshold value. 物体を検出する能力を模式的に示す説明図である。It is explanatory drawing which shows typically the capability to detect an object. しきい値の設定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the setting process of a threshold value. 表示部21の表示例を示す説明図である。11 is an explanatory diagram illustrating a display example of the display unit 21. FIG.

符号の説明Explanation of symbols

1 検出部1
2 アンプ部2
10 検出用コイル
11 発振回路
12 検波回路
21 操作部
22 表示部21
23 CPU23
24 積分回路
25 A/D変換回路
26 EEPROM
29 出力回路
1 detector 1
2 Amplifier section 2
DESCRIPTION OF SYMBOLS 10 Detection coil 11 Oscillation circuit 12 Detection circuit 21 Operation part 22 Display part 21
23 CPU23
24 integration circuit 25 A / D conversion circuit 26 EEPROM
29 Output circuit

Claims (3)

検出対象の物体の位置によって変化する物理量を測定する測定手段と、この測定手段による測定値を所定のしきい値と比較することにより物体の有無を検出する検出手段と、前記物体が検出位置にある旨を示す第1の教示信号および前記物体が非検出位置にある旨を示す第2の教示信号を、第1,第2または第2,第1の順に入力し、各教示信号の入力時点での前記測定手段の測定値を用いて前記しきい値を設定する設定手段とを具備する物体検出器において、
機体の適所に表示部が設けられており、
前記設定手段は、1回目の教示信号の入力から2回目の教示信号の入力までの間に、前記1回目の教示信号を入力した時点での測定値に対する現時点の測定値の余裕度を算出する処理と、算出された余裕度の大きさを示す情報を前記表示部に表示する処理とを実行することを特徴とする物体検出器。
Measuring means for measuring a physical quantity that changes depending on the position of the object to be detected, detecting means for detecting the presence or absence of an object by comparing a measurement value by the measuring means with a predetermined threshold, and the object at the detection position A first teaching signal indicating the presence and a second teaching signal indicating that the object is in the non-detection position are input in the first, second or second, first order, and each teaching signal is input In an object detector comprising: setting means for setting the threshold value using a measurement value of the measuring means at
There is a display at the right place on the aircraft,
The setting means calculates a margin of a current measured value with respect to a measured value at the time when the first teaching signal is input between the input of the first teaching signal and the input of the second teaching signal. An object detector characterized by executing a process and a process of displaying information indicating the calculated degree of margin on the display unit.
前記設定手段は、前記余裕度を算出する毎にその算出値を所定の基準値と比較し、余裕度が前記基準値を下回る状態から上回る状態に移行したときに、前記表示部における表示パターンを変化させるようにした請求項1に記載された物体検出器。   The setting means compares the calculated value with a predetermined reference value every time the margin is calculated, and changes the display pattern on the display unit when the margin shifts from a state below the reference value to a state above the reference value. The object detector according to claim 1, wherein the object detector is changed. 前記表示部は、前記余裕度を示す数字を表示することが可能な数値表示器を含んで成る請求項1または2に記載された物体検出器。   The object detector according to claim 1, wherein the display unit includes a numerical display capable of displaying a number indicating the margin.
JP2004073483A 2004-03-15 2004-03-15 Object detector Expired - Lifetime JP4107254B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004073483A JP4107254B2 (en) 2004-03-15 2004-03-15 Object detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004073483A JP4107254B2 (en) 2004-03-15 2004-03-15 Object detector

Publications (2)

Publication Number Publication Date
JP2005260888A JP2005260888A (en) 2005-09-22
JP4107254B2 true JP4107254B2 (en) 2008-06-25

Family

ID=35086150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004073483A Expired - Lifetime JP4107254B2 (en) 2004-03-15 2004-03-15 Object detector

Country Status (1)

Country Link
JP (1) JP4107254B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1762452A3 (en) 2005-09-08 2009-05-27 Nissan Motor Co., Ltd. Engine starting control device and method
JP4559334B2 (en) * 2005-09-30 2010-10-06 サンクス株式会社 Detection sensor and sensor system
CN116087968B (en) * 2023-01-20 2024-04-30 松下神视电子(苏州)有限公司 Sensor for detecting a position of a body
CN116243328B (en) * 2023-01-20 2024-06-25 松下神视电子(苏州)有限公司 Sensor for detecting a position of a body

Also Published As

Publication number Publication date
JP2005260888A (en) 2005-09-22

Similar Documents

Publication Publication Date Title
JP4516042B2 (en) Apparatus operating device and apparatus operating method
EP1422603B1 (en) Pointing device and electronic apparatus provided with the pointing device
JP4714262B2 (en) Method and apparatus for detecting the position of an object present in a medium
JP5101995B2 (en) Input control apparatus and image forming apparatus
KR101267161B1 (en) Photoelectric sensor and supporting method of confirming work of threshold
JP5918919B2 (en) Electromagnetic induction sensor panel and method for reducing indication error
JPH07311647A (en) Position detection device and its noise removing method
JP4107254B2 (en) Object detector
JP6907886B2 (en) Displacement sensor
US9495022B2 (en) Coordinate compensation method and apparatus in digitizer, and electronic pen used in the same
JP4241450B2 (en) Object detector
JP2003076483A (en) Position detector and position indicator therefor
US10578728B2 (en) Underwater detection device
JPH09134246A (en) Coordinate indicator or device used with coordinate reader
JP6218951B2 (en) Method for determining the type of object and proximity sensor
JP2012163611A (en) Processor, processing method, and program
JP2006236845A (en) Photoelectric switch and setting method of photoelectric switch
KR20170082342A (en) Image forming apparatus and method for controlling the same
JP2016062120A (en) Operation device and cursor movement control method
JP2007170988A (en) Detector and measurement system using the same
JP2007170987A (en) Contact type displacement gauge
JP2006078370A (en) Range sensor and its setting method
CN113238675B (en) Electromagnetic position input device and input position detection method
JP2006048699A (en) Position sensor for movable guided member
JP4832740B2 (en) Ranging sensor and setting method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050921

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080324

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4107254

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130411

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140411

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term