JP2010220945A - Front and rear discrimination device of button - Google Patents

Front and rear discrimination device of button Download PDF

Info

Publication number
JP2010220945A
JP2010220945A JP2009074020A JP2009074020A JP2010220945A JP 2010220945 A JP2010220945 A JP 2010220945A JP 2009074020 A JP2009074020 A JP 2009074020A JP 2009074020 A JP2009074020 A JP 2009074020A JP 2010220945 A JP2010220945 A JP 2010220945A
Authority
JP
Japan
Prior art keywords
button
oblique
light
data
illumination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009074020A
Other languages
Japanese (ja)
Other versions
JP5289129B2 (en
Inventor
Yasuhisa Yokomizo
保久 横溝
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.)
Juki Corp
Original Assignee
Juki 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 Juki Corp filed Critical Juki Corp
Priority to JP2009074020A priority Critical patent/JP5289129B2/en
Publication of JP2010220945A publication Critical patent/JP2010220945A/en
Application granted granted Critical
Publication of JP5289129B2 publication Critical patent/JP5289129B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Sewing Machines And Sewing (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a front and rear discrimination device of button which reliably discriminates the front and rear of the button where the cross sectional shapes of outer peripheral edges are different between the front and the rear. <P>SOLUTION: The Front and rear discrimination device of button includes: a placement surface Wa for placing the button B; an oblique lighting device 7 for irradiating the placement surface Wa with diagonal light La; an image sensor 3 where a plurality of light receiving elements are arrayed and which is embedded in the placement surface Wa, so as to allow the shadow of the button B formed on the placement surface to be projected when the placement surface Wa is irradiated with the diagonal light La; a detecting means 16 for detecting the shadow of the button B by comparing the output voltage of the image sensor 3 with a prescribed detection level; a detection level setting means 19 for performing setting so as to gradually decrease the detection level according to the distance of the respective light receiving elements of the image sensor 3 from the oblique lighting device 7; and a control means 5 for discriminating the front and rear of the button B, based on the length LS of the shadow detected by the detecting means 16 when the diagonal light La is radiated. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、ボタン付けミシンに供給するボタンの表裏を判別するのに好適なボタンの表裏判別装置に関する。   The present invention relates to a button front / back discriminating apparatus suitable for discriminating the front / back side of a button supplied to a button-attached sewing machine.

従来から、工業用ミシンの1種として、縫製物としての布地にボタンを縫い付けることのできるボタン付けミシンが知られている。このようなボタン付けミシンには、縫製効率の向上などの理由により、ボタンをその表面を上方に向けて自動的に供給するボタン供給装置が用いられている(例えば、特許文献1参照。)。   2. Description of the Related Art Conventionally, as a type of industrial sewing machine, a button-attached sewing machine that can sew buttons on a cloth as a sewing product is known. For such a button sewing machine, a button supply device that automatically supplies a button with its surface facing upward is used for reasons such as improving sewing efficiency (see, for example, Patent Document 1).

また、ボタン供給装置には、振動式自動部品整列供給装置としての振動式パーツフィーダが用いられており、この振動式パーツフィーダには、ボタンの表裏を判別するボタンの表裏判別装置が配設されており、ボタンの表面が上を向いた上向きのボタンのみを送出することができるようになっている(例えば、特許文献2参照。)。     In addition, the button supply device uses a vibration type part feeder as a vibration type automatic component alignment supply device, and this vibration type part feeder is provided with a button front / back discrimination device for discriminating the front and back of the button. Therefore, it is possible to send only an upward button with the button surface facing upward (see, for example, Patent Document 2).

図18は従来のボタン供給装置の要部の一例を示すものであり、従来のボタン供給装置101は、振動式自動部品整列供給装置としての振動式パーツフィーダ102を有しており、この振動式パーツフィーダ102の螺旋状のボタン搬送路103の最上段部には、振動により表裏混合で一列に整列して移送される複数の糸通し孔Baを有するボタンBのうち、凹面を上向きにしたボタンBのみを通過させるボタン選別板104が設けられている。このボタン選別板104は、ボタン搬送路103のボタン移動方向に沿った鋸歯状部位104aを有するもので、この鋸歯状部位104aの上にボタンBを通過させることによって、図19に示すように、凹面が上向きのボタンBをそのまま出口に移送し、図20に示すように、凹面が下向きのボタンBは傾いて振動式パーツフィーダ102の底部に落下させるように形成されている。すなわち、ボタン選別板104は、ボタンBの表裏を判別するボタンの表裏判別装置として機能するものである。   FIG. 18 shows an example of a main part of a conventional button supply device. The conventional button supply device 101 has a vibration-type parts feeder 102 as a vibration-type automatic component alignment and supply device. The button having a plurality of threading holes Ba that are transferred in a line by mixing the front and back surfaces by vibration at the uppermost portion of the spiral button conveyance path 103 of the parts feeder 102. A button sorting plate 104 that passes only B is provided. This button selection plate 104 has a serrated portion 104a along the button moving direction of the button conveying path 103, and by passing the button B over the serrated portion 104a, as shown in FIG. The button B with the concave surface facing upward is transferred to the outlet as it is, and the button B with the concave surface facing downward is inclined and dropped onto the bottom of the vibration type part feeder 102 as shown in FIG. That is, the button sorting plate 104 functions as a button front / back discrimination device that discriminates the front / back side of the button B.

また、特許文献3には、ミシンに供給するボタンの上面を撮像して前方画像を取得する撮像手段を備えたボタンの縫着方向設定装置が記載されている。このボタンの縫着方向設定装置は、撮像手段により取得された前方画像と、ボタンについて予め記録された規格画像とに基づいて、ボタンを平面形状における所定の角度に傾けて配置して、ミシンに供給するようになっている。   Patent Document 3 describes a button sewing direction setting device including an image pickup unit that picks up an upper surface of a button supplied to a sewing machine and acquires a front image. This button sewing direction setting device arranges a button at a predetermined angle in a planar shape on the sewing machine based on a front image acquired by an imaging means and a standard image recorded in advance for the button. It comes to supply.

特開平03−086189号公報Japanese Unexamined Patent Publication No. 03-086189 実開昭54−137461号公報Japanese Utility Model Publication No. 54-137461 特公平02−023197号公報Japanese Examined Patent Publication No. 02-023197

しかしながら、上述の特許文献2に記載の従来のボタン選別板104においては、片面が凹面のボタンBを対象としているため、片面が凹面となっていないボタンの場合、表裏の選別、すなわち、表裏を判別することができないという問題点があった。   However, in the conventional button sorting plate 104 described in the above-mentioned Patent Document 2, since the button B that is concave on one side is targeted, in the case of a button that is not concave on one side, the front and back are sorted, that is, the front and back are selected. There was a problem that it could not be determined.

例えば、ボタン選別板104の鋸歯状部位104aの上に片面が凸面となっているボタンBを通過させると、図21(a)に示すように、凸面を上向きとしたボタンBがそのまま出口に移送されるのは勿論のこと、図21(b)に示すように、凸面を下向きとしたボタンBも傾かずにそのまま出口に移送されてしまい、ボタンBの表裏の選別ができなかった。また、同様に、片面が滑らかに膨出する膨出曲面のボタンBについても表裏の選別ができなかった。   For example, when the button B having one convex surface is passed over the serrated portion 104a of the button selection plate 104, the button B having the convex surface upward is transferred to the outlet as shown in FIG. 21 (a). Of course, as shown in FIG. 21 (b), the button B with the convex surface facing downward is also transferred to the outlet without being inclined, and the front and back of the button B cannot be selected. Similarly, the front and back of the bulging curved button B whose one surface bulges smoothly could not be selected.

そこで、片面が凹面となっていないボタンの表裏を確実に判別することのできるボタンの表裏判別装置が求められている。   Therefore, there is a need for a button front / back discriminating device that can reliably discriminate the front / back of a button that is not concave on one side.

なお、従来のボタン選別板104においては、ボタンBの種類を変更する場合、ボタン選別板104の取り付けに機械的な調整を必要とし、手間がかかり、使い勝手が悪いという問題点もあった。   In the conventional button selection plate 104, when the type of the button B is changed, mechanical adjustment is required for attaching the button selection plate 104, which is troublesome and inconvenient.

さらに、特許文献3に記載のボタンの縫着方向設定装置によれば、ボタンの表面に形成された刻印や画像等によって、ボタンの表裏を判別することが可能であるが、例えば、ボタンの両面に刻印や画像が全くないボタンの場合、表裏を判別することができなかった。   Further, according to the button sewing direction setting device described in Patent Document 3, it is possible to determine the front and back of the button based on a stamp or an image formed on the surface of the button. In the case of a button with no markings or images on it, the front and back could not be distinguished.

本発明はこのような点に鑑みてなされたものであり、片面が凹面となっていないボタン、あるいは、ボタンの両面に刻印や画像が全くないボタンであっても、ボタン外周縁の断面形状が表裏で異なっているボタンであれば、表裏を確実に判別することのできるボタンの表裏判別装置を提供することを目的とする。   The present invention has been made in view of such points, and the cross-sectional shape of the outer periphery of the button is not limited to a button having a concave surface on one side, or a button having no markings or images on both sides of the button. An object of the present invention is to provide a button front / back discriminating device capable of discriminating between the front and back sides of the buttons that are different from each other.

前述した目的を達成するため、特許請求の範囲の請求項1に記載の本発明のボタンの表裏判別装置の特徴は、縫製物に縫い付けられるボタンの表裏を判別するボタンの表裏判別装置において、ボタンが載置される載置面と、前記載置面に斜光を照射する斜光照明装置と、前記斜光が前記載置面に照射された際に、ボタン直下の前記載置面上に形成されるボタンの影が投影されるように、複数の受光素子が配列されて前記載置面に埋設されたイメージセンサと、前記イメージセンサの出力電圧を所定の検出レベルと比較することにより、ボタンの影を検出する検出手段と、前記検出レベルを、前記斜光照明装置からの前記イメージセンサの各受光素子の距離に応じて斬減するように設定する検出レベル設定手段と、前記斜光を照射した際に、前記検出手段で検出された影の長さに基づいてボタンの表裏を判別する制御手段とを備えた点にある。   In order to achieve the above-described object, the button front / back discrimination device according to claim 1 of the present invention is characterized in that in the button front / back discrimination device for discriminating the front / back of the button sewn on the sewing product, A mounting surface on which the button is mounted; an oblique illumination device that irradiates the mounting surface with oblique light; and the oblique light that is applied to the mounting surface is formed on the mounting surface immediately below the button. By comparing the output voltage of the image sensor with a predetermined detection level, an image sensor in which a plurality of light receiving elements are arranged and embedded in the mounting surface so that the shadow of the button is projected. A detection means for detecting a shadow, a detection level setting means for setting the detection level so as to be reduced according to a distance of each light receiving element of the image sensor from the oblique illumination device, and when the oblique light is irradiated Before It lies in a control means for discriminating the front and back of the button based on the length of detected by the detection means shadow.

そして、このような構成を採用したことにより、載置面は、ボタンを容易かつ確実に載置することができる。そして、斜光照明装置は、載置面に載置されたボタンに斜光を容易かつ確実に照射することができる。そして、イメージセンサは、斜光によってボタン直下に形成される影の投影を電気信号に変換して出力することができる。さらに、検出手段および検出レベル設定手段は、イメージセンサからの出力電圧を斜光照明装置からのイメージセンサの各受光素子の距離に応じて斬減するように設定した検出レベルと比較することによりボタンの影を検出するから、ボタンの透過性の有無にかかわらず、斜光によりボタン直下の載置面上に形成されるボタンの影を検出することができる。そして、ボタンの外周縁の断面形状が異なりさえすれば、検出されたボタンの影の長さがボタンの表裏によって異なるので、制御手段は、ボタンの透過性の有無にかかわらず、検出手段で検出したボタンの影の長さに基づいてボタンの表裏を確実かつ容易に判別することができる。   And by employ | adopting such a structure, the mounting surface can mount a button easily and reliably. The oblique illumination device can easily and reliably irradiate oblique light to the button placed on the placement surface. The image sensor can convert the projection of the shadow formed immediately below the button by the oblique light into an electric signal and output it. Further, the detection means and the detection level setting means compare the output voltage from the image sensor with a detection level set so as to be reduced according to the distance of each light receiving element of the image sensor from the oblique illumination device. Since the shadow is detected, it is possible to detect the shadow of the button formed on the placement surface immediately below the button by oblique light regardless of whether the button is transparent. And as long as the cross-sectional shape of the outer periphery of the button is different, the length of the shadow of the detected button varies depending on the front and back of the button. Therefore, the control means detects whether or not the button has transparency. The front and back of the button can be reliably and easily determined based on the shadow length of the button.

本発明に係るボタンの表裏判別装置によれば、ボタンの透過性の有無にかかわらず、片面が凹面となっていないボタン、あるいは、ボタンの両面に刻印や画像が全くないボタンであっても、ボタンの外周縁の断面形状が異なりさえすれば、斜光によってボタン直下に形成される影の長さがボタンの表裏によって異なるので、このボタンの影の長さに基づいてボタンの表裏を確実かつ容易に判別することができるなどの優れた効果を奏する。   According to the button front / back discrimination device according to the present invention, regardless of whether or not the button is transparent, a button that is not concave on one side, or a button that has no markings or images on both sides of the button, As long as the cross-sectional shape of the outer peripheral edge of the button is different, the length of the shadow formed directly under the button by oblique light varies depending on the front and back of the button, so the front and back of the button can be reliably and easily based on the shadow length of this button It has excellent effects such as being able to be discriminated.

本発明に係るボタンの表裏判別装置の実施形態の要部を示すブロック図The block diagram which shows the principal part of embodiment of the front-and-back discrimination apparatus of the button which concerns on this invention 本発明に係るボタンの表裏判別装置の実施形態の要部を示す模式的正面図The typical front view showing the important section of the embodiment of the button front / back discrimination device concerning the present invention 図2のZ−Z線に沿った模式的平面図Schematic plan view along the line ZZ in FIG. ボタンの一例を示すものであり、(a)は正面図、(b)は平面図It shows an example of a button, (a) is a front view, (b) is a plan view. ボタンの他例を示すものであり、(a)は正面図、(b)は平面図It shows other examples of buttons, (a) is a front view, (b) is a plan view. 本発明に係るボタンの表裏判別装置の実施形態におけるボタン搬送路の検査位置にボタンが存在しないときの斜光照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式図、(b)は斜光によるCCDラインセンサの出力特性FIG. 4 shows the relationship between oblique illumination and a CCD line sensor when no button is present at the inspection position of the button conveyance path in the embodiment of the button front / back discrimination device according to the present invention, and FIG. Schematic (b) Output characteristics of CCD line sensor by oblique light 本発明に係るボタンの表裏判別装置の実施形態におけるボタン搬送路の検査位置にボタンが存在しないときの落射照明とCCDラインセンサとの関係を示すものであり、(a)は落射光による照明状態の模式図、(b)は落射光によるCCDラインセンサ3aの出力特性FIG. 2 shows the relationship between epi-illumination and a CCD line sensor when no button is present at the inspection position of the button conveyance path in the embodiment of the button front / back discrimination device according to the present invention, and FIG. (B) is an output characteristic of the CCD line sensor 3a by incident light. 本発明に係るボタンの表裏判別装置の実施形態におけるボタン搬送路の検査位置にボタンの中央部分が表面を上に向けて存在するときの照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式的正面図、(b)は光を透過するボタンに対応するように検出レベルを設定した状態における斜光によるCCDラインセンサの出力特性の一例、(c)は落射光による照明状態の模式的正面図、(d)は光を透過するボタンに対応するように検出レベルを設定した状態における落射光によるCCDラインセンサの出力特性の一例In the embodiment of the button front / back discrimination device according to the present invention, the relationship between the illumination and the CCD line sensor when the center portion of the button is present at the inspection position of the button conveyance path with the surface facing upward, (a) is a schematic front view of an illumination state by oblique light, (b) is an example of output characteristics of a CCD line sensor by oblique light in a state where a detection level is set so as to correspond to a button that transmits light, and (c) is a drop. FIG. 6D is a schematic front view of an illumination state by incident light, and FIG. 6D is an example of output characteristics of a CCD line sensor by incident light in a state where a detection level is set so as to correspond to a button that transmits light. 本発明に係るボタンの表裏判別装置の実施形態におけるボタン搬送路の検査位置にボタンの中央部分が裏面を上に向けて存在するときの照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式的正面図、(b)は光を透過するボタンに対応するように検出レベルを設定した状態における斜光によるCCDラインセンサの出力特性の一例、(c)は落射光による照明状態の模式的正面図、(d)は光を透過するボタンに対応するように検出レベルを設定した状態における落射光によるCCDラインセンサの出力特性の一例FIG. 6 shows the relationship between illumination and the CCD line sensor when the center portion of the button exists at the inspection position of the button conveyance path in the embodiment of the button front / back discrimination device according to the present invention with the back side facing up; (a) is a schematic front view of an illumination state by oblique light, (b) is an example of output characteristics of a CCD line sensor by oblique light in a state where a detection level is set so as to correspond to a button that transmits light, and (c) is a drop. FIG. 6D is a schematic front view of an illumination state by incident light, and FIG. 6D is an example of output characteristics of a CCD line sensor by incident light in a state where a detection level is set so as to correspond to a button that transmits light. 本発明に係るボタンの表裏判別装置の実施形態における透過性を有するボタンの斜光照明による影の検出レベル設定値としての検出基準電圧による影の長さの検出状態を説明する説明図Explanatory drawing explaining the detection state of the shadow length by the detection reference voltage as a detection level setting value of the shadow by the oblique illumination of the button which has transparency in embodiment of the button front / back discrimination device concerning this invention 本発明に係るボタンの表裏判別装置の実施形態における透過性を有するボタンの斜光照明による影の検出レベル設定値としての検出基準電圧を一定としたときの影の長さの非検出状態を説明する説明図The shadow length non-detection state when the detection reference voltage as the shadow detection level setting value by the oblique illumination of the transparent button in the embodiment of the button front / back discrimination device according to the present invention is constant will be described. Illustration 本発明に係るボタンの表裏判別装置の実施形態における設定動作の一例を示すフローチャートThe flowchart which shows an example of the setting operation | movement in embodiment of the button front / back discrimination apparatus based on this invention 本発明に係るボタンの表裏判別装置の実施形態における落射照明でのボタンの透過性によるCCDラインセンサの出力電圧と検出基準電圧との関係を示すものであり、(a)は不透明なボタン、(b)は透過性が小さいボタン、(c)は透過性が大きいボタンFIG. 7 shows the relationship between the output voltage of the CCD line sensor and the detection reference voltage depending on the transparency of the button in the epi-illumination in the embodiment of the button front / back discrimination device according to the present invention, (a) is an opaque button, b) Button with low transparency, (c) Button with high transparency 本発明に係るボタンの表裏判別装置の実施形態における斜光照明でのボタンの透過性によるCCDラインセンサの出力電圧と検出基準電圧との関係を示すものであり、(a)は不透明なボタン、(b)は透過性が小さいボタン、(c)は透過性が大きいボタンFIG. 5 shows the relationship between the output voltage of the CCD line sensor and the detection reference voltage depending on the transparency of the button in oblique illumination in the embodiment of the button front / back discrimination device according to the present invention, (a) is an opaque button, b) Button with low transparency, (c) Button with high transparency 本発明に係るボタンの表裏判別装置の実施形態におけるボタンの表裏判別動作図Button front / back discrimination operation in the embodiment of the button front / back discrimination device according to the present invention 本発明に係るボタンの表裏判別装置の実施形態における落射照明によるボタン形状イメージ図Button shape image diagram by epi-illumination in the embodiment of the button front / back discrimination device according to the present invention 本発明に係るボタンの表裏判別装置の実施形態におけるボタンの表裏判別動作の要部を示すフローチャートThe flowchart which shows the principal part of the button front / back discrimination | determination operation | movement in embodiment of the button front / back discrimination apparatus which concerns on this invention. 従来のボタン供給装置におけるボタンの表裏判別装置としてのボタン選別板を示す平面図The top view which shows the button selection board as a button front / back discrimination apparatus in the conventional button supply apparatus 図18のボタン選別板による凹面を上向きにしたボタンの表裏判別状態を示す説明図Explanatory drawing which shows the front-and-back discrimination state of the button which turned the concave surface by the button selection board of FIG. 18 upward 図18のボタン選別板による凹面を下向きにしたボタンの表裏判別状態を示す説明図Explanatory drawing which shows the front-and-back discrimination state of the button which made the concave surface by the button selection board of FIG. 18 face down 図18のボタンの表裏判別装置における片面が凸面のボタンの表裏判別状態を示す説明図であり、(a)は凸面を上向きにしたボタン、(b)は凸面を下向きにしたボタンFIG. 19 is an explanatory diagram illustrating a front / back discrimination state of a button having a convex surface on one side in the button front / back discrimination device of FIG. 18, (a) a button with a convex surface facing upward, and (b) a button with a convex surface facing downward.

以下、本発明を図面に示す実施形態により説明する。   The present invention will be described below with reference to embodiments shown in the drawings.

図1から図3は本発明に係るボタンの表裏判別装置の実施形態を示すものであり、図1は要部のブロック図、図2は要部の模式的正面図、図3は図2のZ−Z線に沿った模式的平面図である。   1 to 3 show an embodiment of a button front / back discrimination device according to the present invention. FIG. 1 is a block diagram of the main part, FIG. 2 is a schematic front view of the main part, and FIG. It is a typical top view along a ZZ line.

本実施形態のボタンの表裏判別装置は、従来公知のボタン付けミシンにおけるボタンをミシンの縫製位置へ搬送する搬送経路途中に設置されるものを例示している。   The button front / back discriminating apparatus of the present embodiment exemplifies an apparatus installed in the middle of a conveyance path for conveying a button in a conventionally known button-attached sewing machine to a sewing position of the sewing machine.

図1に示すように、本実施形態のボタンの表裏判別装置1(以下、単に、表裏判別装置と記す。)は、照明装置2と、イメージセンサ3と、操作パネル4と、制御手段5とを有している。   As shown in FIG. 1, the button front / back discrimination device 1 (hereinafter simply referred to as a front / back discrimination device) of the present embodiment includes an illumination device 2, an image sensor 3, an operation panel 4, a control means 5, and the like. have.

前記照明装置2は、ボタン搬送路Wを照射するためのものである。この照明装置2による照射位置は、ボタン搬送路Wに設けられた検査ステージとなる検査位置IP(図3参照)とされている。   The illumination device 2 is for irradiating the button transport path W. The irradiation position by the illuminating device 2 is an inspection position IP (see FIG. 3) which is an inspection stage provided in the button transport path W.

ここで、本実施形態のボタン搬送路Wについて図2および図3により説明する。   Here, the button conveyance path W of the present embodiment will be described with reference to FIGS.

前記ボタン搬送路Wは、ボタンBを図示しないミシンの縫製位置へ搬送する搬送経路途中に設置されている。すなわち、ボタン搬送路Wは、ボタンBの供給位置からミシンの縫製位置に至る搬送経路の一部を構成するものである。   The button conveyance path W is installed in the middle of the conveyance path for conveying the button B to a sewing position of a sewing machine (not shown). That is, the button conveyance path W constitutes a part of the conveyance path from the supply position of the button B to the sewing position of the sewing machine.

