Abstract:
This invention provides a light scanning photoelectric switch with which various settings of the light scanning photoelectric switch such as setting of a protection area can be easily set. The light scanning photoelectric switch includes: a display unit having a display screen that displays information including at least one of a status of a safety function of the light scanning photoelectric switch, and information of a failure status; and an operating unit provided in vicinity of the display unit, and for switching the information displayed in the display screen to different one of the safety signal, the result of the determination, setting contents of the light scanning photoelectric switch, the status of the safety function of the light scanning photoelectric switch, and the information of the failure status.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application claims foreign priority based on Japanese Patent Application No. 2008-126851, filed May 14, 2008, the contents of which is incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to a light scanning photoelectric switch. 
         [0004]    2. Description of the Related Art 
         [0005]    Conventionally, there has been proposed a scanning device that detects, using light such as laser, whether or not an object is present within a predetermined area that has been previously set (see Japanese Unexamined Patent Publication No. 4-310890 (Abstract), Japanese Unexamined Patent Publication No. 3-175390 (FIG. 1), and U.S. Pat. No. 5,455,669 (FIG. 4)). 
         [0006]    A light scanning photoelectric switch is a so-called safety scanner or safety laser scanner, and scans over a detection area with light such as laser, receives the scanning light that has been reflected within the detection area, measures a distance to an object based on a difference between a light projecting timing and a light receiving timing, that is, a time difference and a known speed of light, specifies a position of the object based on a distance in each predetermined direction, outputs a safety signal indicating that a function of the device is either enabled or disabled, and disables the function of the device as needed. 
         [0007]    As an alternative way of sensing an object without using the light scanning photoelectric switch, utilizing a mat switch or providing a light curtain in a horizontal direction can be conceivable. 
         [0008]    A mat switch, for example, detects an approach of a worker and the like by the worker stepping on the mat switch. When using such a mat switch, a position at which the mat switch is placed is a detection area, and this can be recognized at a glance. Accordingly, it is possible to intuitively determine whether or not the mat switch is placed at a correct position. Further, similarly for a light curtain, it is also possible to intuitively determine a position for placing the light curtain based on positions at which light is projected and received. 
         [0009]    However, such a mat switch or a light curtain has a fixed detection area which depends on a shape of an individual product, and it is necessary to prepare a number of products of different shapes, which is inconvenient for a user. 
         [0010]    Therefore, employment of a light scanning photoelectric switch, with which setting of an area for detecting a position of an object (protection area) can be arbitrarily changed, instead of a mat switch or the like, has been proposed. However, the setting itself is complicated because an additional setting device such as a personal computer (PC) is required in order to set the protection area, installation of the light scanning photoelectric switch is difficult compared to mat switches or light curtains that practically do not require setting of the detection area. 
         [0011]    On the other hand, in order to allow a minimum necessary setting without connecting to the PC, it is necessary to provide a display screen of a certain degree of size which displays setting contents of the protection area and a status of safety functions and failures. Further, an operating unit capable of switching the setting and display contents is also necessary. Such a display screen and an operating unit can increase a size of the photoelectric switch. 
       SUMMARY OF THE INVENTION 
       [0012]    In view of the above problem, an object of the present invention is to provide a light scanning photoelectric switch with which various settings of the light scanning photoelectric switch such as setting of a protection area can be easily carried out, without increasing a size of the light scanning photoelectric switch. 
         [0013]    In order to achieve the above object, a light scanning photoelectric switch according to the present invention that outputs a safety signal indicating that an operation of a device connected to the switch is either enabled or disabled includes: a light irradiating unit that applies light along a first axis; a light scanning unit disposed so as to be angled substantially at 45 degrees to the first axis, the light scanning unit rotating about the first axis, deflecting light applied by the light irradiating unit toward a detection area within a plane perpendicular to the first axis, and deflecting reflected light which is the light reflected on an object within the detection area in a direction along the first axis; a light receiving lens having a light axis along the first axis, the light receiving lens for collecting the reflected light deflected along the first axis by the light scanning unit; a light receiving reflecting body disposed so as to be angled substantially at 45 degrees to the first axis, the light receiving reflecting body deflecting the light axis of the reflected light that has been collected by the light receiving lens in a direction substantially perpendicular to the first axis; a photoelectric transducer that receives the reflected light deflected by the light receiving reflecting body, and photoelectrically converts the received light into a light receiving signal; a distance calculation unit that calculates a distance to the object based on the light receiving signal from the photoelectric transducer; a direction calculation unit that calculates a deflect direction of the light deflected toward the detection area by the light scanning unit; a position recognition unit that recognizes a position of the object based on the deflect direction calculated by the direction calculation unit, and on the distance to the object in the deflect direction calculated by the distance calculation unit; a failure sensing unit that senses a failure status of the light scanning photoelectric switch; a determination unit that determines whether or not the object is present within a protection area that has been set previously based on the position of the object recognized by the position recognition unit, and outputs a safety signal based on a result of the determination, based on the failure status sensed by the failure sensing unit, and on a status of a safety function of the light scanning photoelectric switch; a display unit disposed substantially parallel to the light receiving reflecting body and angled substantially at 45 degrees to the axis, the display unit having a display screen that displays information including at least one of the safety signal, the result of the determination, setting contents of the light scanning photoelectric switch, the status of the safety function of the light scanning photoelectric switch, and information of the failure status; and an operating unit provided in vicinity of the display unit, and for switching the information displayed in the display screen to different one of the safety signal, the result of the determination, the setting contents of the light scanning photoelectric switch, the status of the safety function of the light scanning photoelectric switch, and the information of the failure status. 
         [0014]    According to the present invention, the display screen that displays various statuses of the light scanning photoelectric switch and the operating unit for switching the information displayed in the display screen are provided. Accordingly, it is possible to carry out various setting and recognition of the safety function easily without additionally connecting a PC to the photoelectric switch. 
         [0015]    On the other hand, the photoelectric switch is provided with the large light receiving reflecting body and the light receiving lens in order to collect the light that is diffusely reflected on the object, and the light receiving reflecting body is provided so as to be angled to the first axis and the reflected light is collected to photoelectric transducer on the rear side in order to reduce the size of the photoelectric switch. 
         [0016]    Therefore, by providing the display screen and the operating unit parallelly along the rear side of the large light receiving reflecting body, the large sized display screen and operating unit can be disposed on a surface of the photoelectric switch. 
         [0017]    As the display screen and the operating unit are not provided on a top surface of the photoelectric switch, the size of the photoelectric switch does not increase in the direction of the first axis. 
         [0018]    As used herein, the detection area refers to an area in which the presence of the object can be detected by receiving the scanning light that has been reflected on the object and that is defined by the distance to the object and a range of scanning the scanning light. This detection area is previously set for each device before shipment. The protection area is previously set and recorded in a predetermined recording unit for each spot at which the switch of the present invention is used in the detection area. 
         [0019]    In other words, the detection area is defined by a boundary of a range in which the presence of the object can be recognized without fail, while the protection area is an area in which safety of workers and external devices must be ensured. 
         [0020]    In the present invention, it is preferable that the detection area includes at least a front area and both side areas of the light scanning photoelectric switch, and the photoelectric transducer is provided at a rear side of the light scanning photoelectric switch. 
         [0021]    In this aspect of the present invention, by providing the photoelectric transducer on the rear side of the photoelectric switch, the display unit and the operating unit can be provided on the front side of the photoelectric switch that corresponds to the detection area. 
         [0022]    In the present invention, it is preferable that as the setting contents that are displayed in the display screen, three directions from a reference point of the protection area and distances in the three directions from the reference point are displayed. 
         [0023]    In this aspect of the present invention, it is possible to set the protection area easily only by setting three reference points. In this case, although it is necessary to further enlarge the display screen, even such a display screen with an increased size can be provided for the small sized photoelectric switch according to the present invention. 
         [0024]    In the present invention, it is preferable that the light scanning photoelectric switch further includes an indicating lamp for an OSSD that indicates the result of the determination on whether or not the object is present within the protection area, and an indicating lamp for an interlock status in which, when the object is present within the protection area, an operation is disabled until a predetermined input for resetting is inputted, wherein the indicating lamps are provided in vicinity of the display screen of the display unit. 
         [0025]    According to this aspect of the present invention, by providing the indicating lamp for the interlock status and the indicating lamp for the OSSD in vicinity of the display screen of the display unit, a worker is allowed to intuitively know the operation status of the light scanning photoelectric switch. 
         [0026]    In the present invention, it is preferable that the operating unit is provided with an operation button for setting the setting contents, and the operation button is provided on a surface on which the display screen is provided. 
         [0027]    According to this aspect of the present invention, various settings of the light scanning photoelectric switch can be carried out using the operation button without additionally connecting a PC to the photoelectric switch. 
         [0028]    In the present invention, it is preferable that a light projecting device is provided that projects the light along a line formed by having a normal line that passes through the light axis of the light receiving lens and that is perpendicular to the rear side rotate about the light axis by an angle substantially at 40 degrees to 50 degrees. 
         [0029]    According to this aspect of the present invention, it is possible to reduce the size of the photoelectric switch compared to the case in which the light projecting device is provided immediately behind the first axis. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0030]      FIG. 1  is a schematic perspective view illustrating an optical system of a light scanning photoelectric switch according to a first embodiment of the present invention; 
           [0031]      FIG. 2A  is a schematic configurational view illustrating the light scanning photoelectric switch and  FIG. 2B  is a schematic plan view illustrating a detection area and a protection area of the light scanning photoelectric switch; 
           [0032]      FIG. 3  is a schematic perspective view illustrating the light scanning photoelectric switch; 
           [0033]      FIG. 4A  is a schematic right side view and  FIG. 4B  is a schematic perspective view from bottom right, illustrating the light scanning photoelectric switch; 
           [0034]      FIG. 5  is an exploded perspective view illustrating the light scanning photoelectric switch; 
           [0035]      FIG. 6  is a schematic perspective view illustrating the light scanning photoelectric switch with a cover and a sealing member thereof being dismounted; 
           [0036]      FIG. 7  is a schematic vertical cross-sectional view illustrating the light scanning photoelectric switch; 
           [0037]      FIG. 8  is a schematic right side view illustrating a device main body of the light scanning photoelectric switch; 
           [0038]      FIG. 9  is a schematic vertical cross-sectional view illustrating the device main body of the light scanning photoelectric switch; 
           [0039]      FIG. 10A  is a schematic cross-sectional view illustrating an upper portion of the device main body viewed from the bottom and  FIG. 10B  is a cross-sectional view taken along line XB-XB of the upper portion of the device main body; 
           [0040]      FIG. 11  is a schematic perspective view of the light scanning photoelectric switch viewed from the bottom with the cover and the sealing member being dismounted; 
           [0041]      FIG. 12  is a schematic view illustrating a display operation panel; 
           [0042]      FIG. 13A  is a schematic plan view illustrating a method of setting a protection area, and  FIGS. 13B to 13G  are schematic front views illustrating a display screen of a liquid crystal display unit; and 
           [0043]      FIG. 14  is a schematic front view illustrating a display screen of a liquid crystal display. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     First Embodiment 
       [0044]    Hereinafter, one embodiment of the present invention will be described with reference to the drawings. 
         [0045]    A light scanning photoelectric switch according to the present embodiment, for example, is connected to an external device such as a robot, and outputs a safety signal indicating that operation of the connected external device is either enabled or disabled. For example, when an object M such as a human body is detected within a protection area A 2  that has been previously set as shown in  FIG. 2B , the photoelectric switch of the present embodiment, in a predetermined mode, outputs an operation disable signal to prohibit (disable) the operation of the external device connected to the photoelectric switch. The protection area A 2  is previously set within a detection area A 1  and recorded. 
       Optical Path 
       [0046]    The photoelectric switch of the present embodiment detects the object M by, for example, scanning light such as a laser beam. An optical system is first described. 
         [0047]    Light Irradiating Unit 
         [0048]    As shown in  FIG. 1 , light L 1  constituted from a laser beam projected from a light projecting device LD travels through a light projecting lens  10 , and is deflected by first and second light projecting mirrors (reflecting mirrors)  11 ,  12  and applied along a predetermined first axis Z. Thus, the light projecting lens  10  and the first and second light projecting mirrors  11 ,  12  constitute a light irradiating unit that projects the light L 1  along the first axis Z. 
         [0049]    Light Scanning Unit  2   
         [0050]    The light L 1  reflected on the second light projecting mirror  12  is directed toward and applied on a light scanning unit  2 . The light scanning unit  2  is constituted from a mirror that rotates about the first axis Z and is disposed so as to be angled substantially at 45 degrees to the first axis Z. The light scanning unit  2  is driven to rotate by a motor  8  as shown in  FIG. 7 , thereby deflecting the light L 1  that has been applied by the irradiating unit toward a plane perpendicular to the first axis Z and scanning the light L 1  across the plane, as shown by a dashed line in  FIG. 2B . The scanning light L 1  that has been deflected by the light scanning unit  2  is scanned across and applied on the detection area A 1  shown in  FIG. 2B  by the light scanning unit  2  being driven to rotate. 
         [0051]    When the object M is present within the detection area A 1 , the light scanning unit  2  deflects the scanning light L 1  (hereinafter referred to as “reflecting light L 2 ”) that has been reflected on the object M along the first axis Z as shown in  FIG. 1 . 
         [0052]    Light Receiving Reflecting Body  21  and Photoelectric Transducer  22   
         [0053]    The reflecting light L 2  deflected by the light scanning unit  2  is collected by a light receiving lens  20 . The light receiving lens  20  has a light axis that is coincident with the first axis Z, and the reflecting light L 2  collected by the light receiving lens  20  is deflected by a light receiving reflecting body  21 , and collected by a photoelectric transducer  22 . 
         [0054]    The light receiving reflecting body  21  is disposed so as to be angled substantially at 45 degrees to the first axis Z, and to deflect a light axis of the reflecting light L 2  collected by the light receiving lens  20  in a second axis Y that is substantially perpendicular to the first axis Z, and collects the light at the photoelectric transducer  22 . 
         [0055]    The photoelectric transducer  22  receives the reflecting light L 2  that has been deflected by the light receiving reflecting body  21 , and photoelectrically converts the received reflecting light L 2  to generate a light receiving signal. 
       Device Configuration 
       [0056]    As shown in  FIG. 2A , the light projecting device LD and the photoelectric transducer  22  are connected to a control unit  30 . 
         [0057]    The control unit  30  is connected with, as shown in  FIG. 3 , a liquid crystal display (one example of a display unit)  38   a  and an indicating lamp  38   b  that includes an LED (Light Emitting Diode) for indicating various statuses of the photoelectric switch, as well as an operating unit  39  for setting the protection area A 2  and the like. 
         [0058]    On the other hand, a first connector  5  is connected to the control unit  30  shown in  FIG. 2 . To the first connector  5 , a cable  5 A having a second connector which is connected to the external device is connected. The cable  5 A having a second connector includes a second connector  50  at an end of a cable portion  51 . 
         [0059]    The control unit  30  is provided with a distance calculation unit  31 , a direction calculation unit  32 , a position recognition unit  33 , a determination unit  34 , a confirmation unit  35 , a signal generating unit  36 , a display control unit  37 , and the like. 
         [0060]    Direction Calculation Unit  32   
         [0061]    The direction calculation unit  32  calculates an irradiation direction (deflect direction) of the scanning light L 1  deflected toward the detection area A 1  by the light scanning unit  2  and a direction along which the reflecting light L 2  from the object M enters when projecting and receiving the light. 
         [0062]    Here, a rotation shaft of the motor  8  shown in  FIG. 7  is provided with, for example, a photoelectric rotary encoder  8   a.  The deflect directions of the light L 1  and L 2  can be obtained by calculating an angle of rotation of the light scanning unit  2  based on an output from the rotary encoder  8   a.    
         [0063]    Distance Calculation Unit  31   
         [0064]    The distance calculation unit  31  calculates a distance to the object M in each deflect direction based on the light receiving signal from the photoelectric transducer  22 . Specifically, the distance to the object M is calculated by multiplying a difference between a light projecting timing of the scanning light L 1  from the light projecting device LD and a light receiving timing of the photoelectric transducer  22  that has received the reflecting light L 2  reflected on the object M, by the known speed of light. The calculation of the distance based on the light projecting and receiving timings is repeated at a predetermined interval of short period of time. 
         [0065]    Position Recognition Unit  33   
         [0066]    The position recognition unit  33  shown in  FIG. 2A  recognizes a position of the object M. Specifically, the position recognition unit  33  recognizes the position of the object M by calculating the position of the object M based on the deflect direction calculated by the direction calculation unit  32  and the distance to the object M in this deflect direction calculated by the distance calculation unit  31  for each of the light projecting and receiving timings. 
         [0067]    Determination Unit  34   
         [0068]    The determination unit  34  determines whether or not the object M is present within the protection area A 2  that has been previously set based on the position of the object M calculated by the position recognition unit  33 . 
         [0069]    First and Second Optical Elements  71 ,  72   
         [0070]    Here, a casing  1  of the photoelectric switch is provided with a transparent front cover  4  as shown in  FIG. 3  that transmits the scanning light L 1  and the reflecting light L 2 . For example, an amount of the reflecting light L 2  that enters the photoelectric transducer  22  shown in  FIG. 2A  decreases if the cover  4  is obscured by dirt or the like, and therefore sensitivity in detecting the position of the object M is degraded. 
         [0071]    As used herein, “transparent” means transmissive to a wavelength of the scanning light L 1 . When the scanning light L 1  is infrared light, the front cover  4  is transparent to the wavelength of infrared light. 
         [0072]    In view of the above problem, a plurality of first and second optical elements  71 ,  72  for monitoring a status of the cover  4  shown in  FIG. 2A  are provided and these elements constantly monitor the status of the cover  4 . The first and second optical elements  71 ,  72  are disposed so as to face each other with the cover  4  interposed therebetween, and light from the first optical element  71  passes through the cover  4  and enters the second optical element  72 , which transmits the status of the cover  4  as a part of the optical path to the control unit  30 . 
         [0073]    Confirmation Unit  35   
         [0074]    The confirmation unit  35  monitors its own status including the status of the cover  4  sent from the second optical element  72 , and confirms the own status is a safety status. Specifically, the confirmation unit  35  constitutes a failure detection unit that detects whether or not there is a failure in the photoelectric switch, that is, a unit that confirms whether or not the status is sufficiently safe to carry out the desired detection and the like. When the confirmation unit  35  determines that the photoelectric switch is in failure, such a status is displayed in the liquid crystal display  38   a  and the LED  38   b,  and the operation disable signal is transmitted to the external device via the signal generating unit  36 . 
         [0075]    Further, when the confirmation unit  35  determines based on the signal from the second optical element  72  that the cover  4  is deteriorated and requires replacement, the control unit  30  has such a status be displayed in the liquid crystal display  38   a  and the LED  38   b.    
         [0076]    Although the above example describes the case in which the first optical element and the second optical element are disposed so as to face each other with the cover  4  interposed therebetween, the present invention is not limited thereto. For example, a mirror as a third optical element can be disposed in place of the second optical element  72 , and the second optical element  72  is disposed near the first optical element  71 . In this case, the light projected from the first optical element  71  passes through the cover  4  to reflect upon the mirror as the third optical element, and the reflected light again passes through the cover  4  so that the second optical element  72  receives the light. 
         [0077]    Signal Generating Unit  36   
         [0078]    The signal generating unit  36  generates a safety signal based on a result of the determination by the determination unit  34 . For example, in a predetermined mode, when a normal operation of the photoelectric switch can be confirmed and when the determination unit  34  determines the object M is not present within the protection area A 2 , the signal generating unit  36  generates a function enable signal as a safety signal. The generated signal is transmitted from the control unit  30  to the external device via the first connector  5 , thereby allowing the external device to operate. 
       Casing  1   
       [0079]    As shown in  FIG. 3  and  FIGS. 4A and 4B , the photoelectric switch is provided with the casing  1 , a display operation panel  3 , and the cover  4 . 
         [0080]    As shown in  FIG. 5 , the photoelectric switch is provided with a device main body  9  constituted from a configuration device including the optical system described above and a rear cover  1   b  as a part of the casing  1 . The device main body  9  is attached and fixed within the casing  1 , and a rear side thereof is sealed by the rear cover  1   b.    
         [0081]    As shown in  FIGS. 6 and 11 , the casing  1  is provided with an opening  1   d.  The opening  1   d  includes the optical path from the light scanning unit  2  to the detection area A 1  ( FIG. 2B ), and is substantially in U-shape in a cross section that is perpendicular to the first axis Z ( FIG. 7 ). 
         [0082]    At the opening  1   d,  the cover  4  is detachably provided for the casing  1  so as to cover the opening  1   d  of the casing  1 . An elastically deformable sealing member  6  is interposed between the casing  1  and the cover  4 . 
         [0083]    Device Main Body  9   
         [0084]    As shown in  FIG. 7 , the motor  8  for rotating the light scanning unit  2  about the first axis Z is provided below the light scanning unit  2 . As shown in  FIG. 8 , the rotation shaft of the motor  8  is provided with the rotary encoder  8   a.    
         [0085]    As shown in  FIG. 9 , the light receiving reflecting body  21  is disposed so as to be angled substantially at 45 degrees to the first axis Z. The light axis of the reflecting light L 2  that has been collected by the light receiving lens  20  is deflected in a direction along the second axis Y that is substantially perpendicular to the first axis Z at a center of a solid angle of the reflecting light L 2 , and collected to the photoelectric transducer  22  provided on a rear side B of the device main body  9 . 
         [0086]    As shown in  FIGS. 10A and 10B , the second light projecting mirror  12  is attached substantially at a center of the axis Z of the light receiving lens  20 . 
       Display Operation Panel  3   
       [0087]    As shown in  FIG. 3 , the display operation panel  3  includes the liquid crystal display  38   a,  the indicating lamp  38   b,  and the operating unit  39 . 
         [0088]    As shown in  FIGS. 13B to 13G  and  FIG. 14 , various screens are displayed in the liquid crystal display  38   a.    
         [0089]    As shown in  FIG. 12A , a plurality of indicating lamps  38   b  is provided so as to correspond to various functions of the light scanning photoelectric switch, and each lamp is lit up in a color corresponding to each status of the photoelectric switch. 
         [0090]    The operating unit  39  includes a plurality of operation buttons  39   a  to  39   e  that is provided in vicinity of the liquid crystal display  38   a,  and as will be described later, the operating unit  39  can change the display content of the liquid crystal display  38   a  and modes of the light scanning photoelectric switch by carrying out various operations by pressing down the operation buttons  39   a  to  39   e.    
         [0091]    As shown in  FIG. 7 , the display operation panel  3  is provided substantially parallel to the light receiving reflecting body  21 , so as to be angled substantially at 45 degrees to the first axis Z. Accordingly, it is possible to reduce the size of the photoelectric switch by cutting slanted at an upper portion of the casing of the photoelectric switch because an angular protrusion of the casing  1  can be made smaller. At the same time, it is possible to increase the size of the display operation panel  3 . 
         [0092]    Here, the detection area A 1  shown in  FIG. 2B  includes regions on a front side F and both lateral sides S of the light scanning photoelectric switch shown in  FIG. 3 , and the photoelectric transducer  22  is disposed on a rear side B of the photoelectric switch (rear side of the first axis Z) as shown in  FIG. 7 . 
         [0093]    On the other hand, as shown in  FIGS. 10A and 10B , the light projecting device LD is provided so as to project the scanning light L 1  along a line LM formed by having a normal line LS that passes through the light axis Z of the light receiving lens  20  and that is perpendicular to the rear side B rotate about the light axis Z by an angle θ. The angle θ is set substantially at 40 to 50 degrees. 
         [0094]    Arranging the light projecting device LD as described above can prevent the light projecting device LD from protruding from the rear side B, compared to a case in which the light projecting device LD is disposed immediately behind the first axis Z, thereby further reducing the size of the photoelectric switch. 
       Protection Area Setting Mode 
       [0095]    Hereinafter, an example of setting the rectangular protection area A 2  shown in  FIG. 13A  will be described. 
         [0096]    First, in order to set the protection area A 2 , the control unit  30  (FIG.  2 ) is set to a protection area setting mode by a predetermined operation via the operation buttons  39   a  to  39   e  shown in  FIG. 12A . Next, test pieces TL, TR, and TF are respectively placed in three directions with respect to a reference point O of the protection area A 2 , and the photoelectric switch detects each of the test pieces TL, TR, and TF, thereby calculating a distance P 2  from the reference point O to a left side AL, a right side AR, and a front side AF. 
         [0097]    Upon setting the control unit  30  ( FIG. 2A ) to a front side setting mode by operating the operation buttons  39   a  to  39   e  shown in  FIG. 12A , a front side setting screen shown in  FIG. 13B  is displayed. In the liquid crystal display  38   a,  a setting value P 1  and a detection value P 2  are displayed in addition to characters such as “Front”, and characters “S”, “M”, and arrows that can visually indicate the settings of the front side, and a direction for setting the protection area A 2  is displayed. The detection value P 2  represents a distance between the light scanning photoelectric switch and the test piece TF placed on the front side calculated by the distance calculation unit  31 . 
         [0098]    Thereafter, as shown in  FIG. 13C , the setting of the setting value P 1  is changed by touching up and down keys  39   a,    39   b  shown in  FIG. 12A  as needed. Upon a predetermined operation after changing the setting, a value corresponds to the setting value P 1  is recorded in the control unit  30  ( FIG. 2A ), and thus the distance to the front side of the protection area A 2  (front side distance) is set. 
         [0099]    After setting the front side, similar operations are sequentially carried out, thereby setting the distances to the left side and the right side of the protection area A 2  (left side and right side distances) as shown in  FIGS. 13D to 13G . 
         [0100]    By the detection of the test pieces TL, TR, and TF as described above, it is possible to set the protection area A 2  easily without using a setting device that is additionally provided. 
         [0101]    Moreover, a protection area of various shapes can be set by allowing detection of four or more test pieces. 
         [0102]    Further, it is possible to provide a warning area (not shown) around the protection area, and when a worker approaches this warning area, warning can be made by having the liquid crystal display  38   a  shown in  FIG. 12  display a warning, or by lighting the indicating lamp  38   b.  In this case, the warning area can be automatically set upon setting of the protection area A 2 . 
       Minimum Detection Object Size Setting Mode 
       [0103]    Next, a minimum size of a detection object is set. Upon a predetermined operation via the operating unit  39  and setting of the control unit  30  to a minimum detection object size setting mode, the size of the minimum detection object shown in  FIG. 14E  is displayed. The size of the minimum detection object is set by an operator carrying out a predetermined operation. When the size of the minimum detection object is set large, the protection area A 2  can be set at a position farther from the scanning photoelectric switch. In contrast, when the size of the minimum detection object is set small, the protection area A 2  can be set only at a position closer to the scanning photoelectric switch. 
       Operation Status 
       [0104]    The light scanning photoelectric switch of the present invention can be set to various operation statuses. These operation statuses include a normal operation status, an abnormal status based on failure detection by the confirmation unit  35  shown in  FIG. 2A , a special function status, and the like. 
         [0105]    Normal Operation Status 
         [0106]    In the normal operation status, according to the determination by the determination unit  34  on whether or not the object M is present within the protection area A 2  ( FIG. 2B ), the safety signal from the signal generating unit  36  is transmitted to the external device via the first connector  5 , the second connector  50 , and a cable  51 . 
         [0107]    When the normal operation of the photoelectric switch can be confirmed by the confirmation unit  35  and when the determination unit  34  determines that the object M is not present within the protection area A 2 , the signal generating unit  36  generates a function enable signal as the safety signal (signal for enabling operation), and transmits the signal from the first connector  5  to the external device. 
         [0108]    At the same time, the control unit  30  causes the liquid crystal display  38   a  to display “OSSD ON” as shown in  FIG. 14A  via the display control unit  37 , and has the indicating lamp  38   b  light up in green corresponding to the OSSD shown in  FIG. 12A . 
         [0109]    Upon reception of the function enable signal, the external device either starts or continues a predetermined operation. 
         [0110]    On the other hand, when the normal operation of the light scanning photoelectric switch can be confirmed by the confirmation unit  35  and when the determination unit  34  detects the object M within the protection area A 2 , the signal generating unit  36  generates a function disable signal as the safety signal (operation disable signal), and transmits the signal from the first connector  5  to the external device. 
         [0111]    At the same time, the control unit  30  causes the liquid crystal display  38   a  to display “OSSD OFF” as shown in  FIG. 14A  via the display control unit  37 , and has the indicating lamp  38   b  light up in red corresponding to the OSSD shown in  FIG. 12A . 
         [0112]    Upon reception of the operation disable signal, the operation of the external device is disabled. 
         [0113]    Abnormal Status 
         [0114]    When the confirmation unit  35  shown in  FIG. 2A  determines that the photoelectric switch is in an abnormal status in which the normal operation cannot be performed, the signal generating unit  36  generates the operation disable signal as the safety signal, and transmits the signal from the first connector  5  to the external device. 
         [0115]    On the other hand, the control unit  30  causes the liquid crystal display  38   a  to display an error number such as “E011” via the display control unit  37  as shown in  FIG. 14D . 
         [0116]    Upon reception of the operation disable signal, the operation of the external device is disabled. 
         [0117]    Special Function Operation Status 
         [0118]    Examples of functions in the special function operation status include, for example, a mute function and an interlock function. 
         [0119]    In the special function operation, the control unit  30  shown in  FIG. 2A , regardless of the result of the determination by the determination unit  34 , the safety signal for enabling the operation is outputted from the first connector  5 . 
         [0120]    Transition to the special function can be carried out by the operator operating the operating unit. 
         [0121]    Hereinafter, the special functions will be described. 
         [0122]    Mute Function 
         [0123]    The mute function is a function to output the safety signal for enabling the operation from the first connector  5  temporarily regardless of the result of the determination by the determination unit  34 . The transition from the normal operation status to the mute function status is carried out only in a state in which the normal operation of the light scanning photoelectric switch can be confirmed by the confirmation unit  35  and in which the determination unit  34  normally receives the reflecting light L 2 . 
         [0124]    During the mute function, a display indicating “MUTE SENSOR ON” is displayed on the liquid crystal display  38   a  as shown in  FIG. 14B . On the other hand, when the mute function is released, a display indicating “MUTE SENSOR OFF” is displayed on the liquid crystal display  38   a.    
         [0125]    Interlock Function 
         [0126]    The interlock function is a function to, when the determination unit  34  determines that the object M is present within the protection area A 2  ( FIG. 2B ), prohibit the transition to the operation enable status until a reset is inputted from the operating unit  39  ( FIG. 12A ). This status is referred to as “being interlocked”. 
         [0127]    As shown in  FIG. 14C , during the mute or when being interlocked, an indication corresponding to each status is displayed in the liquid crystal display  38   a.  When being interlocked, the indicating lamp  38   b  lights up in yellow corresponding to INTER LOCK shown in  FIG. 12A . 
         [0128]    In many cases, other functions such as an override function, for example, are provided in addition to the mute function and the interlock function. The override function occurs triggered by an input from the external device during the mute, and is a function to temporarily output the operation enable signal as a safety signal. 
         [0129]    Further, the display operation panel  3  can be provided with a plurality of indicating lamps  38   b  for a single signal as shown in  FIG. 12B . 
         [0130]    Moreover, the light scanning unit  2  can be provided with separate scanning reflecting bodies for projecting light and receiving light. For example, a first scanning reflecting body for projecting light and a second scanning reflecting body for receiving light can be provided. In this case, the first scanning reflecting body rotates about the first axis Z, is disposed so as to be angled substantially at 45 degrees to the first axis Z, and deflects the light applied by the light irradiating unit toward the detection area A 1  within a plane perpendicular to the first axis Z. On the other hand, the second scanning reflecting body rotates about the first axis Z in synch with the first scanning reflecting body, and deflects the reflection of light from an object within the detection area A 1  in the direction along the first axis Z. 
       INDUSTRIAL APPLICABILITY 
       [0131]    The present invention can be used for a light scanning photoelectric switch.