Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7602199B2 - Optical sensor, optical sensor control method, and optical sensor control program - Google Patents
[go: Go Back, main page]

JP7602199B2 - Optical sensor, optical sensor control method, and optical sensor control program - Google Patents

Optical sensor, optical sensor control method, and optical sensor control program Download PDF

Info

Publication number
JP7602199B2
JP7602199B2 JP2021040371A JP2021040371A JP7602199B2 JP 7602199 B2 JP7602199 B2 JP 7602199B2 JP 2021040371 A JP2021040371 A JP 2021040371A JP 2021040371 A JP2021040371 A JP 2021040371A JP 7602199 B2 JP7602199 B2 JP 7602199B2
Authority
JP
Japan
Prior art keywords
light
detection
projection
optical sensor
light projection
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.)
Active
Application number
JP2021040371A
Other languages
Japanese (ja)
Other versions
JP2022139823A (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 JP2021040371A priority Critical patent/JP7602199B2/en
Priority to PCT/JP2021/046930 priority patent/WO2022190524A1/en
Publication of JP2022139823A publication Critical patent/JP2022139823A/en
Application granted granted Critical
Publication of JP7602199B2 publication Critical patent/JP7602199B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Geophysics And Detection Of Objects (AREA)

Description

本発明は、光学式センサ、光学式センサの制御方法及び光学式センサの制御プログラムに関する。 The present invention relates to an optical sensor, a control method for an optical sensor, and a control program for an optical sensor.

検査対象物の有無や距離を検出する光学式センサが知られている。例えば、特許文献1には、検査対象物へ投光された検出光が反射して戻ってくるまでの時間を測定することにより距離を検出するToF(Time of Flight)センサが開示されている。 Optical sensors that detect the presence or absence of an object to be inspected and the distance to it are known. For example, Patent Document 1 discloses a ToF (Time of Flight) sensor that detects the distance by measuring the time it takes for detection light projected onto the object to be reflected and returned.

特開2017-53769号公報JP 2017-53769 A

光学式センサは、製造ラインに設置され、製造ラインを流れる部品の特徴的な形状部分を測定して当該物品の品種や良否を判別することに利用されることがある。このように利用される場合に、光学式センサは製造ライン300に付随する構造物に取り付けられることが多いが、必ずしも検査対象物の近くに取り付けることができるとは限らない。そこで、近年においては検出レンジが数mにも達する広レンジタイプの光学式センサも開発されている。しかし、広レンジタイプの光学式センサは、取付け時にわずかでも角度誤差が生じると、検査対象物のターゲットとする箇所から検出光が外れてしまう。取付器具を介して光学式センサを取り付ける場合には検出光の厳密な光軸調整が難しく、作業者は検出光のスポットを確認しつつ取付器具を緩めたり締め付けたりするという煩雑な作業を行う必要があった。 Optical sensors are installed on production lines and are sometimes used to measure the characteristic shapes of parts traveling along the production line to determine the type and quality of the items. When used in this way, optical sensors are often attached to structures associated with the production line 300, but they cannot always be attached close to the object being inspected. In recent years, wide-range optical sensors with detection ranges of several meters have therefore been developed. However, with wide-range optical sensors, even a slight angle error during installation will cause the detection light to deviate from the target location on the object being inspected. When an optical sensor is attached via a mounting fixture, it is difficult to precisely adjust the optical axis of the detection light, and workers are required to perform the cumbersome task of loosening and tightening the mounting fixture while checking the spot of the detection light.

本発明は、このような問題を解決するためになされたものであり、比較的遠くの検出対象物を検出する場合であっても、煩雑な光軸調整作業を必要としない光学式センサ等を提供するものである。 The present invention has been made to solve these problems, and provides an optical sensor that does not require the troublesome task of adjusting the optical axis, even when detecting a relatively distant object.

本発明の第1の態様における光学式センサは、可視光である検出光を投光する投光素子と、投光素子から投光された検出光の光軸を調整する光軸調整素子と、対象物で反射した検出光を受光して検出信号を出力する受光素子と、光軸調整素子を駆動することにより検出光を予め設定された複数の特定方向へ順次投光して得た検出信号に基づく検出結果のうち、検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、認識した指示方向に基づいて検査対象物の検査のために投光する検出光の投光方向を調整する投光調整部とを備える。このように構成された光学式センサによれば、ユーザは、例えば指先で特定方向への検出光を遮るだけで、検査対象物の検査のために投光する検出光の投光方向を指示できるので、光学式センサの向きを調整し直すなどの手間が省け、作業性の向上を図ることができる。 The optical sensor in the first aspect of the present invention includes a light-projecting element that projects a detection light, which is visible light; an optical axis adjustment element that adjusts the optical axis of the detection light projected from the light-projecting element; a light-receiving element that receives the detection light reflected by an object and outputs a detection signal; and a light-projection adjustment unit that recognizes a specific direction in which a detection result is obtained in which the detection light is evaluated as being blocked as a designated direction among detection results based on detection signals obtained by sequentially projecting the detection light in a plurality of specific directions set in advance by driving the optical axis adjustment element, and adjusts the projection direction of the detection light to be projected for the inspection of the inspection object based on the recognized designated direction. With the optical sensor configured in this way, the user can specify the projection direction of the detection light to be projected for the inspection of the inspection object simply by blocking the detection light in a specific direction with, for example, a fingertip, thereby eliminating the need to readjust the orientation of the optical sensor and improving operability.

上記の光学式センサにおいて、投光調整部は、複数の特定方向に加え、その時点で設定されている投光方向を1サイクルとして順次投光し、複数の特定方向へ投光する場合と投光方向へ投光する場合で、投光の態様を異ならせてもよい。このように投光の態様を異ならせることにより、ユーザは、一つの投光素子から投光されるそれぞれの検出光の役割を容易に認識することができる。 In the optical sensor described above, the light projection adjustment unit may sequentially project light in the currently set light projection direction as one cycle in addition to the multiple specific directions, and may differentiate the manner of projection when projecting light in multiple specific directions from when projecting light in the projection direction. By differentiating the manner of projection in this way, the user can easily recognize the role of each detection light projected from one light-projecting element.

上記の光学式センサにおいて、複数の特定方向のそれぞれは、光軸調整素子によって調整可能な範囲の端に設定されているとよい。このように調整可能な範囲の端に設定されることにより、ユーザは、検査対象物の検査のために投光する検出光をどの範囲で調整できるかを容易に認識することができる。 In the optical sensor described above, each of the multiple specific directions may be set to the end of a range that can be adjusted by the optical axis adjustment element. By setting the specific directions to the end of the adjustable range in this manner, the user can easily recognize the range within which the detection light projected for inspecting the inspection object can be adjusted.

上記の光学式センサにおいて、投光調整部は、予め設定された複数の特定方向のうち反射した検出信号を受光素子で検出できない特定方向が存在する場合には、その特定方向を検出信号が検出できる方向へ移動させるようにしてもよい。このように特定方向を移動させれば、いずれの特定方向への検出光も対象物にスポットを形成するので、ユーザは、特定方向への検出光の光軸を発見しやすく、方向指示を与えやすい。 In the optical sensor described above, if there is a specific direction among a plurality of predetermined specific directions in which the light receiving element cannot detect the reflected detection signal, the light projection adjustment unit may move the specific direction to a direction in which the detection signal can be detected. By moving the specific direction in this way, the detection light in any specific direction forms a spot on the target object, making it easier for the user to find the optical axis of the detection light in the specific direction and to give directional instructions.

上記の光学式センサにおいて、投光調整部は、予め設定された複数の特定方向の少なくともいずれか又は前記投光方向で検出された対象物までの距離に基づいて複数の特定方向を移動させるようにしてもよい。このように移動させることにより、光学式センサからの距離によらず特定方向の検出光の間隔を適度に保つことができるので、ユーザは方向指示を与えやすい。このとき、投光調整部は、複数の特定方向が光軸調整素子によって調整可能な範囲の端でない場合には、範囲を示すために端方向への投光を行うようにしてもよい。このように端方向への投光を行うことにより、ユーザは、検査対象物の検査のために投光する検出光をどの範囲で調整できるかを容易に認識することができる。 In the optical sensor described above, the light projection adjustment unit may move the multiple specific directions based on at least one of multiple predetermined specific directions or the distance to the object detected in the light projection direction. By moving in this manner, the intervals between the detection light in the specific directions can be appropriately maintained regardless of the distance from the optical sensor, making it easier for the user to give directional instructions. In this case, if the multiple specific directions are not the ends of the range that can be adjusted by the optical axis adjustment element, the light projection adjustment unit may project light in the end direction to indicate the range. By projecting light in the end direction in this manner, the user can easily recognize the range within which the detection light projected for inspection of the inspection object can be adjusted.

上記の光学式センサにおいて、投光調整部は、複数の特定方向のそれぞれにおいて投光した検出光のうちの2つ以上の特定方向に対する検出光が連続して順次遮られたと評価される検出結果が得られた場合には、当該2つ以上の特定方向の遮られた順番に基づいて検査対象物の検査のために投光する検出光の投光方向を調整するようにしてもよい。このような態様によっても、ユーザは、直感的かつ容易に方向指示を与えることができる。このとき、投光調整部は、遮られた順番に基づいて当該投光方向を調整した場合は、予め設定された設定時間の間、当該投光方向の調整を停止するとよい。このような停止期間を設けることにより、ユーザの手が往復することによる誤検出を防ぐことができる。 In the optical sensor described above, the light projection adjustment unit may adjust the projection direction of the detection light projected for inspecting the inspection object based on the order in which the two or more specific directions were blocked when a detection result is obtained that indicates that the detection light projected in each of a plurality of specific directions has been successively blocked in sequence. This aspect also allows the user to intuitively and easily give direction instructions. In this case, when the light projection adjustment unit adjusts the light projection direction based on the order in which the light is blocked, it is preferable that the light projection adjustment unit suspends adjustment of the light projection direction for a preset time. Providing such a suspension period can prevent erroneous detection due to the reciprocating movement of the user's hand.

上記の光学式センサにおいて、投光調整部は、複数の特定方向へ順次投光して得た検出結果のすべてが検出光が遮られたと評価される検出結果であった場合に、投光方向を確定させてもよい。このように方向指示に連続して確定指示を受け付けるようにすれば、ユーザは、確定指示をするために光学式センサを操作する必要がないので、作業性の向上が見込める。 In the optical sensor described above, the light projection adjustment unit may confirm the light projection direction when all of the detection results obtained by sequentially projecting light in multiple specific directions are evaluated as detection results in which the detection light is blocked. In this way, by accepting a confirmation instruction consecutively to a direction instruction, the user does not need to operate the optical sensor to issue a confirmation instruction, which is expected to improve operability.

上記の光学式センサにおいて、投光調整部は、複数の特定方向へ順次投光して得た検出結果のうち予め設定された組み合わせの検出光がいずれも遮られたと評価される検出結果であった場合に、投光方向を確定させてもよい。また、投光調整部は、確定指示を受け付けるための確定投光として検出光を投光し、確定投光の検出光が遮られたと評価される検出結果であった場合に、投光方向を確定させてもよい。このような態様であっても、ユーザは、確定指示をするために光学式センサを操作する必要がないので、作業性の向上が見込める。 In the optical sensor described above, the light projection adjustment unit may confirm the light projection direction when a preset combination of detection light among the detection results obtained by sequentially projecting light in multiple specific directions is evaluated as being blocked. The light projection adjustment unit may also project detection light as a confirmation projection for receiving a confirmation instruction, and confirm the light projection direction when the detection result is evaluated as being blocked by the detection light of the confirmation projection. Even in this mode, the user does not need to operate the optical sensor to issue a confirmation instruction, and workability is expected to improve.

上記の光学式センサにおいて、複数の特定方向は、光軸調整素子によって調整可能な範囲の少なくとも一部の範囲を覆うように規定された複数の離散点のそれぞれに対して設定され、投光調整部は、検出光が最も至近で遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、当該投光方向を指示方向として確定してもよい。このような指示方式であれば、より直接的に投光方向を指示できる。 In the optical sensor described above, the multiple specific directions are set for multiple discrete points defined to cover at least a portion of the range that can be adjusted by the optical axis adjustment element, and the light projection adjustment unit may recognize the specific direction in which the detection result is evaluated as indicating that the detection light is most closely blocked as the indicated direction, and determine that light projection direction as the indicated direction. This indication method allows the light projection direction to be indicated more directly.

本発明の第2の態様における光学式センサの制御方法は、検出光を投光する投光素子と、投光素子から投光された検出光の光軸を調整する光軸調整素子と、対象物で反射した検出光を受光して検出信号を出力する受光素子とを備える光学式センサの制御方法であって、光軸調整素子を駆動することにより検出光を予め設定された複数の特定方向へ順次投光する投光ステップと、投光ステップで複数の特定方向へそれぞれ投光して得た検出信号に基づく検出結果のうち、検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識する認識ステップと、認識ステップで認識された指示方向に基づいて検査対象物の検査のために投光する検出光の投光方向を調整する調整ステップとを有する。 The control method for an optical sensor in a second aspect of the present invention is a control method for an optical sensor including a light-projecting element that projects detection light, an optical axis adjustment element that adjusts the optical axis of the detection light projected from the light-projecting element, and a light-receiving element that receives the detection light reflected by an object and outputs a detection signal, and includes a light-projecting step in which the detection light is sequentially projected in a plurality of predetermined specific directions by driving the optical axis adjustment element, a recognition step in which a specific direction in which a detection result is obtained in which the detection light is evaluated as being blocked is recognized as a pointed direction among detection results based on detection signals obtained by projecting light in each of the plurality of specific directions in the light-projecting step, and an adjustment step in which the projection direction of the detection light to be projected for inspection of the inspection object is adjusted based on the pointed direction recognized in the recognition step.

また、本発明の第3の態様における光学式センサの制御プログラムは、検出光を投光する投光素子と、投光素子から投光された検出光の光軸を調整する光軸調整素子と、対象物で反射した検出光を受光して検出信号を出力する受光素子とを備える光学式センサの制御プログラムであって、光軸調整素子を駆動することにより検出光を予め設定された複数の特定方向へ順次投光する投光ステップと、投光ステップで複数の特定方向へそれぞれ投光して得た検出信号に基づく検出結果のうち、検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識する認識ステップと、認識ステップで認識された指示方向に基づいて検査対象物の検査のために投光する検出光の投光方向を調整する調整ステップとをコンピュータに実行させる。 In addition, the control program for the optical sensor in the third aspect of the present invention is a control program for an optical sensor including a light-projecting element that projects detection light, an optical axis adjustment element that adjusts the optical axis of the detection light projected from the light-projecting element, and a light-receiving element that receives the detection light reflected by an object and outputs a detection signal, and causes a computer to execute a light-projecting step of sequentially projecting the detection light in a plurality of predetermined specific directions by driving the optical axis adjustment element, a recognition step of recognizing as a pointed direction a specific direction in which a detection result that is evaluated as the detection light being blocked is obtained among detection results based on detection signals obtained by projecting light in each of the plurality of specific directions in the light-projecting step, and an adjustment step of adjusting the projection direction of the detection light to be projected for inspection of the inspection object based on the pointed direction recognized in the recognition step.

このような第2、第3の態様であっても、第1の態様と同様に、検査対象物の検査のために投光する検出光の投光方向を容易に指示できるので、光学式センサの向きを調整し直すなどの手間が省け、作業性の向上を図ることができる。 In the second and third aspects, as in the first aspect, the direction of the detection light emitted to inspect the object to be inspected can be easily indicated, eliminating the need to readjust the orientation of the optical sensor and improving workability.

本発明により、比較的遠くの検出対象物を検出する場合であっても、煩雑な光軸調整作業を必要としない光学式センサ等を提供することができる。 The present invention makes it possible to provide an optical sensor that does not require the need for complicated optical axis adjustment work, even when detecting a relatively distant object.

光学式センサの外観斜視図である。FIG. 2 is a perspective view of the appearance of an optical sensor. 光学式センサのシステム構成図である。FIG. 1 is a system configuration diagram of an optical sensor. 予備ワークに対する指示投光と調整投光の投光を説明する図である。11A and 11B are diagrams illustrating the projection of command light and adjustment light onto a preliminary workpiece. 調整投光を右方向へ移動させる場合の調整方法を説明する図である。13A and 13B are diagrams illustrating an adjustment method in which the adjustment light projection is moved to the right. 調整投光を下方向へ移動させる場合の調整方法を説明する図である。13A and 13B are diagrams illustrating an adjustment method in which the adjusted light projection is moved downward. 調整投光の投光方向を検査方向に確定する確定方法を説明する図である。11A and 11B are diagrams illustrating a method for determining the projection direction of the adjusted light as the inspection direction. 検査対象物を検査する様子を示す図である。FIG. 1 is a diagram showing a state in which an inspection object is inspected. 対象物の形状に応じて指示投光の投光方向を自動調整する様子を示す図である。11A and 11B are diagrams illustrating a state in which the projection direction of the pointing light is automatically adjusted in accordance with the shape of the target object. 対象物の距離に応じて指示投光の投光方向を自動調整する様子を示す図である。11A and 11B are diagrams illustrating how the projection direction of the pointing light is automatically adjusted according to the distance to the target object. 指示投光に加えて境界投光を行う様子を示す図である。FIG. 13 is a diagram showing a state in which boundary light is cast in addition to designated light cast. 調整投光を移動させる他の指示手法を説明する図である。13A and 13B are diagrams illustrating another instruction method for moving the adjusted light projection. 調整投光の投光方向を検査方向に確定する他の確定方法を説明する図である。13A and 13B are diagrams illustrating another method for determining the projection direction of the adjusted light as the inspection direction. 調整投光の投光を行うことなく直接的に検査方向を確定する調整手法を説明する図である。11A and 11B are diagrams illustrating an adjustment method for directly determining the inspection direction without projecting an adjustment light. 制御部の処理手順を説明するフロー図である。FIG. 4 is a flowchart illustrating a processing procedure of a control unit.

以下、発明の実施の形態を通じて本発明を説明するが、特許請求の範囲に係る発明を以下の実施形態に限定するものではない。また、実施形態で説明する構成の全てが課題を解決するための手段として必須であるとは限らない。 The present invention will be described below through embodiments of the invention, but the invention according to the claims is not limited to the following embodiments. Furthermore, not all of the configurations described in the embodiments are necessarily essential as means for solving the problem.

図1は、光学式センサ100の外観斜視図である。本実施形態に係る光学式センサ100は、検査対象物であるワークの部分形状の有無や特定箇所までの距離等を検出するセンサであり、例えば工場の製造ラインなどに設置されて利用される。光学式センサ100は、検出光L1をワークへ向けて投光し、ワークで反射して戻ってくる検出光L2を受光する。以下に説明する光学式センサ100は、特に検出光の往復時間を計測することにより距離情報を検出するToFセンサである。光学式センサ100は、検出光L2を受光できない場合にはワークが検出されない旨の未検出情報を出力し、検出光L2を受光できた場合には距離情報を出力する。 FIG. 1 is an external perspective view of an optical sensor 100. The optical sensor 100 according to this embodiment is a sensor that detects the presence or absence of a partial shape of a workpiece as an inspection target, the distance to a specific location, etc., and is installed and used, for example, on a production line in a factory. The optical sensor 100 projects detection light L1 toward the workpiece and receives detection light L2 that is reflected by the workpiece and returns. The optical sensor 100 described below is a ToF sensor that detects distance information by measuring the round-trip time of the detection light in particular. When the optical sensor 100 cannot receive the detection light L2 , it outputs undetected information indicating that the workpiece is not detected, and when the detection light L2 can be received, it outputs distance information.

検出光L1は、筐体101の一面に設けられた透過窓102を透過して投光される。詳細については後述するが、光学式センサ100は、投光素子から投光された検出光L1の投光方向を調整する光軸調整素子を備える。光軸調整素子は、所定ピッチで直交する2軸方向(図示するX軸方向とY軸方向)へ、検出光L1の光軸を偏向することができる。具体的には、図示するように偏向可能範囲R内のドットで示す任意の方向(xm,yn)へ検出光L1の光軸を一致させることができる。 The detection light L1 is projected through a transparent window 102 provided on one surface of the housing 101. Although details will be described later, the optical sensor 100 includes an optical axis adjustment element that adjusts the projection direction of the detection light L1 projected from the light projecting element. The optical axis adjustment element can deflect the optical axis of the detection light L1 in two axial directions (X-axis direction and Y-axis direction shown in the figure) that are orthogonal at a predetermined pitch. Specifically, the optical axis of the detection light L1 can be aligned with any direction ( xm , yn ) indicated by dots within the deflectable range R as shown in the figure.

また、光学式センサ100は、検出光L1の投光方向に沿ってDnからDfの範囲で距離を検出することができる。すなわち、図の網点で示す範囲が検出可能範囲Vであり、光学式センサ100は、この範囲にワークが存在しなければ未検出情報を出力し、この範囲にワークが存在すれば検出光L1の反射点までの距離情報を出力する。 Furthermore, the optical sensor 100 can detect distances in the range from Dn to Df along the projection direction of the detection light L1 . That is, the range indicated by the dots in the figure is the detectable range V, and the optical sensor 100 outputs undetected information if no workpiece is present within this range, and outputs distance information to the reflection point of the detection light L1 if a workpiece is present within this range.

筐体101の一面には操作ボタン150が設けられており、操作ボタン150は、ユーザからの操作を受け付ける。また、筐体101の一面には表示パネル160が設けられており、表示パネル160は、後述するように、確定した検査方向等を表示する。ケーブル103は、外部機器であるPLCやPCと接続され、出力信号をこれらの機器へ伝送する。なお、図示するようにX軸、Y軸及びZ軸を定める。以後のいくつかの図面においても図1と同様の座標軸を併記することにより、それぞれの図面が表す構成要素の向きを示す。 An operation button 150 is provided on one side of the housing 101, and the operation button 150 accepts operations from the user. A display panel 160 is also provided on one side of the housing 101, and the display panel 160 displays the confirmed inspection direction, etc., as described below. The cable 103 is connected to external devices such as a PLC or PC, and transmits output signals to these devices. Note that the X-axis, Y-axis, and Z-axis are defined as shown in the figure. In the following drawings, the same coordinate axes as in Figure 1 are also shown to indicate the orientation of the components depicted in each drawing.

図2は、光学式センサ100のシステム構成図である。光学式センサ100の制御システムは、主に、制御部110、投光素子120、光軸調整素子130、受光素子140、操作ボタン150、表示パネル160、入出力IF170、記憶部180によって構成される。制御部110は、光学式センサ100の制御とプログラムの実行処理を行うプロセッサ(CPU:Central Processing Unit)である。制御部110は、ASIC(Application Specific Integrated Circuit)等の演算処理チップや、各種電気信号を処理する処理回路を含む構成であってもよい。制御部110は、記憶部180から読み出される、あるいは入出力IF170を介して外部機器から与えられる制御プログラムを実行して、ワークの検出処理に関する様々な処理を実行する。 Figure 2 is a system configuration diagram of the optical sensor 100. The control system of the optical sensor 100 is mainly composed of a control unit 110, a light projecting element 120, an optical axis adjustment element 130, a light receiving element 140, an operation button 150, a display panel 160, an input/output IF 170, and a storage unit 180. The control unit 110 is a processor (CPU: Central Processing Unit) that controls the optical sensor 100 and executes programs. The control unit 110 may be configured to include an arithmetic processing chip such as an ASIC (Application Specific Integrated Circuit) and a processing circuit that processes various electrical signals. The control unit 110 executes a control program that is read from the storage unit 180 or provided from an external device via the input/output IF 170, and performs various processes related to the detection process of the workpiece.

投光素子120は、可視光である波長帯域のレーザ光(例えば635nm~680nmの赤色光)を出射するレーザダイオードであり、制御部110の制御により特定の周波数(例えば12MHz)に変調された検出光L1を出射する。なお、投光素子120は、コヒーレント光を出射するレーザダイオードに限らず、LEDなどのインコヒーレント光を出射する素子を用いてもよい。 The light projecting element 120 is a laser diode that emits laser light in a wavelength band that is visible light (e.g., red light of 635 nm to 680 nm), and emits detection light L1 modulated to a specific frequency (e.g., 12 MHz) under the control of the control unit 110. Note that the light projecting element 120 is not limited to a laser diode that emits coherent light, and an element that emits incoherent light, such as an LED, may be used.

光軸調整素子130は、上述のように、投光素子120から投光された検出光L1の光軸を調整する素子である。本実施形態においては、光軸調整素子130として、液晶セルに電圧を加えてオン/オフを制御することにより偏向を実現する液晶デバイスを利用する。液晶デバイスは、具体的には、液晶セルが配列された液晶回折格子(例えば、会誌「光学」30巻1号:「液晶光学デバイスの研究動向」第6頁)を積層し、入力された制御信号に応じて入射されたレーザ光の偏向量を制御できるように液晶セルに印加する電圧を制御する制御回路を組み込んだデバイスである。また、光軸調整素子130としては、他にも、MEMSミラー、光フェーズドアレイ、電気光学結晶などを利用することができる。 As described above, the optical axis adjustment element 130 is an element that adjusts the optical axis of the detection light L1 projected from the light projecting element 120. In this embodiment, a liquid crystal device that realizes deflection by applying a voltage to a liquid crystal cell and controlling the on/off state is used as the optical axis adjustment element 130. Specifically, the liquid crystal device is a device in which a liquid crystal diffraction grating in which liquid crystal cells are arranged (for example, Journal of Optics, Vol. 30, No. 1: "Research Trends in Liquid Crystal Optical Devices," p. 6) is stacked, and a control circuit is incorporated that controls the voltage applied to the liquid crystal cell so that the amount of deflection of the incident laser light can be controlled according to an input control signal. In addition, as the optical axis adjustment element 130, a MEMS mirror, an optical phased array, an electro-optical crystal, etc. can also be used.

受光素子140は、二次元状に配列された光電変換画素を有する例えばCMOSセンサであり、受光した検出光L2を電気信号に変換して制御部110へ送信する。なお、図においてはワークへ向けて投光される検出光L1と、受光素子140で受光する検出光L2の光路を分けて示すが、実際には図1に示すように同一光路であり、例えばダイクロイックミラーを用いて受光素子140へ向かう検出光L2の光路を検出光L1の光路から分離する。また、光軸調整素子130は、投光素子120及び受光素子140と共に筐体101内に収容されているので、筐体101の外に検出光L1の光軸を調整する可動部を設ける必要がない。したがって、筐体101を例えば製造ラインに付随する構造物に直接的に固定できるので、光学式センサ100の設置がしやすく、また作業者による不用意な接触等の影響も受けにくい。 The light receiving element 140 is, for example, a CMOS sensor having photoelectric conversion pixels arranged two-dimensionally, and converts the received detection light L2 into an electrical signal and transmits it to the control unit 110. In the figure, the optical paths of the detection light L1 projected toward the work and the detection light L2 received by the light receiving element 140 are shown separately, but in reality, as shown in FIG. 1, they are the same optical path, and the optical path of the detection light L2 toward the light receiving element 140 is separated from the optical path of the detection light L1 using, for example, a dichroic mirror. In addition, since the optical axis adjustment element 130 is housed in the housing 101 together with the light projecting element 120 and the light receiving element 140, it is not necessary to provide a movable part for adjusting the optical axis of the detection light L1 outside the housing 101. Therefore, since the housing 101 can be directly fixed to, for example, a structure associated with the manufacturing line, the optical sensor 100 is easy to install and is less susceptible to the influence of inadvertent contact by an operator.

操作ボタン150は、ユーザからの指定を受け付ける操作部材であり、例えば、UPボタンとDOWNボタン、十字ボタンなどが含まれていてもよい。操作ボタン150は、制御部110と協働して、光学式センサ100の各種項目の入力を受け付ける受付部としての機能を担う。なお、操作部材としては操作ボタンに限らず、タッチセンサなど他のデバイスであってもよい。 The operation button 150 is an operation member that accepts specifications from the user, and may include, for example, an UP button, a DOWN button, a cross button, etc. The operation button 150 cooperates with the control unit 110 to function as a reception unit that accepts input of various items of the optical sensor 100. Note that the operation member is not limited to the operation button, and may be another device such as a touch sensor.

表示パネル160は、例えば液晶パネルであり、光学式センサ100の設定状態、検出結果としての距離情報や未検出情報などが表示される。なお、光学式センサ100の設定状態を示すデバイスとしては、LEDなどが設けられていてもよい。入出力IF170は、ケーブル103を介して外部機器と情報の授受を行うためのインタフェースであり、例えばEthernet(登録商標)ユニットやLANユニットを含む。なお、入出力IF170としては、ケーブル103を介した有線接続に限らず、無線LANやBluetooth(登録商標)に対応する無線の接続ユニットを含んでもよい。 The display panel 160 is, for example, a liquid crystal panel, and displays the setting state of the optical sensor 100, distance information as a detection result, undetected information, and the like. An LED or the like may be provided as a device indicating the setting state of the optical sensor 100. The input/output IF 170 is an interface for sending and receiving information to and from an external device via the cable 103, and includes, for example, an Ethernet (registered trademark) unit or a LAN unit. The input/output IF 170 is not limited to a wired connection via the cable 103, and may also include a wireless connection unit compatible with a wireless LAN or Bluetooth (registered trademark).

制御部110は、外部の操作盤に対してユーザが行った操作や外部機器であるPLCが出力する制御信号を、入出力IF170を介して受け付けることもできる。例えば、ユーザが操作盤を操作してワークの検査を開始する指示を行う場合には、入出力IF170は、制御部110と協働して検査開始の指示を受け付ける受付部としての機能を担う。 The control unit 110 can also receive operations performed by a user on an external operation panel and control signals output by a PLC, which is an external device, via the input/output IF 170. For example, when a user operates the operation panel to instruct the start of inspection of a workpiece, the input/output IF 170 works in cooperation with the control unit 110 as a reception unit that receives the instruction to start inspection.

記憶部180は、不揮発性の記憶媒体であり、例えばフラッシュメモリによって構成されている。記憶部180は、光学式センサ100の制御や処理を実行するプログラムの他にも、制御や演算に用いられる様々なパラメータ値、関数、ルックアップテーブル等を記憶し得る。また、記憶部180は、調整モードの開始時に検出された初期検出距離や、検出光L1の確定された検査方向を記憶する。 The storage unit 180 is a non-volatile storage medium, and is configured by, for example, a flash memory. The storage unit 180 can store various parameter values, functions, look-up tables, and the like used for control and calculation, in addition to programs for executing control and processing of the optical sensor 100. The storage unit 180 also stores the initial detection distance detected at the start of the adjustment mode and the confirmed inspection direction of the detection light L1 .

制御部110は、制御プログラムが指示する処理に応じて様々な演算を実行する機能演算部としての役割も担う。制御部110は、投光調整部111、距離演算部112として機能し得る。投光調整部111は、光軸調整素子130を駆動することにより検出光L1を予め設定された複数の特定方向へ順次投光して得た検出結果のうち、検出光L1が遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、検査ワークの検査のために投光する検出光L1の投光方向を認識した当該指示方向に基づいて調整する。また、検査ワークの検査時には、そのように調整され確定された検査方向へ検出光L1が投光されるように光軸調整素子130を駆動する。距離演算部112は、投光した検出光L1と、受光した検出光L2の時間差を例えば両者の位相差を用いて演算し、予備ワークあるいは検査ワークまでの距離に変換する。制御部110は、距離演算部112の演算結果をデータ構造化し、距離情報として出力することができる。あるいは、受光素子140が検出光L2を受光しない場合には、規定された未検出情報を出力することができる。 The control unit 110 also plays a role as a functional calculation unit that executes various calculations according to the processing instructed by the control program. The control unit 110 can function as a light projection adjustment unit 111 and a distance calculation unit 112. The light projection adjustment unit 111 recognizes the specific direction in which the detection result that the detection light L 1 is interrupted is obtained as the indicated direction among the detection results obtained by sequentially projecting the detection light L 1 in a plurality of specific directions set in advance by driving the optical axis adjustment element 130, and adjusts the projection direction of the detection light L 1 to be projected for the inspection of the inspection work based on the recognized indicated direction. In addition, when inspecting the inspection work, the optical axis adjustment element 130 is driven so that the detection light L 1 is projected in the inspection direction adjusted and determined in this way. The distance calculation unit 112 calculates the time difference between the projected detection light L 1 and the received detection light L 2 , for example, using the phase difference between the two, and converts it into the distance to the preliminary work or the inspection work. The control unit 110 can convert the calculation result of the distance calculation unit 112 into a data structure and output it as distance information, or, when the light receiving element 140 does not receive the detection light L2 , can output specified non-detection information.

ユーザは、操作ボタン150等を介して光学式センサ100を調整モードに切り替え、検出光L1が向けられるべき検査方向を確定させるための調整作業を行う。以下にその手順を具体的に説明する。 The user switches the optical sensor 100 to an adjustment mode via the operation button 150 or the like, and performs an adjustment operation to determine the inspection direction in which the detection light L1 should be directed. The procedure will be specifically described below.

図3は、予備ワーク210に対する指示投光IU、IR、ID、ILと調整投光LTの投光を説明する図である。光学式センサ100は、製造ライン300上の検査位置辺りに向けて、製造ラインに付随する構造物に固定されている。ユーザは、予定している検査対象物と同一種類の予備対象物である予備ワーク210を、ターゲットとする検査箇所211が検査位置辺りに位置するように、製造ライン300上に載置する。ここで、検査箇所211は検出光L1の偏向可能範囲に含まれていればよく、ユーザは、それ程の注意を払うことなくおよその場所に予備ワーク210を製造ライン300上に載置すればよい。 3 is a diagram for explaining the projection of the instruction light projections IU , IR , ID , and IL and the adjustment light projection LT to the preliminary work 210. The optical sensor 100 is fixed to a structure associated with the production line, facing the vicinity of the inspection position on the production line 300. The user places the preliminary work 210, which is a preliminary object of the same type as the object to be inspected, on the production line 300 so that the target inspection point 211 is located near the inspection position. Here, the inspection point 211 only needs to be included in the deflectable range of the detection light L1 , and the user can place the preliminary work 210 on the production line 300 in an approximate location without paying much attention.

なお、予備ワーク210は、検査箇所211が良好と判定される状態の、基準品であることが望ましい。本実施例においては、製造ライン300上を順番に流されるそれぞれのワークに六角ネジが良好に締結されていることを検査する場合を想定する。この場合、検査箇所211は六角ネジのネジ頭であり、予備ワーク210においても六角ネジが正しく締結されている状態であることが望ましい。 It is desirable that the preliminary workpiece 210 is a reference product in a state where the inspection point 211 is judged to be good. In this embodiment, it is assumed that each workpiece that is conveyed in sequence on the production line 300 is inspected to ensure that the hexagonal screws are properly fastened. In this case, the inspection point 211 is the head of the hexagonal screw, and it is desirable that the hexagonal screws are properly fastened in the preliminary workpiece 210 as well.

このように光学式センサ100と予備ワーク210が設置された状態で、ユーザは、操作ボタン150等を操作して光学式センサ100を調整モードに切り替える。光学式センサ100は、調整モードに切り替えられると、指示投光IU、IR、ID、ILと調整投光LTを順次かつ繰り返し実行する。調整投光LTは、検査対象物を検査する検出光L1の投光方向(検査方向)を確定するための、仮の検査方向へ向けて投光された調整対象光である。調整投光LTは、調整モード開始時においては、例えば偏向可能範囲Rの中心に向けられる。 With the optical sensor 100 and the preliminary workpiece 210 thus placed, the user operates the operation button 150 or the like to switch the optical sensor 100 to the adjustment mode. When the optical sensor 100 is switched to the adjustment mode, it sequentially and repeatedly executes the instruction light projections IU , IR , ID , and IL and the adjustment light projection L T. The adjustment light projection L T is light to be adjusted that is projected toward a tentative inspection direction to determine the projection direction (inspection direction) of the detection light L1 that inspects the inspection target. At the start of the adjustment mode, the adjustment light projection L T is directed toward the center of the deflectable range R, for example.

指示投光IU、IR、ID、ILは、ユーザから調整投光LTの投光方向を調整する指示を受け付けるために、それぞれ偏向可能範囲Rの四方へ向けて投光された指示検出光である。本実施例においては、図示するように、指示投光IUは偏向可能範囲Rの境界上辺の中点に、指示投光IRは偏向可能範囲Rの境界右辺の中点に、指示投光IDは偏向可能範囲Rの境界下辺の中点に、指示投光ILは偏向可能範囲Rの境界左辺の中点にそれぞれ向けて投光される。すなわち、本実施例においては、指示投光を投光する複数の特定方向として、偏向可能範囲Rの中心に対して、調整可能な範囲の端となる上下左右の4方向が設定されている。なお、複数の特定方向はこれに限らず、例えば偏向可能範囲Rの境界の四隅の方向を設定してもよいし、これに本実施例の4方向を加えた8方向を設定してもよい。 The instruction light projections IU , IR , ID , and IL are instruction detection lights projected toward the four directions of the deflectable range R in order to receive an instruction from the user to adjust the projection direction of the adjustment light projection L T. In this embodiment, as shown in the figure, the instruction light projection IU is projected toward the midpoint of the upper side of the boundary of the deflectable range R, the instruction light projection IR is projected toward the midpoint of the right side of the boundary of the deflectable range R, the instruction light projection ID is projected toward the midpoint of the lower side of the boundary of the deflectable range R, and the instruction light projection IL is projected toward the midpoint of the left side of the boundary of the deflectable range R. That is, in this embodiment, four directions, namely, up, down, left, and right, which are the ends of the adjustable range with respect to the center of the deflectable range R, are set as the multiple specific directions in which the instruction light is projected. Note that the multiple specific directions are not limited to this, and for example, the directions of the four corners of the boundary of the deflectable range R may be set, or eight directions may be set by adding the four directions of this embodiment to the above.

投光調整部111は、投光素子120から発出された検出光L1を順次偏向して、指示投光IU→指示投光IR→指示投光ID→指示投光IL→調整投光LTを1サイクルとする投光を繰り返す。具体的には、それぞれの投光が例えば0.01秒継続するように、順次切り替える。検出光L1は可視光であるので、ユーザは、これらの投光が予備ワーク210上に形成するスポットSPU、SPR、SPD、SPL、SPTを視認することができる。なお、調整モードの開始時においては、スポットSPTがスポットSPU、SPR、SPD、SPLに囲まれた内部、特に囲まれた内部の中心に位置するように、調整投光LTの投光方向が調整されるとよい。このように調整されると、ユーザは、指示投光IU、IR、ID、ILと調整投光LTの役割を直感的に把握することができ、また、その後の調整によってスポットSPTが移動されても、調整投光LTの偏向量や偏向方向を容易に把握することができる。 The light projection adjustment unit 111 sequentially deflects the detection light L 1 emitted from the light projection element 120, and repeats light projection in one cycle of command light projection I U → command light projection IR → command light projection ID → command light projection IL → adjustment light projection LT . Specifically, the light projection is switched sequentially so that each light projection lasts, for example, for 0.01 seconds. Since the detection light L 1 is visible light, the user can visually recognize the spots SP U , SP R , SP D , SP L , and SP T formed by these light projections on the preliminary work 210. At the start of the adjustment mode, it is preferable to adjust the projection direction of the adjustment light L T so that the spot SP T is located inside the area surrounded by the spots SP U , SP R , SP D , and SP L , especially at the center of the surrounded area. When adjustments are made in this manner, the user can intuitively grasp the roles of the command light projections IU , IR , ID , and IL and the adjustment light projection L T , and can easily grasp the deflection amount and deflection direction of the adjustment light L T even if the spot SP T is moved by subsequent adjustments.

ここで、投光調整部111は、調整投光LTのスポットSPTと指示投光IU、IR、ID、ILのスポットSPU、SPR、SPD、SPLが区別されるように、調整投光LTと指示投光IU、IR、ID、ILの投光の態様を異ならせる。具体的には、制御部110と協働して投光素子120の投光を制御し、調整投光LTに対して発光強度を上げたり、点滅させたりすることができる。このように投光の態様を異ならせることにより、ユーザは、一つの投光素子120から投光される検出光L1でありながら、それぞれの投光の役割を容易に認識することができる。 Here, the light projection adjustment unit 111 differentiates the light projection modes of the adjustment light LT and the command light projections IU , IR , ID , and IL so that the spot SP T of the adjustment light LT and the spots SP U , SPR , SPD , and SPL of the command light projections IU , IR , ID , and IL can be distinguished. Specifically, the light projection adjustment unit 111 cooperates with the control unit 110 to control the projection of the light projection element 120, and can increase the light emission intensity of the adjustment light LT or blink it. By differentiating the light projection modes in this way, the user can easily recognize the role of each light projection, even though the detection light L1 is projected from a single light projection element 120.

投光調整部111は、調整モードが開始されると、開始時に実行された指示投光IU、IR、ID、ILのそれぞれに対する距離を距離演算部112に演算させる。投光調整部111は、これらの演算結果を初期検出距離DU、DR、DD、DLとして記憶部180に記憶する。 When the adjustment mode is started, the light-projection adjustment unit 111 causes the distance calculation unit 112 to calculate the distances for each of the command light projections I U , IR , ID , and IL executed at the start of the adjustment mode. The light-projection adjustment unit 111 stores these calculation results in the storage unit 180 as initial detection distances D U , D R , D D , and D L.

図4は、調整投光LTを右方向へ移動させる場合の調整方法を説明する図である。上述のように調整モードが開始されると、調整モードが終了するまで、投光調整部111は、指示投光IU→指示投光IR→指示投光ID→指示投光IL→調整投光LTの投光を繰り返す。距離演算部112は、指示投光IU、IR、ID、ILに対する検出距離をそれぞれの投光に同期して算出する。この状態でユーザが例えば図示するように人差指を指示投光IRの光路中に突き出すと、スポットSPRはユーザの人差指上に形成され、指示投光IRは人差指に遮られ、それより後方(破線で示す)へは進行しない。距離演算部112は、指示投光IRについて、人差指までの距離DR’を算出する。 4 is a diagram for explaining an adjustment method in the case where the adjustment light L T is moved to the right. When the adjustment mode is started as described above, the light projection adjustment unit 111 repeats the projection of the instruction light I U →instruction light I R →instruction light I D →instruction light I L →adjustment light L T until the adjustment mode is ended. The distance calculation unit 112 calculates the detection distance for each of the instruction light projections I U , I R , I D , and I L in synchronization with the projection of each light. In this state, if the user sticks out his/her index finger in the optical path of the instruction light I R as shown in the figure, for example, the spot S P R is formed on the user's index finger, and the instruction light I R is blocked by the index finger and does not proceed further back (indicated by a broken line). The distance calculation unit 112 calculates the distance D R ' to the index finger for the instruction light I R.

算出結果が投光調整部111へ引き渡されると、投光調整部111は、初期検出距離DRとの比較から、指示投光IRが遮られたと評価する。指示投光IRは偏向可能範囲Rの中心に対して右側へ向けて投光されたものなので、投光調整部111は、その評価結果から、調整投光LTをその時点における投光方向から右側へ、予め設定された偏向量だけ偏向させる。ユーザが人差指を指示投光IRの光路中にしばらくの間突き出しておくと、調整投光LTは、徐々に右側へ偏向され、やがて検査箇所211の上方まで到達する。ユーザは、タイミングを見計らって、人差指を指示投光IRの光路から退避させる。 When the calculation result is handed over to the light projection adjustment unit 111, the light projection adjustment unit 111 evaluates that the instruction light projection I R has been blocked by comparing it with the initial detection distance D R. Since the instruction light projection I R is projected to the right of the center of the deflectable range R, the light projection adjustment unit 111 deflects the adjusted light L T by a preset deflection amount to the right from the light projection direction at that time based on the evaluation result. If the user holds out his/her index finger in the optical path of the instruction light projection I R for a while, the adjusted light L T is gradually deflected to the right and eventually reaches above the inspection point 211. The user waits for the right timing to move his/her index finger out of the optical path of the instruction light projection I R.

図5は、調整投光LTを下方向へ移動させる場合の調整方法を説明する図である。図4に続いて、ユーザが例えば図示するように人差指を指示投光IDの光路中に突き出すと、スポットSPDはユーザの人差指上に形成され、距離演算部112は、指示投光IDについて、人差指までの距離DD’を算出する。 Fig. 5 is a diagram for explaining an adjustment method in the case where the adjustment light L T is moved downward. Following Fig. 4, when the user thrusts out his/her index finger into the optical path of the instruction light I D as shown in the figure, the spot S P D is formed on the user's index finger, and the distance calculation unit 112 calculates the distance D D ' to the index finger for the instruction light I D.

算出結果が投光調整部111へ引き渡されると、投光調整部111は、初期検出距離DDとの比較から、指示投光IDが遮られたと評価する。指示投光IDは偏向可能範囲Rの中心に対して下側へ向けて投光されたものなので、投光調整部111は、その評価結果から、調整投光LTをその時点における投光方向から下側へ、予め設定された偏向量だけ偏向させる。ユーザが人差指を指示投光IDの光路中にしばらくの間突き出しておくと、調整投光LTは、徐々に下側へ偏向され、やがて検査箇所211まで到達する。ユーザは、タイミングを見計らって、人差指を指示投光IDの光路から退避させる。 When the calculation result is handed over to the light projection adjustment unit 111, the light projection adjustment unit 111 evaluates that the instruction light projection I D has been blocked by comparing it with the initial detection distance D D. Since the instruction light projection I D is projected downward with respect to the center of the deflectable range R, the light projection adjustment unit 111 deflects the adjusted light L T downward from the light projection direction at that time by a preset deflection amount based on the evaluation result. If the user holds out his/her index finger in the optical path of the instruction light projection I D for a while, the adjusted light L T is gradually deflected downward and eventually reaches the inspection point 211. The user waits for the right timing to move his/her index finger out of the optical path of the instruction light projection I D.

図6は、調整投光LTの投光方向を検査方向に確定する確定方法を説明する図である。ユーザは、上述のように調整投光LTを検査箇所211まで到達させたら、その投光方向を検査方向として確定させる。具体的には、例えば図示するように操作ボタン150のうちの確定ボタンを押下して確定させる。その時点における調整投光LTの投光方向が検査方向として確定されると、投光調整部111は、その検査方向示す方向座標(xT,yT)を記憶部180に記憶する。投光調整部111は、調整投光LTの投光の態様とは異なる態様で確定された検査投光LCを一定時間行う。具体的には、制御部110と協働して投光素子120の投光を制御し、調整投光LTに対して発光強度を上げたり、点滅させたりすることができる。これにより、検査箇所211には視認性の高いスポットSPCが形成され、ユーザは検査が実行される箇所を確認することができる。このように検査方向が確定されると、ユーザは、光学式センサ100から比較的遠くの検出対象物を検出する場合であっても、検出光のスポットを確認しつつ取付器具を繰り返し緩めたり締め付けたりするといった煩雑な作業を省くことができる。 FIG. 6 is a diagram for explaining a method for determining the projection direction of the adjusted light L T as the inspection direction. When the user causes the adjusted light L T to reach the inspection point 211 as described above, the user determines the projection direction as the inspection direction. Specifically, for example, as shown in the figure, the user presses the determination button of the operation button 150 to determine the projection direction. When the projection direction of the adjusted light L T at that time is determined as the inspection direction, the light projection adjustment unit 111 stores the direction coordinate (x T , y T ) indicating the inspection direction in the storage unit 180. The light projection adjustment unit 111 performs the determined inspection light L C in a manner different from the projection manner of the adjusted light L T for a certain period of time. Specifically, the light projection adjustment unit 111 cooperates with the control unit 110 to control the projection of the light projecting element 120, and can increase the emission intensity of the adjusted light L T or make it blink. As a result, a highly visible spot SP C is formed at the inspection point 211, and the user can confirm the location where the inspection is performed. Once the inspection direction is determined in this manner, the user can avoid the tedious task of repeatedly loosening and tightening the mounting fixture while checking the detection light spot, even when detecting an object that is relatively far away from the optical sensor 100.

図7は、検査対象物である検査ワーク290を検査する様子を示す図である。上述のように検査方向が確定すると、ユーザは、予備ワーク210を取り除き、対象となる検査ワーク290が順次流れるように製造ライン300を稼働する。投光調整部111は、検査開始の指示を受け付けると、記憶部180に記憶された方向座標(xT,yT)を読み出して検査投光LCの投光方向をその方向へ固定する。制御部110は、検査ワーク290が製造ライン300上の規定位置に到達するたびに検査投光LCを行って検出処理を実行させ、その検出結果を外部機器へ出力する。 7 is a diagram showing a state in which an inspection workpiece 290, which is an object to be inspected, is inspected. Once the inspection direction is determined as described above, the user removes the preliminary workpiece 210 and operates the production line 300 so that the target inspection workpiece 290 flows in sequence. Upon receiving an instruction to start inspection, the light projection adjustment unit 111 reads out the direction coordinates (x T , y T ) stored in the storage unit 180 and fixes the projection direction of the inspection light projection L C to that direction. Each time the inspection workpiece 290 reaches a specified position on the production line 300, the control unit 110 performs the inspection light projection L C to execute a detection process and outputs the detection result to an external device.

ここでは、単純に検査箇所221の検出距離を検出結果として出力する場合について説明する。図示するように、ある検査ワーク290aにおいて六角ネジは正しく締結されており、光学式センサ100は、検査箇所291aにおける検出距離として距離Daを外部機器へ出力する。外部機器は、距離Daが許容範囲に含まれることを確認して「合格」と判定する。一方、次の検査ワーク290bにおいて六角ネジは締結が不十分で浮いており、光学式センサ100は、検査箇所291bにおける検出距離として距離Dbを外部機器へ出力する。外部機器は、距離Dbが許容範囲に含まれないことを確認して「不合格」と判定する。このようにして、光学式センサ100を用いて検査ワーク290の良/不良を判定することができる。なお、合格/不合格の判定を光学式センサ100が行い、その結果を外部機器へ出力するようにしてもよい。 Here, a case will be described where the detection distance of the inspection point 221 is simply output as the detection result. As shown in the figure, the hexagonal screw is properly fastened in a certain inspection work 290a, and the optical sensor 100 outputs the distance D a to the external device as the detection distance at the inspection point 291a. The external device confirms that the distance D a is within the allowable range and judges it as "pass". On the other hand, the hexagonal screw in the next inspection work 290b is insufficiently fastened and floats, and the optical sensor 100 outputs the distance D b to the external device as the detection distance at the inspection point 291b. The external device confirms that the distance D b is not within the allowable range and judges it as "fail". In this way, the optical sensor 100 can be used to judge whether the inspection work 290 is good or bad. The optical sensor 100 may also be configured to judge pass/fail and output the result to the external device.

次に、いくつかの変形例について説明する。図8は、1つ目の変形例として、対象物である予備ワーク220の形状に応じて指示投光の投光方向が自動調整される様子を示す図である。 Next, we will explain some modified examples. Figure 8 shows the first modified example, in which the direction of the instruction light is automatically adjusted according to the shape of the target object, the preliminary workpiece 220.

図3から図6を用いて説明した実施例においては、指示投光IU、IR、ID、ILの投光方向は、偏向可能範囲Rの端(境界)に設定されていた。しかし、対象物の形状によっては指示投光が投光された箇所に反射面が存在せず、スポットを形成できない場合がある。そのような場合は、受光素子140は反射光である検出光L2を検出できず、距離演算部112は距離不算出の結果を出力する。また、ユーザはいずれの方向へ指示投光が行われているのか視認することができず、そのような指示投光を遮ることも難しい。 In the embodiment described with reference to Figures 3 to 6, the projection direction of the instruction light IU , IR , ID , and IL was set to the end (boundary) of the deflectable range R. However, depending on the shape of the target object, there may be no reflective surface at the location where the instruction light is projected, and a spot cannot be formed. In such a case, the light receiving element 140 cannot detect the detection light L2, which is the reflected light, and the distance calculation unit 112 outputs a result of the distance not being calculated. In addition, the user cannot visually recognize in which direction the instruction light is being projected, and it is difficult to block such instruction light.

そこで、投光調整部111は、距離不算出の結果であった指示投光に対して、その投光方向を偏向可能範囲Rの内側へ徐々に移動させる調整を実行する。具体的には、例えば図示するように初期の指示投光IUに対して距離不算出の結果を得た場合には、投光調整部111は、指示投光IUを予め設定された偏向量だけ下方へ偏向させる。この場合、指示投光IUにとっての下方は、偏向可能範囲Rの中心方向である。偏向させた後も再び距離不算出の結果を得た場合には、更に指示投光IUを予め設定された偏向量だけ下方へ偏向させる。このような処理を繰り返し、予備ワーク210上にスポットSPUが形成され、距離検出に成功した時点で、指示投光IUの投光方向の調整を終了する。 Therefore, the light projection adjustment unit 111 executes an adjustment to gradually move the projection direction of the instruction light that has resulted in the distance not being calculated toward the inside of the deflection possible range R. Specifically, for example, as shown in the figure, when the distance not being calculated is obtained for the initial instruction light projection IU , the light projection adjustment unit 111 deflects the instruction light IU downward by a preset deflection amount. In this case, the downward direction for the instruction light IU is the center direction of the deflection possible range R. If the distance not being calculated is obtained again after the deflection, the instruction light IU is further deflected downward by a preset deflection amount. This process is repeated, and when a spot SP U is formed on the preliminary work 210 and the distance detection is successful, the adjustment of the projection direction of the instruction light IU is terminated.

このようにスポットSPUが予備ワーク210上に形成されれば、距離演算部112は初期検出距離DUを算出することができ、ユーザは指示投光IUの光路を認識することができる。指示投光IR、ID、ILについても同様に、距離不算出の結果を得た場合には、その投光方向を偏向可能範囲Rの中心方向へ向かって徐々に偏向することにより自動調整を実行する。 When the spot SP U is formed on the preliminary work 210 in this manner, the distance calculation unit 112 can calculate the initial detection distance D U , and the user can recognize the optical path of the instruction light projection I U. Similarly, for the instruction lights I R , I D , and I L , if a result of distance calculation is not obtained, the light projection direction is gradually deflected toward the center of the deflection range R, thereby executing automatic adjustment.

なお、偏向させる方向は偏向可能範囲Rの中心方向でなくてもよい。また、それぞれの指示投光が上下左右の相対関係を保って予備ワーク210上にスポットを形成するように、距離不算出の結果を得た指示投光以外の指示投光も併せて偏向させてもよい。このように自動調整を実行すれば、いずれの指示投光も予備ワーク210上にスポットを形成することができるので、ユーザは、それぞれの指示投光の光路を発見しやすく、方向指示を与えやすい。 The direction of deflection does not have to be toward the center of the deflectable range R. Also, instruction lights other than the instruction light for which the distance was not calculated may be deflected together so that each instruction light forms a spot on the preliminary work 210 while maintaining the relative relationship between the up, down, left, and right directions. By performing automatic adjustment in this manner, all instruction lights can form a spot on the preliminary work 210, making it easier for the user to find the light path of each instruction light and give directional instructions.

図9は、2つ目の変形例として、対象物である予備ワーク210の距離に応じて指示投光の投光方向が自動調整される様子を示す図である。図1に示すように、偏向可能範囲Rは、光学式センサ100から遠ざかるにつれて大きくなる。したがって、製造ライン300が光学式センサ100から遠い場合には、対象物に対して偏向可能範囲Rが大きくなり、指示投光の投光方向を偏向可能範囲Rの端(境界)に設定すると、距離不算出となることが多くなる。また、距離が算出できる場合でもそれぞれが形成するスポットの間隔が拡がってしまい、ユーザはそれぞれの光路を遮る動作を行いにくくなってしまう。 Figure 9 shows a second modified example in which the direction of the instruction light is automatically adjusted depending on the distance to the target, the preliminary workpiece 210. As shown in Figure 1, the deflectable range R increases with distance from the optical sensor 100. Therefore, when the production line 300 is far from the optical sensor 100, the deflectable range R for the target increases, and setting the direction of the instruction light to the edge (boundary) of the deflectable range R often results in the distance not being calculated. Even if the distance can be calculated, the spacing between the spots formed by each increases, making it difficult for the user to block each light path.

そこで、投光調整部111は、指示投光IU、IR、ID、ILの少なくともいずれか又は調整投光LTで検出された予備ワーク210までの距離に基づいてそれぞれの投光方向を調整する。例えば、図示するように調整投光LTが形成するスポットSPTにより距離DPが検出された場合、距離DPに対して予め規定されている大きさに合わせて指示投光枠Sを決定し、指示投光IU、IR、ID、ILのそれぞれの投光方向をこの指示投光枠Sの上下左右の方向に合わせるように調整する。 Therefore, the light projection adjustment unit 111 adjusts the projection direction of each of the command light projections IU , IR , ID , and IL based on the distance to the preliminary workpiece 210 detected by at least one of the command light projections IU, IR, ID, and IL or the adjusted light projection LT . For example, when the distance D P is detected by the spot SP T formed by the adjusted light projection LT as shown in the figure, the command light projection frame S is determined according to a size that is predefined for the distance D P , and the projection directions of each of the command light projections IU , IR , ID , and IL are adjusted to match the up, down, left, and right directions of this command light projection frame S.

このように予備ワーク210の距離に応じて指示投光枠Sを偏向可能範囲Rの内側に設定して指示投光の投光方向を調整すれば、予備ワーク210上にそれぞれのスポットが互いに適度な間隔で形成されることが期待できる。ユーザは、それぞれの光路を遮る動作を行いやすくなる。なお、このように指示投光の投光方向を調整しても距離不算出の結果を得る指示投光が存在する場合には、その指示投光に対して図8の例を適用し、更に投光方向の調整を行ってもよい。 By setting the instruction light projection frame S inside the deflectable range R in accordance with the distance to the preliminary workpiece 210 and adjusting the projection direction of the instruction light in this way, it is expected that the respective spots will be formed at appropriate intervals on the preliminary workpiece 210. This makes it easier for the user to perform the action of blocking each light path. Note that if there is an instruction light that results in an inability to calculate the distance even after adjusting the projection direction of the instruction light in this way, the example of Figure 8 may be applied to that instruction light, and the projection direction may be further adjusted.

図10は、3つ目の変形例として、指示投光IU、IR、ID、ILに加えて境界投光Pa、Pb、Pc、Pdを行う様子を示す図である。図9の例のように予備ワーク210の距離に応じて指示投光枠Sを偏向可能範囲Rの内側に設定すると、ユーザは、調整投光LTをどの範囲で移動できるか認識しづらくなる。そこで、投光調整部111は、調整投光LTの移動指示を受け付けるための指示投光IU、IR、ID、ILとは別に、調整可能範囲を示すための指示投光境界投光Pa、Pb、Pc、Pdをさらに実行する。 Fig. 10 is a diagram showing a state in which boundary light projections Pa , Pb , Pc , and Pd are performed in addition to instruction light projections IU , IR , ID , and IL as a third modified example. If the instruction light projection frame S is set inside the deflectable range R according to the distance of the preliminary work 210 as in the example of Fig. 9, it becomes difficult for the user to recognize the range in which the adjustment light L T can be moved. Therefore, the light projection adjustment unit 111 further executes instruction light boundary projections Pa , Pb , Pc , and Pd for indicating the adjustable range, in addition to the instruction light projections IU , IR , ID , and IL for receiving a movement instruction for the adjustment light L T.

図示するように、予備ワーク230が比較的大きければ、偏向可能範囲Rの四隅に対して投光される境界投光Pa、Pb、Pc、Pdは、それぞれ予備ワーク230の表面にスポットSPa、SPb、SPc、SPdを形成することができる。ユーザは、このように形成されたスポットSPa、SPb、SPc、SPdを視認することにより、調整投光LTをどの範囲で移動できるかを認識することができる。 As shown in the figure, if the preliminary work 230 is relatively large, the boundary projections P a , P b , P c , and P d projected onto the four corners of the deflection possible range R can form spots SP a , SP b , SP c , and SP d , respectively, on the surface of the preliminary work 230. By visually checking the spots SP a , SP b , SP c , and SP d thus formed, the user can recognize the range within which the adjustment projection L T can be moved.

投光調整部111は、投光素子120から発出された検出光L1を順次偏向して、例えば、指示投光IU→指示投光IR→指示投光ID→指示投光IL→調整投光LT→境界投光Pa→境界投光Pb→境界投光Pc→境界投光Pdを1サイクルとする投光を繰り返す。あるいは、境界投光の頻度を指示投光の頻度の半分にするなど、境界投光の頻度を下げてもよい。また、指示投光に対して、境界投光の発光強度を下げたり点灯時間を短くしたりしてもよい。 The light-projection adjustment unit 111 sequentially deflects the detection light L1 emitted from the light-projecting element 120, and repeats light projection in the following cycle: command light projection IU → command light projection IR → command light projection ID → command light projection IL → adjustment light projection LT → boundary light projection P a → boundary light projection P b → boundary light projection P c → boundary light projection P d . Alternatively, the frequency of the boundary light projection may be reduced, for example, by reducing the frequency of the boundary light projection to half the frequency of the command light projection. Furthermore, the emission intensity of the boundary light projection may be reduced or the lighting time may be shortened, relative to the command light projection.

このように境界投光を行うと、ユーザは、特に指示投光枠Sを超えて調整投光LTを移動させる場合に調整を行いやすい。例えば図示するように、指示投光枠Sの外側に存在する検査箇所231まで調整投光LTを移動させる場合に都合が良い。 By performing boundary projection in this manner, the user can easily perform adjustments, particularly when moving the adjustment projection L T beyond the designated projection frame S. For example, as shown in the figure, this is convenient when moving the adjustment projection L T to an inspection point 231 that exists outside the designated projection frame S.

図11は、4つ目の変形例として、調整投光LTを移動させる他の指示手法を説明する図である。これまで説明した各実施例においては、ユーザは、指示投光のいずれかを遮ることにより指示方向を認識させたが、4つ目の変形例では、それぞれの指示投光を連続的に遮り、その遮った順番により方向指示を認識させる。図11(A)から図11(C)は、時間の経過に伴って順番にいずれかの指示投光が遮られる様子を示す図である。 Fig. 11 is a diagram for explaining another instruction method for moving the adjustment light projection L T as a fourth modified example. In each embodiment described so far, the user recognizes the instruction direction by blocking one of the instruction lights, but in the fourth modified example, each instruction light is successively blocked, and the direction instruction is recognized based on the order in which they are blocked. Fig. 11 (A) to Fig. 11 (C) are diagrams showing how one of the instruction lights is blocked in order over time.

具体的には、ユーザが手のひらを上から下へ振る様子を示し、図11(A)はその初期の段階において指示投光IUを遮っている様子を示す。その後図11(B)に示すように、手のひらは指示投光IUに加えて指示投光IR、ILも遮り、やがて図11(C)に示すように、手のひらは指示投光IDを遮る。なお、図11(C)ではIRも同時に遮られている様子を示す。投光調整部111は、距離演算部112からそのような経時に沿って順次遮られたと評価し得る算出結果を受け取ると、手のひらが上から下へ振られたと認識し、調整投光LTをその時点における投光方向から下側へ、予め設定された偏向量だけ偏向させる。同様に、手のひらが下から上へ振られたと認識した場合には調整投光LTを上側へ、右から左へ振られたと認識した場合には調整投光LTを左側へ、左から右へ振られたと認識した場合には調整投光LTを右側へ予め設定された偏向量だけ偏向させる。 Specifically, the user shakes his palm from top to bottom, and Fig. 11(A) shows the state where the command light projection IU is blocked in the initial stage. After that, as shown in Fig. 11(B), the palm blocks the command light projections I R and I L in addition to the command light projection IU , and eventually, as shown in Fig. 11(C), the palm blocks the command light projection I D. Fig. 11(C) shows the state where I R is also blocked at the same time. When the light projection adjustment unit 111 receives a calculation result from the distance calculation unit 112 that can be evaluated as indicating such sequential blocking over time, it recognizes that the palm has been shaken from top to bottom, and deflects the adjusted light projection L T downward from the light projection direction at that time by a preset deflection amount. Similarly, when it is recognized that the palm of the hand is shaken from bottom to top, the adjustment light L T is deflected upward, when it is recognized that the palm is shaken from right to left, the adjustment light L T is deflected to the left, and when it is recognized that the palm is shaken from left to right, the adjustment light L T is deflected to the right by a preset deflection amount.

なお、例えば連続して手のひらを上から下へ振ろうとすると、併せて連続して下から上へ振ることになるので、誤認識を回避するために、投光調整部111は、指示方向の認識を一度行ったら、予め設定された設定時間(例えば1秒)の間、指示方向の認識を停止する。ユーザは、一度手のひらを振って指示方向を認識させたら、指示方向の認識が停止されている間に手のひらを初期位置へ戻す。 For example, if a user tries to wave his/her palm from top to bottom repeatedly, the palm will also be waved from bottom to top repeatedly, so in order to avoid erroneous recognition, the light projection adjustment unit 111 stops recognizing the pointing direction for a preset time period (e.g., one second) once it has recognized the pointing direction. After the user waves their palm once to have the pointing direction recognized, they return their palm to the initial position while recognition of the pointing direction is stopped.

図12は、5つ目の変形例として、調整投光LTの投光方向を検査方向に確定する他の確定方法を説明する図である。本変形例は、4つ目の変形例と相性が良いが、これに限らず、これまでの実施例のいずれにも組み合わせることができる。 12 is a diagram illustrating another method for determining the projection direction of the adjustment light L T as the inspection direction as a fifth modified example. This modified example is compatible with the fourth modified example, but is not limited to this and can be combined with any of the previous embodiments.

上述の図6の例では、調整投光LTを検査箇所211まで到達させたら、ユーザは、その投光方向を検査方向として確定させるために操作ボタン150を操作した。本変形例においては、ユーザは、調整投光LTを検査箇所211まで到達させた後に、図示するように、指示投光IU、IR、ID、ILのすべてを同時に遮ることにより、その投光方向を検査方向として確定させる。 6, when the adjusted light projection L T reaches the inspection point 211, the user operates the operation button 150 to confirm the light projection direction as the inspection direction. In this modified example, after the adjusted light projection L T reaches the inspection point 211, the user simultaneously blocks all of the instruction light projections I U , IR , ID , and IL as shown in the figure, thereby confirming the light projection direction as the inspection direction.

投光調整部111は、指示投光IU、IR、ID、ILのすべてが遮られたと評価される算出結果を距離演算部112から受け取った場合に、その時点における調整投光LTの投光方向を検査方向に確定する。すなわち、その検査方向示す方向座標(xT,yT)を記憶部180に記憶する。このように方向指示に連続して確定指示を受け付けるようにすれば、ユーザは、確定指示をするために光学式センサ100の操作ボタン150を操作する必要がないので、作業性の向上が期待できる。 When the light projection adjustment unit 111 receives from the distance calculation unit 112 a calculation result that indicates that all of the instruction light projections IU , IR , ID , and IL are blocked, it determines the projection direction of the adjustment light L T at that time as the inspection direction. That is, the direction coordinates ( xT , yT ) indicating the inspection direction are stored in the storage unit 180. If the determination instruction is accepted consecutively to the direction instruction in this way, the user does not need to operate the operation button 150 of the optical sensor 100 to give the determination instruction, and this is expected to improve operability.

なお、確定指示を検出する手法は、指示投光IU、IR、ID、ILのすべてが同時に遮られたことを検出する手法に限らず、他にも様々な手法を採用し得る。例えば、指示投光IU、IR、ID、ILのうち予め設定された組み合わせの指示投光がいずれも遮られたと検出された場合に、その時点における調整投光LTの投光方向を検査方向に確定してもよい。例えば指示投光IUとIDの組み合わせにおいては、同時に遮られることが偶発的に発生することは稀と考えられるので、このような組み合わせの指示投光が同時に遮られた場合には確定指示と認識してもよい。また、指示投光とは別に、確定指示を受け付けるための確定投光を行うようにしてもよい。確定投光が遮られた場合には、その時点における調整投光LTの投光方向を検査方向に確定する。確定投光は、指示投光の投光方向とは離れた方向へ行うとよい。 The method of detecting the final instruction is not limited to the method of detecting that all of the instruction light projections IU , IR , ID , and IL are blocked at the same time, and various other methods may be adopted. For example, when it is detected that all of the instruction light projections of a preset combination of the instruction light projections IU , IR , ID , and IL are blocked, the projection direction of the adjustment light projection L T at that time may be determined as the inspection direction. For example, in the combination of the instruction light projections IU and ID , it is considered that simultaneous blocking rarely occurs accidentally, so that when the instruction light projections of such a combination are blocked at the same time, it may be recognized as a final instruction. In addition to the instruction light projection, a final light projection for receiving a final instruction may be performed. When the final light projection is blocked, the projection direction of the adjustment light projection L T at that time is determined as the inspection direction. The final light projection may be performed in a direction away from the projection direction of the instruction light.

図13は、6つ目の変形例として、調整投光LTの投光を行うことなく直接的に検査方向を確定する調整手法を説明する図である。これまでに説明した実施例はいずれも、調整投光LTの移動指示を受け付けるために指示投光IU、IR、ID、ILを4方向(あるいはそれ以上)へ向けて投光し、いずれかが遮られたことを検出してその方向へ段階的に偏向させた。本変形例においては、指示投光IMの投光方向を偏向可能範囲Rに規定された格子点のそれぞれに対して設定する。そして、投光調整部111は、それらのうち最も至近で遮られたと評価される検出結果が得られた指示投光IMの投光方向を指示方向と認識し、その指示方向を直ちに検査方向として確定する。 13 is a diagram explaining an adjustment method for directly determining the inspection direction without projecting the adjustment light L T as a sixth modified example. In all of the embodiments described so far, the instruction light I U , I R , I D , and I L are projected in four directions (or more) to receive an instruction to move the adjustment light L T , and when any of them is blocked, the light is deflected in that direction stepwise. In this modified example, the projection direction of the instruction light I M is set for each of the lattice points defined in the deflectable range R. Then, the light projection adjustment unit 111 recognizes the projection direction of the instruction light I M for which a detection result is obtained that is evaluated as being most closely blocked as the instruction direction, and immediately determines the instruction direction as the inspection direction.

具体的には図13(A)に示すように、投光調整部111は、光軸調整素子130を駆動して、偏向可能範囲Rに設定された格子点の左上から右下まで一筆書きの要領で、検出光L1を順次偏向して投光する。格子点に対するそれぞれの投光を指示投光IMとする。ユーザは、例えば検査箇所211である六角ネジのネジ頭を検査方向にしたい場合には、当該ネジ頭を照射する指示投光IMの一つを他の指示投光IMと比べて最も光学式センサ100に近い場所で遮るように、人差指を突き出す。すると、投光調整部111は、その指示投光IMを指示方向と認識し、検査対象物を検査する検査方向として確定する。 Specifically, as shown in Fig. 13A, the light projection adjustment unit 111 drives the optical axis adjustment element 130 to sequentially deflect and project the detection light L1 in a single stroke from the upper left to the lower right of the lattice points set in the deflection possible range R. Each light projection onto the lattice point is designated as an instruction light projection I M. For example, when a user wants to direct the head of a hexagonal screw, which is the inspection point 211, in the inspection direction, the user thrusts out his/her index finger so as to block one of the instruction lights I M irradiating the screw head at a location closest to the optical sensor 100 compared to the other instruction lights I M. Then, the light projection adjustment unit 111 recognizes the instruction light projection I M as the instruction direction and determines it as the inspection direction for inspecting the inspection object.

図13(B)は、指示投光IMの投光の態様とは異なる態様で、確定された検査投光LCを一定時間行う様子を示す。具体的には、制御部110と協働して投光素子120の投光を制御し、調整投光LTに対して発光強度を上げたり、点滅させたりすることができる。このような調整手法によれば、複数回の指示工程を経て調整投光LTの投光方向を追い込む作業を省くことができるので、より直接的に、かつ短時間に検査方向を確定することができる。 13B shows a state in which the confirmed inspection light projection L C is performed for a certain period of time in a mode different from the mode of projection of the instruction light I M. Specifically, the light projection of the light-projecting element 120 can be controlled in cooperation with the control unit 110 to increase the emission intensity of the adjusted light L T or to make it blink. According to such an adjustment method, it is possible to omit the work of correcting the projection direction of the adjusted light L T through multiple instruction steps, and therefore it is possible to confirm the inspection direction more directly and in a short time.

なお、図の例では指示投光IMの投光方向を偏向可能範囲Rに規定された格子点のそれぞれに対して設定したが、指示投光IMの投光方向の設定はこれに限らない。指示投光IMの投光方向は、偏向可能範囲Rの少なくとも一部の範囲を覆うように規定された複数の離散点のそれぞれに対して設定されればよい。 In the illustrated example, the projection direction of the command light I M is set for each of the lattice points defined in the deflectable range R, but the setting of the projection direction of the command light I M is not limited to this. The projection direction of the command light I M may be set for each of a plurality of discrete points defined so as to cover at least a part of the deflectable range R.

次に、図3から図7を用いて説明した実施例を代表例として、制御部110の処理手順について説明する。図14は、制御部110の処理手順を説明するフロー図である。フローは、光学式センサ100が製造ライン300に付随する構造物に固定され、予備ワーク210が製造ライン300上に載置された状態で、調整モードが選択された時点から開始する。 Next, the processing procedure of the control unit 110 will be described using the embodiment described using Figures 3 to 7 as a representative example. Figure 14 is a flow diagram explaining the processing procedure of the control unit 110. The flow starts when the adjustment mode is selected with the optical sensor 100 fixed to a structure associated with the production line 300 and the preliminary workpiece 210 placed on the production line 300.

投光調整部111は、ステップS101で、偏向可能範囲Rの境界上辺へ向けた指示投光IU→境界右辺へ向けた指示投光IR→境界下辺へ向けた指示投光ID→境界左辺へ向けた指示投光ILを順次投光し、それぞれに対する距離を距離演算部112に演算させる。投光調整部111は、これらの演算結果を初期検出距離DU、DR、DD、DLとして記憶部180に記憶する。 In step S101, the light projection adjustment unit 111 sequentially projects a command light I U toward the upper boundary of the deflection range R, a command light I R toward the right boundary, a command light I D toward the lower boundary, and a command light I L toward the left boundary, and causes the distance calculation unit 112 to calculate the distance for each light. The light projection adjustment unit 111 stores the results of these calculations in the storage unit 180 as initial detection distances D U , D R , D D , and D L.

続いてステップS102へ進み、投光調整部111は、指示投光IU→指示投光IR→指示投光ID→指示投光ILを順に実行する。そして、ステップS103で、いずれかの指示投光が遮られたか否かを判断する。具体的には、それぞれの投光に対して算出された検出距離DU’、DR’、DD’、DL’が、初期検出距離DU、DR、DD、DLより閾値を超えて短くなったか否かによって、遮られたか否かを判断する。 Next, the process proceeds to step S102, where the light-projection adjustment unit 111 executes command light projection I U → command light projection IR → command light projection ID → command light projection IL in that order. Then, in step S103, it is determined whether any of the command light projections has been blocked. Specifically, it is determined whether a light projection has been blocked by determining whether the detection distances D U ', D R ', D D ', and D L ' calculated for each light projection have become shorter than the initial detection distances D U , D R , D D , and D L by exceeding a threshold value.

いずれも遮られていないと判断したら、ステップS104へ進み、投光調整部111は、調整投光LTを前回と同じ方向へ投光し、ステップS106へ進む。いずれかが遮られたと判断したら、投光調整部111は、調整投光LTを当該遮られた指示投光が示す方向へ向きを更新して投光し、ステップS106へ進む。 If it is determined that none of the light projections are blocked, the process proceeds to step S104, where the light projection adjustment unit 111 projects the adjusted light L T in the same direction as the previous time, and then proceeds to step S106. If it is determined that any of the light projections is blocked, the light projection adjustment unit 111 updates the direction of the adjusted light L T to the direction indicated by the blocked instruction light, and then proceeds to step S106.

投光調整部111は、ステップS106へ進むと、操作ボタン150を介して確定指示を受け付けたか否かを確認する。確定指示を受け付けていなければ、ステップS102へ戻って調整モードを続行する。確定指示を受け付けていれば、その時点における調整投光LTの投光方向を検査方向として確定させ、その検査方向示す方向座標(xT,yT)を記憶部180に記憶し、調整モードを終了してステップS107へ進む。 When the light projection adjustment unit 111 proceeds to step S106, it checks whether or not a confirmation instruction has been received via the operation button 150. If a confirmation instruction has not been received, the light projection adjustment unit 111 returns to step S102 and continues the adjustment mode. If a confirmation instruction has been received, the projection direction of the adjusted light L T at that time is confirmed as the inspection direction, the direction coordinates (x T , y T ) indicating the inspection direction are stored in the storage unit 180, the adjustment mode is terminated, and the process proceeds to step S107.

制御部110は、ステップS107で検査開始の指示を受け付けると、記憶部180に記憶された方向座標(xT,yT)を読み出して検査投光LCの投光方向をその方向へ固定する。そして、ステップS108へ進み、検査ワーク290が製造ライン300上の規定位置に到達するたびに検査投光LCを行って検出処理を実行させ、その検出結果を外部機器へ出力する。製造ライン300上を流れる予定数のワークの検査が終了したら、一連の処理を終える。 When the control unit 110 receives an instruction to start inspection in step S107, it reads out the direction coordinates ( xT , yT ) stored in the memory unit 180 and fixes the projection direction of the inspection light L C to that direction. Then, the process proceeds to step S108, where the inspection light L C is projected every time the inspected workpiece 290 reaches a specified position on the production line 300, causing a detection process to be executed and the detection results to be output to an external device. When the inspection of the planned number of works flowing on the production line 300 has been completed, the series of processes ends.

以上説明した光学式センサ100は、検出光の往復時間を計測することにより距離情報を検出するToFセンサに限らず、検出対象物の距離に応じて変化する反射光の到達位置を計測することにより距離情報を検出する三角測距センサを用いてもよい。三角測距センサで光軸調整素子を採用する場合には、例えば、検出光L1の投光方向と検出光L2の受光位置に対して測定距離を対応付けるルックアップテーブルを予め準備しておけば、検出結果としての距離情報を生成できる。また、以上説明した実施形態においては、検査対象物の良否を判定するための距離情報の検出について説明したが、出力された距離情報の利用態様は良否判定に限らない。例えば、特徴的な部分形状を検査対象として距離を検出することにより、検査対象物の品種を判定する利用態様等も想定し得る。 The optical sensor 100 described above is not limited to a ToF sensor that detects distance information by measuring the round trip time of the detection light, but may be a triangulation sensor that detects distance information by measuring the arrival position of the reflected light that changes depending on the distance of the detection object. When the optical axis adjustment element is adopted in the triangulation sensor, for example, if a lookup table that associates the measured distance with the projection direction of the detection light L1 and the receiving position of the detection light L2 is prepared in advance, distance information can be generated as a detection result. In addition, in the above-described embodiment, the detection of distance information for determining the quality of the inspection object is described, but the use of the output distance information is not limited to the quality determination. For example, a use mode in which the type of the inspection object is determined by detecting the distance to a characteristic partial shape as the inspection object may be assumed.

[付記]
可視光である検出光(L1)を投光する投光素子(120)と、
前記投光素子(120)から投光された前記検出光(L1)の光軸を調整する光軸調整素子(130)と、
対象物で反射した前記検出光(L2)を受光して検出信号を出力する受光素子(140)と、
前記光軸調整素子(130)を駆動することにより前記検出光(L1)を予め設定された複数の特定方向へ順次投光して得た前記検出信号に基づく検出結果のうち、前記検出光(L1)が遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、検査対象物(290)の検査のために投光する前記検出光(L1)の投光方向を認識した前記指示方向に基づいて調整する投光調整部(111)と
を備える光学式センサ(100)。
[Additional Notes]
A light-projecting element (120) that projects a detection light (L 1 ) which is visible light;
an optical axis adjustment element (130) for adjusting the optical axis of the detection light (L 1 ) projected from the light projecting element (120);
a light receiving element (140) that receives the detection light ( L2 ) reflected by an object and outputs a detection signal;
The optical sensor (100) is provided with a light projection adjustment unit (111) which recognizes as an indicated direction a specific direction in which a detection result is obtained in which the detection light ( L1 ) is evaluated as being blocked, among detection results based on the detection signals obtained by driving the optical axis adjustment element (130) to sequentially project the detection light ( L1 ) in a plurality of predetermined specific directions, and adjusts the projection direction of the detection light ( L1 ) to be projected for inspection of an inspection object (290) based on the recognized indicated direction.

100…光学式センサ、101…筐体、102…透過窓、103…ケーブル、110…制御部、111…投光調整部、112…距離演算部、120…投光素子、130…光軸調整素子、140…受光素子、150…操作ボタン、160…表示パネル、170…入出力IF、180…記憶部、210、220、230…予備ワーク、211、231…検査箇所、290、290a、290b…検査ワーク、291a、291b…検査箇所、300…製造ライン 100...Optical sensor, 101...Housing, 102...Transmission window, 103...Cable, 110...Control unit, 111...Light projection adjustment unit, 112...Distance calculation unit, 120...Light projection element, 130...Optical axis adjustment element, 140...Light receiving element, 150...Operation button, 160...Display panel, 170...Input/output IF, 180...Memory unit, 210, 220, 230...Preliminary work, 211, 231...Inspection location, 290, 290a, 290b...Inspection work, 291a, 291b...Inspection location, 300...Production line

Claims (14)

可視光である検出光を投光する投光素子と、
前記投光素子から投光された前記検出光の光軸を調整する光軸調整素子と、
対象物で反射した前記検出光を受光して検出信号を出力する受光素子と、
前記光軸調整素子を駆動することにより前記検出光を予め設定された複数の特定方向へ順次投光して得た前記検出信号に基づく検出結果のうち、前記検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、認識した前記指示方向に基づいて検査対象物の検査のために投光する前記検出光の投光方向を調整する投光調整部と
を備える光学式センサ。
a light-projecting element that projects detection light that is visible light;
an optical axis adjustment element for adjusting an optical axis of the detection light projected from the light projecting element;
a light receiving element that receives the detection light reflected by an object and outputs a detection signal;
an optical sensor including: a light projection adjustment unit that recognizes, as a pointed direction, a specific direction in which a detection result that indicates that the detection light is blocked is obtained among detection results based on the detection signals obtained by driving the optical axis adjustment element to sequentially project the detection light in a plurality of predetermined specific directions; and adjusts the projection direction of the detection light to be projected for inspecting an inspection object based on the recognized pointed direction.
前記投光調整部は、前記複数の特定方向に加え、その時点で設定されている前記投光方向を1サイクルとして順次投光し、前記複数の特定方向へ投光する場合と前記投光方向へ投光する場合で、投光の態様を異ならせる請求項1に記載の光学式センサ。 The optical sensor according to claim 1, wherein the light projection adjustment unit sequentially projects light in the multiple specific directions and the currently set light projection direction as one cycle, and the manner of light projection is different when projecting light in the multiple specific directions and when projecting light in the light projection direction. 前記複数の特定方向のそれぞれは、前記光軸調整素子によって調整可能な範囲の端に設定されている請求項1又は2に記載の光学式センサ。 The optical sensor according to claim 1 or 2, wherein each of the plurality of specific directions is set at the end of a range that can be adjusted by the optical axis adjustment element. 前記投光調整部は、予め設定された前記複数の特定方向のうち反射した前記検出信号を前記受光素子で検出できない特定方向が存在する場合には、その特定方向へ投光する前記検出光を前記検出信号が検出できる方向へ偏向させる請求項1から3のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 3, wherein, if there is a specific direction among the plurality of specific directions set in advance in which the reflected detection signal cannot be detected by the light receiving element, the light projection adjustment unit deflects the detection light projected in that specific direction to a direction in which the detection signal can be detected. 前記投光調整部は、予め設定された前記複数の特定方向の少なくともいずれか又は前記投光方向で検出された対象物までの距離に基づいて前記複数の特定方向へそれぞれ投光する前記検出光を偏向させる請求項1から4のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 4, wherein the light projection adjustment unit deflects the detection light projected in each of the plurality of specific directions based on at least one of the plurality of predetermined specific directions or the distance to the object detected in the light projection direction. 前記投光調整部は、前記複数の特定方向が前記光軸調整素子によって調整可能な範囲より内側の方向である場合には、前記範囲を示すために端方向への投光を行う請求項5に記載の光学式センサ。 The optical sensor according to claim 5, wherein the light projection adjustment unit projects light toward the end to indicate the range when the plurality of specific directions are inside the range that can be adjusted by the optical axis adjustment element. 前記投光調整部は、前記複数の特定方向のそれぞれにおいて投光した前記検出光のうち2つ以上の特定方向に対する前記検出光が連続して順次遮られたと評価される検出結果が得られた場合には、前記2つ以上の特定方向の遮られた順番に基づいて前記投光方向を調整する請求項1から6のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 6, wherein, when a detection result is obtained in which the detection light is evaluated to have been successively blocked in two or more specific directions among the detection light projected in each of the plurality of specific directions, the light projection adjustment unit adjusts the light projection direction based on the order in which the two or more specific directions are blocked. 前記投光調整部は、遮られた順番に基づいて前記投光方向を調整した場合は、予め設定された設定時間の間、前記投光方向の調整を停止する請求項7に記載の光学式センサ。 The optical sensor according to claim 7, wherein the light projection adjustment unit stops adjusting the light projection direction for a preset time period when the light projection direction is adjusted based on the order of interruptions. 前記投光調整部は、前記複数の特定方向へ順次投光して得た検出結果のすべてが前記検出光が遮られたと評価される検出結果であった場合に、前記投光方向を確定させる請求項1から8のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 8, wherein the light projection adjustment unit determines the light projection direction when all of the detection results obtained by sequentially projecting light in the multiple specific directions are evaluated as indicating that the detection light is blocked. 前記投光調整部は、前記複数の特定方向へ順次投光して得た検出結果のうち予め設定された組み合わせの前記検出光がいずれも遮られたと評価される検出結果であった場合に、前記投光方向を確定させる請求項1から8のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 8, wherein the light projection adjustment unit determines the light projection direction when a detection result obtained by sequentially projecting light in the multiple specific directions indicates that all of the detection lights of a preset combination are blocked. 前記投光調整部は、確定指示を受け付けるための確定投光として前記検出光を投光し、前記確定投光の前記検出光が遮られたと評価される検出結果であった場合に、前記投光方向を確定させる請求項1から8のいずれか1項に記載の光学式センサ。 The optical sensor according to any one of claims 1 to 8, wherein the light projection adjustment unit projects the detection light as a confirmation projection for receiving a confirmation instruction, and when the detection result indicates that the detection light of the confirmation projection is obstructed, the optical sensor confirms the light projection direction. 前記複数の特定方向は、前記光軸調整素子によって調整可能な範囲の少なくとも一部の範囲を覆うように規定された複数の離散点のそれぞれに対して設定され、
前記投光調整部は、前記検出光が最も至近で遮られたと評価される検出結果が得られた特定方向を指示方向と認識し、前記投光方向を前記指示方向として確定する請求項1に記載の光学式センサ。
the plurality of specific directions are set for a plurality of discrete points defined so as to cover at least a portion of a range that can be adjusted by the optical axis adjustment element,
2. The optical sensor according to claim 1, wherein the light projection adjustment unit recognizes a specific direction in which a detection result is obtained in which the detection light is evaluated to be most closely blocked as the indicated direction, and determines the light projection direction as the indicated direction.
検出光を投光する投光素子と、前記投光素子から投光された前記検出光の光軸を調整する光軸調整素子と、対象物で反射した前記検出光を受光して検出信号を出力する受光素子とを備える光学式センサの制御方法であって、
前記光軸調整素子を駆動することにより前記検出光を予め設定された複数の特定方向へ順次投光する投光ステップと、
前記投光ステップで前記複数の特定方向へそれぞれ投光して得た前記検出信号に基づく検出結果のうち、前記検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識する認識ステップと、
前記認識ステップで認識された前記指示方向に基づいて検査対象物の検査のために投光する前記検出光の投光方向を調整する調整ステップと
を有する光学式センサの制御方法。
A control method for an optical sensor including a light-projecting element that projects detection light, an optical axis adjustment element that adjusts an optical axis of the detection light projected from the light-projecting element, and a light-receiving element that receives the detection light reflected by an object and outputs a detection signal, comprising:
a light projection step of sequentially projecting the detection light in a plurality of predetermined specific directions by driving the optical axis adjustment element;
a recognition step of recognizing, as a pointing direction, a specific direction in which a detection result that indicates that the detection light is blocked has been obtained among detection results based on the detection signals obtained by projecting light in each of the plurality of specific directions in the light projection step;
and an adjustment step of adjusting a projection direction of the detection light projected for inspecting an inspection object based on the pointing direction recognized in the recognition step.
検出光を投光する投光素子と、前記投光素子から投光された前記検出光の光軸を調整する光軸調整素子と、対象物で反射した前記検出光を受光して検出信号を出力する受光素子とを備える光学式センサの制御プログラムであって、
前記光軸調整素子を駆動することにより前記検出光を予め設定された複数の特定方向へ順次投光する投光ステップと、
前記投光ステップで前記複数の特定方向へそれぞれ投光して得た前記検出信号に基づく検出結果のうち、前記検出光が遮られたと評価される検出結果が得られた特定方向を指示方向と認識する認識ステップと、
前記認識ステップで認識された前記指示方向に基づいて検査対象物の検査のために投光する前記検出光の投光方向を調整する調整ステップと
をコンピュータに実行させる光学式センサの制御プログラム。
A control program for an optical sensor including a light-projecting element that projects detection light, an optical axis adjustment element that adjusts an optical axis of the detection light projected from the light-projecting element, and a light-receiving element that receives the detection light reflected by an object and outputs a detection signal,
a light projection step of sequentially projecting the detection light in a plurality of predetermined specific directions by driving the optical axis adjustment element;
a recognition step of recognizing, as a pointing direction, a specific direction in which a detection result that indicates that the detection light is blocked has been obtained among detection results based on the detection signals obtained by projecting light in each of the plurality of specific directions in the light projection step;
and an adjustment step of adjusting the projection direction of the detection light projected for inspecting the object to be inspected, based on the pointing direction recognized in the recognition step.
JP2021040371A 2021-03-12 2021-03-12 Optical sensor, optical sensor control method, and optical sensor control program Active JP7602199B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021040371A JP7602199B2 (en) 2021-03-12 2021-03-12 Optical sensor, optical sensor control method, and optical sensor control program
PCT/JP2021/046930 WO2022190524A1 (en) 2021-03-12 2021-12-20 Optical sensor, method for controlling optical sensor, and program for controlling optical sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021040371A JP7602199B2 (en) 2021-03-12 2021-03-12 Optical sensor, optical sensor control method, and optical sensor control program

Publications (2)

Publication Number Publication Date
JP2022139823A JP2022139823A (en) 2022-09-26
JP7602199B2 true JP7602199B2 (en) 2024-12-18

Family

ID=83227548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021040371A Active JP7602199B2 (en) 2021-03-12 2021-03-12 Optical sensor, optical sensor control method, and optical sensor control program

Country Status (2)

Country Link
JP (1) JP7602199B2 (en)
WO (1) WO2022190524A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018124088A (en) 2017-01-30 2018-08-09 オムロン株式会社 Detection system, detection device, and detection method
JP6825087B2 (en) 2016-05-20 2021-02-03 コアダー カンパニー リミテッド Electronic devices and their operating methods

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6825087B2 (en) 2016-05-20 2021-02-03 コアダー カンパニー リミテッド Electronic devices and their operating methods
JP2018124088A (en) 2017-01-30 2018-08-09 オムロン株式会社 Detection system, detection device, and detection method

Also Published As

Publication number Publication date
WO2022190524A1 (en) 2022-09-15
JP2022139823A (en) 2022-09-26

Similar Documents

Publication Publication Date Title
JP6716318B2 (en) Range finder and industrial robot
CN103430042B (en) There is the electric light distance measuring equipment of the measurement triggering based on gesture acted on without the need to contacting metering facility
TWI665427B (en) Inclination measuring device and control system
JP7240139B2 (en) Displacement measuring device
JP5423543B2 (en) Optical position detector
JP3802339B2 (en) Axis adjustment method for rangefinder
US20170038581A1 (en) Optical monitoring of scan parameters
JP7193308B2 (en) Profile measuring device
EP3134232A1 (en) A method and a system for generating data for calibrating a robot
CN106353764B (en) Laser measuring device
EP3079045A1 (en) Position sensing device and position sensing method
JP7602199B2 (en) Optical sensor, optical sensor control method, and optical sensor control program
JP7324026B2 (en) measuring device
KR100728482B1 (en) Displacement sensor with automatic setting means of measuring area
JP7743702B2 (en) Optical sensor, optical sensor control method, and optical sensor control program
JP6137203B2 (en) Measuring assembly, method for measuring features of a measuring object, method for manufacturing a structure, and pointer
JP7671435B2 (en) Optical sensor, optical sensor control method, and optical sensor control program
US20210270600A1 (en) System and method
US20200149874A1 (en) Displacement Measuring Apparatus
JP2008089393A (en) Optical device and optical measurement system
US10724849B2 (en) Displacement measuring apparatus
JP2020076695A (en) Profile measuring device
WO2006073303A1 (en) Robot positioning system and method of using the same
JP5423545B2 (en) Optical position detector
JP5423544B2 (en) Optical position detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240116

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241119

R150 Certificate of patent or registration of utility model

Ref document number: 7602199

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150