図2および図3に示すように、本実施形態のボタン搬送路Wは、平坦な搬送面Waと、この搬送面Waの右端部において搬送面Waに対して直角をなすように上方に向かって延出されたガイド面Wbとにより、全体として断面L字状をなすように形成されている。また、搬送面Waは、水平面に対してガイド面Wbの形成側が下方に位置するように傾斜配置されている。そして、ボタンBは、図示しない搬送アームによって、搬送面Wa上を図3の矢印Aにて示すボタン搬送方向に沿って搬送されるようになっている。この時、ボタンBは、表面および裏面の一方が搬送面Waと接触しつつ搬送されるとともに、外周の一端がガイド面Wbに接触しつつ搬送されるようになっている。   As shown in FIGS. 2 and 3, the button transport path W of the present embodiment is directed upward so that the flat transport surface Wa and the right end portion of the transport surface Wa are perpendicular to the transport surface Wa. The extended guide surface Wb is formed to have an L-shaped cross section as a whole. Further, the transport surface Wa is inclined so that the side on which the guide surface Wb is formed is positioned below the horizontal plane. The button B is transported on the transport surface Wa along a button transport direction indicated by an arrow A in FIG. 3 by a transport arm (not shown). At this time, the button B is transported while one of the front surface and the back surface is in contact with the transport surface Wa, and is transported while one end of the outer periphery is in contact with the guide surface Wb.

すなわち、図2および図3に示す搬送面Waは、ボタンBを載置する載置面として機能し、この搬送面上をボタンBが移動するようになっている。また、ボタンBが載置される搬送面Waは、ボタンBを図示しないミシンの縫製位置へ搬送する搬送経路途中に設けられている。さらに、ガイド面Wbは、搬送面Waに載置されたボタンBの外周の一端を当接させるために、搬送面Waに、搬送面Waに対して直交するように上方に向かって立設されている。また、ガイド面Wbは、ボタンBが搬送経路に沿って搬送される際に、ボタンBの外周の一端がガイド面Wbに接しつつ搬送されるように搬送経路の搬送方向、すなわち、ボタン搬送方向に沿うように形成されている。またさらに、搬送面Waは、水平面に対してガイド面Wbの形成側が下方に位置するように傾斜配置されているので、ガイド面Wbは、ボタンBの一端を位置決めする機能と、搬送面WaからボタンBが脱落するのを防止する機能とを有している。したがって、ガイド面Wbは、ボタンBの搬送経路を容易に確立する機能を有している。   That is, the conveyance surface Wa shown in FIGS. 2 and 3 functions as a placement surface on which the button B is placed, and the button B moves on the conveyance surface. Further, the transport surface Wa on which the button B is placed is provided in the middle of the transport path for transporting the button B to a sewing position of a sewing machine (not shown). Further, the guide surface Wb is erected upward on the transport surface Wa so as to be orthogonal to the transport surface Wa in order to abut one end of the outer periphery of the button B placed on the transport surface Wa. ing. Further, the guide surface Wb is transported in the transport path, that is, in the button transport direction so that when the button B is transported along the transport path, the outer end of the button B is transported while being in contact with the guide surface Wb. It is formed along. Furthermore, since the conveyance surface Wa is inclined so that the formation side of the guide surface Wb is positioned below the horizontal plane, the guide surface Wb has a function of positioning one end of the button B and the conveyance surface Wa. A function of preventing the button B from falling off. Therefore, the guide surface Wb has a function of easily establishing the conveyance path of the button B.

なお、ボタン搬送路Wとしては、ボタンBの表裏を判別するだけであればガイド面Wbに接して移動する構成であればよい。例えば、滑り台のように、ボタンBの自重によって落下するものであってもよい。また、搬送面Waの材質としては、透過性を備えていてもよいし、透過性を備えていなくてもよい。但し、ガイド面Wbの材質としては、透過性を備えていない不透明なものであることが好ましい。したがって、搬送路Wを一体形成する場合には、不透明な素材を使用することが好ましい。   The button transport path W may be configured to move in contact with the guide surface Wb as long as the front and back of the button B are discriminated. For example, you may fall by the dead weight of the button B like a slide. Moreover, as a material of the conveyance surface Wa, the transparency may be provided or the transparency may not be provided. However, the material of the guide surface Wb is preferably an opaque material that does not have transparency. Therefore, when forming the conveyance path W integrally, it is preferable to use an opaque material.

また、ボタン搬送路Wの下流端には、位置合わせ装置20が配設されている。この位置合わせ装置20は、ボタンBを布地に縫い付けるために糸通し孔Baの位置としての孔位置を決定するためのものである。そのため、ボタンBの孔位置に応じた図示しないピンゲージ上でボタンBを回転させて孔位置を決定している。ここで、孔位置とは、ボタンBを水平面においたときに、ボタンBの中心を原点とする直交座標上における各糸通し孔Baの中心の座標である。そして、位置合わせ装置20は、制御手段5から送出される角度信号に基づいて、ボタンBが最小回転にてピンゲージに合わさるようにボタンBの回転方向を決定し、ボタンBをピンゲージに合わせボタンBの位置合わせを行うことができるようになっている。   An alignment device 20 is disposed at the downstream end of the button transport path W. This alignment device 20 is for determining the hole position as the position of the threading hole Ba in order to sew the button B to the fabric. Therefore, the hole position is determined by rotating the button B on a pin gauge (not shown) corresponding to the hole position of the button B. Here, the hole position is the coordinates of the center of each threading hole Ba on the orthogonal coordinates with the center of the button B as the origin when the button B is placed on a horizontal plane. Then, the alignment device 20 determines the rotation direction of the button B based on the angle signal sent from the control means 5 so that the button B is aligned with the pin gauge with the minimum rotation, and the button B is aligned with the pin gauge. Can be aligned.

図1に戻って、本実施形態の照明装置2は、斜光照明装置7と落射照明装置8との2つを有している。   Returning to FIG. 1, the illuminating device 2 of the present embodiment has two devices, an oblique illumination device 7 and an epi-illumination device 8.

前記斜光照明装置7は、少なくともボタンBの表裏の判別に用いるため斜光Laを得るためのものである。この斜光照明装置7は、図示しない光源からの光を面状の発光面7bから平行光に近似した光として出射するライトボックス7aを有している。そして、図2および図3に示すように、ライトボックス7aを検査位置IPの左斜め上方に配置するとともに、その発光面7bをボタン搬送路Wの検査位置IPに向くように、搬送面Waに対して傾斜するように配置することにより、ガイド面Wbによって遮光されることなく、検査位置IPの搬送面Waに対して上方から斜めに照らす光線である斜光Laを確実に照射することができるように構成されている。   The oblique illumination device 7 is for obtaining oblique light La to be used for at least discrimination of the front and back of the button B. The oblique illumination device 7 includes a light box 7a that emits light from a light source (not shown) as light approximate to parallel light from a planar light emitting surface 7b. As shown in FIGS. 2 and 3, the light box 7a is disposed obliquely to the left of the inspection position IP, and the light emitting surface 7b is placed on the transport surface Wa so as to face the inspection position IP of the button transport path W. By arranging so as to be inclined with respect to the guide surface Wb, it is possible to reliably irradiate oblique light La, which is a light beam obliquely illuminated from above, on the transport surface Wa at the inspection position IP without being shielded by the guide surface Wb. It is configured.

すなわち、斜光照明装置7は、ボタン搬送路Waを通過するボタンBに斜光Laを照射することができるようになっている。   That is, the oblique illumination device 7 can irradiate the button B passing through the button transport path Wa with oblique light La.

前記落射照明装置8は、少なくともボタンBの直径、糸通し孔Baの孔数および孔ピッチの判別に用いるための落射光Lb(同軸落射光)、すなわち、ボタンBの中心線に沿ってほぼ平行な光を得るためのものである。この落射照明装置8は、斜光照明装置7と同様に、図示しない光源からの光を面状の発光面8bから平行光に近似した光として出射するライトボックス8aを有している。そして、図2および図3に示すように、ライトボックス8aをボタン搬送路Wの検査位置IPの直上に配置するとともに、その発光面8bを搬送面Waに対して平行に配置することにより、ガイド面Wbによって遮光されることなく、検査位置IPの搬送面Waに対して真上から照らす光線である落射光Lbを確実に照射することができるようになっている。   The epi-illumination device 8 is substantially parallel to the epi-illumination light Lb (coaxial epi-illumination light) for use in determining at least the diameter of the button B, the number of the threading holes Ba, and the hole pitch, that is, the center line of the button B. Is to get a good light. Similar to the oblique illumination device 7, the epi-illumination device 8 has a light box 8 a that emits light from a light source (not shown) as light approximate to parallel light from a planar light emitting surface 8 b. 2 and 3, the light box 8a is disposed immediately above the inspection position IP of the button transport path W, and the light emitting surface 8b is disposed in parallel to the transport surface Wa, thereby guiding the light box 8a. Without being blocked by the surface Wb, it is possible to reliably irradiate the incident light Lb, which is a light beam illuminating from above the transport surface Wa at the inspection position IP.

したがって、本実施形態の表裏判別装置1においては、載置面としての搬送面Waに載置されたボタンBに対して、斜光Laと落射光Lbとを照射することができるようになっている。   Therefore, in the front / back discrimination device 1 of the present embodiment, the oblique light La and the incident light Lb can be irradiated to the button B placed on the transport surface Wa as the placement surface. .

前記各ライトボックス7a、8aのそれぞれの光源としては、LED、電球および蛍光灯(蛍光ランプ)などを挙げることができる。本実施形態においてはLEDが用いられている。また、光の色は任意の色から選択することができる。また、光源としては、LED、電球などの点光源、棒状の蛍光ランプなどの直線光源、円板光源、球面光源、長方形光源などから選択することができる。   Examples of the light sources of the light boxes 7a and 8a include LEDs, light bulbs and fluorescent lamps (fluorescent lamps). In this embodiment, an LED is used. Moreover, the color of light can be selected from arbitrary colors. The light source can be selected from a point light source such as an LED or a light bulb, a linear light source such as a rod-shaped fluorescent lamp, a disk light source, a spherical light source, a rectangular light source, or the like.

前記斜光照明装置7は、図1に示すように、斜光照明駆動回路10を介して制御手段5と電気的に接続されており、制御手段5から送出される制御指令により、点灯および消灯のタイミングなどの動作制御と、輝度の制御(調整)がなされるようになっている。   As shown in FIG. 1, the oblique illumination device 7 is electrically connected to the control means 5 via the oblique illumination drive circuit 10, and is turned on and off by a control command sent from the control means 5. And the like, and brightness control (adjustment).

前記落射照明装置8は、図1に示すように、斜光照明装置7と同様に、落射照明駆動回路11を介して制御手段5と電気的に接続されており、制御手段5から送出される制御指令により、点灯および消灯のタイミングなどの動作制御と、輝度の制御(調整)がなされるようになっている。   As shown in FIG. 1, the epi-illumination device 8 is electrically connected to the control means 5 via the epi-illumination drive circuit 11, as with the oblique illumination device 7, and is sent out from the control means 5. According to the command, operation control such as lighting and extinguishing timing and brightness control (adjustment) are performed.

前記イメージセンサ3は、照明によりボタン直下の載置面上に形成されるボタンBの影が投影されるものであり、図2および図3に示すように、ボタン搬送路Wに設けられた検査位置IPに埋設されている。このイメージセンサ3は、斜光Laと落射光Lbの両者を受光することができるようになっている。   The image sensor 3 projects the shadow of the button B formed on the mounting surface directly under the button by illumination, and as shown in FIGS. 2 and 3, the inspection provided in the button conveyance path W Embedded in position IP. The image sensor 3 can receive both oblique light La and incident light Lb.

すなわち、イメージセンサ3は、斜光Laおよび落射光Lbのそれぞれが載置面に照射された際に、ボタン直下の載置面上に形成されるボタンBの影が投影されるように載置面に埋設されている。具体的には、載置面としての搬送面Waにイメージセンサ3の受光側に位置する上面が面一になるように配設されている。   That is, the image sensor 3 has the placement surface projected so that the shadow of the button B formed on the placement surface immediately below the button is projected when each of the oblique light La and the incident light Lb is irradiated onto the placement surface. It is buried in. Specifically, the upper surface located on the light receiving side of the image sensor 3 is disposed on the transport surface Wa as the mounting surface.

前記イメージセンサ3は、光量の多少によって発生する電荷量が変化する複数の図示しない受光素子(電荷結合素子)を配列することにより形成されており、検査位置IPを通過するボタンBにより遮光される照明の光量の変化、すなわち、各受光素子が受光した光を電気信号に変換し、その蓄積量(光の明暗)を出力するようになっている。このイメージセンサ3としては、複数の受光素子が1列に配列されている一次元センサ(リニアイメージセンサ)であってもよいし、複数の発光素子が全体として平面状をなすように配列された2次元センサ(エリアイメージセンサ)であってもよい。また、イメージセンサ3としては、CCDセンサであってもよいし、CMOSセンサであってもよい。なお、CMOSラインセンサを用いると、低価格化を図ることができる。   The image sensor 3 is formed by arranging a plurality of light receiving elements (charge-coupled elements) (not shown) that change the amount of charge generated according to the amount of light, and is shielded by a button B that passes through an inspection position IP. A change in the amount of illumination light, that is, light received by each light receiving element is converted into an electrical signal, and the accumulated amount (light brightness and darkness) is output. The image sensor 3 may be a one-dimensional sensor (linear image sensor) in which a plurality of light receiving elements are arranged in a line, or the plurality of light emitting elements are arranged in a planar shape as a whole. A two-dimensional sensor (area image sensor) may be used. The image sensor 3 may be a CCD sensor or a CMOS sensor. If a CMOS line sensor is used, the price can be reduced.

本実施形態のイメージセンサ3としては、対象物の映像を高分解能で、高速でかつ連続的に計測することができるなどという理由により、CCDラインセンサ3aが用いられている。このCCDラインセンサ3aの受光面には、複数の受光素子が直線状に配列され、CCDラインセンサ3aは、受光素子の配列方向に沿った長尺上に形成されている。そして、このCCDラインセンサ3aは、複数の受光素子の配列方向が図3の矢印Aにて示すボタン搬送方向に対して直交する幅方向である図2および図3の左右方向に向かうように、検査位置IPに配置されている。また、CCDラインセンサ3aの受光面上をボタンBが通過するように構成されている。またさらに、図3に示すように、斜光照明装置7は、ボタン直下の載置面上に形成される影がガイド面Wbの直交方向に向かって形成されるように、CCDラインセンサ3aの長手方向延長線の上方にガイド面Wbに対向して配置されている。   As the image sensor 3 of the present embodiment, a CCD line sensor 3a is used for the reason that an image of an object can be continuously measured with high resolution, high speed, and the like. A plurality of light receiving elements are linearly arranged on the light receiving surface of the CCD line sensor 3a, and the CCD line sensor 3a is formed on a long side along the arrangement direction of the light receiving elements. The CCD line sensor 3a is arranged so that the arrangement direction of the plurality of light receiving elements is in the left-right direction in FIGS. 2 and 3 which is the width direction orthogonal to the button conveyance direction indicated by the arrow A in FIG. It is arranged at the inspection position IP. Further, the button B is configured to pass on the light receiving surface of the CCD line sensor 3a. Furthermore, as shown in FIG. 3, the oblique illumination device 7 is configured so that the shadow of the CCD line sensor 3a is formed so that a shadow formed on the mounting surface immediately below the button is formed in the direction orthogonal to the guide surface Wb. It is arranged above the direction extension line so as to face the guide surface Wb.

したがって、図2および図3に示すように、斜光照明装置7の発光面7bから出射される斜光Laは、ボタンBが存在しない状態においてCCDラインセンサ3aの長尺状の受光面全体を照射することができるようになっている。また、落射照明装置8は、CCDラインセンサ3aの上方に配置されており、その発光面8bから出射される落射光Lbは、ボタンBが存在しない状態においてCCDラインセンサ3a全体を照射することができるようになっている。なお、CCDラインセンサ3aの長さ、詳しくは複数の受光素子の配列長さ(有効長さ)は、ボタンBの直径より大きく形成されている。   Therefore, as shown in FIGS. 2 and 3, the oblique light La emitted from the light emitting surface 7b of the oblique illumination device 7 irradiates the entire long light receiving surface of the CCD line sensor 3a in the state where the button B is not present. Be able to. The epi-illumination device 8 is disposed above the CCD line sensor 3a, and the epi-illumination light Lb emitted from the light emitting surface 8b can irradiate the entire CCD line sensor 3a in the state where the button B is not present. It can be done. The length of the CCD line sensor 3a, specifically, the arrangement length (effective length) of the plurality of light receiving elements is formed larger than the diameter of the button B.

前記CCDラインセンサ3aは、図1に示すように、CCD駆動回路12を介して制御手段5と電気的に接続されており、制御手段5から送出される制御指令により、動作タイミングなどの動作制御がなされるとともに、各受光素子が受光した光の明暗を電荷の量に光電変換し、これらを順次読み出して電気信号に変換した出力(検出信号:電圧)をCCDラインセンサ3a内に内蔵されたAD変換素子によりAD変換し、各受光素子の長手方向に沿った座標に対応して制御手段5に送出することができるようになっている。   As shown in FIG. 1, the CCD line sensor 3a is electrically connected to the control means 5 via the CCD drive circuit 12, and the operation control such as the operation timing is performed by the control command sent from the control means 5. In addition, the light and darkness of the light received by each light receiving element is photoelectrically converted into the amount of electric charge, and the output (detection signal: voltage) obtained by sequentially reading and converting the light into an electric signal is incorporated in the CCD line sensor 3a. AD conversion is performed by the AD conversion element, and the light can be sent to the control means 5 in accordance with the coordinates along the longitudinal direction of each light receiving element.

前記操作パネル4は、例えば、タッチパネルが用いられており、このタッチパネルは、情報の入力操作に用いる入力手段としての透明なシート状の入力センサの背面に、情報の表示に用いる表示手段としての表示パネルが配設されて構成されている。このようなタッチパネルには、各種の情報の表示に用いる表示部4aおよび各種の情報の入力操作に用いる入力部4bが設けられており、入力部4bには、基準値などの各種の情報の入力を行う入力ボタンや入力および設定の終了に用いる決定ボタンなどの各種の操作ボタンが設けられている。   For example, a touch panel is used as the operation panel 4, and this touch panel is displayed as a display means used for displaying information on the back surface of a transparent sheet-like input sensor as an input means used for inputting information. A panel is provided and configured. Such a touch panel includes a display unit 4a used for displaying various types of information and an input unit 4b used for inputting various types of information. The input unit 4b inputs various types of information such as reference values. Various operation buttons such as an input button for performing the input and a determination button used for ending input and setting are provided.

前記操作ボタンとしては、ボタンBの検出に必要な基準値や設定値などを後述する基準データ保持メモリ21に記憶して登録する設定動作の有効と無効、すなわち、ボタン登録を行うか否かを選択する登録ボタン18を挙げることができる。この登録ボタン18が有効、例えばオン操作された場合には、手動あるいは自動にてボタンBの検出に必要な基準値や設定値を基準データ保持メモリ21に記憶して登録する設定動作を実行することができるように、表裏判別装置1の制御が行われるようになっている。ここで、ボタンBの検出に必要な基準値や設定値の登録の自動と手動との選択は、例えば登録モード選択ボタンの操作によって行われるようになっている。   As the operation button, whether or not the setting operation for registering the reference value and setting value necessary for detecting the button B is stored and registered in a reference data holding memory 21 described later, that is, whether or not button registration is performed is determined. The registration button 18 to be selected can be listed. When the registration button 18 is valid, for example, when it is turned on, a reference operation or a setting value necessary for detecting the button B is stored in the reference data holding memory 21 and registered manually or automatically. Thus, the front / back discrimination device 1 is controlled. Here, the selection of automatic and manual registration of reference values and setting values necessary for the detection of the button B is performed, for example, by operating a registration mode selection button.

なお、操作ボタンとしては、登録ボタン18が有効な場合、後述する照明設定の動作制御の開始と終了を選択する照明設定ボタン、後述するレベル設定の動作制御の開始と終了を選択するレベル設定ボタン、後述する落射照明によるレベル設定の動作制御の開始を指示する落射レベル設定ボタン、後述する斜光照明によるレベル設定の動作制御の開始を指示する斜光レベル設定ボタン、後述するサイズ設定の動作制御の開始を指示するサイズ設定ボタン、後述するFデータおよびRデータの設定動作制御の開始と終了を選択するFデータ設定ボタンおよびRデータ設定ボタンなども挙げることができる。   As the operation buttons, when the registration button 18 is valid, a lighting setting button for selecting the start and end of operation control for lighting setting to be described later, and a level setting button for selecting the start and end of operation control for level setting to be described later , An epi-illumination level setting button for instructing start of operation control for level setting by epi-illumination to be described later, an oblique-light level setting button for instructing start of operation control for level setting by oblique illumination to be described later, and start of operation control for size setting to be described later There may also be mentioned a size setting button for instructing, an F data setting button for selecting start and end of setting operation control of F data and R data, which will be described later, an R data setting button, and the like.

前記操作ボタンは、実際の突起物ではなく、タッチパネルの予め設定された位置に絵記号などで表示されているものであり、操作ボタンの表示部4a分を操作者が指などで接触あるいは押下することにより、どの操作ボタンが操作されたかを入力センサで検出して、表示されている操作ボタンの機能が実行されるようになっている。   The operation buttons are not actual projections but are displayed with pictorial symbols or the like at preset positions on the touch panel, and the operator touches or presses the display portion 4a of the operation buttons with a finger or the like. Thus, which operation button is operated is detected by the input sensor, and the function of the displayed operation button is executed.

また、操作ボタンの表示は、プルダウンメニューとされており、特定の操作ボタンの操作に関連づけて、入力部4bの操作ボタンの表示や表示部4aの表示内容などの画面を切り換えることができるようになっている。   The operation button display is a pull-down menu, and the screen of the operation button display of the input unit 4b and the display content of the display unit 4a can be switched in association with the operation of a specific operation button. It has become.

前記操作パネル4は、図1に示すように、制御手段5と電気的に接続されており、入力情報を制御手段5に送出することができるとともに、制御手段5から送出される制御指令により、表示部4aの表示内容などの動作制御を行うことができるようになっている。   As shown in FIG. 1, the operation panel 4 is electrically connected to the control means 5 and can send input information to the control means 5, and according to a control command sent from the control means 5, Operation control such as display contents of the display unit 4a can be performed.

前記制御手段5は、表裏判別装置1の可動部およびボタンの表裏判別に関わる各種処理の制御を司るためのものであり、図1に示すように、少なくとも各種の演算処理を行う演算部として機能するCPU14と、プログラムやデータを記憶する記憶部として機能するメモリ15とを主として形成されている。また、メモリ15は、適宜な容量のROM、RAMおよびデータの消去と書き込みとを行うことのできるEEPROMやフラッシュメモリなどの不揮発性メモリなどにより形成されている。なお、不揮発性メモリとしては、着脱可能なものであってもよい。   The control means 5 is for controlling various processes related to the movable part of the front / back discrimination device 1 and the front / back discrimination of the button, and functions as an arithmetic part that performs at least various arithmetic processes as shown in FIG. And a memory 15 that functions as a storage unit for storing programs and data. The memory 15 is formed by a ROM, RAM having an appropriate capacity, and a nonvolatile memory such as an EEPROM or flash memory capable of erasing and writing data. Note that the nonvolatile memory may be removable.

前記制御手段5のCPU14には、基準信号発生回路17が接続されており、基準信号発生回路17から出力される基準信号(クロック信号:クロック・パルス)により、各部の動作タイミングが制御されるようになっている。   A reference signal generating circuit 17 is connected to the CPU 14 of the control means 5 so that the operation timing of each part is controlled by a reference signal (clock signal: clock pulse) output from the reference signal generating circuit 17. It has become.

前記メモリ15には、少なくとも基準データ保持メモリ21、計測データ保持メモリ22、ワークメモリ23、データ処理部24、動作制御部25が設けられている。   The memory 15 includes at least a reference data holding memory 21, a measurement data holding memory 22, a work memory 23, a data processing unit 24, and an operation control unit 25.

前記基準データ保持メモリ21は、基準値や設定値などを記憶するためのものであり、各種の基準値および設定値が記憶されるようになっている。この基準データ保持メモリ21には、不揮発性メモリが割り当てられる。   The reference data holding memory 21 is for storing reference values, setting values, and the like, and stores various reference values and setting values. A non-volatile memory is assigned to the reference data holding memory 21.

本実施形態の基準データ保持メモリ21には、少なくともボタンBの表裏の判別に用いる基準ボタンデータ、CCDラインセンサ3aによるボタンBの影の検出レベルの設定値である検出レベル設定値、ボタンBの直径の判別に用いる基準ボタン直径データ(基準直径値)、および、ボタンBの糸通し孔Baの判別に用いる基準孔データが記憶されている。この基準孔データとしては、糸通し孔Baの基準孔数、基準孔ピッチを挙げることができる。   In the reference data holding memory 21 of this embodiment, at least reference button data used for discrimination of the front and back of the button B, a detection level setting value that is a setting value of the shadow detection level of the button B by the CCD line sensor 3a, and the button B Reference button diameter data (reference diameter value) used for determining the diameter and reference hole data used for determining the threading hole Ba of the button B are stored. Examples of the reference hole data include the reference hole number and the reference hole pitch of the threading hole Ba.

前記基準ボタンデータとしては、ボタンBの「表」を判別するときに用いるFデータ(F値)と、ボタンBの「裏」を判別するときに用いるRデータ(R値)とを挙げることができる。   Examples of the reference button data include F data (F value) used when determining the “front” of the button B and R data (R value) used when determining the “back” of the button B. it can.

前記検出レベル設定値としては、照明装置2による斜光Laおよび落射光Lbのそれぞれの照明設定値である輝度、およびCCDラインセンサ3aそれ自体の感度設定値であるセンサ感度を挙げることができる。   Examples of the detection level setting value include the brightness that is the respective illumination setting value of the oblique light La and the incident light Lb by the illumination device 2, and the sensor sensitivity that is the sensitivity setting value of the CCD line sensor 3a itself.

これら輝度およびセンサ感度は、通常は、初期設定値が用いられている。すなわち、表裏の判別に供するボタンBが光を遮光する不透明な材質で形成されている場合には、検出レベル設定値として初期設定値が用いられるようになっている。   Normally, initial values are used for the luminance and sensor sensitivity. That is, when the button B for front / back discrimination is formed of an opaque material that blocks light, an initial setting value is used as the detection level setting value.

また、表裏の判別に供するボタンBが光を透過する透過性の材質で形成されている場合には、光を遮蔽する不透明なボタンBと異なり、CCDラインセンサ3aの各受光素子のうち出力電圧が0V(ボルト)になるものがなく、ボタンの影、ひいてはボタンBを検出することができないことになる。しかしながら、透明なボタンBといえどもその透過率は100%ではないので、検出レベルを上げることで、CCDラインセンサ3aからの出力電圧に応じて、ボタンBの影、ひいてはボタンBを検出することができるようになっている。このボタンBを検出するための検出レベルについては後に詳しく説明する。   Further, when the button B used for front / back discrimination is formed of a transparent material that transmits light, unlike the opaque button B that blocks light, the output voltage of each light receiving element of the CCD line sensor 3a. There is nothing that becomes 0 V (volt), and the shadow of the button, and hence the button B cannot be detected. However, since the transmittance of the transparent button B is not 100%, the shadow of the button B and thus the button B can be detected according to the output voltage from the CCD line sensor 3a by increasing the detection level. Can be done. The detection level for detecting this button B will be described in detail later.

なお、本実施形態においては、後述する制御手段5による制御により、検出レベルを自動的に設定できるようになっているが、自動的に設定された検出レベルの値をさらに微調整等する場合には、操作パネル4の入力部4aを入力操作する。すなわち、操作パネル4の入力部4bは、検出レベル設定手段の一部として機能するようになっている。   In the present embodiment, the detection level can be automatically set by control by the control means 5 to be described later. However, when the value of the automatically set detection level is further finely adjusted. Performs an input operation on the input unit 4 a of the operation panel 4. That is, the input unit 4b of the operation panel 4 functions as a part of the detection level setting unit.

前記基準ボタン直径データ(基準直径値)としては、判別対象のボタンBに対応する基準直径値が用いられている。そして、基準孔データとしては、同じく判別対象のボタンBに対応する糸通し孔Baの基準孔数、基準孔ピッチを挙げることができる。   As the reference button diameter data (reference diameter value), a reference diameter value corresponding to the button B to be determined is used. As the reference hole data, the reference hole number and the reference hole pitch of the threading hole Ba corresponding to the button B to be determined can be cited.

なお、基準データ保持メモリ21には、予め種々のボタンBに対応した各種の基準データおよび設定値をそのボタンBの種類と関連させて記憶し、使用するボタンBの種類のものを読み出して用いるようにしてもよい。   The reference data holding memory 21 stores in advance various reference data and set values corresponding to various buttons B in association with the type of the button B, and reads and uses the type of the button B to be used. You may do it.

前記計測データ保持メモリ22は、検出したボタンBの影の長さに基づいて形成あるいは取得した計測データを一時的に記憶するためのものであり、計測データは、検査位置IPを通過するボタン毎、すなわち表裏の判別に供するボタン毎に更新されるようになっている。この計測データ保持メモリ22には、不揮発性メモリが割り当てられる。なお、ボタンBの影の長さの検出については後に詳しく説明する。   The measurement data holding memory 22 is for temporarily storing measurement data formed or acquired based on the detected shadow length of the button B. The measurement data is stored for each button that passes the inspection position IP. That is, it is updated for each button used for front / back discrimination. A non-volatile memory is allocated to the measurement data holding memory 22. The detection of the shadow length of the button B will be described in detail later.

前記計測データとしては、載置面上に載置されるボタン上方、本実施形態においては不図示の搬送手段により搬送されて検査位置IPを通過するボタンBに斜光Laを照射した際に、ボタン直下の載置面上であるイメージセンサ上、詳しくはCCDラインセンサ3aの受光面に斜光Laの照射方向に向かって形成される影(以下、単に、ボタンBの直下に形成される影と記す。)の長さに基づいて得られる表裏の判別に用いる計測ボタンデータと、検査位置IPを通過するボタンBに落射光Lb照射した際に、ボタン直下の載置面上であるCCDラインセンサ3aの受光面に形成される影、すなわち、ボタンBの直下に形成される影の長さや位置などに基づいて得られる計測ボタン直径データ(計測直径値)、および、計測孔データを挙げることができる。また、計測孔データとしては、計測孔数および計測孔ピッチを挙げることができる。   As the measurement data, when the oblique light La is irradiated onto the button B above the button placed on the placement surface, in this embodiment, the button B which is transported by a transport means (not shown) and passes the inspection position IP, A shadow formed on the image sensor on the mounting surface directly below, specifically, the light receiving surface of the CCD line sensor 3a toward the irradiation direction of the oblique light La (hereinafter simply referred to as a shadow formed immediately below the button B). .) Measurement button data obtained based on the length and the CCD line sensor 3a on the mounting surface immediately below the button when the incident light Lb is applied to the button B passing the inspection position IP. Measured button diameter data (measured diameter value) obtained based on the shadow formed on the light receiving surface, that is, the length and position of the shadow formed directly below the button B, and measured hole data Door can be. The measurement hole data can include the number of measurement holes and the measurement hole pitch.

なお、斜光Laによる影の長さ、および、落射光Lbによる影の長さについては後に詳しく説明する。   The length of the shadow caused by the oblique light La and the length of the shadow caused by the incident light Lb will be described in detail later.

ここで、斜光Laよる影と、落射光Lbよる影とを区別するために、以下、斜光LaよりボタンBの直下に形成される影を斜影、落射光LbによりボタンBの直下に形成される影を陰影と記す。   Here, in order to distinguish between the shadow caused by the oblique light La and the shadow caused by the incident light Lb, a shadow formed immediately below the button B from the oblique light La is formed obliquely, and is formed immediately below the button B by the incident light Lb. The shadow is described as a shadow.

前記ワークメモリ23は、少なくともCPU14による演算データおよび中間データなどを記憶するためのものであり、CPU14による処理動作を行う際には、必要なプログラムやデータを読み込んで記憶するようになっている。このワークメモリ23には、RAMが割り当てられる。   The work memory 23 is for storing at least calculation data and intermediate data by the CPU 14, and when the CPU 14 performs processing operations, it reads and stores necessary programs and data. A RAM is allocated to the work memory 23.

前記データ処理部24は、ボタンBの表裏、直径および糸通し孔Baのそれぞれを判別するのに必要なプログラムおよびデータを記憶するためのものであり、このデータ処理部24には、少なくともボタンBの表裏の判別、ボタンBの直径および糸通し孔Baのそれぞれの判別を行うためのデータ処理である計測データと基準データとを比較する比較処理に供するプログラムおよびデータが記憶されている。なお、比較処理については、従来公知のものが用いられているので、その詳しい説明については省略する。このデータ処理部24には、RAMおよび/または不揮発性メモリが割り当てられる。   The data processing unit 24 is for storing a program and data necessary for determining the front and back, the diameter, and the threading hole Ba of the button B. The data processing unit 24 includes at least the button B A program and data for comparison processing for comparing measurement data and reference data, which are data processing for determining the front / back side of the button and the diameter of the button B and the threading hole Ba, are stored. In addition, since the conventionally well-known thing is used about the comparison process, the detailed description is abbreviate | omitted. The data processing unit 24 is assigned a RAM and / or a nonvolatile memory.

前記動作制御部25は、CPU14が表裏判別装置1の制御を行うためのものであり、少なくとも、ボタンBを検出するための基準値や設定値を基準データ保持メモリ21に記憶して登録する設定動作を行うように、CPU14が照明装置2およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。   The operation control unit 25 is for the CPU 14 to control the front / back discrimination device 1, and at least a reference value and a setting value for detecting the button B are stored and registered in the reference data holding memory 21. An operation control program and data for the CPU 14 to perform operation control of the illumination device 2 and the CCD line sensor 3a and the like are stored in advance so as to perform the operation.

前記設定動作を行うための動作制御プログラムおよびデータとしては、検査位置IPを通過するボタンBに斜光Laあるいは落射光Lbを照射することにより、ボタン直下に投影されるボタンBの斜影あるいは陰影を、イメージセンサ3としてのCCDラインセンサ3aからそれぞれ出力される出力電圧を所定の検出レベルとしての検出基準電圧PLと比較することにより検出するとともに、検出基準電圧PLを、検査位置IPにボタンBが存在しない状態で斜光Laあるいは落射光Lbを照射したときにCCDラインセンサ3aからそれぞれ出力される出力電圧に対して所定の一定電位を減じた電圧を自動的に設定するように、CPU14が斜光照明装置7およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。   As an operation control program and data for performing the setting operation, by irradiating the button B passing the inspection position IP with the oblique light La or the incident light Lb, the obliqueness or shadow of the button B projected immediately below the button is obtained. The output voltage output from the CCD line sensor 3a as the image sensor 3 is detected by comparing with the detection reference voltage PL as a predetermined detection level, and the detection reference voltage PL is present at the inspection position IP. In such a state, when the oblique light La or the incident light Lb is irradiated, the CPU 14 sets the oblique illumination device so that a voltage obtained by subtracting a predetermined constant potential from the output voltage output from the CCD line sensor 3a is automatically set. 7 and an operation control program for controlling the operation of the CCD line sensor 3a, etc. Fine data are stored in advance.

したがって、本実施形態の表裏判別装置1の制御手段5は、イメージセンサ3の出力電圧を所定の検出レベルと比較することにより、ボタンBの影を検出する検出手段16としても機能するとともに、検出レベルである検出レベル設定値としての検出基準電圧PLを斜光照明装置7からのイメージセンサ3の各受光素子の距離に応じて斬減するように設定する検出レベル設定手段19としても機能するようになっている。勿論、ボタンBの影を検出する検出動作は、制御手段5のCPU14がメモリ15の動作制御部25に記憶されている検出動作に用いる動作制御プログラムおよびデータに基づいて実行することになる。また、実際の検出基準電圧PLの設定動作は、制御手段5のCPU14がメモリ15の動作制御部25に記憶されている設定動作に用いる動作制御プログラムおよびデータに基づいて、照明装置2およびCCDラインセンサ3aなどの動作を制御して実行することになる。   Therefore, the control means 5 of the front / back discrimination device 1 according to the present embodiment functions as the detection means 16 that detects the shadow of the button B by comparing the output voltage of the image sensor 3 with a predetermined detection level. It also functions as a detection level setting means 19 for setting the detection reference voltage PL as a detection level setting value, which is a level, to be reduced according to the distance of each light receiving element of the image sensor 3 from the oblique illumination device 7. It has become. Of course, the detection operation for detecting the shadow of the button B is executed by the CPU 14 of the control means 5 based on the operation control program and data used for the detection operation stored in the operation control unit 25 of the memory 15. In addition, the actual setting operation of the detection reference voltage PL is performed based on the operation control program and data used for the setting operation stored in the operation control unit 25 of the memory 15 by the CPU 14 of the control unit 5. The operation of the sensor 3a and the like is controlled and executed.

また、前記動作制御部25には、少なくとも検出手段16によって検出した斜影長さに基づいてボタンBの表裏を判別する判別動作を行うように、CPU14が斜光照明装置7およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。   In addition, the operation control unit 25 has the CPU 14 such as the oblique illumination device 7 and the CCD line sensor 3a so as to perform a discrimination operation for discriminating the front and back of the button B based on at least the oblique length detected by the detecting means 16. An operation control program and data for performing operation control are stored in advance.

すなわち、検査位置IPを通過するボタンBに斜光Laを照射することによりボタン直下に投影されるボタンBの斜影を、イメージセンサ3としてのCCDラインセンサ3aの出力および検出レベルとしての検出基準電圧PLaに基づいてで検出し、検出した斜影の長さに基づいてボタンBの表裏を判別するように、CPU14が斜光照明装置7およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。   That is, by irradiating the oblique light La to the button B passing the inspection position IP, the oblique shadow of the button B projected directly below the button is detected as the output of the CCD line sensor 3a as the image sensor 3 and the detection reference voltage PLa as the detection level. And a control program and data for the CPU 14 to control the operation of the oblique illumination device 7 and the CCD line sensor 3a so as to discriminate the front and back of the button B based on the detected oblique length. Is stored in advance.

したがって、載置面上に載置されるボタン上方から斜光Laを照射した際に、ボタン直下の載置面上に斜光Laの照射方向に向かって形成される斜影を検出し、この検出した斜影の長さに基づいて、ボタンBの外周縁の断面形状の表裏の相違を判別することにより、ボタンBの表裏を判別するように、CPU14が、斜光照明装置7およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。したがって、制御手段5は、CCDラインセンサ3aの出力に基づいて斜影および斜影の長さを検出し、斜影の長さによって表裏の判別を行うことになる。   Therefore, when the oblique light La is irradiated from above the button placed on the placement surface, the oblique formed on the placement surface immediately below the button in the irradiation direction of the oblique light La is detected, and the detected oblique shadow is detected. The CPU 14 operates the oblique illumination device 7 and the CCD line sensor 3a so as to discriminate the front and back of the button B by discriminating the front and back of the cross-sectional shape of the outer peripheral edge of the button B based on the length of the button B. An operation control program and data for performing control are stored in advance. Therefore, the control means 5 detects the bevel and the length of the bevel based on the output of the CCD line sensor 3a, and determines the front and back according to the bevel length.

前記斜影長さとしては、載置面上のボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の影の長さを用いることが、検出した斜影の長さの表裏の差を容易に判別することができるという意味で好ましい。また、斜影長さとしては、ガイド面Wbの直交方向(図8(c)の左右方向)に沿う斜影長さの最大値を用いることが、ボタンBの表裏の斜影の差が最も大きくなるので、ボタンBの表裏をより容易に判別することができるという意味でより好ましい。   As the oblique length, it is possible to use the length of the shadow on a straight line passing through the lower part of the center of the button B on the mounting surface in the oblique light La irradiation direction. Is preferable in that it can be easily discriminated. Further, as the bevel length, using the maximum value of the bevel length along the orthogonal direction of the guide surface Wb (the left-right direction in FIG. 8C), the difference between the bevels on the front and back of the button B becomes the largest. This is more preferable in the sense that the front and back of the button B can be more easily distinguished.

前記ボタンBの表裏を判別するための動作制御プログラムおよびデータとしては、斜影長さに基づいて計測ボタンデータを形成し、この計測ボタンデータを基準となる基準ボタンデータと比較することによりボタンBの表裏を判別するように形成されていることが、計測ボタンデータと基準ボタンデータとを比較するという簡単な方法で、ボタンBの表裏を容易に判別することができるし、基準ボタンデータを変更するという簡単な方法で、ボタンBの種類の変更に対応することができるなどという意味で好ましい。その結果、機械的な微調整を不要とすることができる。   As the operation control program and data for discriminating the front and back of the button B, measurement button data is formed based on the bevel length, and the measurement button data is compared with the reference button data serving as a reference. Being configured to discriminate between the front and back, the button B can be easily discriminated by the simple method of comparing the measurement button data and the reference button data, and the reference button data is changed. It is preferable in the sense that it is possible to cope with a change in the type of the button B by a simple method. As a result, mechanical fine adjustment can be eliminated.

なお、動作制御部25には、RAMおよび/または不揮発性メモリが割り当てられる。   Note that a RAM and / or a nonvolatile memory are allocated to the operation control unit 25.

また、本実施形態の動作制御部25には、ボタンBの表裏の判別に加えて、ボタンBの直径および糸通し孔Baの判別を行うために、ボタンBに落射光Lbを斜光Laと交互に照射し、落射光Lbを照射した際に、斜光Laによる斜影の検出と同様に、ボタン直下の載置面上であるCCDラインセンサ3aの受光面上に落射光Lbaの照射方向に向かって形成される陰影を、CCDラインセンサ3aからの出力電圧を検出手段16(制御手段5)により、検出レベル設定手段19(制御手段5)によって設定された所定の検出レベルと比較することにより検出し、検出した陰影の長さ(以下、単に、陰影長さと記す。)や位置などに基づいて、ボタンBの計測ボタン直径データおよびボタンBの糸通し孔Baの計測孔データを取得し、この計測ボタン直径データおよび計測孔データのそれぞれを基準となる基準ボタン直径データおよび基準孔データと比較することによりボタンBの直径および糸通し孔Baを判別するように、CPU14が、斜光照明装置7、落射照明装置8およびCCDラインセンサ3aなどの動作制御を行うための動作制御プログラムおよびデータが予め記憶されている。したがって、制御手段5は、CCDラインセンサ3aの出力に基づいて陰影、陰影の長さおよび位置などを検出することになる。   In addition, in addition to the front / back determination of the button B, the operation control unit 25 of the present embodiment alternates the incident light Lb with the oblique light La in order to determine the diameter of the button B and the threading hole Ba. When the incident light Lb is irradiated, as in the detection of the oblique shadow by the oblique light La, the incident direction of the incident light Lba is directed onto the light receiving surface of the CCD line sensor 3a on the mounting surface immediately below the button. The formed shadow is detected by comparing the output voltage from the CCD line sensor 3a by the detection means 16 (control means 5) with a predetermined detection level set by the detection level setting means 19 (control means 5). The button B measurement button diameter data and the button B threading hole Ba measurement data are acquired based on the detected shadow length (hereinafter simply referred to as the shadow length), position, and the like. The CPU 14 determines that the diameter of the button B and the threading hole Ba are determined by comparing the button diameter data and the measurement hole data with the reference button diameter data and the reference hole data, respectively. An operation control program and data for performing operation control of the illumination device 8 and the CCD line sensor 3a are stored in advance. Therefore, the control means 5 detects the shadow, the length and position of the shadow, etc. based on the output of the CCD line sensor 3a.

さらに、本実施形態の動作制御部25には、CPU14が、基準信号発生回路17からの基準信号に基づいて斜光照明装置7および落射照明装置8のそれぞれを交互に点灯させるタイミングをCCDラインセンサ3aの動作周期毎になるように制御するための動作制御プログラムおよびデータも記憶されている。   Furthermore, in the operation control unit 25 of this embodiment, the CPU 14 sets the timing at which the CPU 14 alternately turns on the oblique illumination device 7 and the epi-illumination device 8 based on the reference signal from the reference signal generation circuit 17. An operation control program and data for controlling each operation cycle are also stored.

すなわち、斜光照明装置7は、基準データ保持メモリ21に記憶された照明設定値(初期設定値あるいは入力部4bにより設定された照明設定値)に基づいて、CPU14が斜光照明駆動回路10を介して出力する駆動信号により、斜光Laの輝度が制御されるようになっている。   That is, in the oblique illumination device 7, the CPU 14 passes through the oblique illumination drive circuit 10 based on the illumination setting value (initial setting value or illumination setting value set by the input unit 4 b) stored in the reference data holding memory 21. The luminance of the oblique light La is controlled by the output drive signal.

前記落射照明装置8は斜光照明装置7と同様に、基準データ保持メモリ21に記憶された照明設定値(初期設定値あるいは入力部4bにより設定された照明設定値)に基づいて、CPU14が、落射照明駆動回路11を介して出力する駆動信号により落射光Lbの輝度が制御されるようになっている。   The epi-illumination device 8 is similar to the oblique illumination device 7 in that the CPU 14 reflects the epi-illumination on the basis of the illumination setting value (initial setting value or illumination setting value set by the input unit 4b) stored in the reference data holding memory 21. The brightness of the incident light Lb is controlled by a drive signal output via the illumination drive circuit 11.

また、動作制御部25には、CPU14が、CCDラインセンサ3aからの出力に基づいてボタンBの影の有無、ひいてはボタンBの有無を判別し、ボタンBの表裏などの判別動作の開始・終了を制御するための動作制御プログラムおよびデータも記憶されている。   Further, in the operation control unit 25, the CPU 14 determines the presence / absence of the shadow of the button B based on the output from the CCD line sensor 3a, and thus the presence / absence of the button B, and starts / ends the determination operation of the front / back of the button B, etc. An operation control program and data for controlling the operation are also stored.

またさらに、動作制御部25には、CPU14が、ボタン表裏判別装置1の初期設定動作を行うためのプログラムおよびそのデータや、CPU14が、図示しないミシン本体およびボタン供給装置のそれぞれの制御部との相互間で動作タイミングやデータなどの送受信を行うためのプログラムおよびデータなども記憶されている。   Further, the operation control unit 25 includes a program and data for the CPU 14 to perform the initial setting operation of the button front / back discrimination device 1, and the CPU 14 is connected to each control unit of the sewing machine body and the button supply device (not shown). A program and data for transmitting and receiving operation timing and data between each other are also stored.

本実施形態の制御手段5は、ミシン本体、ボタン供給装置および位置合わせ装置20のそれぞれの制御部から独立させて個別に設けられている。このため、制御手段5は、各制御部とインターフェースを介して電気的に接続されており、ボタン供給装置の制御部は、制御手段5から出力されるボタンBの表裏および糸通し孔Baのそれぞれの判別結果に基づいて各部の動作制御、例えば、ボタン供給装置を駆動してボタンBをミシン本体の縫製位置に供給したり、あるいはボタンBを供給経路から排除するエラー処理をしたり、位置合わせ装置20を駆動して孔位置を決定したりするようになっている。   The control means 5 of the present embodiment is provided separately from the respective control units of the sewing machine body, the button supply device, and the alignment device 20. For this reason, the control means 5 is electrically connected to each control section through an interface, and the control section of the button supply device is provided on each of the front and back sides of the button B output from the control means 5 and the threading hole Ba. Control of each part based on the determination result, for example, driving the button supply device to supply the button B to the sewing position of the sewing machine main body, or performing error processing to exclude the button B from the supply path, or positioning The device 20 is driven to determine the hole position.

なお、制御手段5は、ミシン本体およびボタン供給装置の少なくとも一方の制御部の機能の一部を借りて実現してもよい。   The control means 5 may be realized by borrowing a part of the function of at least one control unit of the sewing machine main body and the button supply device.

また、本実施形態のボタン表裏判別装置1においては、ボタンBの外周の一部の欠損、外周縁に接する斜面の一部の欠損などの外観欠陥を判別することも可能である。この外観欠陥は、CCDラインセンサ3aから出力される出力信号の出力パターンの異常の有無により判別することができる。すなわち、本来ボタンBで遮光される影の部分が欠陥によりCCDラインセンサ3aに到達するので、欠陥部分のCCDラインセンサ3aの出力が「High」になる。この場合、基準データ保持メモリ21には、CCDラインセンサ3aによる出力パターンの基準パターンを斜光Laによるものと落射光Lbによるものとの両者について記憶することが肝要である。また、糸通し孔Baの孔径を判別するようにすることもできる。この場合、基準データ保持メモリ21に、基準孔径を記憶することが肝要である。   Further, in the button front / back discrimination device 1 of the present embodiment, it is also possible to discriminate appearance defects such as part of the outer periphery of the button B and part of the slope contacting the outer periphery. This appearance defect can be determined by the presence or absence of an abnormality in the output pattern of the output signal output from the CCD line sensor 3a. That is, since the shadow portion originally shielded by the button B reaches the CCD line sensor 3a due to the defect, the output of the CCD line sensor 3a at the defective portion becomes “High”. In this case, it is important to store the reference pattern of the output pattern from the CCD line sensor 3a for both the oblique light La and the incident light Lb in the reference data holding memory 21. It is also possible to determine the hole diameter of the threading hole Ba. In this case, it is important to store the reference hole diameter in the reference data holding memory 21.

さらに、本実施形態のボタン表裏判別装置1においては、ボタンBの表裏、ボタンBの直径、および、糸通し孔Ba(孔数およびピッチ)の判別を行うように形成されているが、ボタンBの表裏のみを判別するように形成してもよい。すなわち、ボタンBの表裏のみを判別する場合には、落射照明装置8は不要である。   Further, in the button front / back discrimination device 1 of the present embodiment, the button B is formed so as to discriminate the front / back of the button B, the diameter of the button B, and the threading hole Ba (number of holes and pitch). You may form so that only the front and back may be discriminate | determined. That is, when only the front and back of the button B are discriminated, the epi-illumination device 8 is unnecessary.

つぎに、前述した構成からなる本実施形態の作用について説明する。   Next, the operation of the present embodiment having the above-described configuration will be described.

まず、表裏の判別に供するボタンについて図4および図5により説明する。   First, buttons used for front / back discrimination will be described with reference to FIGS. 4 and 5. FIG.

図4はボタンの一例を示すものであり、(a)は正面図、(b)は平面図である。また、図5はボタンの他例を示すものであり、(a)は正面図、(b)は平面図である。   FIG. 4 shows an example of a button, where (a) is a front view and (b) is a plan view. FIG. 5 shows another example of the button, where (a) is a front view and (b) is a plan view.

図4および図5に示すように、ボタンBとしては、糸通し孔Baの数が4つのもの(図4)と、糸通し孔Baの数が2つのもの(図5)とがある。また、ボタンBには表裏がある。例えば、図4(a)および図5(a)のそれぞれに誇張して示すように、外周にほぼ半円状の小さい丸みRaを備えた上面が表面とされ、外周にほぼ半円状の大きい丸みRbを備えた下面が裏面とされている。したがって、ボタンBは、外周縁の断面形状が表裏で異なるものが多い。そして、ボタンBは、ミシンの縫製位置において、裏面が縫製物と対向するように、表面を上向きにして縫着されるものである。すなわち、ボタンBは、「表」が上を向いた状態で布地などの縫製物に縫着されるようになっている。   As shown in FIGS. 4 and 5, the button B includes a button B having four threading holes Ba (FIG. 4) and a button having two threading holes Ba (FIG. 5). In addition, the button B has both sides. For example, as exaggeratedly shown in each of FIGS. 4A and 5A, the upper surface having a small semi-circular roundness Ra on the outer surface is the surface, and the outer surface has a large semi-circular shape. The lower surface provided with the roundness Rb is the back surface. Accordingly, the buttons B often have different cross-sectional shapes on the front and back sides. The button B is sewn at the sewing position of the sewing machine with the front surface facing upward so that the back surface faces the sewing product. That is, the button B is sewn to a sewing product such as a fabric with the “table” facing upward.

つぎに、照明装置2による照明とCCDラインセンサ3aの出力との関係について説明する。   Next, the relationship between the illumination by the illumination device 2 and the output of the CCD line sensor 3a will be described.

まず、ボタン搬送路Wの検査位置IPにボタンBが存在しない場合について図6および図7により説明する。   First, the case where the button B does not exist at the inspection position IP of the button transport path W will be described with reference to FIGS.

図6はボタン搬送路の検査位置にボタンが存在しないときの斜光照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式図、(b)は斜光によるCCDラインセンサの出力特性である。また、図7はボタン搬送路の検査位置にボタンが存在しないときの落射照明とCCDラインセンサとの関係を示すものであり、(a)は落射光による照明状態の模式図、(b)は落射光によるCCDラインセンサの出力特性である。   6A and 6B show the relationship between oblique illumination and a CCD line sensor when no button is present at the inspection position of the button conveyance path. FIG. 6A is a schematic diagram of an illumination state by oblique light, and FIG. 6B is a CCD by oblique light. It is the output characteristic of a line sensor. FIG. 7 shows the relationship between the epi-illumination and the CCD line sensor when there is no button at the inspection position of the button conveyance path, (a) is a schematic diagram of the illumination state by epi-illumination, and (b). It is the output characteristic of a CCD line sensor by incident light.

前記ボタン搬送路Wの検査位置IPにボタンBが存在しない状態で斜光Laを照射すると、図6(a)に示すように、斜光Laが検査位置IPに配置されているCCDラインセンサ3aの全体を照らすので、CCDラインセンサ3aの出力はほぼ全域にわたって「High」となる。この時、斜光照明装置7の発光面7bからCCDラインセンサ3aの受光面までの距離がCCDラインセンサ3aの長手方向に沿って異なるが、斜光照明装置7からの光が完全な平行光であれば、発光面7bと受光面との距離に無関係に受光面全域にわたって一定の出力が得られる。しかし、実際には、完全な平行光を得ることが難しいので、発光面7bから受光面までの距離が大きいほど光が拡散され、CCDラインセンサ3aからの出力(電圧)は、図6(b)に示すように、斜光照明装置7に最も近い図6(a)の左端に配置されている受光素子による出力が最大となり、斜光照明装置7に最も離れた図6(a)の右端(ガイド面側)に配置されている受光素子による出力が最小となり、全体としては最大出力と最小出力とを直線で結ぶ斜線状になる。   When the oblique light La is irradiated in the state where the button B does not exist at the inspection position IP of the button conveyance path W, as shown in FIG. 6A, the entire CCD line sensor 3a in which the oblique light La is arranged at the inspection position IP is shown. Therefore, the output of the CCD line sensor 3a becomes “High” over almost the entire area. At this time, although the distance from the light emitting surface 7b of the oblique illumination device 7 to the light receiving surface of the CCD line sensor 3a varies along the longitudinal direction of the CCD line sensor 3a, the light from the oblique illumination device 7 may be completely parallel light. For example, a constant output can be obtained over the entire light receiving surface regardless of the distance between the light emitting surface 7b and the light receiving surface. However, in practice, since it is difficult to obtain perfect parallel light, the light is diffused as the distance from the light emitting surface 7b to the light receiving surface increases, and the output (voltage) from the CCD line sensor 3a is as shown in FIG. ), The output from the light receiving element disposed at the left end of FIG. 6A closest to the oblique illumination device 7 is maximized, and the right end (guide) of FIG. The output from the light receiving elements arranged on the surface side is minimized, and the whole is a diagonal line connecting the maximum output and the minimum output with a straight line.

すなわち、CCDラインセンサ3aの出力特性は、図6(b)に示すように、斜光照明装置7に近い部分の出力(電圧)は大きく、斜光照明装置7から離れるにつれて出力が漸減するパターンとなる。   That is, as shown in FIG. 6B, the output characteristic of the CCD line sensor 3a has a pattern in which the output (voltage) near the oblique illumination device 7 is large, and the output gradually decreases as the distance from the oblique illumination device 7 increases. .

前記ボタン搬送路Wの検査位置IPにボタンBが存在しない状態で落射光Lbを照射すると、図7(a)に示すように、落射光LbがCCDラインセンサ3aの全体を上方から照らすので、CCDラインセンサ3aの出力は「High」となる。この時、落射照明装置8の発光面8bからCCDラインセンサ3aの受光面までの距離がCCDラインセンサ3aの長手方向においてほぼ均等なため、CCDラインセンサ3aの出力特性は、図7(b)に示すように、出力が一定のパターンになる。   When the incident light Lb is irradiated in the state where the button B does not exist at the inspection position IP of the button conveyance path W, as shown in FIG. 7A, the incident light Lb illuminates the entire CCD line sensor 3a from above. The output of the CCD line sensor 3a is “High”. At this time, since the distance from the light emitting surface 8b of the epi-illumination device 8 to the light receiving surface of the CCD line sensor 3a is substantially uniform in the longitudinal direction of the CCD line sensor 3a, the output characteristics of the CCD line sensor 3a are as shown in FIG. As shown, the output is a constant pattern.

つぎに、ボタン搬送路Wの検査位置IPに透過性を有するボタンBの中央部分が存在する場合について図8から図11により説明する。   Next, the case where the central portion of the button B having transparency exists at the inspection position IP of the button conveyance path W will be described with reference to FIGS.

図8は、ボタン搬送路の検査位置にボタンの中央部分が表面を上に向けて存在するときの照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式的正面図、(b)は光を透過するボタンに対応するように検出レベルを設定した状態における斜光によるCCDラインセンサの出力特性の一例、(c)は落射光による照明状態の模式的正面図、(d)は光を透過するボタンに対応するように検出レベルを設定した状態における落射光によるCCDラインセンサの出力特性の一例である。図8(b)および図8(d)は、ともに、CCDラインセンサ3aの受光面の長手方向位置を横軸に、ガイド面Wbを右端部とするように示している。なお、後述する図9(b)、図9(d)、図11、図13、図14、図15における横軸も、図8(b)および図8(d)と同様である。   FIG. 8 shows the relationship between the illumination and the CCD line sensor when the center part of the button exists at the inspection position of the button conveyance path with the surface facing upward, and (a) is a schematic diagram of the illumination state by oblique light. (B) is an example of output characteristics of a CCD line sensor by oblique light in a state where a detection level is set so as to correspond to a button that transmits light, and (c) is a schematic front view of an illumination state by incident light. (D) is an example of the output characteristic of a CCD line sensor by incident light in a state where the detection level is set so as to correspond to a button that transmits light. FIGS. 8B and 8D both show the longitudinal position of the light receiving surface of the CCD line sensor 3a on the horizontal axis and the guide surface Wb on the right end. The horizontal axes in FIGS. 9B, 9D, 11, 13, 14, and 15 to be described later are the same as those in FIGS. 8B and 8D.

図9は、ボタン搬送路の検査位置にボタンの中央部分が裏面を上に向けて存在するときの照明とCCDラインセンサとの関係を示すものであり、(a)は斜光による照明状態の模式的正面図、(b)は光を透過するボタンに対応するように検出レベルを設定した状態における斜光によるCCDラインセンサの出力特性の一例、(c)は落射光による照明状態の模式的正面図、(d)は光を透過するボタンに対応するように検出レベルを設定した状態における落射光によるCCDラインセンサの出力特性の一例である。   FIG. 9 shows the relationship between the illumination and the CCD line sensor when the center portion of the button exists at the inspection position of the button conveyance path with the back surface facing upward, and (a) is a schematic diagram of the illumination state by oblique light. (B) is an example of output characteristics of a CCD line sensor by oblique light in a state where a detection level is set so as to correspond to a button that transmits light, and (c) is a schematic front view of an illumination state by incident light. (D) is an example of the output characteristic of a CCD line sensor by incident light in a state where the detection level is set so as to correspond to a button that transmits light.

図10は、透過性を有するボタンの斜光照明による影の検出レベル設定値としての検出基準電圧PLaによる影の長さの検出状態を説明する説明図である。   FIG. 10 is an explanatory diagram for explaining the detection state of the shadow length by the detection reference voltage PLa as the shadow detection level setting value by the oblique illumination of the button having transparency.

図11は、透過性を有するボタンの斜光照明による影の検出レベル設定値としての検出基準電圧PLaを一定としたときの影の長さの非検出状態を説明する説明図である。   FIG. 11 is an explanatory diagram for explaining a non-detected state of the shadow length when the detection reference voltage PLa as the detection level setting value of the shadow by oblique illumination of the button having transparency is constant.

図8(b)および図9(b)に示すように、斜光LaによるCCDラインセンサ3aの出力電圧は、ボタンBの外周縁が半円状の丸みR(符号Rは、小さい丸みRaと大きい丸みRbを総称する。)を有するため、この丸みR部分を通過してCCDラインセンサ3aに到達する斜光Laの範囲は大きくなり、斜光Laによる出力電圧の「Low」の長さ、すなわち斜影長さは実際のボタンBの直径Dより小さくなる。   As shown in FIGS. 8B and 9B, the output voltage of the CCD line sensor 3a by the oblique light La is round R with the outer periphery of the button B being semicircular (the symbol R is large with a small round Ra). Therefore, the range of the oblique light La passing through the rounded R portion and reaching the CCD line sensor 3a is increased, and the length of the output voltage “Low” by the oblique light La, that is, the oblique length, is increased. This is smaller than the actual diameter D of the button B.

図8(d)および図9(d)に示すように、落射光LbによるCCDラインセンサ3aの出力電圧は、ボタンBの表裏が上下いずれの方向を向いていても共に変わらない。   As shown in FIG. 8D and FIG. 9D, the output voltage of the CCD line sensor 3a by the incident light Lb does not change regardless of whether the button B is facing up or down.

なお、光を透過するボタンBの場合には、陰影部分および斜影部分のCCDラインセンサ3aから出力される出力電圧の最小値は共に0Vにならない(図8(b)、図8(d)、図9(b)、図9(d))のに対し、ボタンBが完全に光を透過しない場合には、陰影部分および斜影部分のCCDラインセンサ3aの出力電圧は共に0Vになる(図13(a)、図14(a))。   In the case of the button B that transmits light, the minimum value of the output voltage output from the CCD line sensor 3a in the shaded portion and the shaded portion is not 0 V (FIGS. 8B and 8D). In contrast to FIGS. 9B and 9D, when the button B does not transmit light completely, the output voltage of the CCD line sensor 3a in the shaded portion and the shaded portion is both 0V (FIG. 13). (A), FIG. 14 (a)).

ここで、CCDラインセンサ3aの出力電圧が0Vにならないと、ボタンBの影である陰影および斜影、ひいてはボタンBそのものを判別(検出)することができないことになる。しかしながら、透明なボタンBといえどもその透過率は100%ではない。したがって、ボタンBを通過した光を受光した受光素子による出力電圧、すなわち、陰影部分および斜影部分の出力電圧は、ボタンBが存在しない状態で光を受光した受光素子による出力電圧よりは低くなる。また、透過率が低いほど、出力電圧は0Vに近づくことになる。   Here, if the output voltage of the CCD line sensor 3a does not become 0V, it is impossible to discriminate (detect) shadows and oblique shadows that are shadows of the button B, and consequently the button B itself. However, the transmittance of the transparent button B is not 100%. Therefore, the output voltage of the light receiving element that has received the light that has passed through the button B, that is, the output voltage of the shaded portion and the shaded portion is lower than the output voltage of the light receiving element that has received light in the absence of the button B. Also, the lower the transmittance, the closer the output voltage approaches 0V.

そこで、ボタンBの透過性の有無(透明および不透明)にかかわらず、ボタンBを判別することができるように、CCDラインセンサ3aによるボタンBの影の検出レベル、詳しくは斜光Laおよび落射光Lbのそれぞれの輝度と、CCDラインセンサ3aそれ自体のセンサ感度との少なくとも1つを操作パネル4の入力部4bへの入力操作により予め設定する。   Therefore, the detection level of the shadow of the button B by the CCD line sensor 3a, specifically, the oblique light La and the incident light Lb so that the button B can be determined regardless of whether the button B is transparent (transparent and opaque). Are set in advance by an input operation to the input unit 4 b of the operation panel 4.

ここで、ボタンBの斜影部分を判別するためには、前記検出基準電圧PLaは、図10に示すように、検査位置IPにボタンBが存在しない状態(図10のボタン無)におけるCCDラインセンサ3aの出力電圧より低く、かつ、CCDラインセンサ3aのボタンBによる射影部分の出力電圧(図10の射影部分電圧)より高く設定する必要がある。したがって、図11に示すように、ボタンBの透過率が大きい場合には、検出基準電圧PLaをより高い電圧に設定する必要がある。しかし、検出基準電圧PLaを一定としたのでは、検出基準電圧PLaが、ボタンBが存在しない状態で斜光照明装置7からの距離に応じて斬減して出力されるCCDラインセンサ3aの右端部分Xの出力電圧に接近し、これ以上検出基準電圧PLaを高くすることができないことになる。そして、このような場合には、図11の細い実線にて示す表が上向きのボタンB(図11のボタン表)の斜影による出力電圧と、図11の細い実線にて示す表が下向きのボタンB(図11のボタン裏)の斜影による出力電圧との違い、すなわち、ボタンBの表裏による斜影長さの違いを検出することができない。   Here, in order to discriminate the shaded portion of the button B, the detection reference voltage PLa is set to a CCD line sensor in a state where the button B does not exist at the inspection position IP (no button in FIG. 10), as shown in FIG. It is necessary to set the output voltage lower than the output voltage of 3a and higher than the output voltage of the projection part by the button B of the CCD line sensor 3a (projection part voltage in FIG. 10). Therefore, as shown in FIG. 11, when the transmittance of the button B is large, it is necessary to set the detection reference voltage PLa to a higher voltage. However, if the detection reference voltage PLa is constant, the right end portion of the CCD line sensor 3a that is output with the detection reference voltage PLa being reduced according to the distance from the oblique illumination device 7 in the absence of the button B. It approaches the output voltage of X, and the detection reference voltage PLa cannot be increased any more. In such a case, the table indicated by the thin solid line in FIG. 11 is the output voltage due to the shading of the upward button B (button table in FIG. 11), and the table indicated by the thin solid line in FIG. It is impossible to detect the difference from the output voltage due to the bevel of B (the back of the button in FIG. 11), that is, the bevel length difference between the front and back of the button B.

そこで、図10に示すように、斜光照明による検出基準電圧PLaを、複数の受光素子が配列されるCCDラインセンサ3aの検出可能範囲全体に渡って、検査位置IPにボタンBが存在しない状態で斜光Laを検査位置に照射したときに、CCDラインセンサ3aから出力される出力電圧から所定の電圧を減じた電圧となるように設定する。すなわち、検出レベル設定手段19は、斜光照明装置7からのCCDラインセンサ3aの各受光素子の距離に応じて斬減するように、検出レベルを設定する。   Therefore, as shown in FIG. 10, the detection reference voltage PLa by oblique illumination is applied to the inspection position IP without the button B over the entire detectable range of the CCD line sensor 3a in which a plurality of light receiving elements are arranged. When the oblique light La is irradiated to the inspection position, the voltage is set to a voltage obtained by subtracting a predetermined voltage from the output voltage output from the CCD line sensor 3a. That is, the detection level setting means 19 sets the detection level so as to be reduced according to the distance of each light receiving element of the CCD line sensor 3a from the oblique illumination device 7.

具体的には、検査位置IPにボタンBが存在しない状態で斜光Laを照射したときに、CCDラインセンサ3aから出力される出力電圧の最小値Vn(最小電圧値)と、ボタンBが存在する状態におけるCCDラインセンサ3aの出力電圧の最小値Veとの電圧差(図10の出力電圧差Vn−Ve)に一定の割合、例えば0.85(85%)程度を乗じた電圧Vr(図10の0.85(Vn−Ve))にVe(検査位置IPにボタンBが存在する状態におけるCCDラインセンサ3aの出力電圧の最小値)を加えた電圧(Vr+Ve)を検査位置IPにボタンBが存在しない状態における出力電圧の最小値Vnから減じた差分値Vd(=Vn−(Vr+Ve))を算出する。そして、この差分値Vdを、CCDラインセンサ3aの全検出範囲に適用する。したがって、CCDラインセンサ3aの全検出範囲における任意の検出位置に対応する出力電圧(検査位置IPにボタンBが存在しない状態)を検出電圧Vpとすると、検出位置における検出基準電圧PLaは、PLa=Vp―Vdで表すことができる。なお、全検出範囲は、複数の受光素子の配列長さであり、検出位置は、複数の受光素子のうちのいずれかである。   Specifically, the minimum value Vn (minimum voltage value) of the output voltage output from the CCD line sensor 3a and the button B exist when the oblique light La is irradiated in the state where the button B does not exist at the inspection position IP. A voltage Vr (FIG. 10) obtained by multiplying the voltage difference from the minimum value Ve of the output voltage of the CCD line sensor 3a in the state (output voltage difference Vn−Ve in FIG. 10) by a certain ratio, for example, about 0.85 (85%). 0.85 (Vn−Ve)) plus Ve (the minimum value of the output voltage of the CCD line sensor 3a when the button B is present at the inspection position IP), and the voltage (Vr + Ve) is added to the inspection position IP. A difference value Vd (= Vn− (Vr + Ve)) subtracted from the minimum value Vn of the output voltage in the nonexistent state is calculated. The difference value Vd is applied to the entire detection range of the CCD line sensor 3a. Therefore, if the output voltage corresponding to an arbitrary detection position in the entire detection range of the CCD line sensor 3a (the state where the button B does not exist at the inspection position IP) is the detection voltage Vp, the detection reference voltage PLa at the detection position is PLa = Vp−Vd. The total detection range is the arrangement length of the plurality of light receiving elements, and the detection position is one of the plurality of light receiving elements.

上述したように、ボタンBが存在しない状態で斜光Laを照射したときに、CCDラインセンサ3aから出力される出力電圧Vpは、斜光照明装置7の光源が完全な平行光線でない限り、CCDラインセンサ3aの複数の受光素子の斜光照明装置7対する距離の長さに応じて斬減するが、検出レベル設定手段19により設定される上述の検出基準電圧PLaは、出力電圧Vpと同様にCCDラインセンサ3aの検出位置の斜光照明装置7に対する距離の大きさに応じて、それぞれ異なる値に設定されることになる。   As described above, the output voltage Vp output from the CCD line sensor 3a when the oblique light La is irradiated in the absence of the button B is the same as the CCD line sensor unless the light source of the oblique illumination device 7 is a perfect parallel light beam. The above-described detection reference voltage PLa set by the detection level setting means 19 is reduced in accordance with the length of the distance from the oblique illumination device 7 of the plurality of light receiving elements 3a. The CCD line sensor is similar to the output voltage Vp. Different values are set according to the magnitude of the distance from the oblique illumination device 7 at the detection position 3a.

上述のように、検出レベル設定手段19が、ボタンBが存在しない状態で斜光Laを照射したときCCDラインセンサ3aから出力される出力電圧Vnから所定の電圧を減じた電圧となるように検出基準電圧PLaを設定するので、検出基準電圧PLaを一定とした場合のように、検出基準電圧PLaが、ボタンBが存在しない状態で斜光照明装置7からの距離に応じて斬減して出力されるCCDラインセンサ3aの出力電圧Vnに接近することがなく、ボタンBの透過率が大きい場合でも、ボタンBの表裏を容易に判定することができる値に検出基準電圧PLaを設定することができる。   As described above, when the detection level setting means 19 emits the oblique light La in the absence of the button B, the detection reference is set so as to be a voltage obtained by subtracting a predetermined voltage from the output voltage Vn output from the CCD line sensor 3a. Since the voltage PLa is set, the detection reference voltage PLa is output in a reduced manner according to the distance from the oblique illumination device 7 without the button B, as in the case where the detection reference voltage PLa is constant. Even when the output voltage Vn of the CCD line sensor 3a is not approached and the transmittance of the button B is high, the detection reference voltage PLa can be set to a value that can easily determine the front and back of the button B.

また、検出レベル設定手段19が、ボタンBが存在しない状態で斜光Laを照射したときCCDラインセンサ3aから出力される出力電圧Vnと、ボタンBが存在する状態におけるCCDラインセンサ3aの出力電圧の最小値Veとの電圧差(Vn−Ve)に一定の割合、例えば0.85(85%)程度を乗じた電圧Vrに基づいて、検出基準電圧PLaを自動的に設定するので、作業者は、入力部4bによる一定の割合の設定(例えば0.85)と、ボタンBが存在しない状態で斜光Laを照射したときCCDラインセンサ3aから出力される出力電圧Vnの基準データメモリ21への記憶とを一度行っておけば、表裏判別の対象となるボタンBが変わっても、表裏判別の対象となるボタンBの良品サンプル用いて、最小値Veの検出を行うのみで、自動的に検出基準電圧PLaを設定することができる。   Further, when the detection level setting means 19 irradiates the oblique light La in the state where the button B does not exist, the output voltage Vn output from the CCD line sensor 3a and the output voltage of the CCD line sensor 3a in the state where the button B exists. Since the detection reference voltage PLa is automatically set based on the voltage Vr obtained by multiplying the voltage difference (Vn−Ve) from the minimum value Ve by a certain ratio, for example, about 0.85 (85%), the operator can , Setting a fixed ratio (for example, 0.85) by the input unit 4b, and storing the output voltage Vn output from the CCD line sensor 3a in the reference data memory 21 when the oblique light La is irradiated in the absence of the button B. Once, even if the button B subject to front / back discrimination changes, the minimum value Ve is detected using the non-defective sample of the button B subject to front / back discrimination. Only, it is possible to automatically set the detection reference voltage PLa.

また、落射照明でも斜光照明と同様に、落射照明による検出基準電圧PLbを設定する(図8(d)、図9(d)。そして、図8および図9に示すように、検出手段16は、CCDラインセンサ3aの出力電圧を所定の検出レベルとしての設定した検出基準電圧PL(符号PLは、斜光照明による検出基準電圧PLaおよび落射照明による検出基準電圧PLbを総称する。)と比較、具体的には、ガイド面Wb(出力電圧のパターンの右端)から、CCDラインセンサ3aの出力電圧(出力電圧のパターン)と検出基準電圧PLとの交点までの横軸の距離を、陰影長さLDおよび斜影長さLSF(ボタン表)、LSR(ボタン裏)とする。なお、検出基準電圧PLは、ボタンBが存在しない状態におけるCCDラインセンサ3aの出力電圧のパターンと平行になる。   Also, in the epi-illumination, similarly to the oblique illumination, the detection reference voltage PLb by epi-illumination is set (FIGS. 8D and 9D). As shown in FIGS. Compared with the detection reference voltage PL (the symbol PL is a generic name of the detection reference voltage PLa by oblique illumination and the detection reference voltage PLb by epi-illumination) set with the output voltage of the CCD line sensor 3a as a predetermined detection level, specifically. Specifically, the distance on the horizontal axis from the guide surface Wb (the right end of the output voltage pattern) to the intersection of the output voltage (output voltage pattern) of the CCD line sensor 3a and the detection reference voltage PL is expressed by the shadow length LD. And the oblique length LSF (button table) and LSR (button back) The detection reference voltage PL is the output voltage of the CCD line sensor 3a when the button B is not present. It is parallel to the turn.

したがって、ボタン搬送路Wの検査位置IPに透過性を具備するボタンBの中央部分が表面を上(搬送面Waと反対側)に向けた状態で存在するときに斜光Laを照射すると、ボタンBの外周がガイド面Wbに案内されているので、図8(a)に示すように、斜光Laの一部、詳しくは斜光照明装置7に近い図8(a)の左側部分を除く部分をボタンBが完全ではないものの遮光する(斜光LaがボタンBの内部を通過するので光量が少なくなる(暗くなる))。したがって、受光素子が受光する電荷量が少なくなり、出力電圧が低くなる。但し、透過性を有しない不透明なボタンBの場合には、完全に遮光する。この時、ボタンBの直下に形成される斜影がCCDラインセンサ3aに投影される。この場合、CCDラインセンサ3aの出力は、図8(b)に示すように、斜光照明装置7に近い部分は光を受光して斜影が形成されないので明るい部分となるから、その出力(電圧)は「High」になり、ボタンBの斜影が形成される部分の出力は「Low」になる。   Accordingly, when the oblique portion La is irradiated when the central portion of the button B having transparency at the inspection position IP of the button transport path W exists with the surface facing upward (opposite the transport surface Wa), the button B As shown in FIG. 8A, a part of the oblique light La, specifically, the part excluding the left part of FIG. Although B is not perfect, the light is shielded (the oblique light La passes through the inside of the button B, so the amount of light decreases (darkens)). Therefore, the amount of charge received by the light receiving element is reduced, and the output voltage is lowered. However, in the case of an opaque button B that does not have transparency, it is completely shielded from light. At this time, an oblique shadow formed immediately below the button B is projected onto the CCD line sensor 3a. In this case, as shown in FIG. 8 (b), the output of the CCD line sensor 3a is a bright portion because the portion close to the oblique illumination device 7 receives light and no oblique shadow is formed. Becomes “High”, and the output of the portion where the bevel of button B is formed becomes “Low”.

また、図8(a)に示すように、CCDラインセンサ3aの受光面に対向するボタンBの裏面の外周には大きな丸みRbが形成されているので、CCDラインセンサ3aの出力電圧に基づいて検出手段16がボタンBの斜影を検知してその斜影の長さ、例えば、出力電圧が検出基準電圧PLaと交わる箇所までの斜影長さLSFは、図8(a)に示すボタンBの直径Dより小さくなる。   Further, as shown in FIG. 8A, since a large round Rb is formed on the outer periphery of the back surface of the button B facing the light receiving surface of the CCD line sensor 3a, based on the output voltage of the CCD line sensor 3a. The detection means 16 detects the shadow of the button B and the length of the shadow, for example, the shadow length LSF up to the point where the output voltage intersects the detection reference voltage PLa, is the diameter D of the button B shown in FIG. Smaller.

なお、このボタン搬送路Wの検査位置IPにボタンBの中央部分が存在する場合、斜影長さLSFは、ガイド面Wbの直交方向に沿うボタンBの斜影長さの最大値となる。このとき、ガイド面Wbには、ボタンBの外周縁の一部が当接しているので、ガイド面Wbは斜影長さLSFを検出する際の基準面として作用し、斜影長さLSFは、ガイド面Wbからガイド面Wbの直交方向に沿う斜影の端部までの距離、例えば、図8(b)に示すように、基準面としてのガイド面Wbから出力電圧が検出基準電圧PLaと交わる箇所までの横軸の長さとして検出される。   When the central portion of the button B exists at the inspection position IP of the button transport path W, the oblique length LSF is the maximum value of the oblique length of the button B along the orthogonal direction of the guide surface Wb. At this time, since a part of the outer peripheral edge of the button B is in contact with the guide surface Wb, the guide surface Wb acts as a reference surface for detecting the oblique length LSF, and the oblique length LSF is the guide length. The distance from the surface Wb to the end of the oblique line along the orthogonal direction of the guide surface Wb, for example, as shown in FIG. 8B, from the guide surface Wb as the reference surface to the location where the output voltage intersects the detection reference voltage PLa It is detected as the length of the horizontal axis.

前記ボタン搬送路Wの検査位置IPにボタンBの中央部分が裏面を上(搬送面Waと反対側)に向けた状態で存在するときに斜光Laを照射すると、ボタンBの外周がガイド面Wbに案内されているので、図9(a)に示すように、斜光Laの一部、詳しくは斜光照明装置7に近い図9(a)の左側部分を除く部分をボタンBが完全ではないものの遮光する(斜光LaがボタンBの内部を通過するので光量が少なくなる(暗くなる))。したがって、受光素子が受光する電荷量が少なくなり、出力電圧が低くなる。但し、透過性を有しない不透明なボタンBの場合には、完全に遮光する。この時、ボタンBの直下に形成される斜影がCCDラインセンサ3aに投影される。この場合、CCDラインセンサ3aの出力は、図9(b)に示すように、斜光照明装置7に近い部分は光を受光して斜影が形成されないので、その出力(電圧)は「High」になり、ボタンBの斜影が形成される部分の出力は「Low」になる。   When the oblique portion La is irradiated when the center portion of the button B is present at the inspection position IP of the button transport path W with the back surface facing upward (opposite the transport surface Wa), the outer periphery of the button B becomes the guide surface Wb. As shown in FIG. 9 (a), although part of the oblique light La, in detail, the part other than the left part of FIG. 9 (a) close to the oblique illumination device 7, the button B is not complete. Shading is performed (because the oblique light La passes through the inside of the button B, the amount of light is reduced (darkens)). Therefore, the amount of charge received by the light receiving element is reduced, and the output voltage is lowered. However, in the case of an opaque button B that does not have transparency, it is completely shielded from light. At this time, an oblique shadow formed immediately below the button B is projected onto the CCD line sensor 3a. In this case, as shown in FIG. 9B, the output of the CCD line sensor 3a receives light at a portion close to the oblique illumination device 7 and no oblique shadow is formed, so that the output (voltage) is “High”. Thus, the output of the portion where the bevel of button B is formed is “Low”.

図9(a)に示すように、CCDラインセンサ3aの受光面に対向するボタンBの表面の外周には小さな丸みRaが形成されているので、CCDラインセンサ3aの出力電圧に基づいて検出手段16がボタンBの斜影を検知してその斜影の長さ、例えば、出力電圧が出基準電圧PLaと交わる箇所までの斜影長さLSRは、図9(a)に示すボタンBの直径Dより小さくなる。このときも、ガイド面Wbは、斜影長さLSRを検出する際の基準面として作用し、斜影長さLSRは、ガイド面Wbからガイド面Wbの直交方向に沿う斜影の端部までの距離、例えば、図9(b)に示すように、基準面としてのガイド面Wbから出力電圧が検出基準電圧PLaと交わる箇所までの横軸の長さとして検出される。   As shown in FIG. 9A, since a small roundness Ra is formed on the outer periphery of the surface of the button B facing the light receiving surface of the CCD line sensor 3a, the detection means is based on the output voltage of the CCD line sensor 3a. 16 detects the shadow of the button B, and the length of the shadow, for example, the shadow length LSR to the point where the output voltage intersects the output reference voltage PLa is smaller than the diameter D of the button B shown in FIG. Become. Also at this time, the guide surface Wb acts as a reference surface when detecting the oblique length LSR, and the oblique length LSR is a distance from the guide surface Wb to the end of the oblique line along the orthogonal direction of the guide surface Wb, For example, as shown in FIG. 9B, the length of the horizontal axis from the guide surface Wb as the reference surface to the location where the output voltage intersects the detection reference voltage PLa is detected.

なお、斜影の位置などは、CCDラインセンサ3aを構成する複数の受光素子の配列方向の位置座標によって容易に取得することができる。   It should be noted that the position of the oblique shadow can be easily obtained from the position coordinates in the arrangement direction of the plurality of light receiving elements constituting the CCD line sensor 3a.

すなわち、CCDラインセンサ3aの受光素子の配列方向の右端が、ガイド面Wbよりも右側に配置されている場合には、斜光Laを遮蔽可能な不透明な材質で形成されたガイド面を用いることによりボタンBが存在しない状態において、斜光Laがガイド面Wbによって遮光されるので、ガイド面Wbの直下に位置するCCDラインセンサ3aの受光素子の位置は、常に明暗境界となるので、この明暗境界を座標の原点とすることで、斜影長さを容易に得ることができる。   That is, when the right end in the arrangement direction of the light receiving elements of the CCD line sensor 3a is arranged on the right side of the guide surface Wb, a guide surface made of an opaque material capable of shielding the oblique light La is used. In the state where the button B is not present, the oblique light La is shielded by the guide surface Wb, so the position of the light receiving element of the CCD line sensor 3a located immediately below the guide surface Wb is always a light / dark boundary. By using the origin of coordinates, the bevel length can be easily obtained.

ここで、ボタンBの表面が上を向いた状態の斜影長さLSFと、ボタンBの裏面が上を向いた状態の斜影長さLSRとは、ボタンBの表面の外周の丸みRaが裏面の外周の丸みRbより小さいので、ボタンBの表面が上を向いた状態の斜影長さLSFがボタンBの裏面が上を向いた状態の斜影長さLSRより小さくなる(LSF<LSR)。   Here, the slant length LSF with the surface of the button B facing up and the slant length LSR with the back surface of the button B facing up are the roundness Ra of the outer periphery of the button B on the back surface. Since it is smaller than the roundness Rb of the outer periphery, the shadow length LSF when the front surface of the button B faces upward is smaller than the shadow length LSR when the rear surface of the button B faces upward (LSF <LSR).

すなわち、ボタンBの外周縁の断面形状が表裏で異なりさえすれば、斜光によるボタンBの斜影をCCDラインセンサ3aで検出して得られる斜影長さLSF、LSRが表裏で異なることになる。   That is, as long as the cross-sectional shape of the outer periphery of the button B is different between the front and back, the oblique lengths LSF and LSR obtained by detecting the obliqueness of the button B by oblique light with the CCD line sensor 3a are different between the front and back.

そこで、本実施形態においては、ボタンBの表面が上を向いた状態の斜影長さLSFを基準ボタンデータのうちのFデータとし、ボタンBの裏面が上を向いた状態の斜影長さLSRを基準ボタンデータのうちのRデータとして予め基準データ保持メモリ21に記憶する。   Therefore, in the present embodiment, the shadow length LSF with the front surface of the button B facing upward is used as the F data of the reference button data, and the shadow length LSR with the back surface of the button B facing upward is determined. The data is stored in advance in the reference data holding memory 21 as R data of the reference button data.

なお、FデータおよびRデータとしては、斜影長さの検出誤差を吸収するための所定のマージンを付加するようにしてもよい。   As F data and R data, a predetermined margin for absorbing the detection error of the oblique length may be added.

また、ボタンBの表裏による斜影長さは、ボタンBの中央部分(中心部)でなくとも異なるが、ボタン搬送方向に沿った位置の特定を短時間で容易かつ確実にできるとともに、ボタンBの表裏のそれぞれにおける斜影の長さ、および、表裏の斜影の長さの差が最も大きくなるので、表裏の判別を容易にできるなどの理由により、ボタンBの中央部分での斜影長さLSF、LSR、すなわち、ボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の影の長さを表裏の判別に用いることが好ましい。   In addition, the oblique length of the button B depending on the front and back is different even if it is not the central portion (center portion) of the button B. However, the position along the button conveying direction can be easily and reliably specified in a short time, and the button B The difference between the length of the bevel on the front and back and the length of the bevel on the front and back is the largest, so that the length of the bevel LSF, LSR at the center portion of the button B can be easily distinguished. In other words, it is preferable to use the length of the shadow on a straight line passing through the lower part of the center of the button B in the irradiation direction of the oblique light La to determine the front and back.

そして、検査位置IPを通過する表裏の判別に供するボタンBに斜光Laを照射して、そのボタンBの斜影長さを所定の時間間隔で順次CCDラインセンサ3aにより検出し、CCDラインセンサ3aの出力に基づいて斜影長さの最大値(検査位置IPにボタンBの中央部分(中心部)が存在するときの斜影長さ。)を計測ボタンデータとして取得し、この計測ボタンデータを基準ボタンデータのFデータあるいはRデータと比較することにより、表裏の判別に供するボタンBの表裏を判別する。   Then, oblique light La is irradiated to the button B used for front / back discrimination through the inspection position IP, and the oblique length of the button B is sequentially detected by the CCD line sensor 3a at predetermined time intervals, and the CCD line sensor 3a Based on the output, the maximum value of the bevel length (the bevel length when the center portion (center portion) of the button B exists at the inspection position IP) is obtained as measurement button data, and this measurement button data is used as the reference button data. By comparing with the F data or R data, the front and back of the button B used for front / back discrimination is discriminated.

なお、上述のように、ボタンBの表裏を判定するためは、搬送面Wa上にボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の影の長さを検出すること好ましいが、ボタンBの搬送中のいつの時点で搬送面Wa上にボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上にボタンBの斜影が形成されるかを判別することは、難しい。しかし、搬送面Wa上にボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上に斜影が形成されると、斜影の長さは最大となるから、このように、搬送面Wa上に形成される斜影の長さの最大値を取得することにより、容易に、ボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の影の長さを検出することができる。   As described above, in order to determine the front and back of the button B, it is preferable to detect the length of a shadow on a straight line passing through the lower part of the center of the button B on the conveying surface Wa in the irradiation direction of the oblique light La. However, when the button B is being conveyed, it is determined whether or not the oblique shadow of the button B is formed on the straight line toward the irradiation direction of the oblique light La through the lower part of the center of the button B on the conveyance surface Wa. difficult. However, if an oblique line is formed on a straight line that passes through the lower part of the center of the button B on the conveying surface Wa and goes in the direction of the oblique light La, the length of the oblique line is maximized. By acquiring the maximum value of the length of the oblique shadow formed above, it is possible to easily detect the length of the shadow on a straight line that passes through the lower part of the center of the button B and goes in the irradiation direction of the oblique light La. .

前記ボタン搬送路Wの検査位置IPに透過性を具備するボタンBの中央部分が存在する状態で落射光Lbを照射すると、ボタンBの外周がガイド面Wbに案内されているので、図8(c)および図9(c)に示すように、落射光Lbの一部、詳しくは斜光照明装置7に近い図8(c)および図9(c)の左側部分を除く部分をボタンBが完全ではないものの遮光する(斜光LaがボタンBの内部を通過するので光量が少なくなる(暗くなる))。但し、透過性を有しない不透明なボタンBの場合には、完全に遮光する。この時、ボタンBの直下に陰影が形成され、このボタンBの直下に形成される陰影がCCDラインセンサ3aに投影される。この場合、CCDラインセンサ3aの出力特性は、図8(d)および図9(d)に示すように、落射照明装置8に近い部分は光を受光して陰影が形成されないので、その出力(電圧)は「High」になり、ボタンBの陰影が形成される部分の出力は「Low」になる。そして、ボタンBの陰影は、ボタンBをそのまま投影して映し出すので、ボタンBの表裏に関わりなく、CCDラインセンサ3aの出力が「Low」になる陰影長さLDは同じになる。   When the incident light Lb is irradiated in a state where the central portion of the button B having transparency exists at the inspection position IP of the button conveyance path W, the outer periphery of the button B is guided to the guide surface Wb, so that FIG. c) and FIG. 9 (c), the button B is completely covered with a part of the incident light Lb, specifically, the part other than the left part of FIG. 8 (c) and FIG. 9 (c) close to the oblique illumination device 7. Although not, light is shielded (because the oblique light La passes through the inside of the button B, the amount of light decreases (darkens)). However, in the case of an opaque button B that does not have transparency, it is completely shielded from light. At this time, a shadow is formed immediately below the button B, and the shadow formed immediately below the button B is projected onto the CCD line sensor 3a. In this case, as shown in FIGS. 8D and 9D, the output characteristics of the CCD line sensor 3a are such that the portion near the epi-illumination device 8 receives light and no shadow is formed. Voltage) becomes “High”, and the output of the portion where the shadow of the button B is formed becomes “Low”. Since the shadow of the button B is projected and projected as it is, the shadow length LD at which the output of the CCD line sensor 3a becomes “Low” is the same regardless of the front and back of the button B.

また、このボタン搬送路Wの検査位置IPにボタンBの中央部分が存在する場合、陰影長さLDは、斜影長さLSF、LSRと同様に、ガイド面Wbの直交方向に沿うボタンBの陰影長さLDの最大値となる。このとき、ガイド面Wbには、ボタンBの外周縁の一部が当接しているので、ガイド面Wbは陰影長さLDを検出する際の基準面として作用し、陰影長さLDは、ガイド面Wbからガイド面Wbの直交方向に沿う陰影の端部までの距離として検出される。そして、CCDラインセンサ3aがボタンBの陰影を検知してその出力が出基準電圧PLbと交わる箇所までの陰影長さLDは、ボタンBの直径Dと同じになる(LD=D)。   When the center portion of the button B is present at the inspection position IP of the button transport path W, the shadow length LD is the shadow of the button B along the orthogonal direction of the guide surface Wb, similarly to the oblique lengths LSF and LSR. This is the maximum value of the length LD. At this time, since a part of the outer peripheral edge of the button B is in contact with the guide surface Wb, the guide surface Wb acts as a reference surface for detecting the shadow length LD, and the shadow length LD is equal to the guide length Wd. It is detected as the distance from the surface Wb to the end of the shadow along the orthogonal direction of the guide surface Wb. The shadow length LD until the CCD line sensor 3a detects the shadow of the button B and the output intersects with the output reference voltage PLb is the same as the diameter D of the button B (LD = D).

そこで、ボタンBの直径Dを基準ボタン直径データ(基準直径値)として予め基準データ保持メモリ21に記憶する。   Therefore, the diameter D of the button B is stored in the reference data holding memory 21 in advance as reference button diameter data (reference diameter value).

そして、検査位置IPを通過する表裏の判別に供するボタンBに落射光Lbを照射して、そのボタンBの陰影長さを所定の時間間隔で順次CCDラインセンサ3aにより検出し、CCDラインセンサ3aの出力に基づいて陰影長さの最大値(検査位置IPにボタンBの中央部分が存在するときの陰影長さ。)を計測ボタン直径データ(計測直径値)として取得し、この計測ボタン直径データを基準ボタンデータの基準ボタン直径データ(基準直径値)としてのボタンBの直径Dと比較することにより、表裏の判別に供するボタンBの直径を判別できる。   Then, the incident light Lb is irradiated to the button B used for discrimination between the front and back passing through the inspection position IP, and the shadow length of the button B is sequentially detected by the CCD line sensor 3a at predetermined time intervals, and the CCD line sensor 3a Is obtained as measurement button diameter data (measurement diameter value), and the maximum value of the shadow length (the shadow length when the center portion of the button B is present at the inspection position IP) is obtained based on the output of the measurement button diameter data. Is compared with the diameter D of the button B as the reference button diameter data (reference diameter value) of the reference button data, the diameter of the button B used for discrimination between the front and the back can be determined.

また、図6から図9は、説明の便宜上、搬送面Waを水平にして示してある。   6 to 9 show the conveyance surface Wa horizontally for the convenience of explanation.

つぎに、本実施形態の表裏判別装置1の動作について説明する。   Next, the operation of the front / back discrimination device 1 of this embodiment will be described.

本実施形態の表裏判別装置1による動作は、制御手段5のCPU14がメモリ15に記憶されているプログラムおよびデータに基づいて実行する。   The operation of the front / back discrimination device 1 according to the present embodiment is executed by the CPU 14 of the control means 5 based on the program and data stored in the memory 15.

本実施形態の表裏判別装置1の動作には、ボタンBの表裏の判別動作に先立ってボタンBを判別するための基準値や設定値を自動的に基準データ保持メモリ21に記憶して登録する設定動作と、ボタンBの表裏の判別を行うボタンBの表裏判別動作(以下、単に、判別動作と記す。)とがある。   In the operation of the front / back discrimination device 1 of the present embodiment, the reference value and setting value for discriminating the button B are automatically stored and registered in the reference data holding memory 21 prior to the front / back discrimination operation of the button B. There are a setting operation and a button B front / back discriminating operation (hereinafter simply referred to as a discriminating operation) for discriminating the front / back of the button B.

まず、本実施形態の表裏判別装置1における設定動作について説明する。   First, the setting operation in the front / back discrimination device 1 of the present embodiment will be described.

図12は本発明に係るボタンの表裏判別装置の実施形態における設定動作の一例を示すフローチャートである。   FIG. 12 is a flowchart showing an example of the setting operation in the embodiment of the button front / back discrimination device according to the present invention.

本実施形態の表裏判別装置1における設定動作は、制御手段5のCPU14がメモリ15の動作制御部25に記憶されている動作制御プログラムおよびデータに基づいて各部を制御して自動的に実行する。   The setting operation in the front / back discrimination device 1 of this embodiment is automatically executed by the CPU 14 of the control means 5 by controlling each unit based on the operation control program and data stored in the operation control unit 25 of the memory 15.

図12に示すように、本実施形態の表裏判別装置1における設定動作は、まず、S(ステップ、以下、同じ。)1においてボタン登録を行うか否かを判断する。そして、ボタン登録を行う(S1のY:例えば、登録ボタン18をオン操作する。)場合には、つぎのS2に進行し、ボタン登録を行わない(S1のN:例えば、登録ボタン18がオフ。)の場合には、設定動作を終了する。   As shown in FIG. 12, in the setting operation in the front / back discrimination device 1 of the present embodiment, first, in S (step, hereinafter the same) 1, it is determined whether or not button registration is performed. When button registration is performed (Y in S1: for example, the registration button 18 is turned on), the process proceeds to the next S2, and button registration is not performed (N in S1: for example, the registration button 18 is turned off). )), The setting operation is terminated.

ついで、照明設定を開始する(S2のY)。この照明設定の開始は、例えば、照明設定ボタンをオン操作するにより行う。そして、照明設定は、落射照明装置8による落射照明と斜光照明装置7による斜光照明とを個別に点灯して照明の輝度を上昇させCCDラインセンサ3aの出力電圧を飽和させる。そして、落射照明では、出力電圧が飽和したときの輝度の予め設定されている規定値割合、例えば90%を検出し、その検出値を照明設定値として取得し、この照明設定値を基準データ保持メモリ21に記憶する。また、斜光照明では、照明とCCDラインセンサ3aとの距離が近い部分の出力電圧Vss(図14)が飽和したときの輝度の予め設定されている規定値割合、例えば90%を検出し、その検出値を照明設定値として取得し、この照明設定値を基準データ保持メモリ21に記憶する(S9)。このステップは、照明設定値としての輝度の設定である。なお、照明設定に用いる落射照明での規定値割合と、斜光照明での規定値割合とは、同一でもよいし、異なっていてもよい。また、図12においては、CCDラインセンサ3aを、単に、ラインセンサと記す。   Next, the illumination setting is started (Y in S2). The lighting setting is started by, for example, turning on a lighting setting button. In the illumination setting, the epi-illumination by the epi-illumination device 8 and the oblique illumination by the oblique illumination device 7 are individually turned on to increase the luminance of the illumination and saturate the output voltage of the CCD line sensor 3a. In the epi-illumination, a preset specified value ratio of brightness when the output voltage is saturated, for example, 90% is detected, the detected value is acquired as an illumination setting value, and this illumination setting value is retained as reference data. Store in the memory 21. In the oblique illumination, a preset specified value ratio, for example, 90% of the luminance when the output voltage Vss (FIG. 14) in the portion where the distance between the illumination and the CCD line sensor 3a is close is saturated, for example, 90% is detected. The detected value is acquired as the illumination setting value, and this illumination setting value is stored in the reference data holding memory 21 (S9). This step is to set the luminance as the illumination setting value. Note that the prescribed value ratio in the epi-illumination used for the illumination setting and the prescribed value ratio in the oblique illumination may be the same or different. In FIG. 12, the CCD line sensor 3a is simply referred to as a line sensor.

ついで、設定した照明設定値により落射照明と斜光照明とを個別に点灯し、ボタンBの無い状態での落射照明および斜光照明によるそれぞれのCCDラインセンサ3aの検出位置における出力電圧VPの全検出範囲にわたる出力電圧である出力電圧データ、すなわち、落射照明データおよび斜光照明データを取得し、基準データ保持メモリ21に記憶する(S10)。ここで、落射照明の場合には、図7(b)および図13に示すように、出力電圧(High:Vp=Vun)は一定であり、斜光照明の場合には、図6(b)および図14に示すように、出力電圧はラインセンサ3aから照明が遠くなるにしたがって低下する。   Next, the epi-illumination and the oblique illumination are individually turned on according to the set illumination setting value, and the entire detection range of the output voltage VP at the detection position of each CCD line sensor 3a by the epi-illumination and the oblique illumination without the button B is provided. Output voltage data, ie, epi-illumination data and oblique illumination data, is acquired and stored in the reference data holding memory 21 (S10). Here, in the case of epi-illumination, as shown in FIG. 7B and FIG. 13, the output voltage (High: Vp = Vun) is constant, and in the case of oblique illumination, FIG. As shown in FIG. 14, the output voltage decreases as the illumination distances from the line sensor 3a.

ついで、基準データ保持メモリ21に記憶されている既存の検出レベルの設定値である検出レベル設定値としての検出基準電圧PLをクリアする(S11)。このステップは、基準データ保持メモリ21に記憶した照明設定値(S9)に対応する検出基準電圧PLを設定して記憶するためである。   Next, the detection reference voltage PL as a detection level setting value which is a setting value of the existing detection level stored in the reference data holding memory 21 is cleared (S11). This step is for setting and storing the detection reference voltage PL corresponding to the illumination setting value (S9) stored in the reference data holding memory 21.

ついで、レベル設定を開始する(S4のY:例えば、レベル設定ボタンをオン操作する。)。このレベル設定は、まず、落射照明によるレベル設定を開始する(S12のY:例えば、落射レベル設定ボタンをオン操作する。)。   Next, level setting is started (Y in S4: for example, the level setting button is turned on). In this level setting, first, level setting by epi-illumination is started (Y in S12: for example, an epi-illumination level setting button is turned on).

落射照明によるレベル設定は、落射照明によるボタンBの透過性(透明度)に対応させるために、図示しない搬送アームを駆動して基準となるボタンBを搬送し、落射照明を点灯させて、CCDラインセンサ3aの出力電圧データである落射照明データを取得する。電圧値の変化よりボタンBの直径部分における出力電圧の最小値Vum(図13)が透過性を有するボタンBによる出力電圧である。そして、ボタンBが存在しない状態であるボタン無における出力電圧Vunと、陰影による出力電圧の最小値Vumとの出力電圧差の一定割合、例えば80%を出力電圧Vunから引いた値を落射照明における検出レベル設定値である検出基準電圧PLbとして取得し、基準データ保持メモリ21に記憶する(S14)。この落射照明におけるボタンBの透過性によるCCDラインセンサ3aの出力電圧と検出基準電圧PLbとの関係を図13(a)から図13(c)に示す。なお、図13(a)は不透明なボタン、図13(b)は透過性が小さいボタン、図13(c)は透過性が大きいボタンを示している。   In order to correspond to the transparency (transparency) of the button B by the epi-illumination, the level setting by the epi-illumination is performed by driving the transport arm (not shown) to convey the reference button B, turning on the epi-illumination, and the CCD line. Epi-illumination data that is output voltage data of the sensor 3a is acquired. The minimum value Vum (FIG. 13) of the output voltage at the diameter portion of the button B from the change of the voltage value is the output voltage by the button B having transparency. Then, a constant ratio of the output voltage difference between the output voltage Vun in the absence of the button B in a state where the button B does not exist and the minimum value Vum of the output voltage due to shading, for example, a value obtained by subtracting 80% from the output voltage Vun is used in the epi-illumination. The detection reference voltage PLb, which is a detection level setting value, is acquired and stored in the reference data holding memory 21 (S14). The relationship between the output voltage of the CCD line sensor 3a and the detection reference voltage PLb due to the transparency of the button B in this epi-illumination is shown in FIG. 13 (a) to FIG. 13 (c). FIG. 13A shows an opaque button, FIG. 13B shows a button with low transparency, and FIG. 13C shows a button with high transparency.

ついで、斜光照明によるレベル設定を開始する(S13のY:例えば、落射レベル設定ボタンをオン操作する。)。   Next, level setting by oblique illumination is started (Y in S13: for example, an epi-illumination level setting button is turned on).

斜光照明によるレベル設定は、図10を用いて説明した場合と同様に行う。具体的には、まず、基準となるボタンBの大きいアールRbを照明側、すなわちボタン裏(図9(c)参照)としてボタン搬送路Wの搬送面Waに配置した状態で、落射照明の場合と同様に、図示しない搬送アームを駆動してボタンBを搬送し、斜光照明を点灯させて、CCDラインセンサ3aの出力電圧データである斜光照明データを取得する。ここでは、まず、検査位置IPにボタンBが存在する場合における出力電圧の最小値Vse(図14)を取得する。そして、検査位置IPにボタンBが存在しない状態であるボタン無における出力電圧は、照明との距離によって変化するため(図14)、ステップS10で取得したボタン無における出力電圧のデータからボタン無における出力電圧の最小値Vsmを求め、この最小値Vsmと斜影による出力電圧の最小値Vseの出力電圧差(Vsm−Vse)を算出し、この出力電圧差に一定割合、例えば85%を乗じたVr(=0.85(Vsm−Vse))を求める。さらに、このVrに検査位置IPにボタンBが存在する状態におけるCCDラインセンサ3aの出力電圧の最小値Ve(を加えたVr+Veを出力電圧Vsmから引いた値Vdを斜光照明における検出レベル設定値である検出基準電圧PLa(=Vsm−Vd)として取得し、基準データ保持メモリ21に記憶する(S15)。この斜光照明におけるボタンBの透過性によるCCDラインセンサ3aの出力電圧と検出基準電圧PLaとの関係を図14(a)から図14(c)に示す。なお、図14(a)は不透明なボタン、図14(b)は透過性が小さいボタン、図14(c)は透過性が大きいボタンを示しており、図14(a)においては、Vse=Ve=0となる。また、検出基準電圧PLaを設定することにより、検出手段16としても機能する制御手段5は、ボタン直下の斜影を検出することになる。   The level setting by oblique illumination is performed in the same manner as described with reference to FIG. Specifically, first, in the case of epi-illumination with the large radius Rb of the reference button B arranged on the conveyance surface Wa of the button conveyance path W as the illumination side, that is, the button back (see FIG. 9C). Similarly to the above, the transport arm (not shown) is driven to transport the button B, the oblique illumination is turned on, and oblique illumination data which is output voltage data of the CCD line sensor 3a is acquired. Here, first, the minimum value Vse (FIG. 14) of the output voltage when the button B is present at the inspection position IP is acquired. Then, since the output voltage without the button in the state where the button B does not exist at the inspection position IP varies depending on the distance from the illumination (FIG. 14), the output voltage data without the button obtained in step S10 indicates that there is no button. A minimum value Vsm of the output voltage is obtained, an output voltage difference (Vsm−Vse) between the minimum value Vsm and the minimum value Vse of the output voltage due to shading is calculated, and Vr obtained by multiplying this output voltage difference by a certain ratio, for example, 85%. (= 0.85 (Vsm-Vse)) is obtained. Further, a value Vd obtained by subtracting Vr + Ve from the output voltage Vsm, which is obtained by adding the minimum output voltage Ve of the CCD line sensor 3a in the state where the button B exists at the inspection position IP to Vr, is a detection level setting value in oblique illumination. It is acquired as a certain detection reference voltage PLa (= Vsm−Vd) and stored in the reference data holding memory 21 (S15) The output voltage of the CCD line sensor 3a and the detection reference voltage PLa due to the transparency of the button B in this oblique illumination. 14 (a) to 14 (c), where FIG. 14 (a) is an opaque button, FIG. 14 (b) is a button with low transparency, and FIG. 14A, Vse = Ve = 0, and the detection means 16 is set by setting the detection reference voltage PLa. Function control means 5 will detect the bevel immediately below the button.

なお、落射照明によるレベル設定(S12)と斜光照明によるレベル設定(S13)の順序は、逆であってもよい。また、レベル設定に用いる落射照明での規定値割合と、斜光照明での規定値割合とは、同一でもよいし、異なっていてもよい。また、上述の説明では、落射照明によるレベル設定は、ボタンBが存在しない状態であるボタン無における出力電圧Vunと、陰影による出力電圧の最小値Vumとの出力電圧差に一定割合を乗じて算出したが、斜光照明によるレベル設定と同様な方法で算出しても良い。但し、この場合は、ボタンBが存在しない状態であるボタン無における出力電圧の最小値は、常に一定であるので、そのままVunを用いることができる。   Note that the order of level setting by epi-illumination (S12) and level setting by oblique illumination (S13) may be reversed. Further, the prescribed value ratio in the epi-illumination used for level setting and the prescribed value ratio in the oblique illumination may be the same or different. In the above description, the level setting by epi-illumination is calculated by multiplying the output voltage difference between the output voltage Vun in the absence of the button B in the state where the button B does not exist and the minimum output voltage Vum by the shadow by a certain ratio. However, it may be calculated by the same method as the level setting by oblique illumination. In this case, however, Vun can be used as it is because the minimum value of the output voltage without the button B in the absence of the button B is always constant.

ついで、レベル設定が終了したら(S5のY)、ボタンBの直径Dおよび糸通し孔Baの判別に用いる基準ボタン直径データ(基準直径値)および基準孔データ(基準孔数、基準孔ピッチ)からなるサイズ設定(S6)、ボタンBの「表」の判別に用いる基準ボタンデータであるFデータ設定(S7)、および、ボタンBの「裏」の判別に用いる基準ボタンデータであるRデータ設定(S8:例えば、Rデータ設定ボタンのオン操作)を行う。これらの設定は、前記ステップで設定した落射照明における照明設定値および検出レベル設定値(検出基準電圧PL)を用いて行う。   Then, when the level setting is completed (Y in S5), from the reference button diameter data (reference diameter value) and the reference hole data (reference hole number, reference hole pitch) used for determining the diameter D of the button B and the threading hole Ba. Size setting (S6), F data setting (S7) which is reference button data used for determining the “table” of the button B, and R data setting (reference button data used for determining the “back” of the button B) ( S8: For example, the R data setting button is turned on). These settings are performed using the illumination setting value and detection level setting value (detection reference voltage PL) in the epi-illumination set in the above step.

前記サイズ設定(S6のY:例えば、サイズ設定ボタンをオン操作する。)は、搬送アームを駆動して基準となるボタンBを搬送し、落射照明を前記ステップ(S9)で設定した照明設定値を用いて点灯させて、前記ステップ(S14)で設定した検出レベル設定値としての検出基準電圧LPbを用いてボタンBの陰影によるCCDラインセンサ3aの出力電圧データである落射照明データを取得し、その落射照明データに基づいて基準ボタン直径データとしての基準直径値である陰影長さLDおよび基準孔データ(基準孔数、基準孔ピッチ)を取得し、基準データ保持メモリ21に記憶することにより行う(S16)。   In the size setting (Y in S6: for example, the size setting button is turned on), the transport arm is driven to transport the reference button B, and the illumination setting value in which the epi-illumination is set in the step (S9). Is used to obtain epi-illumination data that is output voltage data of the CCD line sensor 3a due to the shadow of the button B using the detection reference voltage LPb as the detection level setting value set in the step (S14). Based on the epi-illumination data, the shadow length LD and the reference hole data (reference hole number, reference hole pitch) which are reference diameter values as reference button diameter data are obtained and stored in the reference data holding memory 21. (S16).

前記Fデータ設定(S7のY:例えば、Fデータ設定ボタンをオン操作する。)は、搬送アームを駆動して基準となるボタンBをボタン表(大きいアールRaを搬送面Waに対向するように載置)にして搬送し、斜光照明を前記ステップ(S10)で設定した照明設定値を用いて点灯させて、前記ステップ(S15)で設定した検出レベル設定値としての検出基準電圧LPaを用いてボタンBの斜影の検出と、ボタンBの斜影によるCCDラインセンサ3aの出力電圧データである斜光照明データを取得し、その斜光照明データに基づいてFデータである斜影長さLSFを取得し、基準データ保持メモリ21に記憶することにより行う(S17)。   In the F data setting (Y in S7: for example, the F data setting button is turned on), the button B serving as a reference is driven by driving the transport arm so that the large radius Ra faces the transport surface Wa. The oblique illumination is turned on using the illumination set value set in step (S10), and the detection reference voltage LPa as the detection level set value set in step (S15) is used. The detection of the shadow of the button B, the oblique illumination data which is the output voltage data of the CCD line sensor 3a based on the obliqueness of the button B are acquired, the oblique length LSF which is the F data is acquired based on the oblique illumination data, and the reference This is performed by storing the data in the data holding memory 21 (S17).

前記ボタンBの裏の判別に用いる基準データの設定(S8のY:例えば、Rデータ設定ボタンをオン操作する。)は、搬送アームを駆動して基準となるボタンBを搬送し、斜光照明を前記ステップ(S10)で設定した照明設定値を用いて点灯させて、前記ステップ(S15)で設定した検出レベル設定値(検出基準電圧PLa)を用いてボタンBの斜影によるCCDラインセンサ3aの出力電圧データである斜光照明データを取得し、その斜光照明データに基づいてRデータである斜影長さLSRを取得し、基準データ保持メモリ21に記憶することにより行う(S18)。   For setting the reference data used to determine the back side of the button B (Y in S8: for example, turning on the R data setting button), the transport button is driven to transport the reference button B, and oblique illumination is performed. The light is turned on using the illumination set value set in the step (S10), and the output of the CCD line sensor 3a by the shading of the button B using the detection level set value (detection reference voltage PLa) set in the step (S15). This is performed by acquiring oblique illumination data as voltage data, obtaining an oblique length LSR as R data based on the oblique illumination data, and storing it in the reference data holding memory 21 (S18).

なお、基準データの設定は、操作パネル4からの入力操作により行うこともできる。また、基準ボタンデータ、基準ボタン直径データおよび基準孔データとして、設計値あるいは理論値(マージンを設定してもよい。)を用いることもできる。   The reference data can also be set by an input operation from the operation panel 4. Design values or theoretical values (margins may be set) may be used as the reference button data, reference button diameter data, and reference hole data.

つぎに、本実施形態の表裏判別装置における判別動作について説明する。   Next, the discrimination operation in the front / back discrimination device of the present embodiment will be described.

まず、本実施形態の表裏判別装置1により実施されるボタンBの表裏判別方法(以下、単に、表裏判別方法と記す。)の概略について説明する。   First, an outline of the front / back discrimination method (hereinafter simply referred to as the front / back discrimination method) of the button B performed by the front / back discrimination device 1 of the present embodiment will be described.

本実施形態の表裏判別方法は、載置面上に載置されるボタン上方から斜光Laを照射した際に、イメージセンサ3と検出手段16により検出された斜影の長さに基づいて、ボタンBの外周縁の断面形状の相違を判別することにより、ボタンBの表裏を判別するようになっている。この斜影長さは、載置面上のボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の斜影長さであることが好ましい。   The front / back discrimination method of this embodiment is based on the length of the oblique shadow detected by the image sensor 3 and the detection means 16 when the oblique light La is irradiated from above the button placed on the placement surface. The front and back of the button B are discriminated by discriminating the difference in the cross-sectional shape of the outer peripheral edge of the button B. This oblique length is preferably a straight oblique length passing through the lower part of the center of the button B on the placement surface and extending in the irradiation direction of the oblique light La.

具体的には、ボタン搬送路Wに設けられた載置面としての搬送面Waを通過するボタンBに斜光Laを照射し、この斜光Laの一部をボタンBが遮光することによりボタンBの直下に形成されるボタンBの斜影長さを、検出手段16により、CCDラインセンサ3aからの出力電圧を斜光照明装置7からのCCDラインセンサ3aの各受光素子の距離に応じて斬減するように設定した検出レベルとしての検出基準電圧PLaと比較することにより検出し、検出したボタンBの斜影長さに基づいてボタンBの表裏を判別するようになっている。   Specifically, the oblique light La is irradiated to the button B that passes through the conveyance surface Wa as the placement surface provided in the button conveyance path W, and the button B shields a part of the oblique light La so that the button B is shielded. The oblique length of the button B formed immediately below is reduced by the detection means 16 according to the distance of each light receiving element of the CCD line sensor 3a from the oblique illumination device 7 by the detection means 16. Is detected by comparing with a detection reference voltage PLa as a detection level set to, and the front and back of the button B are discriminated based on the detected shadow length of the button B.

また、本実施形態の表裏判別方法においては、イメージセンサ3と検出手段16により検出されるボタンBの斜影長さを、ボタンBの中心部下方を通って斜光Laの照射方向に向かう直線上の影の長さとし、この斜影長さに基づいて計測ボタンデータを形成し、この計測ボタンデータを基準となる基準ボタンデータと比較することによりボタンBの表裏を判別するようになっている。   Further, in the front / back discrimination method of the present embodiment, the oblique length of the button B detected by the image sensor 3 and the detecting means 16 is set on a straight line passing through the lower part of the center of the button B toward the oblique light La irradiation direction. The measurement button data is formed based on the shadow length and the oblique shadow length, and the front and back of the button B is discriminated by comparing the measurement button data with reference reference button data.

さらに、本実施形態の表裏判別方法においては、ボタンBに落射光Lbを斜光Laと交互に照射し、この落射光Lbの一部をボタンBが遮光することによりボタンの直下に形成されるボタンBの陰影をCCDラインセンサ3aと検出手段16で検出し、検出したボタンBの陰影長さや位置などに基づいて、少なくともボタンBの計測ボタン直径データ、ボタンBの糸通し孔Baの計測孔データを取得し、この計測ボタン直径データおよび計測孔データのそれぞれを基準となる基準ボタン直径データおよび基準孔データと比較することによりボタンBの直径および糸通し孔を判別するようになっている。   Furthermore, in the front / back discrimination method of the present embodiment, the button B is irradiated with the incident light Lb alternately with the oblique light La, and the button B is formed directly below the button by shielding a part of the incident light Lb by the button B. The shadow of B is detected by the CCD line sensor 3a and the detecting means 16, and at least the measurement button diameter data of the button B and the measurement hole data of the threading hole Ba of the button B based on the detected shadow length and position of the button B, etc. And the diameter of the button B and the threading hole are discriminated by comparing each of the measurement button diameter data and the measurement hole data with the reference button diameter data and the reference hole data.

ここで、本実施形態の表裏判別装置における判別動作について、図15に示すボタンの表裏判別動作図により詳しく説明する。   Here, the discrimination operation in the front / back discrimination device of the present embodiment will be described in detail with reference to the button front / back discrimination operation diagram shown in FIG.

図15は本発明に係るボタンの表裏判別装置の実施形態におけるボタンの表裏判別動作図である。なお、図15に示す4列のうちの左端列は、ボタン搬送路Wの検査位置IPに対するボタンBの搬送状態を示し、左端列の1つ右隣は落射光LbによるCCDラインセンサ3aの出力特性である落射照明データを示し、左端列の2つ右隣は表面を上に向けた状態における斜光LaによるCCDラインセンサ3aの出力特性である斜光照明データを示し、右端列は表面を上に向けた状態における斜光LaによるCCDラインセンサ3aの出力特性である斜光照明データを示す。また、出力特性についての横軸および縦軸の説明については図6から図9と同様なので省略し、出力パターンのみを図示する。   FIG. 15 is a button front / back discrimination operation diagram in the embodiment of the button front / back discrimination apparatus according to the present invention. Note that the left end column of the four columns shown in FIG. 15 indicates the transport state of the button B with respect to the inspection position IP of the button transport path W, and the right adjacent one of the left end column is the output of the CCD line sensor 3a by the incident light Lb. Epi-illumination data, which is a characteristic, shows the oblique illumination data, which is the output characteristic of the CCD line sensor 3a by oblique light La in the state where the surface is directed upward, and the right end column has the surface up. The oblique illumination data which is the output characteristic of the CCD line sensor 3a by the oblique light La in the directed state is shown. Further, the description of the horizontal axis and the vertical axis for the output characteristics is the same as in FIGS. 6 to 9 and is omitted, and only the output pattern is shown.

本実施形態の表裏判別装置1において、ボタンBの判別は、照明装置2を駆動して斜光Laと落射光Lbを交互に検査位置IPに照射することにより開始する。勿論、ボタンBの搬送方向の先頭部分が検査位置IPの直前に到達したことを図示しないセンサにより検出して、照明装置2を駆動するようにしてもよい。   In the front / back discrimination device 1 of the present embodiment, the discrimination of the button B is started by driving the illumination device 2 and alternately irradiating the oblique position La and the incident light Lb to the inspection position IP. Of course, the illumination device 2 may be driven by detecting by a sensor (not shown) that the leading portion of the button B in the transport direction has arrived immediately before the inspection position IP.

そして、搬送面Waを搬送されるボタンBは、図示しない搬送手段により等速で図11の矢印Aにて示すボタン搬送方向に沿って移動を開始する。搬送手段については、例えば、CCDラインセンサ3aを挟んで両側にベルトコンベアを配置し、これを駆動させてボタンBを搬送することができる。   Then, the button B transported on the transport surface Wa starts moving along the button transport direction indicated by the arrow A in FIG. As for the conveying means, for example, a belt conveyor can be arranged on both sides of the CCD line sensor 3a, and this can be driven to convey the button B.

図15(a)では、検査位置IPにボタンBが到達せずに、CCDラインセンサ3aがボタンBを検出していない状態(CCDラインセンサ3aからの出力が「High」)である。そして、動作制御部25は判別動作を終了と判断している。そのためデータ処理部24は待機状態にある。   In FIG. 15A, the button B does not reach the inspection position IP, and the CCD line sensor 3a does not detect the button B (the output from the CCD line sensor 3a is “High”). Then, the operation control unit 25 determines that the determination operation is finished. Therefore, the data processing unit 24 is in a standby state.

ついで、図15(b)にてボタンBの端部を検出し、動作制御部25は、ボタンBの表裏を判別する判別動作開始と判断する。そして、動作制御部25は、判別動作開始のため、計測データ保持メモリ22のデータと、基準データ保持メモリ21のデータである基準ボタンデータ(Fデータ、Rデータ)、基準ボタン外径データ、基準孔データ(基準孔数、基準孔ピッチ)との比較を開始する。   Next, the end of the button B is detected in FIG. 15B, and the operation control unit 25 determines that the determination operation for determining the front and back of the button B is started. Then, the operation control unit 25 starts the determination operation, the measurement data holding memory 22 data, the reference button data (F data, R data) which is the data of the reference data holding memory 21, the reference button outer diameter data, the reference data Comparison with the hole data (reference hole number, reference hole pitch) is started.

図15(b)から図15(h)は、ボタンBの検出の一部であり、図15(h)以降もボタンBが検出されなくなるまで動作制御部25は判別動作を開始とし、データ処理部24は計測データと基準データとの比較を実行する。   FIG. 15B to FIG. 15H are a part of the detection of the button B, and the operation control unit 25 starts the discrimination operation until the button B is not detected after FIG. The unit 24 compares the measurement data with the reference data.

そして、ボタンBが検査位置IPを通過してボタンBの検出がなくなり、動作制御部25が判別動作終了と判断した場合、制御手段5部は、ボタンBの表裏、直径D、孔数、孔ピッチのそれぞれの判別結果をミシン本体およびボタン供給装置の少なくとも一方の制御部に出力する。   When the button B passes the inspection position IP and the button B is not detected, and the operation control unit 25 determines that the determination operation is finished, the control unit 5 unit controls the front and back of the button B, the diameter D, the number of holes, the hole Each discrimination result of the pitch is output to at least one control unit of the sewing machine main body and the button supply device.

前記ボタンBの表裏判別については、前述したように、斜光LaによるCCDラインセンサ3aからの出力に基づいて取得した斜影長さをFデータあるいはRデータと比較して、Fデータと一致する場合には、表裏を「表」、すなわち、ボタンBの表面が上を向いた上向きと判別し、Rデータと一致する場合には、表裏を「裏」、すなわち、ボタンBの表面が搬送面Waと対向する下を向いた下向きと判別する。勿論、斜影長さがFデータと一致しない場合に「裏」と判別し、Rデータと一致しない場合に「表」と判別するようにしてもよい。   As for the front / back discrimination of the button B, as described above, when the oblique length acquired based on the output from the CCD line sensor 3a by the oblique light La is compared with the F data or R data, it matches the F data. Determines that the front and back are “front”, that is, the surface of the button B is facing upward, and if it matches the R data, the front and back are “back”, that is, the surface of the button B is the transport surface Wa. It is discriminated as facing downward facing down. Of course, when the oblique length does not match with the F data, it may be determined as “back”, and when it does not match with the R data, it may be determined as “front”.

前記ボタンBの直径Dの判別については、前述したように落射光LbによるCCDラインセンサ3aの出力に基づいて取得した計測直径値を基準直径値と比較し、基準直径値と異なる場合、正常なボタンBでないと判別する。   Regarding the determination of the diameter D of the button B, as described above, the measured diameter value obtained based on the output of the CCD line sensor 3a by the incident light Lb is compared with the reference diameter value. It is determined that it is not button B.

前記ボタンBの糸通し孔Baの判別については、落射光LbによるCCDラインセンサ3aからの出力とボタンBの搬送速度により実行する。   The determination of the threading hole Ba of the button B is performed based on the output from the CCD line sensor 3a by the incident light Lb and the transport speed of the button B.

すなわち、ボタンBの表裏がどの様な向きに搬送されてもCCDラインセンサ3aは同時に3つ以上の糸通し孔Baを検出しない。   That is, the CCD line sensor 3a does not detect three or more threading holes Ba at the same time, regardless of the orientation of the front and back of the button B.

すなわち、図15(e)から図15(g)に示すように、糸通し孔Baの検出開始位置と検出終了位置が分かり、ボタンBの搬送速度が一定であれば、各糸通し孔Baのボタン上における位置が算出できる。また、孔径の最大値が分かれば糸通し孔Baの中心が計算でき、搬送速度よりボタン上の糸通し孔Baの孔位置が算出できる。この孔位置が分かるため、孔ピッチおよび孔数も判別できる。   That is, as shown in FIG. 15 (e) to FIG. 15 (g), if the detection start position and the detection end position of the threading hole Ba are known and the conveyance speed of the button B is constant, each threading hole Ba The position on the button can be calculated. If the maximum value of the hole diameter is known, the center of the threading hole Ba can be calculated, and the hole position of the threading hole Ba on the button can be calculated from the conveying speed. Since this hole position is known, the hole pitch and the number of holes can also be determined.

すなわち、検査位置IPを通過する表裏の判別に供するボタンBに落射光Lbを照射して、そのボタンBの陰影を所定の時間間隔で順次CCDラインセンサ3aにより検出し、CCDラインセンサ3aの出力に基づいて陰影に含まれる糸通し孔Baによる「High」の位置およびその長さに基づいて計測孔データ(計測孔数、計測孔ピッチ)を取得し、この計測孔データを基準孔データと比較することにより、表裏の判別に供するボタンBの糸通し孔Ba(孔数、孔ピッチ)を判別できる。   That is, the incident light Lb is applied to the button B that is used for discrimination between the front and back passing through the inspection position IP, and the shadow of the button B is sequentially detected by the CCD line sensor 3a at predetermined time intervals, and the output of the CCD line sensor 3a is detected. The measurement hole data (measurement hole number, measurement hole pitch) is acquired based on the position and length of “High” by the threading hole Ba included in the shadow, and the measurement hole data is compared with the reference hole data. By doing so, the threading hole Ba (the number of holes, the hole pitch) of the button B used for the discrimination between the front and the back can be determined.

なお、表裏の判別に供するボタンBの表裏、直径、孔数および孔ピッチのすべてが基準と同一である場合には、その判別結果としてボタンBが正常であることをあらわす正常信号をミシン本体およびボタン供給装置の少なくとも一方の制御部に出力する。   When the front and back, the diameter, the number of holes, and the hole pitch of the button B used for front / back discrimination are all the same as the standard, a normal signal indicating that the button B is normal is sent as a result of the discrimination. Output to at least one control unit of the button supply device.

また、表裏の判別に供するボタンBの表裏、直径、孔数および孔ピッチの何れか1つでも基準と異なる場合には、そのボタンBを排除する排除信号をボタン供給装置の制御部に出力し、不図示の排除機構により排除するとよい。   In addition, if any one of the front, back, diameter, number of holes, and hole pitch of the button B used for front / back discrimination is different from the reference, an exclusion signal that excludes the button B is output to the control unit of the button supply device. It is good to exclude by an unshown exclusion mechanism.

さらに、判別に供するボタンBの孔位置を判別(検出)して、ボタンBの孔位置の位置合わせを行うための角度信号を、位置合わせ装置20に対して直接的あるいはミシン制御部を介して間接的に送出する。そして、位置合わせ装置20は、角度信号に応じてボタンBの孔位置を決定するように駆動する。   Further, an angle signal for determining (detecting) the hole position of the button B to be used for determination and aligning the hole position of the button B is directly or via the sewing machine control unit to the alignment device 20. Send indirectly. And the alignment apparatus 20 drives so that the hole position of the button B may be determined according to an angle signal.

そして、表裏の判別に供するボタンBの判別が終了、すなわち、判別結果の出力が終了したら、計測データ保持メモリ22のデータをクリアして待機する。これにより、つぎの表裏の判別に供するボタンBの判別に備える。   When the determination of the button B for front / back determination ends, that is, when the output of the determination result ends, the data in the measurement data holding memory 22 is cleared and waits. This prepares for the determination of the button B to be used for the next front / back determination.

ここで、落射光Lbによるボタン形状イメージ図を図16に示す。   Here, FIG. 16 shows a button shape image diagram by the incident light Lb.

図16は、ボタンBが検査位置IPのCCDラインセンサ3a上を移動し時間軸上に落射光LbによるCCDラインセンサ3aからの出力の明暗切替えポイントを点で表し、その点を結びボタン形状イメージとしたものである。   In FIG. 16, the button B moves on the CCD line sensor 3 a at the inspection position IP, and the light / dark switching point of the output from the CCD line sensor 3 a by the incident light Lb is represented by dots on the time axis. It is what.

実際のCCDラインセンサ3aは、図16に示す表示時間間隔よりも時間間隔を狭く詳細にボタンデータを検出するが、図16では説明の便宜上時間ポイントを省略して図示してある。   The actual CCD line sensor 3a detects the button data in detail with a time interval narrower than the display time interval shown in FIG. 16, but in FIG. 16, the time point is omitted for convenience of explanation.

図16に示すように、ボタンBは搬送面Waを等速で移動するため、時間に速度を乗じたものが搬送方向に沿った長さ(直径)となる。また、CCDラインセンサ3aによるボタンBの検出開始時点を「0」とする基準位置とした場合、搬送方向の座標が求まる。そして、CCDラインセンサ3aの出力の座標(ボタンBの搬送方向に対して直交する方向に配列されている受光素子の座標)とあわせて検出した位置を取得できる。   As shown in FIG. 16, since the button B moves on the transport surface Wa at a constant speed, a value obtained by multiplying time by the speed becomes a length (diameter) along the transport direction. In addition, when the detection start point of the button B by the CCD line sensor 3a is set to a reference position “0”, the coordinates in the transport direction can be obtained. Then, the detected position can be acquired together with the coordinates of the output of the CCD line sensor 3a (the coordinates of the light receiving elements arranged in the direction orthogonal to the direction in which the button B is conveyed).

つぎに、本実施形態の表裏判別装置における判別動作について、図17に示すフローチャートにより詳しく説明する。   Next, the discrimination operation in the front / back discrimination device of this embodiment will be described in detail with reference to the flowchart shown in FIG.

図17は本発明に係るボタンの表裏判別装置の実施形態におけるボタンの表裏判別動作の要部を示すフローチャートである。   FIG. 17 is a flowchart showing the main part of the button front / back discrimination operation in the embodiment of the button front / back discrimination apparatus according to the present invention.

本実施形態の表裏判別装置1による判別動作は、制御手段5のCPU14がメモリ15に記憶されているプログラムおよびデータに基づいて実行する。   The discrimination operation by the front / back discrimination device 1 of the present embodiment is executed by the CPU 14 of the control means 5 based on the program and data stored in the memory 15.

図17に示すように、本実施形態の表裏判別方法は、まず、S(ステップ、以下、同じ)51−S54において、ボタンBの検出を行う。このボタンBの検出は、斜光照明装置7による斜光照明を点灯(落射照明は消灯する。)してデータ読込(CCDラインセンサ3aが検出したデータ(出力)の受信)を行い、ボタン未検出(S52のN:CCDラインセンサ3aからの出力が「High」のまま)の場合には、落射照明装置8による落射照明を点灯(斜光照明は消灯)してデータ読込を行う。そして、ボタンBを検出(S52のYおよびS54のY)するまでS51−S54を繰り返す。なお、図17においては、CCDラインセンサを、単に、ラインセンサと記す。   As shown in FIG. 17, in the front / back discrimination method of the present embodiment, first, the button B is detected in S (step, hereinafter the same) 51-S54. The button B is detected by turning on the oblique illumination by the oblique illumination device 7 (the epi-illumination is turned off), reading the data (receiving the data (output) detected by the CCD line sensor 3a), and not detecting the button ( When the output from the N: CCD line sensor 3a in S52 is “High”), the epi-illumination by the epi-illumination device 8 is turned on (the oblique illumination is extinguished), and data is read. Then, S51 to S54 are repeated until the button B is detected (Y in S52 and Y in S54). In FIG. 17, the CCD line sensor is simply referred to as a line sensor.

ここで、落射照明を用いない場合には、図17の破線にて示すにように、斜光照明のみによりS51、S52をこの順に繰り返す(図17の破線矢印にて示すS52のN)。   Here, when epi-illumination is not used, S51 and S52 are repeated in this order only by oblique illumination, as indicated by a broken line in FIG. 17 (N in S52 indicated by a broken-line arrow in FIG. 17).

ついで、ボタンBを検出(S52のY、S54のY:CCDラインセンサ3aからの出力が「High」から変化)すると、S55において、検出開始時間T1をメモリ15の計測データ保持メモリ22に記憶する。また、検出回数Iと、以前の読込データをクリアする。   Next, when the button B is detected (Y in S52, Y in S54: the output from the CCD line sensor 3a changes from “High”), the detection start time T1 is stored in the measurement data holding memory 22 of the memory 15 in S55. . Also, the number of detections I and the previous read data are cleared.

ついで、S56において、斜光照明を点灯して斜光LaによるCCDラインセンサ3aが検出した斜光照明データ(図15参照)をメモリ15、詳しくは、ワークメモリ23に記憶し、斜光照明を消灯する。   Next, in S56, the oblique illumination is turned on and the oblique illumination data (see FIG. 15) detected by the CCD line sensor 3a by the oblique light La is stored in the memory 15, more specifically, the work memory 23, and the oblique illumination is turned off.

ついで、S57において、落射照明を点灯して落射光LbによるCCDラインセンサ3aが検出した落射照明データ(図15、図16参照)をメモリ15、詳しくは、ワークメモリ23に記憶し、落射照明を消灯する。   Next, in S57, the epi-illumination data (see FIGS. 15 and 16) detected by the CCD line sensor 3a by the epi-illumination Lb is turned on and stored in the memory 15, more specifically in the work memory 23, and the epi-illumination is performed. Turns off.

ついで、S58において、少なくとも斜光照明による斜影長さDRと、落射照明による左右外径陰影長さFRLおよびFRR(図15参照)と、落射照明による糸通し孔Baの孔位置の開始と終わりとなる第1立上がり位置FF1および第1立下がり位置FR1(図15参照)、落射照明による異なる糸通し孔Baの孔位置の開始と終わりとなる第2立上がり位置FF2および第2立下がり位置FR2(図15参照)のそれぞれを、検出回数Iをアドレスとしてメモリ15、詳しくは計測データ保持メモリ22に記憶する。なお、図15に示すように、糸通し孔Baは、最大2つが同時に検出され、3つ以上が同時に検出されることはない。但し、位置は異なる。   Next, in S58, at least the oblique length DR by oblique illumination, the left and right outer diameter shade lengths FRL and FRR (see FIG. 15) by epi-illumination, and the start and end of the hole position of the threading hole Ba by epi-illumination. The first rising position FF1 and the first falling position FR1 (see FIG. 15), the second rising position FF2 and the second falling position FR2 (FIG. 15), which are the start and end of the hole positions of different threading holes Ba due to epi-illumination. Each of the data is stored in the memory 15, more specifically in the measurement data holding memory 22, with the number of detections I as an address. In addition, as shown in FIG. 15, the threading hole Ba is detected at the maximum two at the same time, and three or more are not detected at the same time. However, the position is different.

ついで、S59において、ボタンBの検出を終了したか否かを判断し、終了しない(CCDラインセンサ3aからの出力が「High」に復帰しない:S59のN)場合には、S60に進行して検出回数Iに1を加算して、ボタンBの検出が終了するまでボタンBが所定距離移動する毎にS56−S60の処理を繰り返す。   Next, in S59, it is determined whether or not the detection of the button B is finished. If the button B is not finished (the output from the CCD line sensor 3a does not return to “High”: N in S59), the process proceeds to S60. Each time the button B moves a predetermined distance until the detection of the button B is completed, the process of S56-S60 is repeated until the detection count I is incremented by one.

前記ボタンBの検出を終了した(CCDラインセンサ3aからの出力が「High」に復帰:S59のY)場合には、S61に進行して、ボタンBの検出終了時間T2をメモリ15、詳しくはワークメモリ23に記憶して、検出時間T(T2−T1)を算出する。そして、検出時間Tに予め設定されているボタン搬送速度Vを乗算してボタンBの縦方向(ボタンBの搬送方向と平行で、CCDラインセンサ3aの長手方向に対して直交する方向:図15に示すボタンの上下方向)の外径FLを算出する。この外径FLは、縦方向の計測直径値(計測ボタンデータ)である。なお、S58におけるDR、FRL、FF1、FR1、FF2、FR2およびFRRは、いずれもガイド面Wbから表裏の判別に供するボタンBの横方向(CCDラインセンサ3aの長手方向に平行で、ボタンBの搬送方向に対して直交する方向:図15に示すボタンの左右方向)の長さである。   When the detection of the button B is completed (the output from the CCD line sensor 3a returns to “High”: Y in S59), the process proceeds to S61, where the detection end time T2 of the button B is stored in the memory 15, in detail. The detection time T (T2-T1) is calculated by storing in the work memory 23. Then, the detection time T is multiplied by a preset button transport speed V to multiply the button B in the vertical direction (a direction parallel to the button B transport direction and perpendicular to the longitudinal direction of the CCD line sensor 3a: FIG. The outer diameter FL in the vertical direction of the button shown in FIG. This outer diameter FL is a measured diameter value (measurement button data) in the vertical direction. Note that DR, FRL, FF1, FR1, FF2, FR2, and FRR in S58 are all in the lateral direction of the button B that is used to distinguish the front and back from the guide surface Wb (parallel to the longitudinal direction of the CCD line sensor 3a, The direction perpendicular to the transport direction: the length of the button shown in FIG.

ついで、S62において、斜光Laによる斜影長さDRの最大値MAX(DR(I))を求め、この最大値MAX(DR(I))から表裏の判別に供するボタンBの計測ボタンデータとなる斜影長さLS(LS=MAX(DR(I)))を求める。また、落射光Lbによる陰影長さFRの最大値MAX(FR(I))を求め、この最大値MAX(FR(I))から表裏の判別に供するボタンBの横方向の計測直径値(計測ボタン直径データ)となる陰影長さLD(LD=MAX(FRL(I)−FRR(I)))を求める(図15参照)。そして、斜影長さLSと陰影長さLDを求めたら、つぎのS63に進行する。   Next, in S62, the maximum value MAX (DR (I)) of the shadow length DR due to the oblique light La is obtained, and the shadow which becomes measurement button data of the button B used for front / back discrimination from the maximum value MAX (DR (I)). The length LS (LS = MAX (DR (I))) is obtained. Further, the maximum value MAX (FR (I)) of the shadow length FR by the incident light Lb is obtained, and the measured diameter value (measurement) in the horizontal direction of the button B used for front / back discrimination from the maximum value MAX (FR (I)). The shadow length LD (LD = MAX (FRL (I) −FRR (I))) as the button diameter data) is obtained (see FIG. 15). When the oblique length LS and the shade length LD are obtained, the process proceeds to S63.

ついで、S63において、ボタンBの横方向の外径である陰影長さLDと縦方向の外径FLとを比較して一致すれば(S63のY)、つぎのS64に進行する。また、比較結果が一致しない場合(S63のN)には、S67に進行してボタンBを排除する。このS63は、ボタンBがいびつであるか否かを判断する工程である。なお、ボタンBの排除は、ボタンBが規定値外であることをあらわす信号を制御手段5から図示しないミシン本体およびボタン供給装置の少なくとも一方の制御部に送出し、この信号を受けた制御部により実行されることになる。   Next, in S63, if the shadow length LD, which is the outer diameter in the horizontal direction of the button B, is compared with the outer diameter FL in the vertical direction (Y in S63), the process proceeds to the next S64. If the comparison results do not match (N in S63), the process proceeds to S67 and the button B is excluded. S63 is a step of determining whether or not the button B is distorted. In order to eliminate the button B, a signal indicating that the button B is outside the specified value is sent from the control means 5 to at least one control unit of the sewing machine main body and the button supply device (not shown), and the control unit receiving this signal Will be executed.

ついで、S64において、ボタンBの横方向の外径である陰影長さLDと基準データ保持メモリ22に記憶されている基準ボタン直径データである基準直径値F1、すなわちボタンBの直径Dとを比較して一致すれば(S64のY)、つぎのS65に進行する。また、比較結果が一致しない場合(S64のN)には、つぎのS67に進行してボタンBを排除する。   In step S64, the shadow length LD, which is the outer diameter of the button B in the horizontal direction, is compared with the reference diameter value F1, which is the reference button diameter data stored in the reference data holding memory 22, that is, the diameter D of the button B. If they match (Y in S64), the process proceeds to the next S65. If the comparison results do not match (N in S64), the process proceeds to S67 and the button B is excluded.

なお、縦方向の外径FLと横方向の外径LDとによりボタンBの中心の位置を判別することができる。また、立ち下がり位置および数から糸通し孔Baの孔数、孔ピッチを検出し、基準孔データと比較することにより、孔数、孔ピッチを判別することができる。また、検出した斜光照明データを基準データ保持メモリ21に予め記憶した基準となる斜光照明データと比較したり、検出した射光照明データを基準データ保持メモリ21に予め記憶した基準となる落射照明データと比較したりすることにより、ボタンBの外周の欠損の判別を行うこともできる。なお、糸通し孔Baの孔位置および孔径を判別することもできる。また、糸通し孔Baの孔位置を判別した場合、ボタンBの孔位置の位置合わせを行うための角度信号が、位置合わせ装置20に対して直接的あるいはミシン制御部を介して間接的に送出される。そして、位置合わせ装置20は、角度信号に応じてボタンBの孔位置を決定するように駆動することになる。   The center position of the button B can be determined from the outer diameter FL in the vertical direction and the outer diameter LD in the horizontal direction. Further, the number of holes and the hole pitch can be determined by detecting the number of holes and the hole pitch of the threading hole Ba from the falling position and the number and comparing with the reference hole data. Further, the detected oblique illumination data is compared with the reference oblique illumination data stored in the reference data holding memory 21 in advance, or the detected incident illumination data is stored in the reference data holding memory 21 as the reference incident illumination data. It is also possible to determine the lack of the outer periphery of the button B by comparison. The hole position and hole diameter of the threading hole Ba can also be determined. When the hole position of the threading hole Ba is determined, an angle signal for aligning the hole position of the button B is sent directly to the alignment device 20 or indirectly via the sewing machine control unit. Is done. Then, the alignment device 20 is driven so as to determine the hole position of the button B according to the angle signal.

ついで、S65において、ボタンBの表裏の判別を実行する。すなわち、ボタンBの斜影長さLSと基準データ保持メモリ22に記憶されている基準ボタンデータとを比較して一致すれば(S65のY)、ボタンBの表裏を「表」と判別し、つぎのS66に進行する。   Next, in S65, the front / back discrimination of the button B is executed. That is, if the bevel length LS of the button B and the reference button data stored in the reference data holding memory 22 are compared and matched (Y in S65), the front and back of the button B are determined as “front”. The process proceeds to S66.

具体的には、取得した斜影長LSを基準ボタンデータのうちのFデータ(斜影長さLSF)と比較して一致すれば、ボタンBの表裏を「表」と判別する。そして、ボタンBが「表」であることをあらわす信号を制御手段5から図示しないミシン本体およびボタン供給装置の少なくとも一方の制御部に送出し、この信号を受けた制御部によりミシン本体へのボタンBの搬送が実行されることになる。   Specifically, if the acquired oblique length LS is compared with the F data (shaded length LSF) of the reference button data, the front and back of the button B are determined as “front”. Then, a signal indicating that the button B is “table” is sent from the control means 5 to at least one control unit of the sewing machine main body and the button supply device (not shown), and a button to the sewing machine main body is received by the control unit receiving this signal. The conveyance of B is executed.

前記S65における比較結果が一致しない場合(S65のN)には、つぎのS67に進行してボタンBを排除する。   If the comparison result in S65 does not match (N in S65), the process proceeds to the next S67 and the button B is excluded.

前記S66におけるボタンBの判別およびS67におけるボタンBの排除により、ボタンBの選別が終了する。そして、ボタンBの選別が終了すると、S51に戻って、つぎのボタンBの判別と選別を開始することになる。   The selection of the button B is completed by determining the button B in S66 and eliminating the button B in S67. When the selection of the button B is completed, the process returns to S51 to start the discrimination and selection of the next button B.

このような構成からなる本実施形態の表裏判別装置1によれば、載置面としての搬送面Waは、ボタンBを容易かつ確実に載置することができる。そして、斜光照明装置7は、搬送面Waに載置されたボタンBに斜光Laを容易かつ確実に照射することができる。そして、イメージセンサ3としてのCCDラインセンサ3aは、斜光Laによってボタン直下に形成される影の投影を電気信号に変換して出力することができる。さらに、検出手段16および検出レベル設定手段19は、CCDラインセンサ3aからの出力電圧を斜光照明装置4からのCCDラインセンサ3aの各受光素子の距離に応じて斬減するように設定した検出レベルと比較することによりボタンBの影を検出するから、ボタンBの透過性の有無にかかわらず、斜光Laによりボタン直下の搬送面上に形成されるボタンBの斜影を容易かつ確実に検出することができる。そして、ボタンBの外周縁の断面形状が異なりさえすれば、検出されたボタンBの斜影長さLSがボタンBの表裏によって異なるので、制御手段5は、ボタンBの透過性の有無にかかわらず、検出したボタンBの斜影長さLSに基づいてボタンBの表裏を確実活容易に判別することができる。   According to the front / back discrimination device 1 of the present embodiment having such a configuration, the button B can be easily and reliably placed on the transport surface Wa as the placement surface. The oblique illumination device 7 can easily and reliably irradiate the oblique light La to the button B placed on the transport surface Wa. The CCD line sensor 3a as the image sensor 3 can convert the projection of the shadow formed immediately below the button by the oblique light La into an electrical signal and output it. Further, the detection means 16 and the detection level setting means 19 are detection levels set so as to reduce the output voltage from the CCD line sensor 3a according to the distance of each light receiving element of the CCD line sensor 3a from the oblique illumination device 4. Since the shadow of the button B is detected by comparing with the button B, the oblique shadow of the button B formed on the transport surface immediately below the button can be easily and reliably detected by the oblique light La regardless of whether the button B is transparent. Can do. Then, as long as the cross-sectional shape of the outer periphery of the button B is different, the detected shading length LS of the button B varies depending on the front and back of the button B. Therefore, the control means 5 does not matter whether the button B is transparent or not. The front and back of the button B can be reliably and easily determined based on the detected oblique length LS of the button B.

したがって、本実施形態の表裏判別装置1によれば、ボタンBの透過性の有無にかかわらず、片面が凹面となっていないボタンB、あるいは、ボタンBの両面に刻印や画像が全くないボタンBであっても、ボタンBの外周縁の断面形状が異なりさえすれば、斜光Laによってボタン直下の搬送面上に形成される斜影長さLSがボタンBの表裏によって異なるので、このボタンBの斜影長さLSに基づいてボタンBの表裏を確実かつ容易に判別することができる。   Therefore, according to the front / back discrimination device 1 of the present embodiment, regardless of whether the button B is transparent, the button B is not concave on one side, or the button B has no markings or images on both sides of the button B. However, as long as the cross-sectional shape of the outer peripheral edge of the button B is different, the oblique length LS formed on the conveying surface immediately below the button by the oblique light La differs depending on the front and back of the button B. The front and back of the button B can be reliably and easily determined based on the length LS.

さらに、本実施形態の表裏判別装置1によれば、ガイド面Wbは、ボタンBが搬送経路に沿って搬送される際に、ボタンBの外周の一端がガイド面Wbに接しつつ搬送されるように搬送経路の搬送方向であるボタン搬送方向に沿うように形成され、制御手段5は、ボタンBが搬送面上をボタン搬送方向に沿って搬送されて搬送面Waの検査位置IPを通過する際に、検出手段16で検出した斜影長さLSの最大値に基づいて、ボタンBの表裏を判別するように形成されているから、ボタンBの搬送を中断することなく、表裏の判別を行うことができるので、ボタンBの表裏の判別を自動的かつ効率よく行うことができる。また、ボタンのB外周の一端がガイド面Wbに接しつつ搬送面上を搬送されるので、ボタンBの搬送経路を容易に確立することができるとともに、イメージセンサ3から出力される出力電圧のパターンの基準位置、すなわち、検出手段16により検出される斜影長さLSの基準位置を容易に確立することができる。   Furthermore, according to the front / back discrimination device 1 of the present embodiment, when the button B is transported along the transport path, the guide surface Wb is transported while one end of the outer periphery of the button B is in contact with the guide surface Wb. The control means 5 is formed so that the button B is transported on the transport surface along the button transport direction and passes the inspection position IP of the transport surface Wa. In addition, since the front and back of the button B are discriminated based on the maximum value of the oblique length LS detected by the detecting means 16, the front and back can be discriminated without interrupting the transportation of the button B. Therefore, the front / back discrimination of the button B can be performed automatically and efficiently. Further, since one end of the outer periphery of the button B is transported on the transport surface while being in contact with the guide surface Wb, the transport path of the button B can be easily established and the pattern of the output voltage output from the image sensor 3 That is, the reference position of the oblique length LS detected by the detection means 16 can be easily established.

また、本実施形態の表裏判別装置1によれば、ボタン直下の搬送面Wa上に斜光照明装置7による斜光の照射方向に向かって形成される斜影長さLSに基づいて、ボタンBの表裏を判定しているから、ボタンBの搬送面上に斜影の形成のためのスペースを設ける必要がなく、斜光照明の照射方向と反対側のボタンBの直下より外側に形成される斜影の長さに基づいて表裏を判定する場合と比較して、ボタンBの搬送面の幅を小さくすることができ、ボタンBの搬送経路をよりコンパクトに構成することができる。   Further, according to the front / back discrimination device 1 of the present embodiment, the front / back side of the button B is determined based on the oblique length LS formed in the oblique light irradiation direction by the oblique illumination device 7 on the transport surface Wa immediately below the button. Since it is determined, it is not necessary to provide a space for forming a bevel on the transport surface of the button B, and the length of the bevel formed on the outer side directly below the button B on the side opposite to the irradiation direction of the oblique illumination. Compared with the case where the front and back sides are determined based on this, the width of the transport surface of the button B can be reduced, and the transport path of the button B can be configured more compactly.

なお、本発明は、前述した実施形態に限定されるものではなく、必要に応じて種々の変更が可能である。例えば、上記実施形態では、ボタンBのガイド面WbをボタンBの搬送方向に沿うように構成しているが、ボタンBの表裏判定時にボタンBの搬送面上にボタンBの搬送方向と直交するように上昇立設されるガイド面を有するガイド機構を設け、表裏判定時にこのガイド面にボタンBを当接させてボタンBの搬送を一旦停止させて表裏を判定し、表裏の判定結果が「表」である場合は、ガイド面を搬送面下方に下降させてボタンBを搬送可能とし、判定結果が「裏」である場合は、ガイド面の面方向が搬送方向に向かって若干傾くようにガイド機構を回転させてボタンBが搬送経路から離脱するように構成してもよい。   In addition, this invention is not limited to embodiment mentioned above, A various change is possible as needed. For example, in the above-described embodiment, the guide surface Wb of the button B is configured so as to be along the transport direction of the button B. However, when the front and back of the button B are determined, the guide surface Wb is orthogonal to the transport direction of the button B on the transport surface of the button B. A guide mechanism having a guide surface that is erected upside down is provided, and at the time of front / back determination, the button B is brought into contact with the guide surface to stop the conveyance of the button B, and the front / back determination is made. If it is “front”, the button B can be transported by lowering the guide surface below the transport surface. If the determination result is “back”, the surface direction of the guide surface is slightly inclined toward the transport direction. You may comprise so that the button B may detach | leave from a conveyance path | route by rotating a guide mechanism.

1 表裏判別装置
2 照明装置
3 イメージセンサ
3a CCDラインセンサ
4 操作パネル
4a 表示部
4b 入力部
5 制御手段
7 斜光照明装置
8 落射照明装置
7a、8a ライトボックス
7b、8b 発光面
14 CPU
15 メモリ
16 検出手段
19 検出レベル設定手段
21 基準データ保持メモリ
22 計測データ保持メモリ
24 データ処理部
25 動作制御部
B ボタン
Ba 糸通し孔
R (ボタンの外周縁の半円状の)丸み
Ra (小さい)丸み
Rb (大きい)丸み
PL (検出レベル設定値としての)検出基準電圧
PLa (斜光照明による)検出基準電圧
PLb (落射照明による)検出基準電圧
D (ボタンの)直径
IP 検査位置
L (CCDラインセンサの)長さ
La 斜光
Lb 落射光
LS 斜影長さ
LSF (表面が上向きのときの)斜影長さ
LSR (裏面が上向きのときの)斜影長さ
LD 陰影長さ
W ボタン搬送路
Wa 搬送面
Wb ガイド面
DESCRIPTION OF SYMBOLS 1 Front / back discrimination apparatus 2 Illumination apparatus 3 Image sensor 3a CCD line sensor 4 Operation panel 4a Display part 4b Input part 5 Control means 7 Oblique illumination apparatus 8 Epi-illumination apparatus 7a, 8a Light box 7b, 8b Light emission surface 14 CPU
DESCRIPTION OF SYMBOLS 15 Memory 16 Detection means 19 Detection level setting means 21 Reference data holding memory 22 Measurement data holding memory 24 Data processing part 25 Operation control part B Button Ba Threading hole R (Semicircle shape of the outer periphery of a button) Ra (Small) ) Round Rb (Large) Round PL Detection reference voltage (as detection level set value) PLa Detection reference voltage PLa (with oblique illumination) Detection reference voltage Db (With epi-illumination) D (button) diameter IP Inspection position L (CCD line) Sensor length La Slope Lb Incident light LS Slope length LSF Slope length LSF (when the front side is facing up) LSR Slope length (when the back side is facing up) LD Shade length W Button transport path Wa Transport surface Wb Guide surface

Claims (1)

縫製物に縫い付けられるボタンの表裏を判別するボタンの表裏判別装置において、
ボタンが載置される載置面と、
前記載置面に斜光を照射する斜光照明装置と、
前記斜光が前記載置面に照射された際に、ボタン直下の前記載置面上に形成されるボタンの影が投影されるように、複数の受光素子が配列されて前記載置面に埋設されたイメージセンサと、
前記イメージセンサの出力電圧を所定の検出レベルと比較することにより、ボタンの影を検出する検出手段と、
前記検出レベルを、前記斜光照明装置からの前記イメージセンサの各受光素子の距離に応じて斬減するように設定する検出レベル設定手段と、
前記斜光を照射した際に、前記検出手段で検出されたボタンの影の長さに基づいてボタンの表裏を判別する制御手段とを備えたことを特徴とするボタンの表裏判別装置。
In the button front / back discriminating device for discriminating the front / back side of the button sewn on the sewing product,
A mounting surface on which the button is mounted;
An oblique illumination device for illuminating oblique light on the mounting surface;
A plurality of light receiving elements are arranged and embedded in the mounting surface so that a shadow of the button formed on the mounting surface immediately below the button is projected when the oblique light is irradiated onto the mounting surface. Image sensor
Detecting means for detecting a shadow of the button by comparing the output voltage of the image sensor with a predetermined detection level;
Detection level setting means for setting the detection level to be reduced according to the distance of each light receiving element of the image sensor from the oblique illumination device;
A button front / back discriminating apparatus comprising: a control unit that discriminates the front / back side of the button based on the shadow length of the button detected by the detection unit when the oblique light is irradiated.
JP2009074020A 2009-03-25 2009-03-25 Button front / back discrimination device Expired - Fee Related JP5289129B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009074020A JP5289129B2 (en) 2009-03-25 2009-03-25 Button front / back discrimination device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009074020A JP5289129B2 (en) 2009-03-25 2009-03-25 Button front / back discrimination device

Publications (2)

Publication Number Publication Date
JP2010220945A true JP2010220945A (en) 2010-10-07
JP5289129B2 JP5289129B2 (en) 2013-09-11

Family

ID=43038776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009074020A Expired - Fee Related JP5289129B2 (en) 2009-03-25 2009-03-25 Button front / back discrimination device

Country Status (1)

Country Link
JP (1) JP5289129B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014066649A (en) * 2012-09-26 2014-04-17 Teraoka Seiko Co Ltd Dimensional measuring device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6120842A (en) * 1984-07-10 1986-01-29 Nippon Kinzoku Kk Discriminating method of burr direction of press punched article
JPS63212393A (en) * 1987-02-27 1988-09-05 ジューキ株式会社 Apparatus for stitch direction of button
JPH03103285A (en) * 1989-09-18 1991-04-30 Juki Corp Button supplying device
JPH05225315A (en) * 1992-02-07 1993-09-03 Juki Corp External shape recognition device for object to be worked
JPH05285289A (en) * 1992-04-08 1993-11-02 Juki Corp Cloth end detecting device
JPH06335583A (en) * 1993-05-27 1994-12-06 Juki Corp Cloth end position measuring instrument for sewing machine
JPH0739667A (en) * 1993-07-27 1995-02-10 Brother Ind Ltd Thread tension device for sewing machine
JPH07128018A (en) * 1993-11-08 1995-05-19 Uchiyama Mfg Corp Binarization method
JPH09239169A (en) * 1996-03-07 1997-09-16 Kazumi Akatsu Automatic button feed device for fitting machine of button for sewing
JPH10194435A (en) * 1997-01-16 1998-07-28 Juki Corp Button selecting device
JP2000247429A (en) * 1999-03-02 2000-09-12 Juki Corp Button supply device
JP2001280935A (en) * 2000-03-31 2001-10-10 Matsushita Electric Ind Co Ltd Method and device for optical inspection
JP2010078562A (en) * 2008-09-29 2010-04-08 Juki Corp Device and method for recognizing buttons

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6120842A (en) * 1984-07-10 1986-01-29 Nippon Kinzoku Kk Discriminating method of burr direction of press punched article
JPS63212393A (en) * 1987-02-27 1988-09-05 ジューキ株式会社 Apparatus for stitch direction of button
JPH03103285A (en) * 1989-09-18 1991-04-30 Juki Corp Button supplying device
JPH05225315A (en) * 1992-02-07 1993-09-03 Juki Corp External shape recognition device for object to be worked
JPH05285289A (en) * 1992-04-08 1993-11-02 Juki Corp Cloth end detecting device
JPH06335583A (en) * 1993-05-27 1994-12-06 Juki Corp Cloth end position measuring instrument for sewing machine
JPH0739667A (en) * 1993-07-27 1995-02-10 Brother Ind Ltd Thread tension device for sewing machine
JPH07128018A (en) * 1993-11-08 1995-05-19 Uchiyama Mfg Corp Binarization method
JPH09239169A (en) * 1996-03-07 1997-09-16 Kazumi Akatsu Automatic button feed device for fitting machine of button for sewing
JPH10194435A (en) * 1997-01-16 1998-07-28 Juki Corp Button selecting device
JP2000247429A (en) * 1999-03-02 2000-09-12 Juki Corp Button supply device
JP2001280935A (en) * 2000-03-31 2001-10-10 Matsushita Electric Ind Co Ltd Method and device for optical inspection
JP2010078562A (en) * 2008-09-29 2010-04-08 Juki Corp Device and method for recognizing buttons

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014066649A (en) * 2012-09-26 2014-04-17 Teraoka Seiko Co Ltd Dimensional measuring device

Also Published As

Publication number Publication date
JP5289129B2 (en) 2013-09-11

Similar Documents

Publication Publication Date Title
JP4389982B2 (en) Substrate visual inspection device
JP5817401B2 (en) Game machine
JP5367509B2 (en) Photodetection device and paper sheet processing apparatus provided with the photodetection device
WO2018088423A1 (en) Optical inspection device
JP4713279B2 (en) Illumination device and visual inspection apparatus equipped with the same
TW200842347A (en) Pattern checking device and pattern checking mehtod
JP2009115613A (en) Foreign matter inspecting apparatus
JP5289129B2 (en) Button front / back discrimination device
JP2011078922A (en) Plastic pellet sorter
JP5438301B2 (en) Button front / back determination method and button front / back determination apparatus
JP5289102B2 (en) Button front / back discrimination method and button front / back discrimination device
JP2005183148A (en) Lighting system and sorting system
JP2005214720A (en) Surface inspection device and surface inspection method
JP2020159879A (en) Inspection method and inspection system
JP6128730B2 (en) Granule inspection device
JP2016062161A (en) Coin processor
KR101015808B1 (en) Apparatus and method for measuring line width of bonding electrode
JP5531253B2 (en) Inspection system
WO2020184530A1 (en) Inspection device
JP2004117103A (en) Label tear inspection device of vessel
JP4030570B2 (en) Image processing light irradiation apparatus and image processing light irradiation method
KR20170004576A (en) auto conveying type vision inspection device for a harness
JP2015145817A (en) Optical inspection apparatus and box making apparatus
JP7511875B2 (en) Inspection Equipment
CN218963341U (en) Appearance inspection intelligent vision control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130426

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130604

R150 Certificate of patent or registration of utility model

Ref document number: 5289129

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees