JP7035890B2 - Photoelectric sensor - Google Patents

Photoelectric sensor Download PDF

Info

Publication number
JP7035890B2
JP7035890B2 JP2018145201A JP2018145201A JP7035890B2 JP 7035890 B2 JP7035890 B2 JP 7035890B2 JP 2018145201 A JP2018145201 A JP 2018145201A JP 2018145201 A JP2018145201 A JP 2018145201A JP 7035890 B2 JP7035890 B2 JP 7035890B2
Authority
JP
Japan
Prior art keywords
determination
photoelectric sensor
model
degree
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018145201A
Other languages
Japanese (ja)
Other versions
JP2020022091A (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 JP2018145201A priority Critical patent/JP7035890B2/en
Priority to PCT/JP2019/028266 priority patent/WO2020026832A1/en
Priority to TW108127193A priority patent/TWI691166B/en
Publication of JP2020022091A publication Critical patent/JP2020022091A/en
Application granted granted Critical
Publication of JP7035890B2 publication Critical patent/JP7035890B2/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
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V8/00Prospecting or detecting by optical means
    • G01V8/10Detecting, e.g. by using light barriers
    • G01V8/12Detecting, e.g. by using light barriers using one transmitter and one receiver
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01HELECTRIC SWITCHES; RELAYS; SELECTORS; EMERGENCY PROTECTIVE DEVICES
    • H01H35/00Switches operated by change of a physical condition
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/945Proximity switches

Description

本発明は、対象物の状態についての判定機能を備える光電センサに関する。 The present invention relates to a photoelectric sensor having a function of determining the state of an object.

従来、対象物の有無を検出するセンサとして、対象物に光を照射し、対象物を透過する光を検出したり、対象物による光の遮蔽を検出したり、対象物により反射した光を検出したりする光電センサが用いられている。また、対象物の有無ではなく、対象物の状態を検出する場合には、カメラで対象物を撮像し、画像分析を行う視覚センサを用いることがある。 Conventionally, as a sensor for detecting the presence or absence of an object, the object is irradiated with light to detect the light transmitted through the object, the shielding of light by the object is detected, and the light reflected by the object is detected. A photoelectric sensor is used. Further, when detecting the state of the object instead of the presence or absence of the object, a visual sensor that captures the object with a camera and performs image analysis may be used.

光電センサについて、例えば下記特許文献1には、背景レベルに相当する検出値をゼロリセット基準値として記憶させることにより、任意の検出値を、背景レベルを基準とした相対値で表示し得るように構成した光電センサが記載されている。 Regarding the photoelectric sensor, for example, in the following Patent Document 1, by storing the detection value corresponding to the background level as the zero reset reference value, any detection value can be displayed as a relative value with respect to the background level. The configured photoelectric sensor is described.

また、下記特許文献2には、鋼板表面をレーザ光で走査し、反射光波形を代表する複数個の特徴量を算出し、その特徴量を予め学習させた神経回路網に加えて疵有/無出力を行う検査方法が記載されている。 Further, in Patent Document 2 below, the surface of a steel sheet is scanned with a laser beam, a plurality of feature quantities representing reflected light waveforms are calculated, and the feature quantities are added to a neural network in which the feature quantities are learned in advance. The inspection method to perform no output is described.

特開2001-124594号公報Japanese Unexamined Patent Publication No. 2001-124594 特開平2-298840号公報Japanese Unexamined Patent Publication No. 2-298840

普及している光電センサ1つでできる対象物の有無の検出よりは難しいが、光電センサに比べれば大型、高価である視覚センサの多様な能力が必要というほどではないような対象物の状態の検出需要がある。例えば、形状や模様が大きく異なる対象物を見分ける場合、単に対象物の有無を検出するだけでは足りないが、視覚センサの多様な能力が必要というほどではない。 It is more difficult than the detection of the presence or absence of an object that can be done with one popular photoelectric sensor, but it is larger and more expensive than a photoelectric sensor. There is detection demand. For example, when distinguishing objects having greatly different shapes and patterns, it is not enough to simply detect the presence or absence of the object, but it is not enough to require various capabilities of a visual sensor.

ここで、従来の光電センサと特許文献1に示されているような受光量波形を分析する手法とを組み合わせることで、原理的には対象物の状態についての判定が可能と考えられる。しかし、判定に必要な部分(特許文献2における疵の大きさに対応する部分)の波形のみを取得するための適切なトリガが得られないため、判定に必要な部分よりも長い時間範囲の波形の取得を完了してから波形分析を行うこととなり、例えば搬送ライン上を次々と運ばれてくる対象物に適用するにはリアルタイム性に欠ける。 Here, it is considered that the state of the object can be determined in principle by combining the conventional photoelectric sensor and the method of analyzing the received light amount waveform as shown in Patent Document 1. However, since an appropriate trigger for acquiring only the waveform of the portion necessary for determination (the portion corresponding to the size of the flaw in Patent Document 2) cannot be obtained, the waveform in a longer time range than the portion necessary for determination is not obtained. Waveform analysis is performed after the acquisition of the above is completed, and for example, it lacks real-time performance in order to apply it to an object that is carried one after another on a transport line.

そこで、本発明は、簡易な構成で、時間遅れ少なく、対象物の状態を判定する光電センサを提供する。 Therefore, the present invention provides a photoelectric sensor that has a simple configuration, has a small time delay, and determines the state of an object.

本開示の一態様に係る光電センサは、対象物が到来する検出範囲に向けて光を出射する投光部と、光の受光に基づく時系列の信号値を取得する受光部と、取得された順に順序付けて所定数の信号値を記憶し、周期的に、新たに取得された信号値により所定数の信号値を更新するFIFOメモリと、FIFOメモリに記憶された所定数の信号値により構成される波形と、対象物の特定の状態に対応する基準波形との一致度のランクを判定する判定モデルを記憶するモデル記憶部と、FIFOメモリの更新を1回又は複数回行う毎に一度の頻度で、判定モデルによる判定を実行し、一致度のランクに基づいて、対象物の状態を判定する判定部と、を備える。 The photoelectric sensor according to one aspect of the present disclosure has acquired a light projecting unit that emits light toward a detection range in which an object arrives, and a light receiving unit that acquires a time-series signal value based on the light reception. It is composed of a FIFO memory that stores a predetermined number of signal values in order and periodically updates a predetermined number of signal values with newly acquired signal values, and a predetermined number of signal values stored in the FIFO memory. A model storage unit that stores a judgment model that determines the rank of the degree of coincidence between the waveform and the reference waveform corresponding to a specific state of the object, and the frequency of once each time the FIFO memory is updated once or multiple times. The determination unit is provided with a determination unit that executes determination by the determination model and determines the state of the object based on the rank of the degree of coincidence.

この態様によれば、FIFOメモリの更新を1回又は複数回行う毎に一度の頻度で、FIFOメモリに記憶された信号値により構成される波形と、対象物の特定の状態に対応する基準波形との一致度のランクを判定することで、簡易な構成で、時間遅れ少なく、搬送ライン上を次々と運ばれてくる対象物の状態を判定することができる。 According to this aspect, a waveform composed of signal values stored in the FIFO memory and a reference waveform corresponding to a specific state of the object are used once or once for each update of the FIFO memory. By determining the rank of the degree of coincidence with, it is possible to determine the state of the object being carried one after another on the transport line with a simple configuration and with little time delay.

上記態様において、判定モデルは 、機械学習によって生成された学習済みモデルであってよい。 In the above aspect, the determination model may be a trained model generated by machine learning.

この態様によれば、学習済みモデルによって、FIFOメモリに記憶された信号値により構成される波形と、対象物の特定の状態に対応する基準波形との一致度のランクを判定することで、搬送ライン上を次々と運ばれてくる対象物の状態をより柔軟に判定することができる。 According to this aspect, the trained model determines the rank of the degree of coincidence between the waveform composed of the signal values stored in the FIFO memory and the reference waveform corresponding to the specific state of the object. It is possible to more flexibly determine the state of the object being carried on the line one after another.

上記態様において、判定モデルは、FIFOメモリに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す参照値との差異から一致度を算出することを含むモデルであってよい。 In the above embodiment, the determination model includes calculating the degree of agreement from the difference between a predetermined number of signal values stored in the FIFO memory and a reference value representing a reference waveform corresponding to each of the predetermined number of signal values. May be.

この態様によれば、比較的簡単なモデルによって、FIFOメモリに記憶された信号値により構成される波形と、対象物の特定の状態に対応する基準波形との一致度のランクを判定することで、搬送ライン上を次々と運ばれてくる対象物の状態をより高速に判定することができる。 According to this aspect, a relatively simple model is used to determine the rank of the degree of agreement between the waveform composed of the signal values stored in the FIFO memory and the reference waveform corresponding to the specific state of the object. , The state of the object being carried one after another on the transport line can be determined at higher speed.

上記態様において、判定モデルは、一致度が所定値よりも高い場合に一致度が高ランクであると判定するモデルであり、判定部は、前記高ランクの判定結果が得られた場合に、対象物の状態は特定の状態であると判定してもよい。 In the above aspect, the determination model is a model that determines that the degree of coincidence is high rank when the degree of coincidence is higher than a predetermined value, and the determination unit is a target when the determination result of the high rank is obtained. The state of the object may be determined to be a specific state.

上記態様において、判定モデルは、さらに、一致度が所定値よりも高くないが所定値より小さい第2所定値よりも高い場合に一致度が中ランクであると判定するモデルであり、判定部は、対象物が検出範囲を通過するのに要する時間の範囲内で、前記高ランクの場合がなく前記中ランクの場合があるときに、特定の状態ではない対象物が到来したと判定してもよい。 In the above aspect, the determination model is a model for determining that the degree of agreement is medium rank when the degree of agreement is not higher than the predetermined value but higher than the second predetermined value smaller than the predetermined value. , Even if it is determined that an object that is not in a specific state has arrived when the object is not in the high rank but in the middle rank within the time required for the object to pass through the detection range. good.

この態様によれば、対象物の状態が特定の状態ではない場合であっても、対象物が到来したことと、その対象物の状態が特定の状態ではないことを判定することができる。 According to this aspect, even when the state of the object is not a specific state, it can be determined that the object has arrived and that the state of the object is not a specific state.

上記態様において、信号値に基づいて判定モデルを生成し、生成した判定モデルをモデル記憶部に記憶させる動作制御部をさらに備えてもよい。 In the above embodiment, an operation control unit that generates a determination model based on the signal value and stores the generated determination model in the model storage unit may be further provided.

この態様によれば、光電センサが自ら判定モデルを生成できるので、判定モデルを外部から取得することなく、実際の対象物に応じて生成された判定モデルを使用することができる。 According to this aspect, since the photoelectric sensor can generate the determination model by itself, the determination model generated according to the actual object can be used without acquiring the determination model from the outside.

上記態様において、動作制御部は、時系列の信号値の変動が比較的小さい安定期に続いて、時系列の信号値の変動が比較的大きい変動期が現れた場合に、変動期に属する信号値に基づいて判定モデルを生成してもよい。 In the above embodiment, the motion control unit is a signal belonging to the fluctuation period when a fluctuation period in which the fluctuation of the time-series signal value is relatively large appears following a stable period in which the fluctuation of the time-series signal value is relatively small. A judgment model may be generated based on the value.

この態様によれば、信号値の中から対象物によって生じた信号値を選択的に使用して判定モデルを生成することができる。 According to this aspect, the determination model can be generated by selectively using the signal value generated by the object from the signal values.

上記態様において、動作制御部は、判定モデルを外部に出力可能であってもよい。 In the above aspect, the motion control unit may be able to output the determination model to the outside.

この態様によれば、生成した判定モデルを他の光電センサで用いることができるので、同様の対象物及び設置状況で使用される複数の光電センサごとに判定モデルの生成を繰り返す必要が無くなる。 According to this aspect, since the generated determination model can be used in another photoelectric sensor, it is not necessary to repeat the generation of the determination model for each of a plurality of photoelectric sensors used in the same object and installation situation.

上記態様において、動作制御部は、時系列の信号値を外部に出力可能であってもよい。 In the above aspect, the operation control unit may be able to output a time-series signal value to the outside.

この態様によれば、信号値を外部に出力し、外部機器で判定モデルを生成することができる。これにより、判定モデルを生成する処理に関する計算資源を光電センサ自身で持つ必要がなくなる。 According to this aspect, the signal value can be output to the outside and the determination model can be generated by the external device. This eliminates the need for the photoelectric sensor itself to have computational resources related to the process of generating the determination model.

上記態様において、動作制御部は、判定モデルを外部から取得し、モデル記憶部に記憶させてもよい。 In the above aspect, the motion control unit may acquire the determination model from the outside and store it in the model storage unit.

この態様によれば、他の装置、例えば他の光電センサにより生成された判定モデルを流用することで判定モデルの生成を省略することができる。 According to this aspect, the generation of the determination model can be omitted by diverting the determination model generated by another device, for example, another photoelectric sensor.

本発明によれば、簡易な構成で、時間遅れ少なく、対象物の状態を判定する光電センサが提供される。 According to the present invention, there is provided a photoelectric sensor that determines the state of an object with a simple configuration and with little time delay.

本発明の実施形態に係る光電センサを含む検出システムの概要を示す図である。It is a figure which shows the outline of the detection system including the photoelectric sensor which concerns on embodiment of this invention. 本実施形態に係る光電センサの構成を示す図である。It is a figure which shows the structure of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの処理部の構成の一例を示す図である。It is a figure which shows an example of the structure of the processing part of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの学習モード及び判定モードの処理のフローチャートである。It is a flowchart of the process of the learning mode and the determination mode of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサにより対象物の状態を判定する処理の第1例のフローチャートである。It is a flowchart of 1st example of the process of determining the state of an object by the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサにより対象物の状態を判定する処理の第2例のフローチャートである。It is a flowchart of the 2nd example of the process of determining the state of an object by the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの第nサイクルに測定された信号値の一例を示す図である。It is a figure which shows an example of the signal value measured in the nth cycle of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの第n+1サイクルに測定された信号値の一例を示す図である。It is a figure which shows an example of the signal value measured in the n + 1th cycle of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの第nサイクルに測定された信号値の他の例を示す図である。It is a figure which shows the other example of the signal value measured in the nth cycle of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサの処理部の構成の他の例を示す図である。It is a figure which shows the other example of the structure of the processing part of the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサに外部から判定モデルをインストールする例を示す図である。It is a figure which shows the example which installs the determination model from the outside to the photoelectric sensor which concerns on this embodiment.

以下、本発明の一側面に係る実施の形態(以下、「本実施形態」と表記する。)を、図面に基づいて説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Hereinafter, embodiments according to one aspect of the present invention (hereinafter, referred to as “the present embodiment”) will be described with reference to the drawings. In each figure, those with the same reference numerals have the same or similar configurations.

[構成例]
図1から図3を参照しつつ、本実施形態に係る光電センサ10の構成の一例について説明する。図1は、本実施形態に係る光電センサ10を含む検出システム1の概要を示す図である。検出システム1は、光電センサ10と、コントローラ20と、コンピュータ30と、ロボット40と、搬送装置50とを備える。
[Configuration example]
An example of the configuration of the photoelectric sensor 10 according to the present embodiment will be described with reference to FIGS. 1 to 3. FIG. 1 is a diagram showing an outline of a detection system 1 including a photoelectric sensor 10 according to the present embodiment. The detection system 1 includes a photoelectric sensor 10, a controller 20, a computer 30, a robot 40, and a transfer device 50.

光電センサ10は、取得される信号値に基づいて、光電センサ10の検出範囲10aに対象物100が到来したことを検出し、その対象物100の状態を判定する装置である。光電センサ10は、反射型の光電センサであったり、透過型の光電センサであったり、回帰反射型の光電センサであったりしてよい。また、光電センサ10は、対象物100にレーザビームを投光し、三角測距の原理に基づいて対象物100までの距離に対応する信号値を得る変位センサであってもよい。また、光電センサ10は、対象物100で反射される光の往復時間に基づいて対象物100までの距離に対応する信号値を得る測距センサであってもよい。本明細書において、「信号値」は、受光量の値のほか、対象物100までの距離に対応する信号値も含むものとする。 The photoelectric sensor 10 is a device that detects that the object 100 has arrived in the detection range 10a of the photoelectric sensor 10 based on the acquired signal value, and determines the state of the object 100. The photoelectric sensor 10 may be a reflective photoelectric sensor, a transmissive photoelectric sensor, or a retroreflective photoelectric sensor. Further, the photoelectric sensor 10 may be a displacement sensor that projects a laser beam onto the object 100 and obtains a signal value corresponding to the distance to the object 100 based on the principle of triangular distance measurement. Further, the photoelectric sensor 10 may be a distance measuring sensor that obtains a signal value corresponding to the distance to the object 100 based on the round-trip time of the light reflected by the object 100. In the present specification, the "signal value" includes not only the value of the received light amount but also the signal value corresponding to the distance to the object 100.

対象物100は、光電センサ10による検出の対象となる物であり、例えば生産される製品の完成品であったり、部品等の未完成品であったりしてよい。図1に例示する対象物100は、ベースの上に突起が付いた形状の対象物である。また、異種対象物として、同じベースを有するが突起が付いていない形状の対象物も混入して搬送されるものとする。光電センサ10が、例えば反射型の光電センサである場合、対象物100が光電センサ10の検出範囲10aに到来すると、検出される反射光量が増加する。また、対象物100がベースの上に突起が付いた形状の場合、検出範囲10aに対象物100の突起があるとさらに反射光量が増加する。 The object 100 is an object to be detected by the photoelectric sensor 10, and may be, for example, a finished product of a product to be produced or an unfinished product such as a part. The object 100 exemplified in FIG. 1 is an object having a protrusion on the base. Further, as different kinds of objects, objects having the same base but having a shape without protrusions are also mixed and transported. When the photoelectric sensor 10 is, for example, a reflection type photoelectric sensor, the amount of reflected light detected increases when the object 100 reaches the detection range 10a of the photoelectric sensor 10. Further, when the object 100 has a protrusion on the base, the amount of reflected light further increases if the object 100 has a protrusion in the detection range 10a.

コントローラ20は、ロボット40及び搬送装置50を制御する。コントローラ20は、例えばPLC(Programmable Logic Controller)で構成されてよい。コントローラ20は、光電センサ10からの出力により対象物100が到来したことを検知し、さらに、判定された対象物100の状態に応じてロボット40を制御する。 The controller 20 controls the robot 40 and the transfer device 50. The controller 20 may be configured by, for example, a PLC (Programmable Logic Controller). The controller 20 detects that the object 100 has arrived by the output from the photoelectric sensor 10, and further controls the robot 40 according to the determined state of the object 100.

コンピュータ30は、光電センサ10、コントローラ20及びロボット40の設定を行う。また、コンピュータ30は、コントローラ20から、コントローラ20による制御の実行結果を取得する。さらに、コンピュータ30は、光電センサ10により対象物100の状態を判定するための判定モデルを機械学習により生成する学習装置を含んでよい。ここで、判定モデルは、例えばニューラルネットワークにより構成されたり、決定木により構成されたりしてよい。 The computer 30 sets the photoelectric sensor 10, the controller 20, and the robot 40. Further, the computer 30 acquires the execution result of the control by the controller 20 from the controller 20. Further, the computer 30 may include a learning device that generates a determination model for determining the state of the object 100 by the photoelectric sensor 10 by machine learning. Here, the determination model may be composed of, for example, a neural network or a decision tree.

ロボット40は、コントローラ20による制御に従って、対象物100を操作したり加工したりする。ロボット40は、例えば対象物100をピックアップして別の場所に移動させたり、対象物100を切削したり、組み立てたりしてよい。また、ロボット40は、対象物100に突起が有るか無いかによって、加工内容又は移動先を変えてもよい。 The robot 40 operates and processes the object 100 according to the control by the controller 20. The robot 40 may, for example, pick up the object 100 and move it to another place, cut the object 100, or assemble it. Further, the robot 40 may change the processing content or the moving destination depending on whether or not the object 100 has a protrusion.

搬送装置50は、コントローラ20による制御に従って、対象物100を搬送する装置である。搬送装置50は、例えばベルトコンベアであってよく、コントローラ20により設定された速度で対象物100を搬送してよい。 The transport device 50 is a device that transports the object 100 under the control of the controller 20. The transport device 50 may be, for example, a belt conveyor, and may transport the object 100 at a speed set by the controller 20.

図2は、本実施形態に係る光電センサ10の構成を示す図である。光電センサ10は、投光部11、受光部12、処理部13、操作部14及び出力部15を備える。 FIG. 2 is a diagram showing the configuration of the photoelectric sensor 10 according to the present embodiment. The photoelectric sensor 10 includes a light projecting unit 11, a light receiving unit 12, a processing unit 13, an operation unit 14, and an output unit 15.

<投光部>
投光部11は、対象物100が到来する検出範囲10aに向けて光を出射する。投光部11は、投光素子11a及び駆動回路11bを含んでよい。投光素子11aは、LED(Light Emitting Diode)やレーザダイオードで構成されてよく、駆動回路11bは、投光素子11aを発光させるための電流を制御する。駆動回路11bは、投光素子11aを間欠的に、例えば0.1ms周期でパルス発光させてよい。投光素子11aから出射した光は、図示しないレンズ又は光ファイバを介して、検出範囲10aに照射されてよい。
<Light projector>
The light projecting unit 11 emits light toward the detection range 10a where the object 100 arrives. The light projecting unit 11 may include a light projecting element 11a and a drive circuit 11b. The light emitting element 11a may be composed of an LED (Light Emitting Diode) or a laser diode, and the drive circuit 11b controls a current for causing the light emitting element 11a to emit light. The drive circuit 11b may intermittently cause the light projecting element 11a to emit light in pulses, for example, at a period of 0.1 ms. The light emitted from the light projecting element 11a may be applied to the detection range 10a via a lens or an optical fiber (not shown).

<受光部>
受光部12は、光の受光に基づく時系列の信号値を取得する。受光部12は、受光素子12a、増幅器12b、サンプル/ホールド回路12c及びA/D変換器12dを含んでよい。受光素子12aは、フォトダイオードによって構成されてよく、受光量を電気的な出力信号に変換する。受光部12は、検出範囲10aにおいて反射又は透過した光を、図示しないレンズ又は光ファイバを介して受光素子12aに入射させてよい。増幅器12bは、受光素子12aの出力信号を増幅する。サンプル/ホールド回路12cは、投光部11によるパルス発光のタイミングに同期して、増幅器12bにより増幅された受光素子12aの出力信号を保持する。これにより外乱光の影響が低減される。A/D変換器12dは、サンプル/ホールド回路12cにより保持されたアナログの信号値をデジタル値である受光量の値に変換する。
<Light receiving part>
The light receiving unit 12 acquires a time-series signal value based on the light reception. The light receiving unit 12 may include a light receiving element 12a, an amplifier 12b, a sample / hold circuit 12c, and an A / D converter 12d. The light receiving element 12a may be composed of a photodiode, and converts a light receiving amount into an electrical output signal. The light receiving unit 12 may make the light reflected or transmitted in the detection range 10a incident on the light receiving element 12a via a lens or an optical fiber (not shown). The amplifier 12b amplifies the output signal of the light receiving element 12a. The sample / hold circuit 12c holds the output signal of the light receiving element 12a amplified by the amplifier 12b in synchronization with the timing of the pulse emission by the light projecting unit 11. This reduces the influence of ambient light. The A / D converter 12d converts the analog signal value held by the sample / hold circuit 12c into a light receiving amount value which is a digital value.

<処理部>
処理部13は、動作制御部13a、FIFO(First In First Out)メモリ13b、モデル記憶部13c及び判定部13dを含む。処理部13は、例えば、マイクロプロセッサ、メモリ及びメモリに格納されたプログラム等から構成されるコンピュータとして構成されてよい。
<Processing unit>
The processing unit 13 includes an operation control unit 13a, a FIFO (First In First Out) memory 13b, a model storage unit 13c, and a determination unit 13d. The processing unit 13 may be configured as, for example, a computer composed of a microprocessor, a memory, a program stored in the memory, and the like.

動作制御部13aは、後述する判定モデルを取り扱う処理の他、光電センサ10全体の動作を統括制御してよい。 The motion control unit 13a may collectively control the motion of the entire photoelectric sensor 10 in addition to the process of handling the determination model described later.

FIFOメモリ13bは、取得された順に順序付けて所定数の信号値を記憶し、周期的に、新たに取得された信号値により所定数の信号値を更新する。ここで、FIFOメモリ13bに記憶される信号値の数、すなわち所定数は、任意であるが、例えば100程度であってよい。FIFOメモリ13bは、専用のハードウェアによって実現できるほか、処理部13のメモリ上に処理部13のプログラムに従って実現されてもよい。その場合、FIFOメモリ13bの後段への信号値のシフトは、格納されているデータの物理的なシフトではなく、メモリ上のアクセス箇所の更新によって行うことができる。 The FIFO memory 13b stores a predetermined number of signal values in order of acquisition, and periodically updates the predetermined number of signal values with the newly acquired signal values. Here, the number of signal values stored in the FIFO memory 13b, that is, a predetermined number is arbitrary, but may be, for example, about 100. The FIFO memory 13b can be realized by dedicated hardware, or may be realized on the memory of the processing unit 13 according to the program of the processing unit 13. In that case, the shift of the signal value to the subsequent stage of the FIFO memory 13b can be performed by updating the access point on the memory, not by physically shifting the stored data.

モデル記憶部13cは、FIFOメモリ13bに記憶された所定数の信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度のランクを判定する判定モデルを記憶する。ここで、基準波形は、対象物100の特定の状態に対応する典型的な信号値の波形であってよく、例えば、特定の状態の複数の対象物100について取得された波形の平均であってよい。 The model storage unit 13c stores a determination model for determining the rank of the degree of coincidence between the waveform composed of a predetermined number of signal values stored in the FIFO memory 13b and the reference waveform corresponding to the specific state of the object 100. do. Here, the reference waveform may be a waveform having a typical signal value corresponding to a specific state of the object 100, and is, for example, an average of waveforms acquired for a plurality of objects 100 in the specific state. good.

モデル記憶部13cは、判定モデルとして、機械学習によって生成された学習済みモデルを記憶してよい。学習済みモデルは、FIFOメモリ13bに記憶された所定数の信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度のランクを判定するように学習されてよい。ここで、学習済みモデルは、コンピュータ30によって生成されて、モデル記憶部13cに記憶されてもよい。 The model storage unit 13c may store the trained model generated by machine learning as the determination model. The trained model is trained to determine the rank of the degree of coincidence between the waveform composed of a predetermined number of signal values stored in the FIFO memory 13b and the reference waveform corresponding to a specific state of the object 100. good. Here, the trained model may be generated by the computer 30 and stored in the model storage unit 13c.

判定部13dは、FIFOメモリ13bの更新を1回又は複数回行う毎に一度の頻度で、判定モデルによる判定を実行し、FIFOメモリ13bに記憶された所定数の信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度のランクに基づいて、対象物100の状態を判定する。例えば、基準波形が、ベースに突起が付いた対象物の波形である場合、判定部13dは、判定モデルによる判定を実行し、一致度が十分に高い場合に、対象物100は、ベースに突起が付いた状態であると判定してよい。このように、FIFOメモリ13bの更新を1回又は複数回行う毎に一度の頻度で、FIFOメモリ13bに記憶された信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度のランクを判定することで、簡易な構成で、時間遅れ少なく、搬送ライン上を次々と運ばれてくる対象物100の状態を判定することができる。これにより、普及している光電センサに近い簡易な構成で、すなわち画像処理や別途のトリガ手段を必要としないで、時間遅れ少なく、対象物100の状態を判定することができる。 The determination unit 13d executes the determination by the determination model once every time the FIFO memory 13b is updated once or a plurality of times, and the waveform is composed of a predetermined number of signal values stored in the FIFO memory 13b. , The state of the object 100 is determined based on the rank of the degree of coincidence with the reference waveform corresponding to the specific state of the object 100. For example, when the reference waveform is the waveform of an object having a protrusion on the base, the determination unit 13d executes the determination by the determination model, and when the degree of coincidence is sufficiently high, the object 100 has a protrusion on the base. It may be determined that the state is marked with. In this way, the waveform composed of the signal values stored in the FIFO memory 13b and the reference corresponding to the specific state of the object 100 at a frequency of once for each update of the FIFO memory 13b once or a plurality of times. By determining the rank of the degree of coincidence with the waveform, it is possible to determine the state of the object 100 being carried one after another on the transport line with a simple configuration and with little time delay. This makes it possible to determine the state of the object 100 with a simple configuration similar to that of a popular photoelectric sensor, that is, without the need for image processing or a separate triggering means, with little time delay.

判定モデルは、FIFOメモリ13bに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す参照値との差異から前記一致度を算出することを含むモデルであってよい。 The determination model is a model including calculating the degree of agreement from the difference between a predetermined number of signal values stored in the FIFO memory 13b and a reference value representing a reference waveform corresponding to each of the predetermined number of signal values. It's okay.

判定モデルは、一致度が所定値よりも高い場合に一致度が高ランクであると判定するモデルであってよく、判定部13dは、高ランクの判定結果が得られた場合に、対象物100の状態は特定の状態であると判定してもよい。判定部13dは、高ランクの判定結果が得られた場合に、高ランクの判定結果が消失した後も、対象物100の状態は特定の状態であるとの出力を所定期間維持してよい。ここで、所定期間は、対象物100が検出範囲10aを通過するのに要する時間程度であってよい。判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲で、対象物100の状態を複数回判定してよい。ここで、「対象物100が検出範囲10aを通過するのに要する時間の範囲」は、判定モデル生成時に実測された信号値変動の継続時間として判定モデルに組み込んでよい。また、判定動作時には、信号値変動の開始を検出せずに、現在から、継続時間に対応するシフト回数分過去までの間に得られた判定結果を「検出範囲10aを通過するのに要する時間の範囲」としてもよい。なお、信号値変動の開始が検出されてから継続時間に対応する回数のシフトをするまでを「検出範囲10aを通過するのに要する時間の範囲」とすることも考えられる。このように、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、FIFOメモリ13bに記憶された信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度のランクが所定値よりも高いときがあるか否かを判定することができる。 The determination model may be a model that determines that the degree of coincidence is high rank when the degree of coincidence is higher than a predetermined value, and the determination unit 13d may determine the object 100 when a high rank determination result is obtained. The state of may be determined to be a specific state. When the high rank determination result is obtained, the determination unit 13d may maintain the output that the state of the object 100 is a specific state for a predetermined period even after the high rank determination result disappears. Here, the predetermined period may be about the time required for the object 100 to pass through the detection range 10a. The determination unit 13d may determine the state of the object 100 a plurality of times within the time range required for the object 100 to pass through the detection range 10a. Here, the "range of time required for the object 100 to pass through the detection range 10a" may be incorporated into the determination model as the duration of the signal value fluctuation measured at the time of generation of the determination model. Further, during the determination operation, the determination result obtained from the present to the past by the number of shifts corresponding to the duration is "time required to pass through the detection range 10a" without detecting the start of the signal value fluctuation. It may be "range of". It is also conceivable to set the period from the detection of the start of the signal value fluctuation to the shift of the number of times corresponding to the duration as the "range of time required to pass through the detection range 10a". As described above, within the time required for the object 100 to pass through the detection range 10a, the waveform composed of the signal values stored in the FIFO memory 13b and the reference corresponding to the specific state of the object 100. It is possible to determine whether or not the rank of the degree of coincidence with the waveform may be higher than the predetermined value.

判定モデルは、さらに、一致度が所定値よりも高くないが所定値より小さい第2所定値よりも高い場合に一致度が中ランクであると判定するモデルであってよく、判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、高ランクの場合がなく中ランクの場合があるときに、特定の状態ではない対象物が到来したと判定してよい。判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、対象物100の状態を複数回判定し、複数回の判定のいずれにおいても判定結果が高ランクでないが、複数回の判定のうち少なくとも一度判定結果が中ランクである場合に、特定の状態ではない対象物が到来したと判定してよい。第2所定値は、ゼロより大きい値である。第2所定値は、特定の状態ではない対象物100が検出範囲10aに到来した場合における信号値に基づいて定められる閾値であってよい。これにより、対象物100の状態が特定の状態ではない場合であっても、対象物100が到来したことと、その対象物100の状態が特定の状態ではないことを判定することができる。例えば、特定の状態がベースに突起が付いた状態である場合、突起が付いていないベースのみの対象物が到来した場合、判定部13dは、一致度が中ランクであると判定してよい。 The determination model may be a model that further determines that the degree of agreement is medium rank when the degree of agreement is not higher than the predetermined value but higher than the second predetermined value smaller than the predetermined value, and the determination unit 13d may be used. Within the time required for the object 100 to pass through the detection range 10a, it may be determined that an object that is not in a specific state has arrived when there is a case of a medium rank and there is a case of a high rank. The determination unit 13d determines the state of the object 100 a plurality of times within the time required for the object 100 to pass through the detection range 10a, and the determination result is not high in any of the plurality of determinations. , If the determination result is the middle rank at least once out of a plurality of determinations, it may be determined that an object that is not in a specific state has arrived. The second predetermined value is a value larger than zero. The second predetermined value may be a threshold value determined based on the signal value when the object 100, which is not in a specific state, reaches the detection range 10a. Thereby, even if the state of the object 100 is not a specific state, it can be determined that the object 100 has arrived and that the state of the object 100 is not a specific state. For example, when a specific state is a state in which a protrusion is attached to a base, and an object having only a base without a protrusion arrives, the determination unit 13d may determine that the degree of matching is medium rank.

判定部13dは、窓汚れ等による光量劣化を考慮して、信号値倍率を調節して、一致度が十分に高くなるか否かを判定してもよい。すなわち、判定部13dは、FIFOメモリ13bに記憶された信号値により構成される波形の倍率を変更した波形と、対象物100の特定の状態に対応する基準波形との一致度が所定値より高いか否かによって、対象物100の状態を判定してもよい。このようにすることで、窓汚れ等により投光量や受光量が変化する場合であっても、安定して対象物100の状態を判定することができる。 The determination unit 13d may adjust the signal value magnification in consideration of the deterioration of the amount of light due to the dirt on the window or the like, and determine whether or not the degree of coincidence is sufficiently high. That is, the determination unit 13d has a higher degree of coincidence between the waveform obtained by changing the magnification of the waveform composed of the signal values stored in the FIFO memory 13b and the reference waveform corresponding to the specific state of the object 100. The state of the object 100 may be determined depending on whether or not the object 100 is present. By doing so, even when the amount of light projected or the amount of received light changes due to dirt on the window or the like, the state of the object 100 can be stably determined.

また、複数種類の対象物が混合搬送される場合、判定モデルは、FIFOメモリ13bに記憶された信号値により構成される波形といずれかの種類の対象物100の特定の状態に対応する基準波形との一致度が所定値よりも高い場合に一致度が高ランクであると判定するモデルであってよい。さらに、一致度が高ランクまたは中ランクである場合に、判定モデル自体が、どの種類の対象物についての判定結果であるかを示すことにより、判定部13dは、高ランク又は中ランクと判定された対象物100の種類を特定してもよい。あるいは、判定モデルは対象物100の種類別に用意され、判定部13dは、どの判定モデルが高ランク又は中ランクの判定をしたかによって高ランク又は中ランクと判定された対象物100の種類を特定してもよい。 Further, when a plurality of types of objects are mixed and conveyed, the determination model has a waveform composed of signal values stored in the FIFO memory 13b and a reference waveform corresponding to a specific state of the object 100 of any type. It may be a model that determines that the degree of agreement is high when the degree of agreement with is higher than a predetermined value. Further, when the degree of matching is high rank or medium rank, the determination unit 13d is determined to be high rank or medium rank by indicating which type of object the determination result is for the determination model itself. The type of the object 100 may be specified. Alternatively, the determination model is prepared for each type of the object 100, and the determination unit 13d identifies the type of the object 100 determined to be high rank or medium rank depending on which determination model determines the high rank or medium rank. You may.

例えば、第1種の対象物と第2種の対象物とが混合搬送される場合、判定部13dは、取得された信号値により構成される波形と、第1種の対象物に対応する基準波形との一致度が高ランクである場合に、搬送されている対象物の状態は、第1種の対象物の特定の状態であると判定してよい。また、判定部13dは、取得された信号値により構成される波形と、第2種の対象物に対応する基準波形との一致度が高ランクである場合に、搬送されている対象物の状態は、第2種の対象物の特定の状態であると判定してよい。さらに、判定部13dは、いずれの対象物についても高ランクの判定がされず、取得された信号値により構成される波形と、第1種の対象物に対応する基準波形との一致度が中ランクである場合に、搬送されている対象物は、特定の状態ではない第1種の対象物であると判定してよい。また、判定部13dは、いずれの対象物についても高ランクの判定がされず、取得された信号値により構成される波形と、第2種の対象物に対応する基準波形との一致度が中ランクである場合に、搬送されている対象物の状態は、特定の状態ではない第2種の対象物であると判定してよい。第1種の対象物と第2種の対象物とが類似していたり、中ランクの判定をするための第2所定値が低い値であったりする場合には、取得された信号値により構成される波形と、第1種の対象物に対応する基準波形との一致度及び第2種の対象物に対応する基準波形との一致度が、どちらも中ランクの判定結果となることも起こりうる。このような場合には、判定部13dは、搬送されている対象物は、特定の状態ではない第1種の対象物又は特定の状態ではない第2種の対象物であり、どちらの対象物であるかは特定できない、と判定してよい。 For example, when the first-class object and the second-class object are mixed and conveyed, the determination unit 13d uses the waveform composed of the acquired signal values and the reference corresponding to the first-class object. When the degree of coincidence with the waveform is high, it may be determined that the state of the transported object is a specific state of the first type object. Further, the determination unit 13d is a state of the object being conveyed when the degree of coincidence between the waveform composed of the acquired signal values and the reference waveform corresponding to the second type object is high. May determine that it is a specific state of the second type object. Further, the determination unit 13d does not determine a high rank for any of the objects, and the degree of coincidence between the waveform composed of the acquired signal values and the reference waveform corresponding to the first type object is medium. In the case of rank, it may be determined that the transported object is a first-class object that is not in a specific state. Further, the determination unit 13d does not determine a high rank for any of the objects, and the degree of coincidence between the waveform composed of the acquired signal values and the reference waveform corresponding to the second type object is medium. In the case of rank, it may be determined that the state of the transported object is a second-class object that is not a specific state. If the first type object and the second type object are similar, or if the second predetermined value for determining the middle rank is a low value, it is composed of the acquired signal values. The degree of coincidence between the waveform to be performed and the reference waveform corresponding to the first type object and the degree of coincidence with the reference waveform corresponding to the second type object may both result in a medium rank determination result. sell. In such a case, the determination unit 13d indicates that the object being transported is a type 1 object that is not in a specific state or a type 2 object that is not in a specific state, and either object. It may be determined that it cannot be specified.

<操作部>
操作部14は、光電センサ10の操作を行うためのものであり、操作スイッチ、表示器などを含んでよい。光電センサ10の操作者は、操作部14を用いて、光電センサ10の動作モードの設定等の指示の入力や動作状態の確認を行うことができる。なお、本実施形態に係る光電センサ10は、動作モードとして、判定モデルを生成するための学習モードと、生成された判定モデルを用いて対象物100の状態を判定するための判定モードを備えてよい。
<Operation unit>
The operation unit 14 is for operating the photoelectric sensor 10, and may include an operation switch, a display, and the like. The operator of the photoelectric sensor 10 can use the operation unit 14 to input instructions such as setting the operation mode of the photoelectric sensor 10 and confirm the operating state. The photoelectric sensor 10 according to the present embodiment has, as an operation mode, a learning mode for generating a determination model and a determination mode for determining the state of the object 100 using the generated determination model. good.

<出力部>
出力部15は、判定部13dによる判定結果を含む様々なデータの出力を行う。出力部15は、最も簡単には判定部13dによる判定結果の2値出力を行ってよい。なお、光電センサ10は、出力部15に代えて通信部を備え、大量のデータの入出力を行えるようにしてもよい。
<Output section>
The output unit 15 outputs various data including the determination result by the determination unit 13d. The output unit 15 may most simply output a binary value of the determination result by the determination unit 13d. The photoelectric sensor 10 may be provided with a communication unit instead of the output unit 15 so that a large amount of data can be input / output.

図3は、本実施形態に係る光電センサ10の処理部13の構成の一例を示す図である。処理部13は、第1周期で、FIFOメモリ13bの各ステージに記憶されている信号値を1つ後方のステージにシフトして、A/D変換器12dから出力された受光量のデジタル値を初段q0に記憶する。なお、同図では、原理を説明するために、FIFOメモリ13bの段数をq0~q9の10段としているが、FIFOメモリ13bの段数はさらに多くてもよく、例えば100段程度であってもよい。 FIG. 3 is a diagram showing an example of the configuration of the processing unit 13 of the photoelectric sensor 10 according to the present embodiment. In the first cycle, the processing unit 13 shifts the signal value stored in each stage of the FIFO memory 13b to the stage one behind, and converts the digital value of the received light output from the A / D converter 12d into the digital value. Store in the first stage q0. In the figure, in order to explain the principle, the number of stages of the FIFO memory 13b is set to 10 stages of q0 to q9, but the number of stages of the FIFO memory 13b may be further increased, for example, about 100 stages. ..

FIFOメモリ13bの更新を行う第1周期は、投光部11によるパルス発光の周期と同じであってもよいし、異なっていてもよい。また、FIFOメモリ13bの更新を行う第1周期は、投光部11のパルス発光及びA/D変換器12dによる変換の周期(第2周期とする)と同じであってもよいし、異なっていてもよい。例えば、第2周期は、光電センサ10に固有の値(例えば0.1ms)に固定されていてもよい。第1周期は、図1に示すコンピュータ30からコントローラ20経由で設定可能であってもよい。第1周期は、同時に処理したい信号値波形の範囲がFIFOメモリ13bに収まるように決められる必要がある。第1周期は、第2周期よりも長い場合が多く、例えば1msであってよい。 The first cycle for updating the FIFO memory 13b may be the same as or different from the cycle of pulse emission by the light projecting unit 11. Further, the first cycle for updating the FIFO memory 13b may be the same as or different from the pulse emission of the light projecting unit 11 and the conversion cycle by the A / D converter 12d (referred to as the second cycle). May be. For example, the second period may be fixed to a value peculiar to the photoelectric sensor 10 (for example, 0.1 ms). The first cycle may be set from the computer 30 shown in FIG. 1 via the controller 20. The first period needs to be determined so that the range of the signal value waveform to be processed at the same time is within the FIFO memory 13b. The first cycle is often longer than the second cycle, and may be, for example, 1 ms.

判定部13dは、FIFOメモリ13bの複数の段に格納されている信号値により構成される波形と、対象物の特定の状態に対応する基準波形との一致度のランクを判定モデルにより判定し、一致度のランクに基づいて対象物の状態を判定して、判定結果を第1周期で動作制御部13aに対して出力する。 The determination unit 13d determines the rank of the degree of coincidence between the waveform composed of the signal values stored in the plurality of stages of the FIFO memory 13b and the reference waveform corresponding to the specific state of the object by the determination model. The state of the object is determined based on the rank of the degree of coincidence, and the determination result is output to the operation control unit 13a in the first cycle.

モデル記憶部13cは、判定モデルとして、機械学習によって生成され、一致度のランクを判定する学習済みモデルを記憶してよい。ここで、判定モデルは、例えばニューラルネットワークにより構成されたり、決定木により構成されたりしてよく、その他の公知の機械学習の手法により生成された学習済みモデルを含んでよい。判定部13dは、FIFOメモリ13bの更新を1回又は複数回行う毎に一度の頻度で、学習済みモデルによる判定を実行し、一致度のランクに基づいて、対象物の状態を判定してよい。 As the determination model, the model storage unit 13c may store a trained model generated by machine learning and determining the rank of the degree of matching. Here, the determination model may be configured by, for example, a neural network or a decision tree, and may include a trained model generated by another known machine learning method. The determination unit 13d may execute the determination by the trained model once every time the FIFO memory 13b is updated once or a plurality of times, and determine the state of the object based on the rank of the degree of agreement. ..

動作制御部13aは、信号値に基づいて判定モデルを生成し、生成した判定モデルをモデル記憶部13cに記憶させる。例えば、動作制御部13aは、取得された信号値に基づいて学習モデルの機械学習を実行し、学習済みモデルを生成して、生成した学習済みモデルをモデル記憶部13cに記憶させてよい。このように、動作制御部13aによって、判定モデルを生成することができる。すなわち、光電センサが自ら判定モデルを生成できるので、判定モデルを外部から取得することなく、実際の対象物に応じて生成された判定モデルを使用することができる。 The operation control unit 13a generates a determination model based on the signal value, and stores the generated determination model in the model storage unit 13c. For example, the motion control unit 13a may execute machine learning of the learning model based on the acquired signal value, generate a trained model, and store the generated trained model in the model storage unit 13c. In this way, the motion control unit 13a can generate the determination model. That is, since the photoelectric sensor can generate the determination model by itself, the determination model generated according to the actual object can be used without acquiring the determination model from the outside.

動作制御部13aは、判定モデルを外部に出力可能であってよい。これにより、生成した判定モデルを他の光電センサで用いることができるので、同様の対象物及び設置状況で使用される複数の光電センサごとに判定モデルの生成を繰り返す必要が無くなる。したがって、対象物の状態を判定する光電センサを効率良く準備することができる。 The motion control unit 13a may be able to output the determination model to the outside. As a result, the generated determination model can be used in another photoelectric sensor, so that it is not necessary to repeat the generation of the determination model for each of a plurality of photoelectric sensors used in the same object and installation situation. Therefore, it is possible to efficiently prepare a photoelectric sensor that determines the state of the object.

動作制御部13aは、時系列の信号値の変動が比較的小さい安定期に続いて、時系列の信号値の変動が比較的大きい変動期が現れた場合に、変動期に属する信号値に基づいて判定モデルを生成してよい。ここで、時系列の信号値の変動が比較的小さい安定期は、ノイズの影響を差し引いた場合に、実質的に時系列の信号値の変動が無い期間であってよい。また、時系列の信号値の変動が比較的大きい変動期は、ノイズの影響を差し引いた場合に、実質的に時系列の信号値の変動が有る期間であってよい。このように、変動期に属する信号値に基づいて判定モデルを生成することで、信号値の中から対象物によって生じた信号値を選択的に使用して判定モデルを生成することができる。なお、時系列の信号値の変動が比較的小さい安定期と、時系列の信号値の変動が比較的大きい変動期との具体例は、図7a及び図7bを用いて説明する。 The operation control unit 13a is based on the signal value belonging to the fluctuation period when the fluctuation period in which the fluctuation of the time-series signal value is relatively large appears after the stable period in which the fluctuation of the time-series signal value is relatively small. You may generate a judgment model. Here, the stable period in which the fluctuation of the signal value in the time series is relatively small may be a period in which the fluctuation of the signal value in the time series is substantially free when the influence of noise is subtracted. Further, the fluctuation period in which the fluctuation of the signal value in the time series is relatively large may be a period in which the fluctuation of the signal value in the time series is substantially present when the influence of noise is subtracted. In this way, by generating the determination model based on the signal values belonging to the fluctuation period, the determination model can be generated by selectively using the signal value generated by the object from the signal values. Specific examples of a stable period in which the fluctuation of the signal value in the time series is relatively small and a fluctuation period in which the fluctuation of the signal value in the time series is relatively large will be described with reference to FIGS. 7a and 7b.

図4は、本実施形態に係る光電センサ10の学習モード及び判定モードの処理のフローチャートである。はじめに、光電センサ10は、判定モデルの生成を行う学習モードであるか否かを判定する(S10)。なお、学習モード及び判定モードの切り替えは、操作部14によって行われてよい。 FIG. 4 is a flowchart of processing of the learning mode and the determination mode of the photoelectric sensor 10 according to the present embodiment. First, the photoelectric sensor 10 determines whether or not it is in the learning mode for generating the determination model (S10). The learning mode and the determination mode may be switched by the operation unit 14.

光電センサ10が学習モードである場合(S10:YES)、光電センサ10は、時系列の信号値を取得し、動作制御部13aにより判定モデルを生成する(S11)。 When the photoelectric sensor 10 is in the learning mode (S10: YES), the photoelectric sensor 10 acquires a time-series signal value, and the motion control unit 13a generates a determination model (S11).

一方、光電センサ10が学習モードでない場合(S10:NO)、すなわち光電センサ10が判定モードである場合、光電センサ10は、新しい信号値によりFIFOメモリ13bを更新し(S12)、FIFOメモリ13bに記憶された信号値に対して判定モデルを適用することにより、対象物の状態を判定する(S13)。ここで、判定処理(S13)については、図5及び6を用いてより詳細に説明する。 On the other hand, when the photoelectric sensor 10 is not in the learning mode (S10: NO), that is, when the photoelectric sensor 10 is in the determination mode, the photoelectric sensor 10 updates the FIFO memory 13b with a new signal value (S12) and shifts to the FIFO memory 13b. By applying the determination model to the stored signal value, the state of the object is determined (S13). Here, the determination process (S13) will be described in more detail with reference to FIGS. 5 and 6.

その後、光電センサ10は、判定モードを終了するか否かを判定する(S14)。判定モードの終了は、光電センサ10の稼働を終了する場合や、判定モードから学習モードに切り替えられる場合に生じてよい。判定モードを終了しない場合(S14:NO)、光電センサ10は、再び時系列の信号値を取得し(S12)、取得した信号値に対して判定モデルを適用することにより、対象物の状態を判定する(S13)。一方、判定モードを終了する場合(S14:YES)、学習モード及び判定モードの処理が終了する。 After that, the photoelectric sensor 10 determines whether or not to terminate the determination mode (S14). The end of the determination mode may occur when the operation of the photoelectric sensor 10 is terminated or when the determination mode is switched to the learning mode. When the determination mode is not terminated (S14: NO), the photoelectric sensor 10 acquires the time-series signal value again (S12), and applies the determination model to the acquired signal value to determine the state of the object. Judgment (S13). On the other hand, when the determination mode is terminated (S14: YES), the processing of the learning mode and the determination mode is terminated.

図5は、本実施形態に係る光電センサ10により対象物の状態を判定する処理(S13)の第1例のフローチャートである。はじめに、光電センサ10は、判定モデルにより、取得した信号値により構成される波形と、基準波形との一致度のランクを判定する(S131)。一致度のランクは、例えば「高ランク」、「中ランク」、「低ランク」のような離散値で表されてよい。 FIG. 5 is a flowchart of a first example of a process (S13) for determining the state of an object by the photoelectric sensor 10 according to the present embodiment. First, the photoelectric sensor 10 determines the rank of the degree of coincidence between the waveform composed of the acquired signal values and the reference waveform by the determination model (S131). The rank of the degree of coincidence may be represented by discrete values such as "high rank", "medium rank", and "low rank".

一致度が高ランクの場合(S132:YES)、光電センサ10は、対象物の状態は、基準波形に対応する特定の状態であると判定する(S133)。一方、一致度が高ランクでない場合(S132:NO)、光電センサ10は、判定処理を終了して、次の周期の判定時に改めて一致度が高ランクであるか否かを判定する。以上により判定処理の第1例が終了する。 When the degree of coincidence is high (S132: YES), the photoelectric sensor 10 determines that the state of the object is a specific state corresponding to the reference waveform (S133). On the other hand, when the degree of coincidence is not high rank (S132: NO), the photoelectric sensor 10 ends the determination process and determines whether or not the degree of coincidence is high rank again at the time of determination of the next cycle. This completes the first example of the determination process.

図6は、本実施形態に係る光電センサ10により対象物の状態を判定する処理(S13)の第2例のフローチャートである。はじめに、光電センサ10は、判定モデルにより、取得した信号値により構成される波形と、基準波形との一致度のランクを判定する(S134)。 FIG. 6 is a flowchart of a second example of the process (S13) for determining the state of the object by the photoelectric sensor 10 according to the present embodiment. First, the photoelectric sensor 10 determines the rank of the degree of coincidence between the waveform composed of the acquired signal values and the reference waveform by the determination model (S134).

光電センサ10は、判定した一致度が高ランクの場合(S135:YES)、対象物の状態は、基準波形に対応する特定の状態であると判定する(S136)。一方、一致度が高ランクでなく(S135:NO)、一致度が中ランクであると判定された場合(S137:YES)、光電センサ10は、対象物の状態をただちに判定せずに、判定処理を終了する。 When the determined degree of coincidence is high rank (S135: YES), the photoelectric sensor 10 determines that the state of the object is a specific state corresponding to the reference waveform (S136). On the other hand, when the degree of matching is not high rank (S135: NO) and the degree of matching is determined to be medium rank (S137: YES), the photoelectric sensor 10 determines the state of the object without immediately determining the state. End the process.

一致度が高ランクでなく(S135:NO)、一致度が中ランクでもなく(S137:NO)、対象物が検出範囲を通過する時間の範囲内に、一致度が高ランクの場合がなく、かつ、中ランクの場合があると判定された場合(S138:YES)、光電センサ10は、特定の状態ではない対象物が到来したと判定する(S139)。一方、一致度が高ランクでなく(S135:NO)、一致度が中ランクでなくても(S137:YES)、対象物が検出範囲を通過する時間の範囲内に、一致度が高ランクの場合がなく、かつ、中ランクの場合があると判定されない場合(S138:NO)、判定処理を終了する。 The degree of matching is not high rank (S135: NO), the degree of matching is not medium rank (S137: NO), and there is no case where the degree of matching is high rank within the time range in which the object passes through the detection range. Moreover, when it is determined that there is a case of middle rank (S138: YES), the photoelectric sensor 10 determines that an object which is not in a specific state has arrived (S139). On the other hand, even if the degree of matching is not high rank (S135: NO) and the degree of matching is not medium rank (S137: YES), the degree of matching is high within the time range in which the object passes through the detection range. If there is no case and it is not determined that there is a case of middle rank (S138: NO), the determination process is terminated.

対象物が検出範囲を通過する時間の範囲内に、一致度が高ランクの場合がなく、かつ、中ランクの場合があるか判定するため(S138)、光電センサ10は、現時点から過去の、対象物が検出範囲を通過するのに要する時間の範囲内に判定モデルにより一致度のランクを判定した一連の判定結果を判定結果格納用の図示しないFIFOメモリに記憶してよい。また、光電センサ10は、一連の判定結果をFIFOメモリに記憶せず、判定モデルにより一致度が中ランクであると判定された場合に、対象物が検出範囲を通過するのに要する時間の計時を開始し、計時が終了するまでに高ランクの判定結果が出現しなければ、特定の状態ではない対象物が到来したと判定し、計時が終了するまでに高ランクの判定結果が出現すれば、特定の状態の対象物が到来したと判定してもよい。以上により判定処理の第2例が終了する。 In order to determine whether the degree of coincidence is not high-ranked and medium-ranked within the time range in which the object passes through the detection range (S138), the photoelectric sensor 10 is used from the present time to the past. A series of determination results in which the rank of the degree of coincidence is determined by the determination model within the time required for the object to pass through the detection range may be stored in a FIFO memory (not shown) for storing the determination results. Further, the photoelectric sensor 10 does not store a series of determination results in the FIFO memory, and when the determination model determines that the degree of coincidence is medium rank, the photoelectric sensor 10 measures the time required for the object to pass through the detection range. If a high-ranked judgment result does not appear by the end of the timekeeping, it is judged that an object that is not in a specific state has arrived, and if a high-ranked judgment result appears by the end of the timekeeping. , It may be determined that an object in a specific state has arrived. This completes the second example of the determination process.

図7aは、本実施形態に係る光電センサ10の第nサイクルに測定された信号値の一例を示す図である。また、図7bは、本実施形態に係る光電センサ10の第n+1サイクルに測定された信号値の一例を示す図である。図7a及び図7bでは、縦軸に受光量の値を示し、横軸に時間とそれに対応するFIFOメモリ13bのステージを示している。両図に示すように、最新の受光量の値(時間t9の値)は、FIFOメモリ13bの初段q0に記憶されており、最も過去の受光量の値(時間t0の値)は、FIFOメモリ13bの最終段q9に記憶されている。本例では、FIFOメモリ13bは、取得された順に順序付けて10の信号値を記憶している。 FIG. 7a is a diagram showing an example of signal values measured in the nth cycle of the photoelectric sensor 10 according to the present embodiment. Further, FIG. 7b is a diagram showing an example of signal values measured in the n + 1 cycle of the photoelectric sensor 10 according to the present embodiment. In FIGS. 7a and 7b, the vertical axis shows the value of the light receiving amount, and the horizontal axis shows the time and the corresponding stage of the FIFO memory 13b. As shown in both figures, the latest received light amount value (time t9 value) is stored in the first stage q0 of the FIFO memory 13b, and the oldest received light amount value (time t0 value) is the FIFO memory. It is stored in the final stage q9 of 13b. In this example, the FIFO memory 13b stores 10 signal values in order of acquisition.

破線により示す対象物の形状S1は、各受光量の値が得られるタイミングに合わせて対象物の形状を模式的に示すものである。対象物の形状S1によれば、対象物は、ベースに突起の付いた形状であることが読み取れる。 The shape S1 of the object shown by the broken line schematically shows the shape of the object according to the timing at which the value of each light receiving amount is obtained. According to the shape S1 of the object, it can be read that the object has a shape with protrusions on the base.

図7aにおいて実線により示す波形W1は、第nサイクルに取得され、FIFOメモリ13bに記憶された信号値により構成された波形である。また、図7bにおいて実線により示す波形W2は、第n+1サイクルに取得され、FIFOメモリ13bに記憶された信号値により構成された波形である。両図に示すように、第nサイクルにFIFOメモリ13bに記憶されていた信号値は、第n+1サイクルにおいて1つ後段にシフトされてFIFOメモリ13bに記憶されている。 The waveform W1 shown by the solid line in FIG. 7a is a waveform composed of signal values acquired in the nth cycle and stored in the FIFO memory 13b. Further, the waveform W2 shown by the solid line in FIG. 7b is a waveform composed of signal values acquired in the n + 1 cycle and stored in the FIFO memory 13b. As shown in both figures, the signal value stored in the FIFO memory 13b in the nth cycle is shifted to the next stage by one in the n + 1 cycle and stored in the FIFO memory 13b.

検出範囲10aには一定の広がりがあるため、対象物100の段差に対応するタイミング付近では段差の上面と下面との両方からの反射光が受光され、波形W1及び波形W2を構成する信号値は中間的な値となる。中間的な受光量の値は、わずかな取得タイミングの違いで大きく変動しやすい。したがって、同一形状の対象物100についても毎回受光量の値は変動し得る。判定モデルの生成にあたっては、平均化の効果が得られるように、ある程度の回数にわたって対象物100を搬送させて、受光量の値の取得を繰り返すことが好ましい。 Since the detection range 10a has a certain spread, the reflected light from both the upper surface and the lower surface of the step is received near the timing corresponding to the step of the object 100, and the signal values constituting the waveform W1 and the waveform W2 are It is an intermediate value. The value of the amount of received light in the middle tends to fluctuate greatly with a slight difference in acquisition timing. Therefore, the value of the light receiving amount may fluctuate every time even for the object 100 having the same shape. In generating the determination model, it is preferable to transport the object 100 a certain number of times and repeat the acquisition of the value of the received light amount so that the effect of averaging can be obtained.

動作制御部13aは、時系列の信号値の変動が比較的小さい安定期に続いて、時系列の信号値の変動が比較的大きい変動期が現れた場合に、変動期に属する信号値に基づいて判定モデルを生成してよい。図7aの例の場合、時系列の信号値の変動が比較的小さい安定期は、時間t0からt1までであり、時系列の信号値の変動が比較的大きい変動期は、時間t2からt8までである。また、図7bの例の場合、時系列の信号値の変動が比較的小さい安定期は、時間t8以降であり、時系列の信号値の変動が比較的大きい変動期は、時間t2からt7までである。動作制御部13aは、FIFOメモリ13bの最終段から初段に向かって隣り合うステージに記憶された値を比較して、その差が閾値以上である隣り合うステージが存在する場合に、隣り合うステージのうち初段に近い側のステージから初段に向かって変動期に属する信号値が記憶されていると判定し、隣り合うステージのうち最終段に近い側のステージから最終段に向かって安定期に属する信号値が記憶されていると判定してもよい。具体的には、動作制御部13aは、図7aの例の場合、最終段q9と第8段q8に記憶された値を比較して、その差が0であり閾値以下であるため、第8段q8と第7段q7に記憶された値を比較して、その差が2であり閾値以上であると判定してよい。ここで、閾値は、例えば1であってよい。そして、動作制御部13aは、記憶された値の差が閾値以上である第8段q8と第7段q7のうち初段q0に近い側の第7段q7から初段q0に向かって変動期に属する信号値が記憶されていると判定し、第8段q8と第7段q7のうち最終段に近い側の第8段q8から最終段q9に向かって安定期に属する信号値が記憶されていると判定してよい。 The operation control unit 13a is based on the signal value belonging to the fluctuation period when the fluctuation period in which the fluctuation of the time-series signal value is relatively large appears after the stable period in which the fluctuation of the time-series signal value is relatively small. You may generate a judgment model. In the case of the example of FIG. 7a, the stable period in which the fluctuation of the signal value in the time series is relatively small is from time t0 to t1, and the fluctuation period in which the fluctuation of the signal value in the time series is relatively large is from time t2 to t8. Is. Further, in the case of the example of FIG. 7b, the stable period in which the fluctuation of the signal value in the time series is relatively small is after time t8, and the fluctuation period in which the fluctuation of the signal value in the time series is relatively large is from time t2 to t7. Is. The operation control unit 13a compares the values stored in the adjacent stages from the final stage to the first stage of the FIFO memory 13b, and when there is an adjacent stage whose difference is equal to or larger than the threshold value, the operation control unit 13a of the adjacent stages It is determined that the signal values belonging to the variable period are stored from the stage closer to the first stage to the first stage, and the signals belonging to the stable period from the stage closer to the final stage among the adjacent stages to the final stage. It may be determined that the value is stored. Specifically, in the case of the example of FIG. 7a, the motion control unit 13a compares the values stored in the final stage q9 and the eighth stage q8, and the difference is 0, which is equal to or less than the threshold value. The values stored in the 7th stage q8 and the 7th stage q7 may be compared, and it may be determined that the difference is 2 and is equal to or larger than the threshold value. Here, the threshold value may be, for example, 1. Then, the motion control unit 13a belongs to the variable period from the 7th stage q7 on the side closer to the first stage q0 of the 8th stage q8 and the 7th stage q7 where the difference between the stored values is equal to or larger than the threshold value toward the first stage q0. It is determined that the signal value is stored, and the signal value belonging to the stable period is stored from the 8th stage q8 on the side closer to the final stage of the 8th stage q8 and the 7th stage q7 toward the final stage q9. May be determined.

判定部13dは、FIFOメモリ13bの更新を1回又は複数回行う毎に一度の頻度で、FIFOメモリ13bに記憶された所定数の信号値により構成される波形W1と、対象物100の特定の状態に対応する基準波形との一致度を判定モデルにより判定し、一致度のランクに基づいて、対象物の状態を判定してよい。例えば、基準波形が図7aに破線で示した対象物の形状S1とほぼ等しい波形である場合、判定部13dは、FIFOメモリ13bの各ステージに記憶された信号値と基準波形の信号値との差の絶対値の総和を求めて、その値が小さいほど一致度が高いとして、対象物の状態が特定の状態であるか判定してよい。このように、光電センサ10が判定モードで動作している時に、搬送されてきた対象物100が突起のある対象物である場合、FIFOメモリ13bの特定のシフトサイクルにおいて、取得される受光量の値で構成される波形とモデル生成時における受光量の値で構成される基準波形との一致の程度が高くなる。 The determination unit 13d has a waveform W1 composed of a predetermined number of signal values stored in the FIFO memory 13b at a frequency of once each time the FIFO memory 13b is updated once or a plurality of times, and a specific object 100. The degree of agreement with the reference waveform corresponding to the state may be determined by the determination model, and the state of the object may be determined based on the rank of the degree of agreement. For example, when the reference waveform has a waveform substantially equal to the shape S1 of the object shown by the broken line in FIG. 7a, the determination unit 13d sets the signal value stored in each stage of the FIFO memory 13b and the signal value of the reference waveform. The sum of the absolute values of the differences may be obtained, and it may be determined whether the state of the object is a specific state, assuming that the smaller the value, the higher the degree of coincidence. As described above, when the photoelectric sensor 10 is operating in the determination mode and the conveyed object 100 is an object having protrusions, the amount of received light received in a specific shift cycle of the FIFO memory 13b The degree of matching between the waveform composed of the values and the reference waveform composed of the values of the amount of received light at the time of model generation is increased.

図8は、本実施形態に係る光電センサ10の第nサイクルに測定された信号値の他の例を示す図である。同図では、縦軸に受光量の値を示し、横軸に時間とそれに対応するFIFOメモリ13bのステージを示している。 FIG. 8 is a diagram showing another example of the signal value measured in the nth cycle of the photoelectric sensor 10 according to the present embodiment. In the figure, the vertical axis shows the value of the light receiving amount, and the horizontal axis shows the time and the corresponding stage of the FIFO memory 13b.

図8において実線により示す波形W3は、第nサイクルに取得され、FIFOメモリ13bに記憶された信号値により構成された波形である。また、破線により示す対象物の形状S2は、各受光量の値が得られるタイミングに合わせて対象物の形状を模式的に示すものである。対象物の形状S2によれば、対象物は、突起が無いベースのみの形状であることが読み取れる。 The waveform W3 shown by the solid line in FIG. 8 is a waveform composed of signal values acquired in the nth cycle and stored in the FIFO memory 13b. Further, the shape S2 of the object shown by the broken line schematically shows the shape of the object according to the timing at which the value of each light receiving amount is obtained. According to the shape S2 of the object, it can be read that the object has only the shape of the base without protrusions.

波形W3を図7aに示す波形W1と比較すると、時間t4からt6までの間の受光量の値に差異がある。判定モードで動作しているときに搬送されるものが突起のない対象物である場合、対象物の通過に要する時間の範囲内で、FIFOメモリ13bのいくつかのシフトサイクルにおいて、取得される受光量の値で構成される波形と、判定モデル生成時における受光量の値で構成される基準波形との一致度は、第2所定値より大きくなり、中程度になるが、所定値より高くならず、高程度になることはない。従って、判定部13dは、突起のある対象物ではないが、一致度が中程度となることがあることをもって、突起のある対象物と何らかの共通性のある対象物が到来したと判定してよい。本例では、対象物のベース部分が共通しているので一致の程度が中程度となった。 Comparing the waveform W3 with the waveform W1 shown in FIG. 7a, there is a difference in the value of the received light amount between the times t4 and t6. When the object to be conveyed is an object without protrusions when operating in the determination mode, the received light received in some shift cycles of the FIFO memory 13b within the time required to pass the object. The degree of agreement between the waveform composed of the quantity values and the reference waveform composed of the received light quantity values at the time of generating the judgment model is larger than the second predetermined value and is medium, but if it is higher than the predetermined value. No, it will not be high. Therefore, although the determination unit 13d is not an object having protrusions, it may be determined that an object having some commonality with the object having protrusions has arrived because the degree of coincidence may be medium. .. In this example, since the base part of the object is common, the degree of agreement is medium.

図9は、本実施形態に係る光電センサ10の処理部13の構成の他の例を示す図である。同図に示す処理部13の構成の例は、図3に示す処理部13の構成の例と比較して、モデル記憶部13cに参照値Rが記憶されている点で相違し、それ以外の構成について共通する。 FIG. 9 is a diagram showing another example of the configuration of the processing unit 13 of the photoelectric sensor 10 according to the present embodiment. The example of the configuration of the processing unit 13 shown in FIG. 3 is different from the example of the configuration of the processing unit 13 shown in FIG. 3 in that the reference value R is stored in the model storage unit 13c, and other than that. Common to the configuration.

モデル記憶部13cは、判定モデルとして、FIFOメモリ13bに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す参照値Rとの差異から一致度を算出するモデルを記憶してよい。一致度を算出するモデルは、本例の場合、5つの参照値Rと、それらに対応するFIFOメモリのq0からq4までのステージに記憶された信号値との差の絶対値の総和を算出し、その値が小さいほど一致度が大きくなるように一致度を算出するモデルであってよい。モデル記憶部13cには、参照値r4、r3、r2、r1及びr0が格納され、それぞれFIFOメモリ13bのq0、q2、q4、q6及びq8に格納されている値と対応していてよい。 As a determination model, the model storage unit 13c calculates the degree of coincidence from the difference between the predetermined number of signal values stored in the FIFO memory 13b and the reference value R representing the reference waveform corresponding to the predetermined number of signal values. You may memorize the model. In the case of this example, the model for calculating the degree of coincidence calculates the sum of the absolute values of the differences between the five reference values R and the signal values stored in the stages q0 to q4 of the FIFO memory corresponding to them. , The model may be a model that calculates the degree of coincidence so that the smaller the value is, the larger the degree of coincidence is. Reference values r4, r3, r2, r1 and r0 are stored in the model storage unit 13c, and may correspond to the values stored in q0, q2, q4, q6 and q8 of the FIFO memory 13b, respectively.

判定部13dが備える判定モデルは、対応関係にある各値の差の絶対値を求め、各差の絶対値の総和が第1閾値より小さいことを第1基準とし、第1基準を満たすとき一致度が高ランクであると判定するモデルであってよい。判定部13dが備える判定モデルは、さらに、各差の絶対値の総和が第1閾値と、第1閾値より大きい第2閾値との間にあることを第2基準とし、対象物100の通過に要する時間の範囲内で、第2基準は満たすことがあるが第1基準は満たすことがないときに一致度が中ランクであると判定するモデルであってよい。 The determination model provided in the determination unit 13d obtains the absolute value of the difference between the corresponding values, and sets the sum of the absolute values of the differences to be smaller than the first threshold value as the first criterion, and matches when the first criterion is satisfied. It may be a model that determines that the degree is high. The determination model included in the determination unit 13d further sets that the sum of the absolute values of the differences is between the first threshold value and the second threshold value larger than the first threshold value, and passes the object 100. Within the time required, the model may be a model that determines that the degree of agreement is medium rank when the second criterion may be satisfied but the first criterion is not satisfied.

判定部13dは、FIFOメモリ13bの更新を1回又は複数回行う毎に一度の頻度で、判定モデルによる判定を実行し、一致度のランクに基づいて、対象物の状態を判定してよい。このように、比較的簡単なモデルによって、FIFOメモリ13bに記憶された信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度を判定することで、搬送ライン上を次々と運ばれてくる対象物100の状態をより高速に判定することができる。 The determination unit 13d may execute the determination by the determination model once every time the FIFO memory 13b is updated once or a plurality of times, and determine the state of the object based on the rank of the degree of agreement. In this way, by using a relatively simple model, the degree of coincidence between the waveform composed of the signal values stored in the FIFO memory 13b and the reference waveform corresponding to the specific state of the object 100 is determined, and the transfer is performed. It is possible to determine the state of the object 100 carried on the line one after another at a higher speed.

判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、対象物100の状態を複数回判定し、FIFOメモリ13bに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す所定数の参照値Rとの差異が小さいことを判定するための第1基準を少なくとも一度満たす場合に、対象物100の状態は特定の状態であると判定してよい。例えば、判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、FIFOメモリ13bに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す所定数の参照値Rとの差異が小さいことを判定するための第1基準を少なくとも一度満たす場合、対象物100がベースに突起が付いた形状の対象物であると判定してよい。このように、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、FIFOメモリ13bに記憶された信号値により構成される波形と、対象物100の特定の状態に対応する基準波形との一致度が所定値よりも高いときがあるか否かを判定することができる。 The determination unit 13d determines the state of the object 100 a plurality of times within the time required for the object 100 to pass through the detection range 10a, and determines a predetermined number of signal values stored in the FIFO memory 13b and a predetermined number of signal values. The state of the object 100 is in a specific state when the first criterion for determining that the difference from the predetermined number of reference values R representing the reference waveform corresponding to each of the signal values of the numbers is small is satisfied at least once. It may be determined that there is. For example, the determination unit 13d corresponds to a predetermined number of signal values stored in the FIFO memory 13b and a predetermined number of signal values within a range of time required for the object 100 to pass through the detection range 10a. When the first criterion for determining that the difference from the predetermined number of reference values R representing the reference waveform is small is satisfied at least once, it is determined that the object 100 is an object having a protrusion on the base. good. As described above, within the time required for the object 100 to pass through the detection range 10a, the waveform composed of the signal values stored in the FIFO memory 13b and the reference corresponding to the specific state of the object 100. It is possible to determine whether or not the degree of coincidence with the waveform may be higher than a predetermined value.

また、判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、対象物100の状態を複数回判定し、複数回の判定全てにおいて第1基準を満たさないが、FIFOメモリ13bに記憶された所定数の信号値と、所定数の信号値にそれぞれ対応する、基準波形を表す所定数の参照値Rとの差異が中程度であることを判定するための第2基準を少なくとも一度満たす場合に、特定の状態ではない対象物100が到来したと判定してよい。例えば、判定部13dは、対象物100が検出範囲10aを通過するのに要する時間の範囲内で、FIFOメモリ13bに記憶された所定数の信号値と、基準波形を表す所定数の参照値Rとの差異が小さいことを判定するための第1基準を満たさないが、差異が中程度であることを判定するための第2基準を少なくとも一度満たす場合、対象物100に突起が無く、ベースのみの形状の対象物であると判定してよい。このように、対象物100の状態が特定の状態ではない場合であっても、対象物100が到来したことと、その対象物100の状態が特定の状態ではないことを判定することができる。 Further, the determination unit 13d determines the state of the object 100 a plurality of times within the time required for the object 100 to pass through the detection range 10a, and does not satisfy the first criterion in all of the plurality of determinations. , The first for determining that the difference between the predetermined number of signal values stored in the FIFO memory 13b and the predetermined number of reference values R representing the reference waveform corresponding to the predetermined number of signal values is moderate. When the two criteria are satisfied at least once, it may be determined that the object 100 which is not in a specific state has arrived. For example, the determination unit 13d has a predetermined number of signal values stored in the FIFO memory 13b and a predetermined number of reference values R representing a reference waveform within the time range required for the object 100 to pass through the detection range 10a. If the first criterion for determining that the difference is small is not met, but the second criterion for determining that the difference is moderate is met at least once, the object 100 has no protrusions and only the base. It may be determined that the object has the shape of. In this way, even when the state of the object 100 is not a specific state, it can be determined that the object 100 has arrived and that the state of the object 100 is not a specific state.

図10は、本実施形態に係る光電センサ10に外部から判定モデルをインストールする例を示す図である。同図に示す光電センサ10の処理部13の構成の例は、図3に示す処理部13の構成の例と比較して、動作制御部13aが、時系列の受光量の値を外部に出力し、それに基づいて外部のコンピュータで生成された判定モデルを入力し、入力した判定モデルをモデル記憶部13cに記憶させる点で相違し、それ以外の構成について共通する。 FIG. 10 is a diagram showing an example of installing a determination model from the outside on the photoelectric sensor 10 according to the present embodiment. In the example of the configuration of the processing unit 13 of the photoelectric sensor 10 shown in the figure, the operation control unit 13a outputs the value of the received light amount in time series to the outside as compared with the example of the configuration of the processing unit 13 shown in FIG. However, the difference is that a determination model generated by an external computer is input based on the input, and the input determination model is stored in the model storage unit 13c, and the other configurations are common.

動作制御部13aは、時系列の信号値を外部に出力可能であってよい。外部に出力される信号値は、FIFOメモリ13bに記憶されている信号値であってよい。信号値を外部に出力し、外部機器で判定モデルを生成することができる。これにより、判定モデルを生成する処理に関する計算資源を光電センサ自身で持つ必要がなくなる。 The operation control unit 13a may be able to output a time-series signal value to the outside. The signal value output to the outside may be a signal value stored in the FIFO memory 13b. The signal value can be output to the outside and a judgment model can be generated by an external device. This eliminates the need for the photoelectric sensor itself to have computational resources related to the process of generating the determination model.

動作制御部13aは、判定モデルを外部から取得し、モデル記憶部13cに記憶させてよい。動作制御部13aは、外部のコンピュータで生成された判定モデルを取得したり、他の光電センサにより生成された判定モデルを取得したりしてよい。他の装置、例えば他の光電センサにより生成された判定モデルを流用することで判定モデルの生成を省略することができる。 The motion control unit 13a may acquire the determination model from the outside and store it in the model storage unit 13c. The motion control unit 13a may acquire a determination model generated by an external computer, or may acquire a determination model generated by another photoelectric sensor. By diverting the determination model generated by another device, for example, another photoelectric sensor, the generation of the determination model can be omitted.

なお、動作制御部13aは、時系列の信号値を外部に出力することなく、他の光電センサにおいて生成されたモデル、又は他の光電センサで取得された時系列の信号値に基づいて外部のコンピュータで生成されたモデルを入力して使用するようにしてもよい。 The operation control unit 13a does not output the time-series signal value to the outside, but is external based on the model generated by the other photoelectric sensor or the time-series signal value acquired by the other photoelectric sensor. You may enter and use a computer-generated model.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are for facilitating the understanding of the present invention, and are not for limiting the interpretation of the present invention. Each element included in the embodiment and its arrangement, material, condition, shape, size, and the like are not limited to those exemplified, and can be appropriately changed. Further, it is possible to partially replace or combine the configurations shown in different embodiments.

[附記]
対象物(100)が到来する検出範囲(10a)に向けて光を出射する投光部(11)と、
前記光の受光に基づく時系列の信号値を取得する受光部(12)と、
取得された順に順序付けて所定数の前記信号値を記憶し、周期的に、新たに取得された前記信号値により所定数の前記信号値を更新するFIFOメモリ(13b)と、
前記FIFOメモリ(13b)に記憶された所定数の前記信号値により構成される波形と、前記対象物(100)の特定の状態に対応する基準波形との一致度のランクを判定する判定モデルを記憶するモデル記憶部(13c)と、
前記FIFOメモリ(13b)の更新を1回又は複数回行う毎に一度の頻度で、前記判定モデルによる判定を実行し、前記一致度のランクに基づいて、前記対象物(100)の状態を判定する判定部(13d)と、
を備える光電センサ(10)。
[Appendix]
A light projecting unit (11) that emits light toward the detection range (10a) where the object (100) arrives, and
A light receiving unit (12) that acquires a time-series signal value based on the light reception, and a light receiving unit (12).
A FIFO memory (13b) that stores a predetermined number of the signal values in order of acquisition and periodically updates the predetermined number of the signal values with the newly acquired signal values.
A determination model for determining the rank of the degree of coincidence between the waveform composed of the predetermined number of the signal values stored in the FIFO memory (13b) and the reference waveform corresponding to the specific state of the object (100). The model storage unit (13c) to be stored and
The determination by the determination model is executed once every time the FIFO memory (13b) is updated once or a plurality of times, and the state of the object (100) is determined based on the rank of the degree of agreement. Judgment unit (13d)
A photoelectric sensor (10).

1…検出システム、10…光電センサ、10a…検出範囲、11…投光部、11a…投光素子、11b…駆動回路、12…受光部、12a…受光素子、12b…増幅器、12c…サンプル/ホールド回路、12d…A/D変換器、13…処理部、13a…動作制御部、13b…FIFOメモリ、13c…モデル記憶部、13d…判定部、14…操作部、15…出力部、20…コントローラ、30…コンピュータ、40…ロボット、50…搬送装置、100…対象物 1 ... Detection system, 10 ... Photoelectric sensor, 10a ... Detection range, 11 ... Floodlight, 11a ... Floodlight element, 11b ... Drive circuit, 12 ... Light receiving unit, 12a ... Light receiving element, 12b ... Amplifier, 12c ... Sample / Hold circuit, 12d ... A / D converter, 13 ... Processing unit, 13a ... Operation control unit, 13b ... FIFA memory, 13c ... Model storage unit, 13d ... Judgment unit, 14 ... Operation unit, 15 ... Output unit, 20 ... Controller, 30 ... computer, 40 ... robot, 50 ... transfer device, 100 ... object

Claims (10)

対象物が到来する検出範囲に向けて光を出射する投光部と、
前記光の受光に基づく時系列の信号値を取得する受光部と、
取得された順に順序付けて所定数の前記信号値を記憶し、周期的に、新たに取得された前記信号値により所定数の前記信号値を更新するFIFOメモリと、
前記FIFOメモリに記憶された所定数の前記信号値により構成される波形と、前記対象物の特定の状態に対応する基準波形との一致度のランクを判定する判定モデルを記憶するモデル記憶部と、
前記FIFOメモリの更新を1回又は複数回行う毎に一度の頻度で、前記判定モデルによる判定を実行し、前記一致度のランクに基づいて、前記対象物の状態を判定する判定部と、
を備え
前記基準波形は、前記特定の状態の複数の対象物について取得された波形に基づいて生成され、
前記一致度のランクは、前記一致度と所定値との比較に基づいて、判定される、光電センサ。
A light projecting unit that emits light toward the detection range where the object arrives,
A light receiving unit that acquires a time-series signal value based on the light reception, and a light receiving unit.
A FIFO memory that stores a predetermined number of the signal values in order of acquisition and periodically updates a predetermined number of the signal values with the newly acquired signal values.
A model storage unit that stores a determination model for determining the rank of the degree of coincidence between a waveform composed of a predetermined number of signal values stored in the FIFO memory and a reference waveform corresponding to a specific state of the object. ,
A determination unit that executes determination by the determination model once or once each time the FIFO memory is updated, and determines the state of the object based on the rank of the degree of agreement.
Equipped with
The reference waveform is generated based on the waveforms acquired for the plurality of objects in the specific state.
The rank of the degree of agreement is determined based on the comparison between the degree of agreement and a predetermined value, and is a photoelectric sensor.
前記判定モデルは、機械学習によって生成された学習済みモデルである、
請求項1に記載の光電センサ。
The determination model is a trained model generated by machine learning.
The photoelectric sensor according to claim 1.
前記判定モデルは、前記FIFOメモリに記憶された前記所定数の信号値と、前記所定数の信号値にそれぞれ対応する、前記基準波形を表す参照値との差異から前記一致度を算出することを含むモデルである、
請求項1に記載の光電センサ。
The determination model calculates the degree of agreement from the difference between the predetermined number of signal values stored in the FIFO memory and the reference value representing the reference waveform corresponding to the predetermined number of signal values. It is a model that includes
The photoelectric sensor according to claim 1.
前記判定モデルは、前記一致度が所定値よりも高い場合に一致度が高ランクであると判定するモデルであり、
前記判定部は、前記高ランクの判定結果が得られた場合に、前記対象物の状態は前記特定の状態であると判定する、
請求項1から3のいずれか一項に記載の光電センサ。
The determination model is a model for determining that the degree of agreement is high when the degree of agreement is higher than a predetermined value.
When the high-ranked determination result is obtained, the determination unit determines that the state of the object is the specific state.
The photoelectric sensor according to any one of claims 1 to 3.
前記判定モデルは、さらに、前記一致度が前記所定値よりも高くないが前記所定値より小さい第2所定値よりも高い場合に一致度が中ランクであると判定するモデルであり、
前記判定部は、前記対象物が前記検出範囲を通過するのに要する時間の範囲内で、前記高ランクの場合がなく前記中ランクの場合があるときに、前記特定の状態ではない前記対象物が到来したと判定する、
請求項4に記載の光電センサ。
The determination model is a model for determining that the degree of agreement is medium rank when the degree of agreement is not higher than the predetermined value but higher than the second predetermined value smaller than the predetermined value.
The determination unit is not in the specific state when the object is not in the high rank but in the middle rank within the time required for the object to pass through the detection range. Judges that has arrived,
The photoelectric sensor according to claim 4.
前記信号値に基づいて前記判定モデルを生成し、生成した前記判定モデルを前記モデル記憶部に記憶させる動作制御部をさらに備える、
請求項1から5のいずれか一項に記載の光電センサ。
An operation control unit that generates the determination model based on the signal value and stores the generated determination model in the model storage unit is further provided.
The photoelectric sensor according to any one of claims 1 to 5.
前記動作制御部は、時系列の前記信号値の変動が比較的小さい安定期に続いて、時系列の前記信号値の変動が比較的大きい変動期が現れた場合に、前記変動期に属する前記信号値に基づいて前記判定モデルを生成する、
請求項6に記載の光電センサ。
The operation control unit belongs to the fluctuation period when a fluctuation period in which the fluctuation of the signal value in the time series is relatively large appears following a stable period in which the fluctuation of the signal value in the time series is relatively small. Generate the determination model based on the signal value,
The photoelectric sensor according to claim 6.
前記動作制御部は、前記判定モデルを外部に出力可能である、
請求項6又は7に記載の光電センサ。
The motion control unit can output the determination model to the outside.
The photoelectric sensor according to claim 6 or 7.
前記動作制御部は、時系列の前記信号値を外部に出力可能である、
請求項6又は7に記載の光電センサ。
The operation control unit can output the time-series signal value to the outside.
The photoelectric sensor according to claim 6 or 7.
前記判定モデルを外部から取得し、前記モデル記憶部に記憶させる動作制御部をさらに備える、
請求項1から5のいずれか一項に記載の光電センサ。
An operation control unit that acquires the determination model from the outside and stores it in the model storage unit is further provided.
The photoelectric sensor according to any one of claims 1 to 5.
JP2018145201A 2018-08-01 2018-08-01 Photoelectric sensor Active JP7035890B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2018145201A JP7035890B2 (en) 2018-08-01 2018-08-01 Photoelectric sensor
PCT/JP2019/028266 WO2020026832A1 (en) 2018-08-01 2019-07-18 Photoelectric sensor
TW108127193A TWI691166B (en) 2018-08-01 2019-07-31 Photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018145201A JP7035890B2 (en) 2018-08-01 2018-08-01 Photoelectric sensor

Publications (2)

Publication Number Publication Date
JP2020022091A JP2020022091A (en) 2020-02-06
JP7035890B2 true JP7035890B2 (en) 2022-03-15

Family

ID=69231703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018145201A Active JP7035890B2 (en) 2018-08-01 2018-08-01 Photoelectric sensor

Country Status (3)

Country Link
JP (1) JP7035890B2 (en)
TW (1) TWI691166B (en)
WO (1) WO2020026832A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320373A (en) 2003-04-15 2004-11-11 Yamatake Corp Photodetecting sensor device
JP2007072665A (en) 2005-09-06 2007-03-22 Fujitsu Ten Ltd Object discrimination device, object discrimination method and object discrimination program
JP2009236751A (en) 2008-03-27 2009-10-15 Asahi Kasei Electronics Co Ltd Infrared sensor, and detecting method using infrared sensor
JP2016191568A (en) 2015-03-30 2016-11-10 京セラディスプレイ株式会社 Proximity sensor device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05248829A (en) * 1992-03-02 1993-09-28 Taiyo Yuden Co Ltd Apperance inspecting apparatus for electronic part
JPH09252243A (en) * 1996-03-18 1997-09-22 Keyence Corp Detection switch
JP2014021901A (en) * 2012-07-23 2014-02-03 Casio Comput Co Ltd Object detection device, object detection method and program
US9286690B2 (en) * 2014-03-14 2016-03-15 National Taipei University Of Technology Method and apparatus for moving object detection using fisher's linear discriminant based radial basis function network
JP6189978B2 (en) * 2016-01-08 2017-08-30 株式会社ダイシン Conveyed object discrimination control system and conveying apparatus
TWI623740B (en) * 2016-03-31 2018-05-11 松下知識產權經營股份有限公司 Inspection method, inspection system, production method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320373A (en) 2003-04-15 2004-11-11 Yamatake Corp Photodetecting sensor device
JP2007072665A (en) 2005-09-06 2007-03-22 Fujitsu Ten Ltd Object discrimination device, object discrimination method and object discrimination program
JP2009236751A (en) 2008-03-27 2009-10-15 Asahi Kasei Electronics Co Ltd Infrared sensor, and detecting method using infrared sensor
JP2016191568A (en) 2015-03-30 2016-11-10 京セラディスプレイ株式会社 Proximity sensor device

Also Published As

Publication number Publication date
TWI691166B (en) 2020-04-11
WO2020026832A1 (en) 2020-02-06
JP2020022091A (en) 2020-02-06
TW202008724A (en) 2020-02-16

Similar Documents

Publication Publication Date Title
US10245724B2 (en) System, method and product for utilizing prediction models of an environment
US8718319B2 (en) Method and system for optoelectronic detection and location of objects
JP2014222235A (en) Technological detection of photoelectron of object, and method and system for localization
CN112699697B (en) Code reader and method for reading optical code
JP5974561B2 (en) Optical sensor and setting method for sensitivity adjustment control
US11087456B2 (en) Image inspection apparatus and setting method for image inspection apparatus
US20220174912A1 (en) Egg Sorting Device, Egg Sorting Method and Recording Medium
JP7035890B2 (en) Photoelectric sensor
JP2005064586A (en) Imaging apparatus for inspection/selection apparatus provided with imaging timing automatic detection function
JP7043030B2 (en) Photoelectric sensor
US20130235365A1 (en) Distance-measuring sensor and method for synchronizing measurement value generation and measurement value output
TW202001204A (en) Detection method and setting method of detection device
US20110255076A1 (en) Method for determining a particle concentration and measuring apparatus
JP6121488B2 (en) Distance measuring sensor for object recognition and distance measurement
JP7034440B2 (en) Photoelectric sensor
JP7406724B2 (en) photoelectric sensor
JP7100826B2 (en) Detection device
JP7021631B2 (en) Photoelectric sensor
JP2016020903A (en) Method for measurement of object
JPH1123710A (en) Range finder
EP3062516A1 (en) Parallax image generation system, picking system, parallax image generation method, and computer-readable recording medium
WO2022176372A1 (en) Input/output device
JP2020145575A (en) Photoelectronic sensor
JP7152883B2 (en) detector
US20190033486A1 (en) Optoelectronic sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210927

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211119

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220214

R150 Certificate of patent or registration of utility model

Ref document number: 7035890

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150