Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2913595B2 - Method of manufacturing detection switch and detection switch - Google Patents
[go: Go Back, main page]

JP2913595B2 - Method of manufacturing detection switch and detection switch - Google Patents

Method of manufacturing detection switch and detection switch

Info

Publication number
JP2913595B2
JP2913595B2 JP18596493A JP18596493A JP2913595B2 JP 2913595 B2 JP2913595 B2 JP 2913595B2 JP 18596493 A JP18596493 A JP 18596493A JP 18596493 A JP18596493 A JP 18596493A JP 2913595 B2 JP2913595 B2 JP 2913595B2
Authority
JP
Japan
Prior art keywords
detection
level
microcomputer
output
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP18596493A
Other languages
Japanese (ja)
Other versions
JPH0745167A (en
Inventor
貞雄 野田
健司 松尾
悟 市村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SANKUSU KK
Original Assignee
SANKUSU KK
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 SANKUSU KK filed Critical SANKUSU KK
Priority to JP18596493A priority Critical patent/JP2913595B2/en
Publication of JPH0745167A publication Critical patent/JPH0745167A/en
Application granted granted Critical
Publication of JP2913595B2 publication Critical patent/JP2913595B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Switches Operated By Changes In Physical Conditions (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、被検出物体が存在する
状態で検出手段から出力される物体検出信号に応じて、
設定された出力モードに従った出力信号を制御手段によ
り出力するようにした検出スイッチに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object detection signal output from detection means in the presence of an object to be detected.
About detection switch so as to output the control means set the output signal in accordance with the output mode.

【0002】[0002]

【従来の技術】検出スイッチの一種である光電スイッチ
においては、投光器と受光器との組み合わせにより構成
され、受光器の検出に応じた物体検出信号を出力信号と
して出力する機能が設けられている。このような検出ス
イッチには、検出対象や設置条件等に対応して、種々の
切換機能や調整機能が必要に応じて設けられたものがあ
る。
2. Description of the Related Art A photoelectric switch, which is a kind of a detection switch, is constituted by a combination of a light emitter and a light receiver, and has a function of outputting an object detection signal corresponding to the detection of the light receiver as an output signal. Some of such detection switches are provided with various switching functions and adjustment functions as necessary according to the detection target, installation conditions, and the like.

【0003】例えば、切換機能としては、検出出力モー
ドの切換機能、検出出力遅延モードの切換機能、外部同
期モードの切換機能あるいは投光周波数の切換機能等が
あり、調整機能としては、検出感度調整機能、検出ヒス
テリシス調整機能、検出出力遅延時間調整機能あるいは
検出感度微調整機能等があり、検出スイッチ本体にこれ
らの切換や調整が可能となるようにスイッチや調整器が
設けられた構成となっている。
For example, the switching function includes a switching function of a detection output mode, a switching function of a detection output delay mode, a switching function of an external synchronization mode, and a switching function of a projection frequency. It has a function, a detection hysteresis adjustment function, a detection output delay time adjustment function, a detection sensitivity fine adjustment function, etc., and a switch and an adjuster are provided on the detection switch body so that these can be switched and adjusted. I have.

【0004】[0004]

【発明が解決しようとする課題】ところで、光電スイッ
チなどの検出スイッチは、その設置場所や環境に対応し
て適切な位置に配置することができるように、できるだ
け小形のものに形成されていることが要求される。した
がって、本体ケースには必要最小限のスイッチ類や調整
用の可変抵抗器等の配設スペースを設けて構成されてい
る。
By the way, the detection switch such as the photoelectric switch is formed as small as possible so that it can be arranged at an appropriate position in accordance with the installation place and environment. Is required. Accordingly, the main body case is provided with a space for disposing minimum necessary switches and variable resistors for adjustment.

【0005】一方、このように光電スイッチにおいて
は、例えば切換機能に対応して切換スイッチを配設し、
調整機能に対応して可変抵抗器などを設ける構成として
いるので、上述のような切換機能や調整機能のうちの必
要とされる種々の機能を設けるために、本体ケースを製
造する上では、次のような不具合が生じていた。
On the other hand, in the photoelectric switch as described above, for example, a changeover switch is provided corresponding to a changeover function.
Since a variable resistor or the like is provided corresponding to the adjustment function, the following functions are required for manufacturing the main body case in order to provide various functions required of the switching function and the adjustment function as described above. The following problems have occurred.

【0006】すなわち、例えば、切換機能および調整機
能のうちから2種類の機能を設けるように構成する場合
には、本体ケースに切換スイッチを設けるかあるいは可
変抵抗器を設けるかによって、切換スイッチ2個,可変
抵抗器2個あるいは切換スイッチ1個と可変抵抗器1個
といった3種類の態様が考えられる。従って、本体ケー
スには切換スイッチや可変抵抗器を配設するための構造
を設けて作製する必要上から3種類の本体ケースを製作
する必要があるので、製作コストやそれらの管理コスト
が上昇することに加えて、組み立て時に本体ケースに取
り付ける切換スイッチおよび可変抵抗器を製品に応じて
区別する必要があるため、作業性の低下も発生するとい
う不具合がある。
That is, for example, when two kinds of functions are provided from the switching function and the adjusting function, two switching switches are provided depending on whether a switching switch or a variable resistor is provided in the main body case. , Two variable resistors, or one changeover switch and one variable resistor. Therefore, since it is necessary to manufacture the main body case by providing a structure for disposing the changeover switch and the variable resistor, it is necessary to manufacture three types of main body cases, which increases the manufacturing cost and the management cost thereof. In addition, since it is necessary to distinguish the changeover switch and the variable resistor attached to the main body case at the time of assembling according to the product, there is a problem that the workability is reduced.

【0007】このような不具合を解決すべく、例えば、
本体ケースに、あらかじめ2個の切換スイッチと2個の
可変抵抗器を設けるためのスペースを設けておき、製作
時には、その光電スイッチに必要とされるスイッチある
いは可変抵抗器のみを配設し、使用しない部分にはカバ
ーなどにより覆って隠すようにして構成することが考え
られる。
To solve such a problem, for example,
A space is provided in the body case in advance to provide two changeover switches and two variable resistors, and at the time of manufacture, only switches or variable resistors required for the photoelectric switch are provided and used. It is conceivable to cover and hide portions not to be covered with a cover or the like.

【0008】これにより、種々の機能を持たせるために
複数種類の本体ケースを個々に製作することなく、共通
化された1種類の本体ケースで済ますことができるよう
になるものである。しかしながら、この場合には、使用
しないスイッチあるいは可変抵抗器のスペースまで設け
る必要があるため、本体ケースに無駄なスペースが生じ
て全体の小形化が図れなくなるという不具合がある。
Thus, a single type of main body case can be used without having to individually manufacture a plurality of types of main body cases to have various functions. However, in this case, it is necessary to provide a space for a switch or a variable resistor that is not used. Therefore, there is a problem that a useless space is generated in the main body case and the entire device cannot be reduced in size.

【0009】また、このような事情は、2種類の機能を
設ける場合だけではなく、1種類の機能を設ける場合で
も生じることであるし、3種類以上の機能を設ける場合
でも同様に発生することであり、つまり、設けようとす
る機能が増加するに従って製作すべき本体ケースの種類
が増加してしまうという状況にある。
Further, such a situation occurs not only when two types of functions are provided but also when one type of function is provided, and similarly when three or more types of functions are provided. That is, there is a situation where the types of main body cases to be manufactured increase as the functions to be provided increase.

【0010】本発明は、上記事情に鑑みてなされたもの
で、その目的は、動作条件等の設定のための種々の切換
機能や調整機能を有する構成とする場合に、小形化を図
る構成としながら、しかもそのそれぞれの構成に対応し
て複数の本体ケースを作製する必要がなく、全体として
製作コストの低減および管理コストの低減を図ると共
に、組み立て時の作業性の向上も図り得る検出スイッチ
を提供するにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has as its object to reduce the size of a device when it has various switching and adjustment functions for setting operating conditions and the like. while, moreover there is no need to prepare a plurality of the main body case in correspondence with the respective configuration, reduce the reduction and management costs fabrication overall cost, workability also detection obtained Ru aim improved during assembly To provide the switch.

【0011】[0011]

【課題を解決するための手段】本発明の検出スイッチ
は、本体ケースを備え、その本体ケースに被検出物体が
存在する状態で検出手段から出力される物体検出信号に
基づいて検出動作を行う制御手段を備えている検出スイ
ッチを対象とするものであり、 前記本体ケースに外部か
ら操作可能に複数個の可変抵抗器を設け、 前記制御手段
は、前記複数個の可変抵抗器のそれぞれに対して、その
可変抵抗器の抵抗値に基づく入力信号のレベルが所定範
囲内にあるか否かに応じて検出動作を切り換える切換機
能およびその可変抵抗器の抵抗値に基づく入力信号のレ
ベルに応じて検出動作を調整する調整機能のいずれかを
選択設定するように構成されているところに特徴を有す
る。また、本発明の検出スイッチは、被検出物体が存在
する状態で検出手段から出力さえる物体検出信号に基づ
いて検出動作を行う制御手段を有する検出スイッチにお
いて、本体ケースに外部から操作可能に複数個の可変抵
抗器を設け、前記制御手段は、前記複数個の可変抵抗器
のうちの少なくとも一つに対してその可変抵抗器の抵抗
値に基づく入力信号のレベルが所定範囲内にあるか否か
に応じて検出動作を切り換える切換機能を選択設定し、
この切換機能を設定しないものについてはその可変抵抗
器の抵抗値に基づく入力信号のレベルに応じて検出動作
を調整する調整機能を選択設定するように構成されてい
るところに特徴を有する。さらに、本発明の検出スイッ
チは、被検出物体が存在する状態で検出手段から出力さ
れる物体検出信号に基づいて検出動作を行う制御手段を
有する検出スイッチにおいて、本体ケースに外部から操
作可能に複数個の可変抵抗器を設け、前記制御手段は、
前記複数個の可変抵抗器のうちの少なくとも一つに対し
その可変抵抗器の抵抗値に基づく入力信号のレベルが
所定範囲内にあるか否かに応じて検出動作を切り換える
切換機能およびその可変抵抗器の抵抗値に基づく入力信
号のレベルに応じて検出動作を調整する調整機能の両者
を備えるように選択設定し、残りの可変抵抗器について
は前記切換機能あるいは調整機能のいずれか一方を選択
設定するように構成されているところに特徴を有する。
A detection switch according to the present invention .
Has a main body case, and the detected object is in the main body case.
The object detection signal output from the detection means in the presence state
A detection switch having control means for performing a detection operation based on the
Switch, and the body case
A plurality of variable resistors operably provided from the control means
For each of the plurality of variable resistors,
The level of the input signal based on the resistance of the variable resistor
Switching device that switches the detection operation depending on whether it is within the enclosure
And the input signal level based on the resistance of the variable resistor.
One of the adjustment functions to adjust the detection operation according to the bell
It is characterized in that it is configured to select and set . Further, the detection switch of the present invention is a detection switch having a control means for performing a detection operation based on an object detection signal output from the detection means in a state where a detected object is present, wherein the variable resistor is provided, the control means, the variable resistor of resistance to at least one of said plurality of variable resistors
Selecting and setting a switching function for switching the detection operation according to whether the level of the input signal based on the value is within a predetermined range,
The feature that the switching function is not set is that the adjustment function for adjusting the detection operation is selectively set according to the level of the input signal based on the resistance value of the variable resistor. Further, the detection switch of the present invention is a detection switch having a control means for performing a detection operation based on an object detection signal output from the detection means in a state where the detected object is present, wherein Are provided, and the control means includes:
For at least one of the plurality of variable resistors, an input signal level based on a resistance value of the variable resistor is
It is selectively set so as to have both a switching function for switching the detection operation according to whether or not it is within a predetermined range and an adjustment function for adjusting the detection operation according to the level of the input signal based on the resistance value of the variable resistor. The remaining variable resistors are characterized in that one of the switching function and the adjustment function is selectively set.

【0012】本発明の検出スイッチによれば、可変抵抗
器が切換機能を有するように設けられる場合には、制御
手段に、その可変抵抗器の抵抗値に基づく入力信号のレ
ベルがあらかじめ設定されている範囲内にあるか否かで
検出動作を切り換える切換機能を有するように選択設定
し、可変抵抗器が調整機能を有するように設けられる場
合には、制御手段に、その可変抵抗器の抵抗値に基づく
入力信号のレベルに応じて検出動作を調整するように調
整機能を選択設定する。これによって、本体ケースに
は、設けようとする機能に応じて切換スイッチあるいは
調整器などを別途に設ける必要がなく、いずれの場合に
も可変抵抗器を取り付ける構成としておけば対応するも
のを製造することができるようになり、本体ケースを共
通化することができてコストダウンを図ることができる
と共に、外観上において可変抵抗器を複数個設ける同じ
形状の本体ケースとしながら、切換機能および調整機能
の設定個数が異なる複数種類のものを得ることができる
ようになる。また、本発明の検出スイッチは、2以上の
可変抵抗器を設ける構成としながら、その可変抵抗器に
よって切換機能を持たせたものを構成することができ、
この結果、本体ケースに切換機能を持たせるためのスイ
ッチ配設部分を設けた構成つする必要がなくなるので、
本体ケースを共用することができるようになる。さら
に、本発明の検出スイッチは、2以上の可変抵抗器を設
ける構成としながら、その可変抵抗器によって切換機能
および調整機能を兼ね備えた複合的な機能を備えたもの
を構成することができる。
According to the detection switch of the present invention, the variable resistor
Control, if the device is provided with a switching function
Means for input signal level based on the resistance of the variable resistor.
Depending on whether the bell is within a preset range
Selective setting to have a switching function to switch the detection operation
If the variable resistor is provided so as to have an adjustment function,
In the case, the control means, based on the resistance value of the variable resistor
Adjust so that the detection operation is adjusted according to the level of the input signal.
Select and set the adjustment function. By this, the main body case, manufacturing the need to provide and changeover switches or regulators separately without a corresponding if so constructed to mount the variable resistor in each case in accordance with the function of it is intended to create Can be used, the main body case can be shared, and the cost can be reduced.
At the same time, the same as providing multiple variable resistors in appearance
Switching function and adjustment function while keeping the main body case shaped
Can be obtained in different numbers . Further, the detection switch of the present invention can be configured to have a switching function by the variable resistor while providing two or more variable resistors,
As a result, there is no need to provide a switch arrangement portion for giving the switching function to the main body case,
The main body case can be shared. Furthermore, the detection switch of the present invention can be configured to have a composite function having both a switching function and an adjustment function by using the variable resistor, while having a configuration in which two or more variable resistors are provided.

【0013】[0013]

【実施例】以下、本発明を反射形の光電スイッチに適用
した場合の一実施例として、2つの可変抵抗器を設ける
場合に種々の機能を持つ光電スイッチの実施態様に対応
して図面を参照しながら説明する。図1および図2は本
実施例の基本構成を示すもので、光電スイッチ1の外観
を示す図1において、矩形状をなす本体ケース2には前
面部から投光用および受光用の光ファイバケーブル3,
4が導出されており、それらは1本にまとめて図示しな
い検出部分に配設されるようになっている。また、本体
ケース2の背面部からは電源ケーブルおよび信号出力ケ
ーブルなどがまとめられたケーブル5が導出されてい
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the following, as an embodiment in which the present invention is applied to a reflection type photoelectric switch, two variable resistors are provided.
The case will be described with reference to the drawings corresponding to the embodiments of the photoelectric switch having various functions . FIGS. 1 and 2 show the basic configuration of the present embodiment. In FIG. 1 showing the appearance of a photoelectric switch 1, an optical fiber cable for projecting light and receiving light from a front portion is provided in a main body case 2 having a rectangular shape. 3,
4 are led out, and they are collectively arranged in a detection part (not shown). A cable 5 in which a power cable, a signal output cable, and the like are grouped is led out from a rear portion of the main body case 2.

【0014】そして、本体ケース2の上面部2aには、
表示用のLED6,7が配設されると共に、第1および
第2の可変抵抗器8および9が配設されている。この上
面部2aには、表示素子6,7および可変抵抗器8,9
部分に対応する部分に開口部を設けた銘板10が取着さ
れる共に、上面部2a全体を覆うようにした透光性を有
するケースカバー11が取着されている。
On the upper surface 2a of the main body case 2,
LEDs 6 and 7 for display are provided, and first and second variable resistors 8 and 9 are provided. The display elements 6 and 7 and the variable resistors 8 and 9 are provided on the upper surface 2a.
A nameplate 10 provided with an opening at a portion corresponding to the portion is attached, and a light-transmitting case cover 11 covering the entire upper surface portion 2a is attached.

【0015】電気的構成を示す図2において、マイクロ
コンピュータ12は、内部にCPU,ROM,RAMお
よびA/D変換器等を含んで構成された所謂ワンチップ
マイコンであり、内部に検出動作を行うためのプログラ
ムが記憶されており、制御手段として機能するようにな
っている。
In FIG. 2 showing an electrical configuration, a microcomputer 12 is a so-called one-chip microcomputer including a CPU, a ROM, a RAM, an A / D converter, and the like, and internally performs a detection operation. Is stored, and functions as control means.

【0016】投光回路13は、図示極性のLED(発光
ダイオード)14,npn形のトランジスタ15および
抵抗16の直列回路から構成されており、直流電源端子
VD(例えば電源電圧が5Vであるとする)とアースと
の間に接続されている。そして、トランジスタ15のベ
ースはマイクロコンピュータ12の出力端子Aに接続さ
れている。
The light projecting circuit 13 is composed of a series circuit of an LED (light emitting diode) 14 having an illustrated polarity, an npn transistor 15 and a resistor 16, and a DC power supply terminal VD (for example, the power supply voltage is assumed to be 5V). ) And ground. The base of the transistor 15 is connected to the output terminal A of the microcomputer 12.

【0017】受光回路17は、フォトダイオード18と
抵抗19との直列回路から構成されており、直流電源端
子VDとアースとの間に接続されている。そして、フォ
トダイオード18と抵抗19との共通接続点は増幅回路
20を介してマイクロコンピュータ12の入力端子Bに
接続されている。出力用のnpn形トランジスタ21
は、オープンコレクタで使用されるもので、コレクタは
出力端子Pに接続され、エミッタはアースされ、ベース
はマイクロコンピュータ12の出力端子Cに接続されて
いる。
The light receiving circuit 17 is composed of a series circuit of a photodiode 18 and a resistor 19, and is connected between the DC power supply terminal VD and the ground. The common connection point between the photodiode 18 and the resistor 19 is connected to the input terminal B of the microcomputer 12 via the amplifier circuit 20. NPN transistor 21 for output
Are used as open collectors. The collector is connected to the output terminal P, the emitter is grounded, and the base is connected to the output terminal C of the microcomputer 12.

【0018】前述した第1および第2の可変抵抗器8お
よび9は、それぞれ一方の固定端子8a,9aが直流電
源端子VDに接続され、他方の固定端子8b,9bがア
ースされ、可変出力端子8c,9cがマイクロコンピュ
ータ12の入力端子DおよびEにそれぞれ接続されてい
る。そして、以上の電気的構成は本体ケース2内部に収
容されている。
The first and second variable resistors 8 and 9 each have one fixed terminal 8a, 9a connected to the DC power supply terminal VD, the other fixed terminal 8b, 9b grounded, and a variable output terminal. 8c and 9c are connected to input terminals D and E of the microcomputer 12, respectively. The above electrical configuration is housed inside the main body case 2.

【0019】さて、上述した基本構成において、マイク
ロコンピュータ12には次に示すような3つの態様のそ
れぞれに対応した機能を有するようにあらかじめプログ
ラムが記憶されており、以下、(1)第1の実施態様と
して第1および第2の可変抵抗器8,9を切換機能を有
するスイッチとして機能させる場合、(2)第2の実施
態様として第1および第2の可変抵抗器8,9をそれぞ
れ切換機能を有するスイッチおよび調整機能を有する調
整器として機能させる場合、(3)第3の実施態様とし
て第1および第2の可変抵抗器8,9を調整機能を有す
る調整器として機能させる場合とに分けて説明する。
In the basic configuration described above, a program is stored in the microcomputer 12 in advance so as to have functions corresponding to each of the following three modes. When the first and second variable resistors 8 and 9 function as switches having a switching function as an embodiment, (2) the first and second variable resistors 8 and 9 are switched as a second embodiment, respectively. (3) A third embodiment in which the first and second variable resistors 8 and 9 function as an adjuster having an adjusting function. I will explain separately.

【0020】(1)第1の実施態様 この実施態様においては、切換機能として、例えば検出
モードの切換機能と外部同期モードの切換機能とを有す
る構成とした場合について、図3ないし図5を参照して
説明する。検出モードの切換機能としては、ライトON
検出モードとダークON検出モードとの切換設定を行う
ものである。また、外部同期モードは、マイクロコンピ
ュータ12の入力端子Fに外部から与えられる外部同期
信号に基づいて検出動作を行うもので、その外部同期モ
ードの切換機能としては、期間同期モードと微分同期モ
ードとの切換設定を行うものである。
(1) First Embodiment In this embodiment, for example, a configuration having a switching function of a detection mode and a switching function of an external synchronization mode as the switching function is shown in FIGS. I will explain. As the detection mode switching function, light ON
The setting for switching between the detection mode and the dark ON detection mode is performed. In the external synchronization mode, a detection operation is performed based on an external synchronization signal externally applied to the input terminal F of the microcomputer 12, and the switching function of the external synchronization mode includes a period synchronization mode, a differential synchronization mode, and a period synchronization mode. Is set.

【0021】この場合、検出モードがライトON検出モ
ードに設定されたときには、入光検出で出力オン、非入
光時に出力オフとなり、検出モードがダークON検出モ
ードに設定されたときには、非入光時に出力オン、入光
検出で出力オフとなるように検出動作を行うもので、こ
のような機能は、設置する場所や検出物体の条件に応じ
て使用者に切り替え設定されるものである。
In this case, when the detection mode is set to the light ON detection mode, the output is turned on when light is detected, and the output is turned off when light is not detected. When the detection mode is set to the dark ON detection mode, the light is not detected. The detection operation is performed so that the output is sometimes turned on and the output is turned off when the light is detected. Such a function is switched and set by the user according to the installation location and the condition of the detected object.

【0022】また、外部同期モードの設定状態が期間同
期モードであるときには、外部同期信号が入力されてい
る期間中の入光検出を有効化し、微分同期モードである
ときには、外部同期信号が立ち上がる時点から所定時間
の入光検出を有効化するように検出動作を行うようにな
っている。
When the external synchronization mode is set to the period synchronization mode, light detection during the period when the external synchronization signal is being input is enabled. The detection operation is performed so as to enable the light detection for a predetermined time from.

【0023】この場合、期間同期モードとは、例えば、
別の光センサなどにより検出した検出対象の存在期間を
示す信号を同期信号として受け、その検出対象の存在状
態で検出対象に設けられたマークや物体等の存在の有無
を検出する検出動作を行おうとするものである。また、
微分同期モードとは、検出すべき物体の所定位置に来た
ことを別のセンサにより検出してその信号を同期信号と
して受け、その同期信号を受けたタイミングでその検出
対象の所定位置に設けられたマークや物体等の存在の有
無を検出する検出動作を行おうとするものである。
In this case, the period synchronization mode is, for example,
A signal indicating the existence period of the detection target detected by another optical sensor or the like is received as a synchronization signal, and a detection operation for detecting the presence or absence of a mark or an object provided on the detection target in the presence state of the detection target is performed. That's what I'm trying to do. Also,
Differential synchronization mode is a method in which the arrival at a predetermined position of an object to be detected is detected by another sensor, the signal is received as a synchronization signal, and provided at a predetermined position of the detection target at the timing of receiving the synchronization signal. It is intended to perform a detection operation for detecting the presence or absence of a mark, an object, or the like.

【0024】図3は第1および第2の可変抵抗器8およ
び9の操作ダイヤル22を示すもので、回転可能な角度
範囲0°から240°のうち、0°以上120°未満の
角度範囲を領域Aとし、120°以上240°以下の角
度範囲を領域Bとしている。この場合、第1の可変抵抗
器8は検出モードの切換用として、その操作ダイヤル2
2の領域AはライトON検出モードの設定領域に対応
し、領域BはダークON検出モードの設定領域に対応し
ており、第2の可変抵抗器9は外部同期モードの切換用
として、その操作ダイヤル22の領域Aは期間同期モー
ドの設定領域に対応し、領域Bは微分同期モードの設定
領域に対応するようになっている。
FIG. 3 shows the operation dials 22 of the first and second variable resistors 8 and 9, of which the rotatable angle range of 0 ° to 240 ° is an angle range of 0 ° or more and less than 120 °. An area A is defined as an area A, and an angle range between 120 ° and 240 ° is defined as an area B. In this case, the first variable resistor 8 is used for switching the detection mode,
The area A corresponds to the setting area of the light ON detection mode, the area B corresponds to the setting area of the dark ON detection mode, and the second variable resistor 9 is used for switching the external synchronization mode. The area A of the dial 22 corresponds to the setting area of the period synchronization mode, and the area B corresponds to the setting area of the differential synchronization mode.

【0025】次に、本実施態様の作用について、図4お
よび図5をも参照しながら述べる。まず、使用者により
第1および第2の可変抵抗器8および9の操作ダイヤル
22,22が所望の設定位置に回動操作されると、マイ
クロコンピュータ12の入力端子DおよびEにはその回
転角度に応じた電圧信号が可変出力端子8cあるいは9
cから入力されるようになる。
Next, the operation of the present embodiment will be described with reference to FIGS. First, when the user turns the operation dials 22 and 22 of the first and second variable resistors 8 and 9 to desired setting positions, the input terminals D and E of the microcomputer 12 have their rotation angles. Voltage signal corresponding to the variable output terminal 8c or 9
c.

【0026】この場合、直流電源電圧が5Vに設定され
ているので、各可変抵抗器8,9の回転角度が0°以上
120°未満の領域A内に設定されているときには0V
以上2.5V未満の電圧値となり、回転角度が120°
以上240°以下のの領域B内に設定されているときに
は2.5V以上5V以下の電圧値となる。
In this case, since the DC power supply voltage is set to 5 V, 0 V is set when the rotation angle of each of the variable resistors 8 and 9 is set within the range A of 0 ° or more and less than 120 °.
And a voltage value of less than 2.5 V and a rotation angle of 120 °
When it is set within the region B of not less than 240 ° and not more than 240 °, the voltage value is not less than 2.5V and not more than 5V.

【0027】マイクロコンピュータ12は、可変抵抗器
8および9から入力される0Vから5Vの範囲の電圧信
号を、内蔵されたA/D変換機能により8ビットの分解
能でA/D変換して、「0」から「255」までの範囲
のデジタル値として入力するようになっている。したが
って、可変抵抗器8,9の操作ダイヤル22,22が領
域A内に設定されているときには「0」から「127」
の範囲のデジタル値が入力され、領域B内に設定されて
いるときには「128」から「255」の範囲のデジタ
ル値が入力されることになる。
The microcomputer 12 A / D-converts a voltage signal in the range of 0 V to 5 V input from the variable resistors 8 and 9 with a built-in A / D conversion function at 8-bit resolution, and A digital value in a range from "0" to "255" is input. Therefore, when the operation dials 22, 22 of the variable resistors 8, 9 are set in the area A, the value changes from "0" to "127".
When the digital value is set in the area B, a digital value in a range from “128” to “255” is input.

【0028】さて、マイクロコンピュータ12は、図4
に示す検出プログラムをスタートすると、まず、ステッ
プA1にて設定ルーチンを実行して第1および第2の可
変抵抗器8,9により設定された検出モードおよび外部
同期モードの各設定動作を行うようになる。
Now, the microcomputer 12 will be described with reference to FIG.
When the detection program shown in (1) is started, first, a setting routine is executed in step A1 to perform each setting operation of the detection mode and the external synchronization mode set by the first and second variable resistors 8 and 9. Become.

【0029】この設定ルーチンA1は、図5に示すよう
なプログラムから構成されており、マイクロコンピュー
タ12は、ステップB1にて第1の可変抵抗器8から入
力端子Dに入力された電圧信号のデジタル値を入力し、
ステップB2にてそのデジタル値が「128」以上であ
るか否かを判断する。デジタル値が「0」から「12
7」の範囲つまり領域A内の値であるときには、マイク
ロコンピュータ12は、ステップB2で「NO」と判断
してステップB3に進み、ライトON検出モードの設定
を行う。また、デジタル値が「128」から「255」
の範囲つまり領域B内の値であるときには、マイクロコ
ンピュータ12は、ステップB2で「YES」と判断し
てステップB4に進み、ダークON検出モードの設定を
行う。
The setting routine A1 is constituted by a program as shown in FIG. 5, and the microcomputer 12 converts the digital signal of the voltage signal inputted from the first variable resistor 8 to the input terminal D in step B1. Enter a value,
At step B2, it is determined whether or not the digital value is "128" or more. The digital value changes from "0" to "12".
If the value is within the range of “7”, that is, the value within the area A, the microcomputer 12 determines “NO” in step B2 and proceeds to step B3 to set the light ON detection mode. Also, the digital value is changed from “128” to “255”.
Is within the range B, that is, the value in the area B, the microcomputer 12 determines “YES” in step B2 and proceeds to step B4 to set the dark ON detection mode.

【0030】この後、マイクロコンピュータ12は、ス
テップB5に進み、第2の可変抵抗器9から入力された
電圧信号のデジタル値を入力し、ステップB6にてその
デジタル値が「128」以上であるか否かを判断する。
デジタル値が「0」から「127」の範囲つまり領域A
内の値であるときには、マイクロコンピュータ12は、
ステップB6で「NO」と判断してステップB7に進
み、期間同期モードの設定を行う。また、デジタル値が
「128」から「255」の範囲つまり領域B内の値で
あるときには、マイクロコンピュータ12は、ステップ
B6で「YES」と判断してステップB8に進み、微分
同期モードの設定を行う。
Thereafter, the microcomputer 12 proceeds to step B5, inputs the digital value of the voltage signal input from the second variable resistor 9, and in step B6, the digital value is "128" or more. It is determined whether or not.
The digital value is in the range of “0” to “127”, that is, the area A
When the microcomputer 12 has the value of
In step B6, "NO" is determined, and the process proceeds to step B7 to set the period synchronization mode. When the digital value is in the range of “128” to “255”, that is, the value in the area B, the microcomputer 12 determines “YES” in step B6 and proceeds to step B8 to set the differential synchronization mode. Do.

【0031】ここで、上述の設定ルーチンにおいて、検
出モードがライトONモードに設定されると共に、外部
同期モードが期間同期モードに設定されている場合につ
いてまず説明する。
Here, the case where the detection mode is set to the light ON mode and the external synchronization mode is set to the period synchronization mode in the above setting routine will be described first.

【0032】すなわち、マイクロコンピュータ12は、
設定ルーチンのステップB8を終了すると、検出プログ
ラムにリターンしてステップA2に進み、投光動作を行
うようになる。この場合、マイクロコンピュータ12
は、投光動作として出力端子Aから1回分の投光パルス
を出力し、トランジスタ15をオンさせてLED14に
通電して点灯させる。これにより、検出エリアに向けて
パルス光が出力されるようになる。
That is, the microcomputer 12
When step B8 of the setting routine ends, the process returns to the detection program and proceeds to step A2, where the light projection operation is performed. In this case, the microcomputer 12
Outputs one light emission pulse from the output terminal A as a light emission operation, turns on the transistor 15 and energizes the LED 14 to light it. Thereby, the pulse light is output toward the detection area.

【0033】次に、マイクロコンピュータ12は、ステ
ップA3にて、検出エリア内からの反射光をフォトダイ
オード18により受光して増幅回路20にて増幅された
受光信号を入力端子Bから入力し、その受光信号をA/
D変換機能によりデジタル値に変換してCPUに入力す
るようになる。このとき、検出エリア内に例えば物体T
が存在する場合には、パルス光が物体Tにより反射さ
れ、そのときの反射光の強度に相当する受光信号がデジ
タル値に変換されて入力される。マイクロコンピュータ
12は、ステップA4に進むと、受光信号に相当するデ
ジタル値が基準レベルの値よりも大きいか否かを判定す
ることにより、物体の存在の有無を検出する。
Next, in step A3, the microcomputer 12 receives the reflected light from within the detection area by the photodiode 18 and inputs the received light signal amplified by the amplifier circuit 20 from the input terminal B. A / A
The data is converted into a digital value by the D conversion function and input to the CPU. At this time, for example, the object T
Exists, the pulse light is reflected by the object T, and a light receiving signal corresponding to the intensity of the reflected light at that time is converted into a digital value and input. When the microcomputer 12 proceeds to step A4, the microcomputer 12 determines whether the digital value corresponding to the light receiving signal is greater than the value of the reference level, thereby detecting the presence or absence of the object.

【0034】そして、マイクロコンピュータ12は、反
射光が入光していないときには、ステップA5に進み、
ここではダークON検出モードの設定状態ではないから
「NO」と判断してステップA6に進んで出力オフつま
り出力停止状態を保持してステップA1に戻るようにな
る。
When the reflected light is not incident, the microcomputer 12 proceeds to step A5,
Here, since it is not the setting state of the dark ON detection mode, it is determined to be "NO", and the process proceeds to step A6, where the output is turned off, that is, the output stop state is maintained, and the process returns to step A1.

【0035】この後、マイクロコンピュータ12は、入
光状態を示す受光信号が入力されたときには、ステップ
A4にて「YES」と判断してステップA7に進み、こ
こでもライトON検出モードに設定されていることから
「YES」と判断してステップA8に進むようになる。
そして、ステップA8では、マイクロコンピュータ12
は、期間同期モードに設定されていることから、「YE
S」と判断してステップA9に進み、ここでは、入力端
子Fから入力される外部同期信号が「H」レベルである
か否かを判断し、「YES」の場合にはステップA10
に進んで出力オンとして出力トランジスタ21に出力信
号を与えてステップA1に戻るようになる。
Thereafter, when the microcomputer 12 receives the light receiving signal indicating the light incident state, the microcomputer 12 determines "YES" in step A4 and proceeds to step A7, where the microcomputer 12 is again set to the light ON detection mode. Is determined to be "YES" and the process proceeds to step A8.
Then, in step A8, the microcomputer 12
Is set to the period synchronization mode.
S ”and proceeds to step A9, where it is determined whether or not the external synchronization signal input from the input terminal F is at“ H ”level. If“ YES ”, step A10
Then, the output is turned on, an output signal is supplied to the output transistor 21, and the process returns to step A1.

【0036】以下、マイクロコンピュータ21は、検出
エリア内の物体Tからの反射光がなくなってステップA
9で「NO」と判断すると、ステップA6に進んで出力
オフつまり出力トランジスタ21をオフさせるようにな
る。これにより、物体Tが検出エリア内に存在して受光
信号が入力されている状態で、外部同期信号が入力され
ている期間中に対応して、マイクロコンピュータ12は
出力端子Pに検出信号としての「L」レベルの信号を出
力するようになる。
Thereafter, the microcomputer 21 determines in step A that the reflected light from the object T in the detection area has disappeared.
If "NO" is determined in step 9, the process proceeds to step A6, in which the output is turned off, that is, the output transistor 21 is turned off. Accordingly, in a state where the object T is present in the detection area and the light receiving signal is being input, the microcomputer 12 outputs the detection signal as the detection signal to the output terminal P during the period in which the external synchronization signal is input. An "L" level signal is output.

【0037】次に、上述の場合で外部同期検出モードが
微分同期モードに設定されている場合には、マイクロコ
ンピュータ12は、ステップA8で「NO」と判断して
ステップA11に移行するようになり、ステップA12
およびA13を経て入力端子Fに与えられる外部同期信
号が「L」レベルから「H」レベルに立ち上がる時点を
検出すると、ステップA13に進んでタイマをスタート
させ、このタイマ時間が終了するまでの間出力オンの状
態とし(ステップA14,A15)、タイマをリセット
して(ステップA16)から出力をオフ(ステップA
6)し、ステップA1に戻るようになる。
Next, when the external synchronization detection mode is set to the differential synchronization mode in the above case, the microcomputer 12 determines "NO" in step A8 and shifts to step A11. , Step A12
When the external synchronization signal applied to the input terminal F via the input terminal A and the input terminal F is detected at the time when the external synchronization signal rises from the "L" level to the "H" level, the process proceeds to a step A13 to start the timer. It turns on (steps A14 and A15), resets the timer (step A16), and turns off the output (step A16).
6) Then, the process returns to step A1.

【0038】また、検出モードがダークON検出モード
に設定されている場合には、マイクロコンピュータ12
は、上述したステップA5おいて「YES」と判断して
ステップA8に移行するようになると共に、ステップA
9においては「YES」と判断してステップA10に移
行するようになり、他のステップにおいては上述と同様
にして実行される。これにより、ライトON検出モード
における出力状態とオンオフの出力状態が逆になるよう
に出力トランジスタ21が動作される。
When the detection mode is set to the dark ON detection mode, the microcomputer 12
Is determined to be "YES" in step A5, and the process proceeds to step A8.
In step 9, the determination is "YES" and the process proceeds to step A10. In other steps, the processing is executed in the same manner as described above. Thus, the output transistor 21 is operated such that the output state in the light ON detection mode and the output state of ON / OFF are reversed.

【0039】(2)第2の実施態様 次に、第2の実施態様として、検出モードの切換機能と
検出感度の調整機能とを有する構成とした場合につい
て、図6および図7を参照して説明する。検出モードの
切換機能としては、第1の実施態様と同様に、ライトO
N検出モードとダークON検出モードとの切換設定を行
うものである。また、感度調整機能は、受光信号のレベ
ルに対して、マイクロコンピュータ12内において物体
の検出を判定するために比較する検出レベルを調整する
ものである。
(2) Second Embodiment Next, as a second embodiment, a configuration having a function of switching the detection mode and a function of adjusting the detection sensitivity will be described with reference to FIGS. 6 and 7. explain. The function of switching the detection mode is similar to that of the first embodiment.
The setting for switching between the N detection mode and the dark ON detection mode is performed. The sensitivity adjustment function adjusts a detection level to be compared with the level of the light receiving signal in the microcomputer 12 to determine the detection of an object.

【0040】この場合、物体の検出動作における検出レ
ベルの設定では、ヒステリシス機能として、所定のヒス
テリシス幅(例えば検出レベルの10%)が設定される
ようになっており、非検出状態において検出信号のレベ
ルがON点検出レベル以上となったときに検出状態に移
行し、検出状態においては、検出信号のレベルがON点
検出レベルよりもヒステリシス幅だけ低いOFF点検出
レベル以下となったときに非検出状態に移行するように
なっている。なお、このようにヒステリシス機能を持た
せるのは、検出レベル近傍の入光状態でもチャタリング
などによる誤検出を防止するためである。
In this case, in setting the detection level in the object detection operation, a predetermined hysteresis width (for example, 10% of the detection level) is set as a hysteresis function. When the level is higher than the ON point detection level, the state shifts to the detection state. In the detection state, non-detection is performed when the level of the detection signal becomes lower than the OFF point detection level lower than the ON point detection level by a hysteresis width. State. The reason for providing the hysteresis function is to prevent erroneous detection due to chattering or the like even in a light incident state near the detection level.

【0041】そして、第1の可変抵抗器8は第1の実施
態様におけるものと同様にしてその操作ダイヤル22の
回転可能な角度範囲を領域Aおよび領域Bとに分けられ
ており、マイクロコンピュータ12により、操作ダイヤ
ル22により設定された領域AあるいはBに対応して検
出モードが設定されるようになっている。一方、第2の
可変抵抗器9は操作ダイヤル22の回転角度に応じた検
出感度を設定するもので、マイクロコンピュータ12に
より操作ダイヤル22の回転角度に応じて検出レベルと
そのヒステリシス幅を設定するようになっている。
The first variable resistor 8 has a rotatable angle range of the operation dial 22 divided into a region A and a region B in the same manner as in the first embodiment. Thus, the detection mode is set corresponding to the area A or B set by the operation dial 22. On the other hand, the second variable resistor 9 sets the detection sensitivity according to the rotation angle of the operation dial 22, and the microcomputer 12 sets the detection level and its hysteresis width according to the rotation angle of the operation dial 22. It has become.

【0042】次に、本実施態様の作用について、図6お
よび図7をも参照しながら述べる。まず、使用者により
第1および第2の可変抵抗器8および9の操作ダイヤル
22,22が所望の設定位置に回動操作されると、マイ
クロコンピュータ12は、第1の実施態様の場合と同様
にして、それらの回転角度に応じたデジタル値をそれぞ
れ入力するようになる。
Next, the operation of the present embodiment will be described with reference to FIGS. First, when the user turns the operation dials 22, 22 of the first and second variable resistors 8 and 9 to a desired set position, the microcomputer 12 operates in the same manner as in the first embodiment. Then, digital values corresponding to the rotation angles are input.

【0043】そして、マイクロコンピュータ12は、図
6に示す検出プログラムをスタートすると、まず、ステ
ップC1にて設定ルーチンを実行して可変抵抗器8,9
により設定された検出モードの設定と検出レベルの設定
動作を行うようになる。この設定ルーチンC1は、図7
に示すようなプログラムから構成されており、マイクロ
コンピュータ12は、ステップD1ないしD4を実行
し、前述した図5に示す設定ルーチンのステップB1な
いしB4と同様にして、ライトON検出モードあるいは
ダークON検出モードの何れかを設定するようになる。
When the microcomputer 12 starts the detection program shown in FIG. 6, the microcomputer 12 first executes a setting routine in step C1 to execute the variable resistors 8 and 9.
Then, the setting of the detection mode and the setting operation of the detection level are performed. This setting routine C1 corresponds to FIG.
The microcomputer 12 executes steps D1 to D4 and performs the light ON detection mode or the dark ON detection in the same manner as in steps B1 to B4 of the setting routine shown in FIG. One of the modes will be set.

【0044】続いて、マイクロコンピュータ12は、ス
テップD5にて、第2の可変抵抗器9から入力端子Eに
入力された電圧信号のデジタル値Qを入力し、ステップ
D6にて、そのデジタル値Qに基づき、ヒステリシス幅
10%を見込んだON点検出レベルLonおよびOFF点
検出レベルLoff とを所定の演算プログラムにより演算
するようになる。
Subsequently, the microcomputer 12 inputs the digital value Q of the voltage signal input from the second variable resistor 9 to the input terminal E in step D5, and in step D6, the digital value Q , An ON point detection level Lon and an OFF point detection level Loff that allow for a hysteresis width of 10% are calculated by a predetermined calculation program.

【0045】この場合、入力されたデジタル値Qは検出
レベルの中心値に相当しており、設定すべきON点検出
レベルLonおよびOFF点検出レベルLoff は、この中
心値から上下に5%ずつ幅をとった値として設定される
ようになっており、このデジタル値Qに対して、例えば
ON点検出レベルLonおよびOFF点検出レベルLoff
を次式に従って演算するようになっている。
In this case, the input digital value Q corresponds to the center value of the detection level, and the ON point detection level Lon and the OFF point detection level Loff to be set have a width of 5% above and below this center value. The digital value Q is, for example, set to an ON point detection level Lon and an OFF point detection level Loff
Is calculated according to the following equation.

【0046】 Lon = 1.05Q …(1) Loff = 0.95Q …(2)Lon = 1.05Q (1) Loff = 0.95Q (2)

【0047】そして、マイクロコンピュータ12は、ス
テップD7にて、上記演算により求めたON点検出レベ
ルLonおよびOFF点検出レベルLoff をRAM内に記
憶して設定し、検出プログラムにリターンするようにな
る。これにより、入力されたデジタル値Qを中心として
10%のヒステリシス幅を有する検出レベルが設定され
たことになるのである。
In step D7, the microcomputer 12 stores and sets the ON point detection level Lon and the OFF point detection level Loff obtained by the above calculation in the RAM, and returns to the detection program. As a result, a detection level having a hysteresis width of 10% around the input digital value Q is set.

【0048】さて、マイクロコンピュータ12は、検出
プログラムのステップC2およびC3を経て投光動作お
よび受光信号入力の動作を実行し、ステップC4に移行
するようになる。前述の設定ルーチンにおいて、例えば
ライトON検出モードが設定されている場合には、マイ
クロコンピュータ12は、ステップC5に進み、出力が
オフ状態であるか否か、つまり未検出状態であるか否か
を判断するが、ここでは、まだトランジスタ21に出力
信号を与えていないので「NO」と判断してステップC
6に移行するようになる。
The microcomputer 12 executes the light projection operation and the light reception signal input operation through steps C2 and C3 of the detection program, and shifts to step C4. In the setting routine described above, for example, when the light ON detection mode is set, the microcomputer 12 proceeds to step C5, and determines whether or not the output is in the off state, that is, whether or not the output is in the undetected state. In this case, since the output signal has not been given to the transistor 21 yet, it is determined “NO” and the step C
The process moves to 6.

【0049】いま、受光信号のレベルが前述のように設
定されたON点検出レベル以上に達していないときに
は、マイクロコンピュータ12は、ステップC6で「N
O」と判断してステップC7に移行し、出力オフつまり
出力停止状態に保持し、ON点検出レベル以上に達して
いる場合には、ステップC6で「YES」と判断してス
テップC8に進み、出力をオンとしてトランジスタ21
をオンさせてステップC1に戻るようになる。
If the level of the light receiving signal has not reached the ON point detection level set as described above, the microcomputer 12 sets "N" in step C6.
O ”is determined, the process proceeds to step C7, the output is turned off, that is, the output is stopped, and if the ON point detection level or higher is reached,“ YES ”is determined in step C6 and the process proceeds to step C8. Turn on the output and turn on transistor 21
Is turned on to return to step C1.

【0050】この後、ステップC1ないしC4を経てス
テップC5になると、マイクロコンピュータ12は、出
力オン状態であることから「NO」と判断してステップ
C9に進むようになり、ここでは検出信号のレベルがO
FF点検出レベル以下に低下したかどうかを判断し、
「NO」の場合には出力オンを保持し(ステップC
8)、「YES」と判断されるようになると、ステップ
C7に移行して出力をオフし、この後ステップC1に戻
るようになる。
Thereafter, at step C5 after steps C1 to C4, the microcomputer 12 determines "NO" because the output is in the ON state, and proceeds to step C9, where the level of the detection signal is determined. Is O
Judge whether it has dropped below the FF point detection level,
In the case of "NO", the output is kept on (step C
8) When it is determined to be "YES", the process proceeds to step C7 to turn off the output, and thereafter returns to step C1.

【0051】一方、設定ルーチンにてダークON検出モ
ードに設定された場合には、マイクロコンピュータ12
は、ステップC4にて「NO」と判断してステップC1
0に移行するようになる。そして、マイクロコンピュー
タ12は、物体Tからの検出信号が入光されていない非
検出状態の場合には、ステップC10,C11を経て、
まずステップC12で出力オンの状態とし、次にステッ
プC10になると「YES」と判断してステップC13
に進むようになる。
On the other hand, when the dark ON detection mode is set in the setting routine, the microcomputer 12
Determines “NO” in step C4 and returns to step C1
It shifts to 0. Then, when the detection signal from the object T is not incident on the microcomputer 12 in the non-detection state, the microcomputer 12 goes through steps C10 and C11,
First, in step C12, the output is turned on, and then in step C10, "YES" is determined and step C13 is executed.
It will come to.

【0052】検出信号のレベルがON点検出レベル以上
に達していない場合には、マイクロコンピュータ12
は、ステップC13で「NO」と判断して出力オンを保
持し(ステップC12)、ON点検出レベル以上になる
とステップC13で「YES」と判断してステップC7
に移行し、出力をオフするようになる。そして、この
後、ステップC1ないしC4およびC10を経てC11
になったときに、検出信号のレベルがOFF点検出レベ
ル以下になっているときには再びステップC12に進ん
で出力をオン状態に変化させるようになる。
If the level of the detection signal has not reached the ON point detection level or more, the microcomputer 12
Determines "NO" in step C13 and keeps the output on (step C12), and when the output level exceeds the ON point detection level, determines "YES" in step C13 and proceeds to step C7.
And the output is turned off. Then, after this, through steps C1 to C4 and C10, C11
When the detection signal level becomes equal to or lower than the OFF point detection level, the process again proceeds to step C12 to change the output to the ON state.

【0053】(3)第3の実施態様 次に、第3の実施態様として、検出感度の調整機能と検
出ヒステリシス幅の調整機能とを有する構成とした場合
について、図8および図9を参照して説明する。検出感
度調整機能は、第2の実施態様と同様に、受光信号のレ
ベルに対して、マイクロコンピュータ12内において物
体の検出を判定するために比較する検出レベルを調整す
るものであり、検出ヒステリシス幅の調整機能は、第2
の実施態様において一定のヒステリシス幅10%に設定
していたのに対してこのヒステリシス幅を調整可能とし
たものである。
(3) Third Embodiment Next, as a third embodiment, a configuration having a detection sensitivity adjustment function and a detection hysteresis width adjustment function will be described with reference to FIGS. 8 and 9. FIG. Will be explained. The detection sensitivity adjustment function adjusts the detection level to be compared with the level of the received light signal in the microcomputer 12 in order to determine the detection of the object in the same manner as in the second embodiment. The adjustment function of the second
In this embodiment, the hysteresis width can be adjusted, while the constant hysteresis width is set to 10%.

【0054】そして、第1および第2の可変抵抗器8お
よび9は操作ダイヤル22の回転角度に応じた検出感度
あるいは検出ヒステリシス幅を設定するもので、マイク
ロコンピュータ12により操作ダイヤル22の回転角度
に応じて検出レベルとそのヒステリシス幅を設定するよ
うになっている。
The first and second variable resistors 8 and 9 are for setting the detection sensitivity or the detection hysteresis width according to the rotation angle of the operation dial 22, and the microcomputer 12 controls the rotation angle of the operation dial 22 by the microcomputer 12. The detection level and its hysteresis width are set accordingly.

【0055】次に、本実施態様の作用について、図8お
よび図9をも参照しながら述べる。まず、使用者により
第1および第2の可変抵抗器8および9の操作ダイヤル
22,22が所望の設定位置に回動操作されると、マイ
クロコンピュータ12は、第1の実施態様の場合と同様
にして、それらの回転角度に応じたデジタル値をそれぞ
れ入力するようになる。
Next, the operation of the present embodiment will be described with reference to FIGS. First, when the user turns the operation dials 22, 22 of the first and second variable resistors 8 and 9 to a desired set position, the microcomputer 12 operates in the same manner as in the first embodiment. Then, digital values corresponding to the rotation angles are input.

【0056】そして、マイクロコンピュータ12は、図
8に示す検出プログラムをスタートすると、まず、ステ
ップE1にて設定ルーチンを実行して可変抵抗器8,9
により設定された検出レベルの設定動作と検出ヒステリ
シス幅の設定動作を行うようになる。
When the microcomputer 12 starts the detection program shown in FIG. 8, the microcomputer 12 first executes a setting routine in step E1 to execute the variable resistors 8, 9
Thus, the operation of setting the detection level and the operation of setting the detection hysteresis width are performed.

【0057】この設定ルーチンE1は、図9に示すよう
なプログラムから構成されており、マイクロコンピュー
タ12は、ステップF1およびF2にて第1および第2
の可変抵抗器8および9から入力端子DおよびEに入力
された電圧信号のデジタル値Q1およびQ2を入力し、
ステップF3にてそのデジタル値に基づいて、ON点検
出レベルLonおよびOFF点検出レベルLoff とを所定
の演算プログラムにより演算するようになる。
The setting routine E1 is composed of a program as shown in FIG. 9, and the microcomputer 12 performs the first and second steps in steps F1 and F2.
Digital values Q1 and Q2 of the voltage signals input from the variable resistors 8 and 9 to the input terminals D and E,
In step F3, based on the digital value, the ON point detection level Lon and the OFF point detection level Loff are calculated by a predetermined calculation program.

【0058】この場合、入力されたデジタル値Q1は検
出レベルの中心値に対応しており、デジタル値Q2は検
出ヒステリシス幅に対応している。そして、例えばON
点検出レベルLonおよびOFF点検出レベルLoff を次
式に従って演算するようになっている。なお、この検出
ヒステリシス幅の設定範囲は検出レベルに対して5%か
ら20%までの範囲となっており、その範囲内でデジタ
ル値Q2に対応して設定されるようになっている。
In this case, the input digital value Q1 corresponds to the center value of the detection level, and the digital value Q2 corresponds to the detection hysteresis width. And, for example, ON
The point detection level Lon and the OFF point detection level Loff are calculated according to the following equation. The setting range of the detection hysteresis width is in a range from 5% to 20% with respect to the detection level, and is set within the range corresponding to the digital value Q2.

【0059】ここで、デジタル値Q2の値は「0」から
「255」までの範囲をとるので、ON点検出レベルL
onおよびOFF点検出レベルLoff は、検出レベルの値
に対して5%の範囲から20%の範囲まで、つまり±
2.5%の値から±10%の値まで変化するように設定
すれば良いから、次式のようになる。
Since the digital value Q2 ranges from "0" to "255", the ON point detection level L
The on and OFF point detection levels Loff are in the range of 5% to 20% of the detection level value, that is, ±.
The value may be set so as to change from a value of 2.5% to a value of ± 10%.

【0060】 Lon =(1.025 +0.075 × Q2/255 )×Q1 …(3) Loff =(0.975 +0.075 × Q2/255 )×Q1 …(4)Lon = (1.025 + 0.075 × Q2 / 255) × Q1 (3) Loff = (0.975 + 0.075 × Q2 / 255) × Q1 (4)

【0061】そして、マイクロコンピュータ12は、ス
テップF4にて、上記演算により求めたON点検出レベ
ルLonおよびOFF点検出レベルLoff をRAM内に記
憶して設定し、検出プログラムにリターンするようにな
る。これにより、入力されたデジタル値Q1を中心とし
て5%から20%の範囲で設定された検出ヒステリシス
幅Q2を有する検出レベルが設定されたことになるので
ある。
Then, in step F4, the microcomputer 12 stores and sets the ON point detection level Lon and the OFF point detection level Loff obtained by the above calculation in the RAM, and returns to the detection program. As a result, the detection level having the detection hysteresis width Q2 set in the range of 5% to 20% around the input digital value Q1 is set.

【0062】さて、マイクロコンピュータ12は、検出
プログラムのステップE2およびE3を経て投光動作お
よび受光信号入力の動作を実行し、ステップE4に移行
するようになる。マイクロコンピュータ12は、ステッ
プE4で出力がオフ状態であるか否か、つまり未検出状
態であるか否かを判断するが、ここでは、まだトランジ
スタ21に出力信号を与えていないので「NO」と判断
してステップE5に移行するようになる。
The microcomputer 12 executes the light projecting operation and the light receiving signal input operation through steps E2 and E3 of the detection program, and shifts to step E4. The microcomputer 12 determines whether or not the output is in the off state, that is, whether or not the output is in the undetected state in step E4. Here, since the output signal has not been supplied to the transistor 21, "NO" is returned. Then, the process proceeds to step E5.

【0063】受光信号のレベルが前述のように設定され
たON点検出レベル以上に達していないときには、マイ
クロコンピュータ12は、ステップE5で「NO」と判
断してステップE6に移行し、出力オフつまり出力停止
状態に保持し、ON点検出レベル以上に達している場合
には、ステップE5で「YES」と判断してステップE
7に進み、出力をオンとしてトランジスタ21をオンさ
せてステップE1に戻るようになる。
When the level of the light receiving signal has not reached the ON point detection level set as described above, the microcomputer 12 determines "NO" in step E5 and shifts to step E6 to turn off the output. If the output is stopped and the ON point detection level or more is reached, “YES” is determined in the step E5 and the step E5 is performed.
In step 7, the output is turned on to turn on the transistor 21, and the process returns to step E1.

【0064】この後、ステップE1ないしE3を経てス
テップE4になると、マイクロコンピュータ12は、出
力オン状態であることから「NO」と判断してステップ
E8に進むようになり、ここでは検出信号のレベルがO
FF点検出レベル以下に低下したかどうかを判断し、
「NO」の場合には出力オンを保持し(ステップE
7)、「YES」と判断されるようになると、ステップ
E6に移行して出力をオフし、この後ステップE1に戻
るようになる。
Thereafter, at step E4 after steps E1 to E3, the microcomputer 12 determines "NO" because the output is on, and proceeds to step E8, where the level of the detection signal is set. Is O
Judge whether it has dropped below the FF point detection level,
If "NO", the output is kept on (step E
7) When it is determined to be "YES", the process proceeds to step E6 to turn off the output, and thereafter returns to step E1.

【0065】(4)第4の実施態様 次に、第4の実施態様においては、前記第1あるいは第
2の実施態様で示したいずれかの切換機能に代えて、投
光周波数の切換機能を設ける場合について図10を参照
して説明する。この投光周波数の切換機能としては、前
述した各検出プログラム中で実施される投光動作におい
て、LED14に出力する投光信号の出力周波数をf1
あるいはf2に切換設定可能なものである。なお、この
場合に、投光周波数の切換機能は、他の光電スイッチか
らの投光信号と同期することによる誤検出を防止するた
めに設けられたものである。
(4) Fourth Embodiment Next, in a fourth embodiment, a switching function of the light emission frequency is replaced with one of the switching functions shown in the first and second embodiments. The case of providing will be described with reference to FIG. As a function of switching the light emission frequency, in the light emission operation performed in each of the above-described detection programs, the output frequency of the light emission signal output to the LED 14 is set to f1.
Alternatively, it can be switched to f2. In this case, the light emission frequency switching function is provided to prevent erroneous detection due to synchronization with a light emission signal from another photoelectric switch.

【0066】この投光周波数の切換設定のための設定ル
ーチンは、図10に示すフローチャートのように構成さ
れており、例えば、第1の可変抵抗器8により切換設定
可能な構成とする場合には、前述した第1の実施態様の
設定ルーチンにおけるステップB1ないしB4の部分と
置き換えることにより実施可能となっている。
The setting routine for setting the switching of the light emission frequency is configured as shown in the flowchart of FIG. 10. For example, in the case where the switching can be set by the first variable resistor 8, It can be implemented by replacing the steps B1 to B4 in the setting routine of the first embodiment described above.

【0067】さて、この設定ルーチンにおいて、マイク
ロコンピュータ12は、ステップG1にて第1の可変抵
抗器8から入力端子Dに入力された電圧信号のデジタル
値を入力し、ステップG2にてそのデジタル値が「12
8」以上であるか否かを判断する。デジタル値が「0」
から「127」の範囲つまり領域A内の値であるときに
は、マイクロコンピュータ12は、ステップG2で「N
O」と判断してステップG3に進み、投光周波数f1の
設定を行う。また、デジタル値が「128」から「25
5」の範囲つまり領域B内の値であるときには、マイク
ロコンピュータ12は、ステップG2で「YES」と判
断してステップG4に進み、投光周波数f2の設定を行
う。
In this setting routine, the microcomputer 12 inputs the digital value of the voltage signal input to the input terminal D from the first variable resistor 8 in step G1, and the digital value in step G2. Is "12
8 ”or more. Digital value is "0"
If the value is within the range of “127”, that is, the value in the area A, the microcomputer 12 determines “N” in step G2.
O ”is determined, and the process proceeds to step G3 to set the light emission frequency f1. Also, the digital value is changed from “128” to “25”.
When the value is within the range of "5", that is, the value within the area B, the microcomputer 12 determines "YES" in step G2 and proceeds to step G4 to set the light emission frequency f2.

【0068】これにより、マイクロコンピュータ12
は、検出プログラムの投光動作ステップにおいては、上
述のように設定された投光周波数f1あるいはf2に従
った投光周期で投光信号を出力するようになるものであ
る。
Thus, the microcomputer 12
In the light emitting operation step of the detection program, a light emitting signal is output at a light emitting cycle according to the light emitting frequency f1 or f2 set as described above.

【0069】(5)第5の実施態様 次に、第5の実施態様においては、前記第3の実施態様
で示した検出感度と検出ヒステリシス幅との2つの調整
機能に代えて、感度調整機能をさらに精度良く行うため
に微調整機能と粗調整機能とを設けた構成の場合につい
て図11を参照して説明する。なお、ON点検出レベル
とOFF点検出レベルとのヒステリシス幅は10%に設
定されるものとしている。
(5) Fifth Embodiment Next, in a fifth embodiment, a sensitivity adjustment function is provided in place of the two adjustment functions of the detection sensitivity and the detection hysteresis width shown in the third embodiment. With reference to FIG. 11, a description will be given of a case in which a fine adjustment function and a coarse adjustment function are provided in order to more accurately perform the above. Note that the hysteresis width between the ON point detection level and the OFF point detection level is set to 10%.

【0070】そして、第3の実施態様と同様に、第1お
よび第2の可変抵抗器8および9は操作ダイヤル22の
回転角度に応じた入力レベルで検出感度設定の粗調整お
よび微調整を行うもので、マイクロコンピュータ12に
より操作ダイヤル22の回転角度に応じてON点検出レ
ベルおよびOFF点検出レベルを設定するようになって
いる。
Then, as in the third embodiment, the first and second variable resistors 8 and 9 perform coarse adjustment and fine adjustment of the detection sensitivity setting at an input level corresponding to the rotation angle of the operation dial 22. The microcomputer 12 sets an ON point detection level and an OFF point detection level in accordance with the rotation angle of the operation dial 22.

【0071】次に、本実施態様における検出感度の設定
について図11の設定ルーチンのフローチャートにした
がって述べる。まず、使用者により第1および第2の可
変抵抗器8および9の操作ダイヤル22,22が所望の
設定位置に回動操作されると、マイクロコンピュータ1
2は、第3の実施態様の場合と同様にして、ステップH
1およびH2にて、それらの回転角度に応じて入力端子
DおよびEに入力される電圧信号のデジタル値R1およ
びR2をそれぞれ入力し、続くステップH3にて、それ
らのデジタル値に基づいて、ON点検出レベルLonおよ
びOFF点検出レベルLoff とを所定の演算プログラム
により演算するようになる。
Next, the setting of the detection sensitivity in this embodiment will be described with reference to the flowchart of the setting routine of FIG. First, when the user turns the operation dials 22, 22 of the first and second variable resistors 8 and 9 to desired setting positions, the microcomputer 1
2 is the same as in the third embodiment, step H
At 1 and H2, the digital values R1 and R2 of the voltage signals input to the input terminals D and E according to their rotation angles are input, respectively. At the next step H3, based on those digital values, ON is performed. The point detection level Lon and the OFF point detection level Loff are calculated by a predetermined calculation program.

【0072】この場合、入力されたデジタル値R1は検
出レベルの中心値を設定するための粗ゲイン設定データ
として用いられ、デジタル値R2は粗ゲイン設定データ
の値を基準として設定される微ゲイン設定データとして
用いられる。そして、設定可能な検出レベル中心値の範
囲に対して、粗ゲイン設定データは全範囲を調整幅の対
象としており、微ゲイン設定データは3分の1の範囲を
調整幅の対象としている。これらを考慮して、マイクロ
コンピュータ12においては、デジタル値R1およびR
2から、ON点検出レベルLonおよびOFF点検出レベ
ルLoff の値を次式に基づいて演算する。
In this case, the input digital value R1 is used as coarse gain setting data for setting the center value of the detection level, and the digital value R2 is fine gain setting which is set based on the value of the coarse gain setting data. Used as data. For the settable detection level center value range, the coarse gain setting data covers the entire range of the adjustment range, and the fine gain setting data covers the third range of the adjustment range. In consideration of these, in the microcomputer 12, the digital values R1 and R
From 2, the values of the ON point detection level Lon and the OFF point detection level Loff are calculated based on the following equation.

【0073】 Lon =1.05×[R1+(R2−127)/3] …(5) Loff =0.95×[R1+(R2−127)/3] …(6)Lon = 1.05 × [R1 + (R2-127) / 3] (5) Loff = 0.95 × [R1 + (R2-127) / 3] (6)

【0074】そして、マイクロコンピュータ12は、ス
テップH4にて、上記演算により求めたON点検出レベ
ルLonおよびOFF点検出レベルLoff をRAM内に記
憶して設定するようになり、これにより、入力されたデ
ジタル値R1およびR2で決まる検出レベルを中心値と
して10%の範囲で設定されたON点検出レベルLonお
よびOFF点検出レベルLoff の値が設定されるのであ
る。
Then, in step H4, the microcomputer 12 stores the ON point detection level Lon and the OFF point detection level Loff obtained by the above calculation in the RAM, and sets them. The values of the ON point detection level Lon and the OFF point detection level Loff are set within a range of 10% around the detection level determined by the digital values R1 and R2.

【0075】(6)第6の実施態様 次に、第6の実施態様においては、上記した各実施態様
における可変抵抗器8あるいは9に適用した切換機能お
よび調整機能の両者を兼ね備えた機能として用いる場合
について、図12および図13を参照しながら説明す
る。
(6) Sixth Embodiment Next, in a sixth embodiment, a function having both the switching function and the adjusting function applied to the variable resistor 8 or 9 in each of the above embodiments is used. The case will be described with reference to FIGS.

【0076】この場合には、ひとつの可変抵抗器8ある
いは9により設定されたデジタル値Sに基づいて、検出
モードとしてのタイマモードの設定をタイマ設定をオフ
させるタイマオフモード,検出時の出力タイミングを遅
らせるオンディレイタイマモードおよび検出時に出力し
た出力信号のオフタイミングを非検出時点から遅らせる
オフディレイモードの3つの検出モードの切換設定を行
うと共に、オンディレイタイマモードおよびオフディレ
イタイマモードのそれぞれにおいては、その回転角度に
応じたタイマ時間設定の調整動作を行うようにしたもの
である。
In this case, based on the digital value S set by one variable resistor 8 or 9, a timer mode as a detection mode is set to a timer off mode for turning off the timer setting, and an output timing at the time of detection. In the on-delay timer mode and the off-delay mode in which the off-timing of the output signal output at the time of detection is delayed from the non-detection point, and in each of the on-delay timer mode and the off-delay timer mode, The adjustment operation of the timer time setting according to the rotation angle is performed.

【0077】図12は、例えば可変抵抗器8を利用した
場合の操作ダイヤル22の設定可能な回転角度の範囲を
示すもので、設定可能な回転角度は0°から260°の
範囲とされている。そして、可変抵抗器8による設定可
能な回転角度の範囲のうち120°から140°の範囲
である中間領域はタイマオフモード設定領域fとされ、
その中間領域を挟んだ両側の回転角度の範囲が0°から
120°の範囲をオフディレイタイマモード設定領域g
とし、140°から260°の範囲をオンディレイタイ
マモード設定領域hとしている。
FIG. 12 shows the range of the settable rotation angle of the operation dial 22 when the variable resistor 8 is used, for example, and the settable rotation angle is in the range of 0 ° to 260 °. . Then, of the rotation angle range that can be set by the variable resistor 8, an intermediate region that is a range from 120 ° to 140 ° is a timer-off mode setting region f,
The range of the rotation angle on both sides of the intermediate region is in the range of 0 ° to 120 °.
The range from 140 ° to 260 ° is an on-delay timer mode setting area h.

【0078】タイマオフモード設定領域fとオフディレ
イタイマモード設定領域gとの境界となる位置、つまり
可変抵抗器8の操作ダイヤル22の回転角度にして12
0°の位置はオフディレイタイマのタイマ時間Tdoffの
設定値が「0」であり、回転角度にして0°の位置はタ
イマ時間Tdoffの設定値が最大(例えば5秒)とされて
いる。また、タイマオフモード設定領域fとオンディレ
イタイマモード設定領域hとの境界となる位置、つまり
可変抵抗器8の操作ダイヤル22の回転角度にして14
0°の位置はオンディレイタイマのタイマ時間Tdon の
設定値が「0」であり、回転角度にして260°の位置
はタイマ時間Tdon の設定値が最大(例えば5秒)とさ
れている。
The position at the boundary between the timer-off mode setting area f and the off-delay timer mode setting area g, that is, the rotation angle of the operation dial 22 of the variable resistor 8 is 12
At the position of 0 °, the set value of the timer time Tdoff of the off-delay timer is “0”, and at the position of 0 ° in terms of the rotation angle, the set value of the timer time Tdoff is the maximum (for example, 5 seconds). Further, the position at the boundary between the timer off mode setting area f and the on delay timer mode setting area h, that is, the rotation angle of the operation dial 22 of the variable resistor 8 is set to 14
At the position of 0 °, the set value of the timer time Tdon of the on-delay timer is “0”, and at the position of 260 ° in rotation angle, the set value of the timer time Tdon is the maximum (for example, 5 seconds).

【0079】次に、本実施態様におけるタイマモードの
設定およびタイマ時間の設定について図13に示す設定
ルーチンのフローチャートにしたがって述べる。すなわ
ち、マイクロコンピュータ12は、ステップJ1にて、
入力端子Dに入力される電圧信号のデジタル値Sを読み
込む。この場合、読み込んだデジタル値Sは、オフディ
レイタイマモードの設定範囲Edoff,タイマオフモード
の設定範囲Endおよびオンディレイタイマモードの設定
範囲Edon のそれぞれに対応して次式のようになる。
Next, the setting of the timer mode and the setting of the timer time in this embodiment will be described with reference to the flowchart of the setting routine shown in FIG. That is, the microcomputer 12 determines in step J1
The digital value S of the voltage signal input to the input terminal D is read. In this case, the read digital value S is represented by the following equation corresponding to each of the setting range Edoff in the off-delay timer mode, the setting range End in the timer-off mode, and the setting range Edon in the on-delay timer mode.

【0080】 0 ≦ Edoff ≦ 117 …(7) 118 ≦ End ≦ 138 …(8) 139 ≦ Edon ≦ 256 …(9) つまり、デジタル値Sが式(7)ないし(9)のいずれ
の領域にあるかにより出力モードが決まるのである。
0 ≦ Edoff ≦ 117 (7) 118 ≦ End ≦ 138 (8) 139 ≦ Edon ≦ 256 (9) That is, the digital value S is in any of the regions of the formulas (7) to (9). This determines the output mode.

【0081】マイクロコンピュータ12は、ステップJ
2になると、例えば、読み込んだデジタル値Sがオフデ
ィレイタイマモードの設定範囲Edoffにあるときには、
「118」以下であることから、「NO」と判断してス
テップJ3に進み、オフディレイタイマモードを設定
し、続いて、ステップJ4で、デジタル値Sからタイマ
時間Tdoffを演算し、ステップJ5で演算結果であるタ
イマ時間Tdoffを記憶設定してタイマ設定ルーチンを終
了する。この場合、マイクロコンピュータ12は、デジ
タル値Sから次のようにしてタイマ時間Tdoffを演算す
る。
The microcomputer 12 executes step J
When the value becomes 2, for example, when the read digital value S is within the setting range Edoff of the off-delay timer mode,
Since it is equal to or less than "118", the determination is "NO" and the process proceeds to step J3 to set the off-delay timer mode. Then, in step J4, a timer time Tdoff is calculated from the digital value S, and in step J5 The timer time Tdoff as the calculation result is stored and set, and the timer setting routine ends. In this case, the microcomputer 12 calculates the timer time Tdoff from the digital value S as follows.

【0082】すなわち、デジタル値Sが、タイマオフモ
ードの下限の値「118」よりも小さい「117」であ
るときにタイマ時間Tdoffが零となり、それよりもデジ
タル値Sが小さくなるに従って、つまり「117」との
差の値が大きくなるに従ってこれに比例してタイマ時間
Tdoffを長くしてゆき、デジタル値Sが「0」のときに
タイマ時間Tdoffを最大である「5秒」に設定するよう
になっている。つまり、この関係は、 Tdoff(秒)=[(117−S)/117]×5(秒) …(10) という演算式で表すことができる。
That is, when the digital value S is "117" which is smaller than the lower limit value "118" of the timer off mode, the timer time Tdoff becomes zero, and as the digital value S becomes smaller than that, that is, " As the value of the difference from “117” increases, the timer time Tdoff is lengthened in proportion to the value, and when the digital value S is “0”, the timer time Tdoff is set to the maximum “5 seconds”. It has become. That is, this relationship can be represented by the following arithmetic expression: Tdoff (second) = [(117−S) / 117] × 5 (second) (10)

【0083】また、デジタル値Sがタイマオフモードの
設定範囲Endにあるときには、マイクロコンピュータ1
2は、ステップJ2でデジタル値Sが「118」よりも
大きいことから、「YES」と判断してステップJ6に
進み、ここではデジタル値Sが「139」以下であるこ
とから「NO」と判断してステップJ7に進み、タイマ
オフモードを設定するようになる。そして、デジタル値
Sがオンディレイタイマモードの設定範囲Edon にある
ときには、マイクロコンピュータ12は、ステップJ2
およびJ6にて「YES」と判断してステップJ8に進
み、オンディレイタイマモードを設定するようになる。
When the digital value S is within the set range End of the timer off mode, the microcomputer 1
In step 2, since the digital value S is larger than “118” in step J2, the determination is “YES” and the process proceeds to step J6. In this case, since the digital value S is “139” or less, “NO” is determined. Then, the process proceeds to step J7 to set the timer off mode. When the digital value S is within the setting range Edon of the on-delay timer mode, the microcomputer 12 proceeds to step J2.
And J6 is determined to be "YES", the process proceeds to step J8, and the on-delay timer mode is set.

【0084】続いて、マイクロコンピュータ12は、ス
テップJ9で、デジタル値Sからタイマ時間Tdon を演
算し、ステップJ10で演算結果であるタイマ時間Tdo
n を記憶設定するようになる。この場合、マイクロコン
ピュータ12は、デジタル値Sから次のようにしてタイ
マ時間Tdon を演算する。
Subsequently, the microcomputer 12 calculates the timer time Tdon from the digital value S in step J9, and calculates the timer time Tdo which is the calculation result in step J10.
n will be set. In this case, the microcomputer 12 calculates the timer time Tdon from the digital value S as follows.

【0085】すなわち、デジタル値Sが、タイマオフモ
ードの上限値「138」よりも大きい値「139」であ
るときにタイマ時間Tdon が零となり、それよりもデジ
タル値Sが大きくなるに従って、つまり「138」との
差の値が大きくなるに従ってこれに比例してタイマ時間
Tdon を長くしてゆき、デジタル値Sが「256」のと
きにタイマ時間Tdon を最大である「5秒」に設定する
ようになっている。つまり、この関係は、 Tdon (秒)=[(S−139)/117]×5(秒) …(11) という演算式で表すことができる。
That is, when the digital value S is a value "139" larger than the upper limit value "138" of the timer off mode, the timer time Tdon becomes zero, and as the digital value S becomes larger than that, that is, " 138 ", the timer time Tdon is lengthened in proportion to the value, and when the digital value S is" 256 ", the timer time Tdon is set to the maximum" 5 seconds ". It has become. That is, this relationship can be represented by the following arithmetic expression: Tdon (second) = [(S-139) / 117] × 5 (second) (11)

【0086】このようにして、出力モードの設定とタイ
マ時間の設定を終了すると、マイクロコンピュータ12
はタイマ時間設定ルーチンのプログラムを終了し、ここ
で設定されたタイマモードおよびタイマ時間にしたがっ
て、前述したような検出動作を行うようになる。
When the setting of the output mode and the setting of the timer time are completed in this way, the microcomputer 12
Terminates the program of the timer time setting routine, and performs the above-described detection operation according to the timer mode and the timer time set here.

【0087】このような本実施例によれば、上記第1な
いし第6の実施態様にて説明したように、外部から操作
可能な可変抵抗器8および9を本体ケース2の上面部2
aに設け、マイクロコンピュータ12により、可変抵抗
器8あるいは9の入力信号のレベルに応じて検出動作を
切り換える切換機能と、検出動作を調整する調整機能と
のいずれか一方若しくは双方を有するように選択設定す
るように構成したので、本体ケース2に2つの可変抵抗
器8あるいは9を設けるだけの構成としながら切換機能
と調整機能とのいずれの機能をも持たせることができる
ようになり、種々の機能に対応して複数種類の検出スイ
ッチを製作する場合でも、小形化を図る構成として且つ
1種類の本体ケース2を製作するだけで済ますことがで
き、全体として製作コストおよび管理コストの低減が図
れると共に、組み立て時の作業性の向上も図れるように
なる。
According to this embodiment, as described in the first to sixth embodiments, the externally operable variable resistors 8 and 9 are connected to the upper surface 2 of the main body case 2.
a, which is selected by the microcomputer 12 so as to have one or both of a switching function for switching the detection operation in accordance with the level of the input signal of the variable resistor 8 or 9 and an adjustment function for adjusting the detection operation. Since the configuration is such that the two variable resistors 8 or 9 are provided in the main body case 2, it is possible to have both the switching function and the adjusting function while maintaining various configurations. Even when a plurality of types of detection switches are manufactured in accordance with the functions, only a single type of main body case 2 needs to be manufactured in a configuration for miniaturization, and overall manufacturing costs and management costs can be reduced. At the same time, workability during assembly can be improved.

【0088】尚、上記実施例においては、本発明を光電
スイッチに適用した場合について説明したが、これに限
らず、例えば超音波により物体を検出する超音波スイッ
チや、近接スイッチ等の他の検出スイッチにも適用でき
るものである。
In the above embodiment, the case where the present invention is applied to a photoelectric switch has been described. However, the present invention is not limited to this. For example, an ultrasonic switch for detecting an object by ultrasonic waves, another detection such as a proximity switch, or the like. It can also be applied to switches.

【0089】また、上記実施例においては、2個の可変
抵抗器8,9を設ける構成の光電スイッチに適用した場
合について説明したが、これに限らず、例えば、1個の
可変抵抗器を用いる構成のものにも適用することができ
るし、あるいは3個以上の可変抵抗器を用いる構成のも
のにも適用することができ、本発明においては可変抵抗
器の個数が多くなるほどその効果が増大するものであ
る。
In the above embodiment, the case where the present invention is applied to a photoelectric switch having a configuration in which two variable resistors 8 and 9 are provided has been described. However, the present invention is not limited to this. For example, one variable resistor is used. The present invention can also be applied to a configuration using three or more variable resistors, and in the present invention, the effect increases as the number of variable resistors increases. Things.

【0090】そして、上記実施例においては、可変抵抗
器8,9を切換スイッチとして用いる場合に、領域Aお
よび領域Bの2つの領域に分割して切換える構成の場合
について説明したが、これに限らず、例えば、可変抵抗
器の回転可能な角度領域を3個以上の複数の領域に分割
してマイクロコンピュータ12により検出する構成とし
て、複数段階に切換え設定可能な構成とすることもでき
るものである。
In the above-described embodiment, the case where the variable resistors 8 and 9 are used as changeover switches and the structure is changed into two areas, the area A and the area B, and switching is performed, but the present invention is not limited to this. Instead, for example, a configuration in which a rotatable angle region of the variable resistor is divided into a plurality of regions of three or more and detected by the microcomputer 12 may be a configuration that can be switched and set in a plurality of stages. .

【0091】[0091]

【発明の効果】本発明の検出スイッチによれば、本体ケ
ースに外部から操作可能に複数個の可変抵抗器を設け、
制御手段に、複数個の可変抵抗器のそれぞれに対して、
切換機能および調整機能のいずれかを選択設定するよう
に構成したので、本体ケースに同じ可変抵抗器を設ける
構成としながら、切換機能と調整機能とのいずれの機能
をも持たせた検出スイッチを製作することができるよう
になり、種々の機能に対応して複数種類の検出スイッチ
を製作する場合でも、共通化された本体ケースを用いる
ことにより、小形化を図る構成としながら本体ケースを
複数種類製作する必要がなくなり、全体として製作コス
トおよび管理コストが図れると共に、組み立て時の作業
性の向上も図れるようになり、さらには、外観上におい
て可変抵抗器を複数個設ける同じ形状の本体ケースとし
ながら、切換機能および調整機能の設定個数が異なる複
数種類のものを得ることができるようになるという優れ
た効果を奏する。また、本発明の検出スイッチによれ
ば、制御手段に、複数個の可変抵抗器のうちの少なくと
も一つに対して入力信号のレベルが設定されている範囲
内にあるか否かに応じて検出動作を切り換える切換機能
を選択設定しているので、2以上の可変抵抗器を設ける
構成としながら、その可変抵抗器によって切換機能を持
たせたものとして構成することができ、この結果、本体
ケースに切換機能を持たせるためのスイッチ配設部分を
設けた構成とする必要がなくなるので、本体ケースを共
用することができるようになる。さらに、本発明の検出
スイッチによれば、制御手段に、複数個の可変抵抗器の
うちの少なくとも一つに対して切換機能および調整機能
を兼ね備えた複合的な機能を選択設定しているので、可
変抵抗器を設ける構成としながら、その可変抵抗器によ
って高い機能を有する手段として利用することができる
ようになる。
According to the detection switch of the present invention , the main body
A plurality of variable resistors that can be operated from outside
In the control means, for each of the plurality of variable resistors,
Select and set either the switching function or the adjustment function.
With this configuration, it is possible to manufacture a detection switch that has both the switching function and the adjustment function while providing the same variable resistor in the main body case, and supports various functions. When a plurality of types of detection switches are manufactured, the use of a common main body case eliminates the need to manufacture a plurality of types of main body cases while reducing the size. Not only improves the workability during assembly, but also improves the appearance.
With the same shape of the main body case with multiple variable resistors
However, when the number of setting of the switching function and the adjustment function is different,
There is an excellent effect that several types can be obtained . Further, according to the detection switch of the present invention, the control means detects whether or not the level of the input signal for at least one of the plurality of variable resistors is within a set range. Since the switching function for switching the operation is selectively set, it is possible to provide a switching function by the variable resistor while providing two or more variable resistors. As a result, the main body case can be provided. Since there is no need to provide a switch arrangement portion for providing a switching function, the main body case can be shared. Further, according to the detection switch of the present invention, the control means selectively selects and sets a composite function having both a switching function and an adjusting function for at least one of the plurality of variable resistors. While the variable resistor is provided, the variable resistor can be used as a means having a high function.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例を示す全体の外観斜視図FIG. 1 is an overall perspective view showing an embodiment of the present invention.

【図2】基本構成の電気的構成図FIG. 2 is an electrical configuration diagram of a basic configuration.

【図3】第1の実施態様における可変抵抗器の操作ダイ
ヤルの説明図
FIG. 3 is an explanatory diagram of an operation dial of a variable resistor according to the first embodiment.

【図4】検出動作プログラムのフローチャートFIG. 4 is a flowchart of a detection operation program.

【図5】設定ルーチンのフローチャートFIG. 5 is a flowchart of a setting routine.

【図6】第2の実施態様における図4相当図FIG. 6 is a diagram corresponding to FIG. 4 in a second embodiment.

【図7】図5相当図FIG. 7 is a diagram corresponding to FIG. 5;

【図8】第3の実施態様における図4相当図FIG. 8 is a view corresponding to FIG. 4 in a third embodiment.

【図9】図5相当図FIG. 9 is a diagram corresponding to FIG. 5;

【図10】第4の実施態様における図5相当図FIG. 10 is a view corresponding to FIG. 5 in a fourth embodiment.

【図11】第5の実施態様における図5相当図FIG. 11 is a view corresponding to FIG. 5 in a fifth embodiment.

【図12】第6の実施態様における図3相当図FIG. 12 is a view corresponding to FIG. 3 in a sixth embodiment.

【図13】図5相当図FIG. 13 is a diagram corresponding to FIG. 5;

【符号の説明】[Explanation of symbols]

1は光電スイッチ(検出スイッチ)、2は本体ケース、
3,4は光ファイバケーブル、5はケーブル、6,7は
表示素子、8は第1の可変抵抗器、9は第2の可変抵抗
器、10は銘板、11はケースカバー、12はマイクロ
コンピュータ(制御手段)、13は投光回路、14はL
ED、17は受光回路、18はフォトダイオード、20
は増幅回路、21は出力用のnpn形トランジスタ、2
2は操作ダイヤルである。
1 is a photoelectric switch (detection switch), 2 is a main body case,
3, 4 are optical fiber cables, 5 is a cable, 6, 7 is a display element, 8 is a first variable resistor, 9 is a second variable resistor, 10 is a nameplate, 11 is a case cover, and 12 is a microcomputer. (Control means), 13 is a light emitting circuit, 14 is L
ED, 17 is a light receiving circuit, 18 is a photodiode, 20
Is an amplifier circuit, 21 is an npn transistor for output, 2
Reference numeral 2 denotes an operation dial.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 市村 悟 東京都立川市曙町三丁目5番3号 サン クス株式会社内 (56)参考文献 特開 昭63−160124(JP,A) 実開 昭60−155143(JP,U) 実開 昭55−173837(JP,U) 実開 昭62−26936(JP,U) ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Satoru Ichimura 3-5-3 Akebonocho, Tachikawa-shi, Tokyo Thanks Inc. (56) References JP-A-63-160124 (JP, A) 60-155143 (JP, U) Fully open 1975-173837 (JP, U) Fully open 62-26936 (JP, U)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 本体ケースを備え、その本体ケースに被
検出物体が存在する状態で検出手段から出力される物体
検出信号に基づいて検出動作を行う制御手段を備えてい
る検出スイッチにおいて、 前記本体ケースに外部から操作可能に複数個の可変抵抗
器を設け、 前記制御手段は、前記複数個の可変抵抗器のそれぞれに
対して、その可変抵抗器の抵抗値に基づく入力信号のレ
ベルが所定範囲内にあるか否かに応じて検出動作を切り
換える切換機能およびその可変抵抗器の抵抗値に基づく
入力信号のレベルに応じて検出動作を調整する調整機能
のいずれかを選択設定するように構成されていることを
特徴とする検出スイッチ。
A main body case provided on the main body case;
Object output from detection means in the presence of the detected object
Control means for performing a detection operation based on the detection signal.
In the detection switch, a plurality of variable resistors are operable from outside to the main body case.
A control unit , wherein the control means is provided for each of the plurality of variable resistors.
On the other hand, the input signal level based on the resistance value of the variable resistor
The detection operation is stopped depending on whether the bell is within the predetermined range.
Switching function based on the resistance value of the variable resistor
Adjustment function that adjusts the detection operation according to the level of the input signal
Is configured to select one of
Characteristic detection switch.
【請求項2】 被検出物体が存在する状態で検出手段か
ら出力さえる物体検出信号に基づいて検出動作を行う制
御手段を有する検出スイッチにおいて、 本体ケースに外部から操作可能に複数個の可変抵抗器を
設け、 前記制御手段は、前記複数個の可変抵抗器のうちの少な
くとも一つに対してその可変抵抗器の抵抗値に基づく
力信号のレベルが所定範囲内にあるか否かに応じて検出
動作を切り換える切換機能を選択設定し、この切換機能
を設定しないものについてはその可変抵抗器の抵抗値に
基づく入力信号のレベルに応じて検出動作を調整する調
整機能を選択設定するように構成されていることを特徴
とする検出スイッチ。
2. A detection switch having control means for performing a detection operation based on an object detection signal output from a detection means in a state where an object to be detected is present, wherein a plurality of variable resistors are operable from the outside of a main body case. Wherein the control means determines whether the level of an input signal based on the resistance value of at least one of the plurality of variable resistors is within a predetermined range. Select the switching function to switch the detection operation according to the setting, and for those not setting this switching function, select and set the adjustment function to adjust the detection operation according to the level of the input signal based on the resistance value of the variable resistor A detection switch characterized in that the detection switch is configured to:
【請求項3】 被検出物体が存在する状態で検出手段か
ら出力される物体検出信号に基づいて検出動作を行う制
御手段を有する検出スイッチにおいて、 本体ケースに外部から操作可能に複数個の可変抵抗器を
設け、 前記制御手段は、前記複数個の可変抵抗器のうちの少な
くとも一つに対してその可変抵抗器の抵抗値に基づく
力信号のレベルが所定範囲内にあるか否かに応じて検出
動作を切り換える切換機能およびその可変抵抗器の抵抗
値に基づく入力信号のレベルに応じて検出動作を調整す
る調整機能の両者を備えるように選択設定し、残りの可
変抵抗器については前記切換機能あるいは調整機能のい
ずれか一方を選択設定するように構成されていることを
特徴とする検出スイッチ。
3. A detection switch having a control means for performing a detection operation based on an object detection signal output from a detection means in a state where an object to be detected is present. A control unit configured to determine whether a level of an input signal based on a resistance value of at least one of the plurality of variable resistors is within a predetermined range. Switching function to switch the detection operation according to whether or not, and the resistance of the variable resistor
Select and set so as to have both adjustment functions for adjusting the detection operation according to the level of the input signal based on the value, and select and set either the switching function or the adjustment function for the remaining variable resistors. A detection switch characterized by being constituted.
JP18596493A 1993-07-28 1993-07-28 Method of manufacturing detection switch and detection switch Expired - Fee Related JP2913595B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18596493A JP2913595B2 (en) 1993-07-28 1993-07-28 Method of manufacturing detection switch and detection switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18596493A JP2913595B2 (en) 1993-07-28 1993-07-28 Method of manufacturing detection switch and detection switch

Publications (2)

Publication Number Publication Date
JPH0745167A JPH0745167A (en) 1995-02-14
JP2913595B2 true JP2913595B2 (en) 1999-06-28

Family

ID=16179961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18596493A Expired - Fee Related JP2913595B2 (en) 1993-07-28 1993-07-28 Method of manufacturing detection switch and detection switch

Country Status (1)

Country Link
JP (1) JP2913595B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4848602B2 (en) * 2001-07-31 2011-12-28 井関農機株式会社 Powered vehicle
JP2005128002A (en) * 2003-10-01 2005-05-19 Olympus Corp Encoder
JP2006310080A (en) * 2005-04-28 2006-11-09 Sunx Ltd Detection sensor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533020A (en) * 1978-08-28 1980-03-08 Mitsubishi Electric Corp Manufacture of semiconductor device
JPS5942102A (en) * 1982-09-03 1984-03-08 Nippon Stainless Steel Co Ltd Production of alpha+beta type hot rolled titanium alloy sheet having good suitability to cold rolling
JPS60119609A (en) * 1983-11-30 1985-06-27 Kao Corp Magnetic head of vertical magnetic recording system

Also Published As

Publication number Publication date
JPH0745167A (en) 1995-02-14

Similar Documents

Publication Publication Date Title
US6011467A (en) Sensing device and display method therein
JP2688361B2 (en) Photoelectric sensor
US6831657B2 (en) Display control apparatus for displaying gain setting value in predetermined color hue
DE69617494D1 (en) Photoelectrically digitized control stick
US20070171285A1 (en) Semiconductor photosensor device and information apparatus with sensitivity region for wide dynamic range
JP2913595B2 (en) Method of manufacturing detection switch and detection switch
CN107615016B (en) sensor circuit
CN111965657A (en) Small-size high accuracy laser displacement sensor
JP3692665B2 (en) Illuminance sensor and illuminance control device using the illuminance sensor
JP5730527B2 (en) Photodetector and electronic device equipped with photodetector
US5739914A (en) Colorimetric instrument
JP3347074B2 (en) Light amount control method of light emitting unit and telephone having light emitting unit for controlling light amount
GB2415769A (en) Portable device having multicolour illumination
JP3826689B2 (en) Brightness sensor and lighting device with brightness sensor
JPH0521168A (en) Variable color lighting system
JPH1183622A (en) Sunlight sensor
JP2975959B2 (en) Light control device for display panel
JP2513359Y2 (en) Detection switch device
JPH09145469A (en) Illuminance detector
JPH02141796A (en) Display brightness control system
KR19980033856A (en) Phone with backlight
JP2002204151A (en) Many optic axes photoelectric sensor
KR940023182A (en) Camcorder's Auto White Balance Circuit
KR0157070B1 (en) Satellite broadcasting receiving system
KR960013694B1 (en) Telephone lighting system

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees