Displacement switch

The triangulation displacement sensor addresses high-speed responsiveness and efficient display challenges by incorporating a light projecting and receiving unit with an elongated dot matrix display, enhancing user accessibility and reducing installation complexity.

JP7714628B2Active Publication Date: 2025-07-29KEYENCE CORP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2023216339
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2025-07-29
Estimated Expiration
2040-04-10

AI Technical Summary

Technical Problem

Existing displacement switches, particularly triangulation sensors, face challenges in achieving high-speed responsiveness and efficient display of displacement measurements, especially when installed on DIN rails, due to the need to access displays located far from the detection unit.

Method used

A triangulation displacement sensor with a light projecting unit, light receiving unit, measurement unit, determination unit, and an elongated dot matrix display that indicates displacement amount, peak position, and threshold values directly on the display, allowing for high-speed responsiveness and efficient display of measurements.

Benefits of technology

The solution enables high-speed responsiveness and efficient display of displacement measurements, improving user accessibility and reducing installation complexity by integrating display elements closer to the detection unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007714628000001
    Figure 0007714628000001
  • Figure 0007714628000002
    Figure 0007714628000002
  • Figure 0007714628000003
    Figure 0007714628000003
Patent Text Reader

Abstract

To provide a displacement switch capable of causing a user to intuitively recognize or confirm a state in which a threshold value allowing a stable operation can be set in a tuning mode in which the threshold value can be automatically set.SOLUTION: If a step (distance difference) between first and second points to be detected is greater than 0.5 mm when a step in which a threshold value allowing a stable operation of a triangulation distance measurement sensor 200 is temporarily 0.5 mm, a stably operable threshold value can be automatically set. An OELD (organic electroluminescence display) 12 displays "0.5 mm" next to a current value "199.9" at tuning.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to Relates to a triangulation displacement sensor for measuring the displacement of a detection target.

Background Art

[0002] There are two types of displacement switches: a type including an image sensor that performs photoelectric conversion and a type not including an image sensor, and they are used properly according to various applications. Specifically, displacement switches include, in addition to proximity switches, contact switches, ultrasonic switches, etc., triangulation sensors, TOF (Time Of Flight), photoelectric switches, and the like. These are applied to the detection of the height of the detection object, the unevenness of the surface of the detection object, the presence or absence of the detection object, and the like.

[0003] Patent Document 1 discloses a photoelectric switch provided with a 7-segment display unit. The photoelectric switch has a plurality of operation buttons adjacent to the 7-segment display unit, and the user can switch the display of the threshold value, the current value, the peak hold value, etc. by properly using the plurality of operation buttons or by short-pressing or long-pressing each operation button.

[0004] As functions related to the automatic setting of the threshold value, this photoelectric switch has a two-point tuning mode, a full auto-tuning mode, and the like. In the two-point tuning mode, the first detection value at the time when the user operates the first operation button and the second detection value at the time when the user operates the second operation button are captured. Then, for example, an intermediate value between the first detection value and the second detection value is set as the threshold value, and this automatically set threshold value is numerically displayed on the 7-segment display unit.

[0005] The full-auto tuning mode is used, for example, to automatically set a threshold value in a state where a plurality of detection objects are running on a conveyance line. That is, in the full-auto tuning mode, a plurality of detection values are captured, and, for example, an intermediate value between the maximum value (peak value) and the minimum value (bottom value) in the distribution of the plurality of detection values is automatically set as the threshold value. Then, this threshold value is numerically displayed on the 7-segment display unit.

[0006] Patent Document 2 discloses a photoelectric switch that employs a dot matrix type display as a display unit. As a typical example of the dot matrix type display, a color liquid crystal display is disclosed, and an organic EL display (OELD) is cited as a modified example.

[0007] Patent Document 3 discloses a photoelectric switch in a form in which a plurality of switch bodies are fixed to a DIN rail. "DIN" is an abbreviation of the German Institute for Standardization. The DIN rail is fixedly arranged at an exposed location with an open periphery, and a large number of switch bodies are fixed adjacent to each other on the DIN rail. For this reason, this type of photoelectric switch is called a "series-connected type photoelectric switch". Since the switch body is installed at a convenient location for installing the DIN rail, the switch body fixed to the DIN rail is arranged at a distance from the head portion constituting the detection unit.

[0008] In the series-connected type photoelectric switch, a 7-segment display unit or a dot matrix display unit is arranged on the switch body. The current value and / or the threshold value, etc. are displayed on this display unit. When the user wants to check the display of this switch body, the user needs to access the switch body fixed to the DIN rail at a position relatively far from the head portion.

Prior Art Documents

Patent Documents

[0009]

Patent Document 1

Patent Document 2

[0010] As described above, the displacement switch is used for detecting "steps" such as the height of the detection object (workpiece), the unevenness of the surface of the workpiece, and the presence or absence of the workpiece. 。

[0011] An object of the present invention is to A triangulation displacement sensor capable of achieving high-speed responsiveness provide the following. [Means for Solving the Problems]

[0012] According to the present invention, the above technical problems are solved by a light projecting unit that projects measurement light toward a detection region; a light receiving unit that photoelectrically converts the measurement light reflected in the detection region with a plurality of pixels to generate a light receiving waveform indicating a light receiving signal corresponding to each pixel; a measurement unit that measures the displacement of a detection target based on the peak of the light receiving waveform generated by the light receiving unit; a determination unit that generates a determination signal based on a comparison between a threshold value and the displacement of the detection target measured by the measurement unit; an elongated dot matrix display; Generate a display screen in the longitudinal direction of the dot matrix display that indicates the displacement amount, Obtain the position of the peak of the received light waveform, and perform received light waveform processing to calculate at which position on the display screen of the dot matrix display the obtained peak position of the received light waveform should be drawn. On the display screen, at the position calculated by the received light waveform processing, the displacement of the detection target measured by the measurement unit Display a peak character indicating the position of the peak of the received light waveform corresponding to it, On the display screen, the threshold value A threshold character meaning along the longitudinal direction of the dot matrix display With the peak character displayed side by side And Before the dot matrix display described above On the display screen of when displaying a mask region, The peak character indicating the position of the peak of the received light waveform, and along the longitudinal direction of the dot matrix display Changing A display generation unit that generates a display screen for displaying a mask area. The present invention is achieved by providing a triangulation displacement sensor, wherein the measurement unit measures the displacement of a detection target based on the peak of the received light waveform outside the mask area.

[0013] The effects and other objects of the present invention will become apparent from the following detailed description of the preferred embodiments.

Brief Description of the Drawings

[0014]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Figure 25

Figure 26

Figure 27

Figure 28

Figure 29

Figure 30

Figure 31

Figure 32

Figure 33

Figure 34

Figure 35

Figure 36

Figure 37

Figure 38

Mode for Carrying Out the Invention

Example

[0015] Hereinafter, preferred embodiments of the present invention will be described based on the accompanying drawings. FIG. 1 shows the displacement switch of the embodiment, and more specifically shows the optical triangulation distance sensor 200. Referring to FIG. 1, the triangulation distance sensor 200 is configured to be divided into first and second housings 2 and 4, and the first and second housings 2 and 4 are connected by a relay cable 6. At least the first housing 2 is preferably made of a metal that is generally superior in strength and rigidity to synthetic resin. The second housing 4 may be made of metal or may be made of synthetic resin.

[0016] Among the components included in a general triangulation distance sensor, the optical components required for triangulation and the component groups related thereto, such as a power supply board, are housed in the first housing 2, and other component groups such as a dot matrix display, for example, an organic EL display (OELD), are housed in the second housing 4. Thereby, the first housing 1 can be miniaturized. For easy understanding of the explanation, the first housing 2 is called the "head part", and the second housing 4 is called the "main body part".

[0017] FIG. 2 shows the main body part 4. The main body part 4 has an elongated outer shape with a somewhat flat cross-section that is substantially rectangular, and has a head-side end 4a located at one end in the longitudinal direction and an output-side end 4b located at the other end in the longitudinal direction. Further, the side surfaces constituted by the four surfaces of the main body part 4 include a relatively wide first side surface 4c and a narrow second side surface 4d adjacent to the first side surface 4c.

[0018] An output cable 8 is connected to the main body 4, and a determination signal, that is, an ON / OFF signal, is output from the main body 4 through the output cable 8 toward a control device 10 (Figure 1) such as a PLC. Both the relay cable 6 and the output cable 8 have flexibility and can be bent. As shown in Figure 1, by folding back and bundling the relay cable 6, the distance between the head unit 2 and the main body 4 can be adjusted arbitrarily. Referring to Figure 2, the main body 4 has a groove-shaped neck portion N extending in the circumferential direction and protruding longitudinally from the head-side end 4a and the output-side end 4b, respectively. The peripheral surface of the neck portion N is preferably circular. By passing a binding band B around the neck portion N, it can be fixed at an arbitrary installation location IL close to the head unit 2, for example, about 30 cm away.

[0019] As a modification regarding the arrangement position of the neck portion N, instead of the neck portion N, grooves for receiving the binding band B may be provided in the main body 4 near the head-side end 4a and the output-side end 4b. The OELD 12 is disposed on the wide first side surface 4c. Also, on this first side surface 4c, a first indicator lamp 14 is disposed on one end side and a SET button 16 is disposed on the other end side with the OELD 12 interposed therebetween. The SET button 16 is used, for example, to select an operation mode such as automatic setting of a threshold value (teaching mode). On the narrow second side surface 4d, an UP button 18 and a DOWN button 20 are adjacently arranged, and a mode button 22 is disposed. The UP / DOWN buttons 18, 20 are used, for example, to adjust a threshold value or select a menu. The mode button 22 is used to switch the operation mode of the triangulation distance sensor 200. The above-described SET button 16 may be disposed on the narrow second side surface 4d instead of the first side surface 4c.

[0020] FIG. 3 is a diagram for explaining that the relay cable 6 and the output cable 8 are connected by being soldered to the main body 4. Reference numeral C indicates a contact of the main body substrate 36. Specifically, the relay cable 6 is connected to the flexible substrate 38, and the flexible base end 38 is soldered to the main body substrate 36. On the other hand, the output cable 8 is soldered to the main body substrate 36 via the vertical relay substrate 40 or the flexible substrate. By adopting such a configuration, the longitudinal dimension of the main body 4 can be reduced. By soldering the relay cable 6 and the output cable 8 to the main body substrate 36 using the flexible substrate, the degree of freedom regarding the attachment of the ends of the relay cable 6 and the output cable 8 can be given. On the other hand, by soldering the output cable 8 using the vertical relay substrate 40, the posture of the output cable 8 can be uniquely fixed. Note that the output cable 8 may be connected to the main body 4 using a connector (not shown). Similarly, the relay cable 6 may also be connected to the main body 4 using a connector (not shown).

[0021] FIG. 4 is a diagram for explaining elements disposed inside the head portion 2. The head portion 2 includes a motion sensor 50 for detecting a change in the installation posture of the head portion 2. A typical example of the motion sensor 50 is a gyro sensor, and other examples include an acceleration sensor and a geomagnetic sensor. The motion sensor 50 is installed integrally with the head portion 2. Specifically, the motion sensor 50 is assembled to the head portion 2 so as not to be displaced relative to the head portion 2. Thereby, when the head portion 2 receives an external force and the installation posture of the head portion 2 changes, the motion sensor 50 can sensitively detect that an optical axis displacement has occurred.

[0022] The optical axis displacement will be described with reference to FIG. 4. The light emitted from the light projecting unit 52 is condensed by the light projecting lens 54 to form a spot on the surface of the workpiece W. When the installation posture of the head unit 2 changes for some reason, the optical axis Lax of the light emitted from the light projecting unit 52 undergoes angular deviation, and the position of the spot on the surface of the workpiece W changes. This phenomenon is the "optical axis displacement". The motion sensor 50 installed in the head unit 2 is assembled to the head unit 2 in a non-relative displacement manner. The change in the posture of the head unit 2 can be detected by the motion sensor 50. This means that the change in the position of the spot can be detected by the motion sensor 50. Also, since the change in the posture of the head unit 2 is accompanied by angular deviation of the optical axis Lax of the light projection, the user can visually confirm whether the spot on the surface of the workpiece W has changed from the desired position, thereby knowing that a change in the posture of the head unit 2 has occurred. That is, the "displacement of the optical axis" is the displacement of the optical axis Lax of the head unit 2, that is, the light projecting unit 52, and it is important in proper operation that it is possible to visually confirm whether the position of the spot on the workpiece W is at the proper position together with the optical axis displacement occurrence signal of the motion sensor 50.

[0023] The head unit 2 has a light projecting unit 52, a light projecting lens 54, a light receiving lens 56, a mirror 58, and an imaging element 60, and an optical path for triangulation is formed by these elements. The imaging element 60 is composed of a linear image sensor, and the imaging element 60 includes a charge storage element. The imaging element 60 and the light receiving circuit 62 constitute a light receiving unit 64. The light projecting unit 52 is preferably composed of a semiconductor laser light source (InGaN / GaN gallium nitride system) that emits green laser light. The head unit 2 projects green laser light, which is measurement light, toward the detection region of the detection target. The state of the spot light irradiated on the workpiece affects the detection accuracy. The better the detection accuracy, the more the spot light is condensed. The state of the spot light of green laser light is superior to that of red. As will be described later, green is superior in relative visibility. Utilizing this characteristic, even if the intensity and power of the green laser light are limited, the visibility of the spot light can be ensured. Needless to say, it is desirable for the user to visually confirm that the projection beam is irradiated at the desired position of the workpiece in order to properly perform the detection.

[0024] The green laser light emitted from the light projecting unit 52 reaches the workpiece through the light projecting lens 54 and the light projecting window 66. The reflected light reflected from the surface of the workpiece passes through the light receiving window 67 and the light receiving lens 56, is refracted by the mirror 58, and is received by the light receiving unit 64. That is, the light receiving unit 64 receives the green laser light reflected from the detection region of the workpiece, and photoelectrically converts it to generate a light receiving signal. The light projecting unit 52 and the light receiving unit 64 are controlled by a processor 68 built into the head unit 2.

[0025] As can be seen from FIGS. 1 and 4, the head unit 2 has a relatively thin substantially rectangular parallelepiped shape, and the above-described light projecting window 66 and light receiving window 67 are arranged on the narrow first side surface 2a. Between the light projecting window 66 and the light receiving window 67, a first operation indicator lamp 70 composed of, for example, two-color LEDs of red and green is disposed. The first operation indicator lamp, that is, the front operation indicator lamp 70, can be lit or blinked in red, green, or yellow, which is a mixed color of red and green.

[0026] Of the first and second ends 2b and 2c in the longitudinal direction of the head portion 2, the second end 2c away from the light projection window 66 and the corner portion 2e between the second side surface 2d facing the first side surface 2a has a notched shape, and this corner portion 2e is composed of a 45° inclined surface. A hole through which the relay cable 6 passes is formed in this corner portion 2e, and water intrusion is prevented by the water stop member 72 in the hole. Inside the head portion 2 directly adjacent to the water stop member 72, two-color LEDs 74 of the same color as the first operation indicator lamp 70 are arranged. The water stop member 72 is composed of a light-transmitting member, and the second operation indicator lamp 76 is constituted by the LED 74 and the light-guiding water stop member 72. The first and second operation indicator lamps 70 and 76 are lit in yellow or green in synchronization with the ON / OFF output signal, and are also error-displayed, for example, by blinking red.

[0027] In the installation of the head portion 2, the first side surface 2a where the light projection / reception windows 66 and 68 are located and the corner portion 2e where the relay cable 6 is located are usually placed in an exposed state. In actual operation, by arranging the first and second indicator lamps 70 and 76 on the exposed first side surface 2a and corner portion 2e, it is not necessary to project the first and second operation indicator lamps 70 and 76 from the outer contour of the head portion 2. In other words, it is possible to make the user recognize the lighting and blinking of the first and second indicator lamps 70 and 76 without having to make the first and second operation indicator lamps 70 and 76 protrude in a form that inhibits the miniaturization of the outer contour of the head portion 2.

[0028] As described above, the relay cable 6 is connected to the corner portion 2e composed of a 45° inclined surface. Also, the second operation indicator lamp 76 is constituted by the light-guiding water stop member 72. Therefore, the second operation indicator lamp 76 arranged at the corner portion 2e is located inside the extension lines L1 and L2 of the second end 2c and the second side surface 2d that define the outer contour of the head portion 2 (Fig. 4). In other words, the second indicator lamp 76 does not protrude externally from the extension lines L1 and L2. Thereby, the outer dimensions of the head portion 2 miniaturized due to the presence of the second operation indicator lamp 76 do not expand. If miniaturization is not considered, the first and second indicator lamps 70 and 76 may be in a form protruding from the outer contour of the head portion 2.

[0029] As described above with reference to FIG. 2, by passing the binding band B around the groove-shaped neck portion N of the main body portion 4, the main body portion 4 can be fixed at an arbitrary position IL close to the head portion 2. FIG. 5 is a schematic cross-sectional view of the main body portion 4. The main body portion 4 has a square or rectangular cross-sectional shape. The first side surface 4c on which the OELD 12 is installed and the narrow second side surface 4d on which the UP / DOWN buttons 18, 20, etc. are installed intersect at right angles to each other. The third side surface 4e opposing the first side surface 4c and the fourth side surface 4f opposing the second side surface 4d are formed of flat surfaces, and the third side surface 4e and the fourth side surface 4f constitute the installation surface. With the third side surface 4e and / or the fourth side surface 4f in contact with the installation location, it is possible to fix the binding band B at an arbitrary relatively flat location IL (for example, a pillar) in the vicinity of the head portion 2.

[0030] FIG. 6 shows a first modification of the cross-sectional shape of the main body portion 4. As can be seen from FIG. 6, the first side surface 4c on which the OELD 12 is installed and the narrow second side surface 4d on which the UP / DOWN buttons 18, 20, etc. are installed may intersect at an angle greater than 90° with each other.

[0031] FIG. 7 shows a second modification of the cross-sectional shape of the main body portion 4. As can be seen from FIG. 7, the third and fourth side surfaces 4e, 4f constituting the installation surface described above may be formed of three or more surfaces, in the illustrated example, three flat surfaces 4g to 4i. According to this second modification, the three surfaces 4g to 4i each constitute the installation surface.

[0032] FIG. 8 shows a third modification of the cross-sectional shape of the main body portion 4. The third modification illustrates that the main body portion 4 may have an elliptical cross-sectional shape, and an attachment AT may be assembled to the elliptical main body portion 4 to form an installation surface with the attachment AT. The illustrated attachment AT includes installation surfaces Sf(1), Sf(2) having two planar contours, but the number of installation surfaces is arbitrary.

[0033] FIG. 9 is a block diagram for explaining the control system of the head unit 2. The laser light emitted by the green laser diode (LD) 520 constituting the light projecting unit 52 is monitored by a photodiode (monitor PD) 522, and the output current of this monitor PD 522 is input to the light projecting control circuit 680 through the I / V conversion circuit 524 and the A / D conversion circuit 526. The green LD 520 is controlled by the LD drive circuit 530, and this LD drive circuit 530 is controlled by the light projecting control circuit 680. The LD drive circuit 530 includes a current control circuit 532 and a light projecting switch circuit 534. A control signal is input to the current control circuit 532 from the light projecting control circuit 680 through the D / A conversion circuit 536, and a control signal is also input to the light projecting switch circuit 534 from the light projecting control circuit 680. Thereby, the green LD 520 projects laser light at a predetermined period and with a predetermined power. When an overcurrent flows through the LD drive circuit 530, it is detected by the overcurrent detection circuit 538, and the detection information of the overcurrent detection circuit 538 is supplied to the light projecting control circuit 680. Thereby, the light projecting control circuit 680 executes control to suppress the overcurrent.

[0034] The light reception information of the light reception circuit 62 that constitutes the light reception unit 64 is input to the processor 68 via the A / D conversion circuit 640. The processor 68 includes a light projection control unit 680, a peak light reception amount detection unit 682, a peak position detection unit 684, a distance calculation unit 686, a distance determination unit 688, and an output unit 690. The light reception information output from the A / D conversion circuit 640 is input to the peak light reception amount detection unit 682 and the peak position detection unit 684. The peak light reception amount detection unit 682 detects the peak light reception amount based on the light reception information, and this peak light reception amount is input to the light projection control unit 680 and reflected in the light projection control. The peak position detection unit 684 detects the peak position of the light reception amount based on the input light reception information and measures the displacement of the peak position. This information is supplied to the distance calculation unit 686. The distance calculation unit 686 calculates the detected displacement of the workpiece based on the displacement of the peak position. A table 692 showing the correspondence between the peak position and the distance is referred to for this calculation of the displacement. The calculated detected displacement is used in the distance determination unit 688 to determine whether it is greater than the threshold value read from the determination threshold value 694 stored in the memory. The measurement information (including the determination threshold value) including the data related to this determination and the light reception information necessary for the display of the OELD12 described later is supplied to the main body unit 4 through the output unit 690 and the communication unit 80.

[0035] The output of the gyro sensor that constitutes the motion sensor 50 described above is input to the optical axis displacement detection unit 696. The optical axis displacement detection unit 696 reads the threshold value from the memory reference unit 698, generates an optical axis displacement detection signal when the output of the gyro sensor is equal to or greater than the threshold value, and supplies this optical axis displacement detection signal to the output unit 690. This optical axis displacement detection signal is supplied to the main body unit 4 through the communication unit 80 and reflected in the display of the OELD12.

[0036] FIG. 10 is a block diagram for explaining the control system of the main body 4. The main body 4 includes a processor 24, an input circuit 26, an output circuit 28, a power supply circuit 30, a memory 32, and a communication unit 34. The illustrated operation unit 402 means the SET button 16, the UP button 18, the DOWN button 20, and the mode button 22. By operating the operation unit 402, the user can perform tuning settings, mask settings, threshold value settings of the gyro sensor (motion sensor 50), output logic settings of the main body 4, clear input, and the like. When the user operates the operation unit 402, this operation is received by the operation reception unit 240. When the user performs an operation to change, for example, the optical axis displacement threshold value or the distance determination threshold value, the optical axis displacement threshold value and the distance determination threshold value stored in the memory 32 are updated.

[0037] The optical axis displacement detection signal received from the head unit 2 through the data reception unit 340 is supplied to the optical axis displacement control unit 242. When the optical axis displacement control unit 242 receives the optical axis displacement detection signal, it supplies the optical axis displacement detection signal to the display screen generation unit 244. When the display screen generation unit 244 receives the optical axis displacement detection signal, it immediately generates a display screen to be displayed on the OELD 12. The display screen generated by the display screen generation unit 244 is supplied to the display control unit 250, and the display control unit 250 controls the drawing of the OELD 12 based on the display screen generated by the display screen generation unit 244.

[0038] The measurement information including the received light information including the determination threshold value received from the head unit 2 is received by the display screen generation unit 244. The display screen generation unit 244 generates a display screen to be displayed on the OELD 12 based on the received light information. The display screen generated by the display screen generation unit 244 is supplied to the display control unit 250, and the display control unit 250 controls the drawing of the OELD 12 based on the display screen generated by the display screen generation unit 244.

[0039] The measurement information and the optical axis displacement detection signal including the received light information received from the head unit 2 through the data reception unit 340 are supplied to the output generation unit 246. The output generation unit 246 generates output information according to the output logic 248 that can be set by the user based on the determination information included in the received light information received from the head unit 2. This output information is supplied to an external device through the output cable 8 via the output circuit 28. Also, when the output generation unit 246 receives the optical axis displacement detection signal, it may supply an alarm signal to the outside through the output circuit 28.

[0040] The above-described output information may be generated by the main body unit 4 or the head unit 2 as described above. Due to the presence of the relay cable 6 that connects the head unit 2 and the main body unit 4, generally, it is easily affected by noise. When the determination ON / OFF signal is generated by the head unit 2, since the determination ON / OFF signal supplied to the main body unit 4 through the relay cable 6 is a binary signal, it is hardly affected by noise. On the other hand, when the determination ON / OFF signal is generated by the main body unit 4, since it is not necessary to generate this determination ON / OFF signal in the head unit, it is possible to avoid the complication of the circuit board of the head unit 2, and it is possible to make the head unit 2 small when aiming for miniaturization.

[0041] FIG. 11 is a diagram for explaining the power supply circuits included in the head unit 2 and the main body unit 4. The main body unit 4 incorporates a power supply circuit 30. The power supply circuit 30 includes two power supply circuits 30A and 30B. One power supply circuit 30A adjusts the voltage of the power supply received from the outside and supplies the adjusted voltage to the other power supply circuit 30B and the head unit 2. This other power supply circuit 30B adjusts the voltage and supplies it to the processor 24 and the head unit 2. In the head unit 2, the motion sensor (gyro sensor) 50 and the processor 68 are driven by the power supply received from the main body unit 4, and also, the green LD 520 is driven. The second power supply circuit 78 of the head unit 2 adjusts the voltage, and after the adjusted voltage is stabilized by the linear regulator 82, it is supplied to the imaging element 60 and the light reception circuit 62.

[0042] FIG. 12 is a flowchart for explaining control to limit the intensity and power of LD520 (FIG. 9) that emits green laser light. Referring to FIG. 11, a light projection signal is generated in step S1. This light projection signal has a predetermined light projection period. In the next step S2, the green LD520 is driven with a preset current amount. The drive control of the green LD520 may be performed with a pulse width. In the next step S3, it is determined whether or not the received light amount received by the light receiving unit 64 is within a preset range. If YES, the process returns to step S1. In step S3, when NO, that is, when the received light amount deviates from the specified range, the process proceeds to step S4 to determine whether or not this deviation continues for a predetermined number of times or more. In this step S4, when YES, that is, when the deviation continues for a predetermined number of times or more, it is assumed that some failure has occurred, and the power supply to the green LD520 is stopped (S5). In step S4, when NO, the process proceeds to step S6 to adjust the current amount and pulse width for controlling the green LD520, and then returns to step S2.

[0043] Steps S3 to S6 above constitute a substantial limiter for limiting the intensity and power of the green laser light. The intensity and power of the green laser light emitted by the light projection unit 52 are limited to a level that does not affect the user even when the user visually confirms the position of the spot of the green laser light hitting the workpiece. This limit may be set with the safety standards of "Class 1" or "Class 2" in mind. Green has a wavelength of 500 nm to 555 nm and has better specific visual sensitivity (bright specific visual sensitivity and dark specific visual sensitivity) than other colors. Therefore, even if the intensity and power of the green laser light are limited to the above levels, the visibility of the spot light can be ensured.

[0044] Next, referring to FIG. 13, the process related to tuning will be described. The determination distance is calculated from the received light amount detected by the light receiving unit 64 in the head unit 2, and this determination distance is supplied to the main body unit 4 through the communication units 80 and 34 together with the threshold value that is the tuning target. In the main body unit 4, a display screen is generated by the display screen generation unit 244, and based on this display screen, the display control unit 250 (FIG. 10) executes control of the drawing of the OELD 12.

[0045] <Inverted display> (I) of FIG. 14 shows an example of the display of OELD 12 during operation. (II) of FIG. 14 shows an example of the display of OELD 12 during tuning. The numerical value "199.9 mm" in the figure is the current value. The unit "mm" can be changed to "inch" according to the user's setting. It is preferable that the entire screen is inverted and displayed both during operation (FIG. 14(I)) and during tuning (FIG. 14(II)). Based on the difference in the display mode including the background color of OELD 12, the user can visually and instantaneously recognize or confirm whether it is the display mode during operation or the display mode during tuning at present.

[0046] <Display of tuning stability> As an ability of the triangulation sensor 200, when the step at which a threshold value at which the triangulation sensor 200 can be stably operated can be set is 0.5 mm, when the step (distance difference) between the first point and the second point to be detected is larger than 0.5 mm, automatic setting of the threshold value at which stable operation is possible is possible. To inform the user of this, "0.5 mm", which is the step at which the threshold value at which the triangulation sensor 200 can be stably operated can be set, is displayed next to the current value (FIG. 14(II)). In addition to this, an inequality symbol (>) indicating that the current value is larger than the allowable step may be displayed. According to this, the user can recognize or confirm visually that automatic setting of the threshold value at which no problem occurs during operation is performed. As a display meaning that automatic setting of the threshold value at which no problem occurs during operation is possible, for example, a circular character 85 described later with reference to FIG. 18 may be displayed.

[0047] <Two-point tuning> FIG. 15 is a flowchart for explaining the processing in the two-point tuning mode. When the user selects the tuning mode, the calculation of the displacement of the workpiece starts at step S11. In the next step S12, when the user presses the SET button 16 (FIG. 2) (the first pressing of the SET button 16), the first detected displacement at that time is acquired according to this first capture instruction (S13), and this first detected displacement is set as the "first reference value" (S14).

[0048] The displacement of the workpiece is continuously detected, and the real-time detected displacement is continuously acquired (S15). Then, the difference between the real-time detected displacement and the reference value, that is, the "relative displacement", is calculated (S16), and this is displayed on the OELD12 (S17). After the user presses the SET button 16 for the first time, when the user moves the workpiece until pressing the SET button 16 for the second time, the current value of the OELD12 will continue to change. The user looks for the position to press the SET button 16 for the second time while visually observing the spot light on the workpiece surface. During this process, the relative displacement that changes as the user moves the workpiece can be confirmed by looking at the display of the OELD12.

[0049] In the next step S18, it is determined whether or not the relative displacement is greater than or equal to the detection step difference at which tuning can be successful. Here, "successful tuning" means that, in relation to the capabilities of the triangulation sensor 200, a threshold value at which no operational problems occur can be automatically set. The limit value of "successful tuning", "0.5 mm" in the above example, may be preferably stored in the memory 32 in advance.

[0050] In step S18, if YES, that is, when the relative displacement is greater than or equal to the step at which tuning can be successful, on the screen of the OELD12, display "0.5 mm", which is the step at which the above-described triangulation sensor 200 can be stably operated, and preferably, an inequality sign may also be displayed. By seeing that the current value of the display is much larger than the above step "0.5 mm", the user can know that the threshold value can be set with a margin. Also, when the current value of the display is close to the above step "0.5 mm", by comparing the current value with "0.5" and seeing that the current value is larger than "0.5", and also seeing the above-described inequality sign, the user can know that a threshold value without operational problems can be set. Thereby, the user can press the second SET button 16 with confidence and instruct the second capture.

[0051] If, at the current point, the relative displacement is smaller than the above "0.5 mm", it is determined as NO in step S18, and the above step S19 is jumped to. Since the user does not see the above step "0.5 mm" or the inequality sign on the screen of the OELD12, the user can refrain from pressing the second SET button 16.

[0052] When the user sees "0.5 mm" or the inequality sign displayed on the OELD12, assuming that a stable threshold value can be set, the user can press the second SET button 16 with confidence. If necessary, after visually confirming the point where the spot light is hitting, the second SET button 16 can be pressed. With this second pressing, the process proceeds from step S20 to S21, and the second detected displacement at the point where the second SET button 16 is pressed is acquired and used as the second reference position. Then, the difference between this second reference position and the above-described first reference value, that is, the value of the step, is calculated (S22). In the next step S23, for example, half of the value of this step is set as the threshold value (S23). The threshold value setting algorithm is not limited to this method, and it may be such that upper and lower limit threshold values are provided so that the determination is ON in any case of the detection distances of the first reference position and the second reference position.

[0053] <Fully automatic tuning> The user can alternatively select between the two-point tuning performed manually as described above and the fully automatic tuning performed automatically with respect to the setting of the determination threshold value. In the fully automatic tuning, the detected displacement while the user keeps pressing the SET button 16 is calculated, and while updating this detected displacement, the peak value (the peak value on the side far from the head portion 2) is determined as the "first reference value", and the bottom value (the peak value on the side close to the head portion 2) is determined as the "second reference value", and the intermediate value between the first reference value and the second reference value is set as the "threshold value".

[0054] FIG. 16 is a flowchart for explaining the basic processing in the fully automatic tuning mode. In the fully automatic tuning mode, in step S31, when the user presses the SET button 16, the acquisition of the work displacement is performed (S32). Based on the acquired displacement of the work, the first and second reference values are determined, and these first and second reference values are registered (S33). Then, when the user stops pressing the SET button 16, the process proceeds from step S34 to step S35, and a determination threshold value is set based on the registered first and second reference values. Examples of the algorithm for setting the threshold value include those that use the intermediate value between the first reference value and the second reference value as the threshold value, and those that determine the threshold value so that the determination of the first reference value and the second reference value becomes ON. On the other hand, when the pressing operation of the SET button 16 continues, the process proceeds from step S34 to step S36, and a process for updating the first and second reference values is executed.

[0055] FIG. 17 is a flowchart for explaining an example of the reference value update process in step S36 (FIG. 16) above. In the reference value update process, the acquisition of the displacement of the work is continuously performed (S361), the detected displacement of the work is compared with the first reference value (S362), and when the displacement of the work is equal to or greater than the first reference value, in step S363, the first reference value is updated based on the detected displacement of the work.

[0056] Also, in step S364, when the detected displacement of the workpiece is compared with the second reference value and the displacement of the workpiece is equal to or less than the second reference value, in step S365, the second reference value is updated based on the detected displacement of the workpiece.

[0057] In the next step S366, the relative displacement between the first reference value and the second reference value is calculated, and based on the calculated relative displacement, it is determined whether the displacement is a displacement at which tuning can be successful (S367). If the calculated relative displacement is equal to or greater than the displacement at which tuning can be successful, the process proceeds to step S368, and a circular character 85 (FIGS. 19 and 20), which means that a stable determination threshold value can be set, is displayed on the OELD12, and the relative displacement between the first reference value and the second reference value is also displayed on the OELD12 (S369).

[0058] A user who has selected the full auto tuning mode can know that stable operation can be performed under the threshold value automatically set by the full auto tuning by checking that the circular character 85 is displayed on the OELD12. Then, by checking that the character 85 is displayed and stopping pressing the SET button 16 and stopping acquisition of new workpiece displacement data, stable operation can be realized under the automatically set determination threshold value.

[0059] The optical triangulation sensor 200 has a "height mode" and a "distance mode" in measuring the displacement of the workpiece, and the user can arbitrarily set the height mode or the distance mode. In the "height mode", the displacement of the workpiece from the placed surface (reference surface), that is, the height, is measured. Instead of the installation surface of the workpiece as the reference surface, for example, the upper surface of the workpiece may be set as the reference surface. When measuring a workpiece whose upper surface is higher than the reference surface, a "+" icon is displayed on the OELD12, and when the upper surface of the workpiece is lower than the reference surface, a "-" icon is displayed on the OELD12.

[0060] FIG. 18 shows a selection screen for "height mode" and "distance mode". (I) in FIG. 18 means the height mode, and (II) in FIG. 18 means the distance mode. On the OELD12, a height mode selection screen ((I) in FIG. 18) and a distance mode selection screen ((II) in FIG. 18) are alternately displayed. On the height mode selection screen ((I) in FIG. 18), an arrow extending toward the character 84 representing the head portion 2 from a reference plane with "0" (zero) appended is displayed. On the other hand, on the distance mode selection screen ((II) in FIG. 18), an arrow extending in a direction away from the head portion character 84 with "0" (zero) appended is displayed.

[0061] FIG. 19(I) shows a display screen of the height mode when the user selects the height mode based on the height mode selection screen shown in FIGS. 18(I) and 19(II). In FIG. 19(I), the numerical value "199.9" means the current value. The "+" icon to its immediate left means that the upper surface of the work is higher than the reference plane as described above, that is, closer to the head portion 2 than the reference plane. The numerical value "67.8" means the determination threshold value. Also, below this determination threshold value, the above-described circular character 85 indicating that stable operation is possible is displayed.

[0062] FIG. 20(I) shows a display screen of the distance mode when the user selects the distance mode based on the distance mode selection screen shown in FIGS. 18(II) and 20(II). As can be seen by comparing FIG. 19(I) (height mode) and FIG. 20(I) (distance mode), in the distance mode (FIG. 20(I)), since the position of the sensor head is used as a reference, the "+" icon (FIG. 19(I)) is not displayed.

[0063] In FIG. 19(I), the numerical value "199.9" means the current value. The "+" icon to its immediate left means that the upper surface of the work is higher than the reference plane as described above, that is, closer to the head portion 2 than the reference plane. The numerical value "67.8" means the determination threshold value. Also, below this determination threshold value, the above-described circular character 85 indicating that stable operation is possible is displayed.

[0064] In the height mode of (I) in FIG. 19 and the distance mode of (I) in FIG. 20, numerical values are displayed, but can be switched to bar display according to the user's selection. FIG. 21 shows the bar display in the height mode. FIG. 22 shows the bar display in the distance mode. The numerical value "12.3 mm" illustrated in FIGS. 21 and 22 means the current value. In the bar display in the height mode of FIG. 21, a "+" icon is displayed next to the current value "12.3 mm". This "+" icon means that the upper surface of the work is higher than the reference plane as described above, that is, closer to the head portion 2 than the reference plane.

[0065] The bar Br that means the current value in FIGS. 21 and 22 extends from the reference plane toward the head portion icon 84 in the display of the height mode (FIG. 21). On the other hand, in the display of the distance mode (FIG. 2), the bar Br extends from the head portion icon 84. In the figure, the vertical line of the reference numeral 88 including "P" indicates the maximum value of the detected displacement obtained so far. The determination threshold value is displayed as a vertical line 90 extending in the direction crossing the bar Br of the current value. When the user operates the UP / DOWN buttons 18 and 20 to change the setting of the threshold value, the determination threshold value character (vertical line) 90 moves following this user operation. Thereby, the user can finely adjust the determination threshold value while looking at the display of the bar Br of the current value of the OELD 12 and the maximum value P and confirming the position of the determination threshold value character 90.

[0066] Regarding the threshold setting, two-point tuning and full-auto tuning have been described above. In addition to these, the triangulation sensor 200 may have a DATUM tuning function. DATUM tuning executes tuning in a state where there is no workpiece to set a reference value, and is a function that turns on the determination when in a state other than when DATUM tuning is executed. In the DATUM measurement based on DATUM tuning, it is detected whether there is a change from the set reference value. Therefore, according to the DATUM measurement, it is possible to effectively and quickly detect a workpiece with a small amount of reflected light or a workpiece that undergoes multiple reflections. The "reference value" used in the DATUM measurement can be registered by DATUM tuning and may also be updated by an external input.

[0067] <Detection range mask display> The triangulation sensor 200 has a mask function to suppress the influence of external light, and the user can set the mask range. Referring to FIG. 23, for example, when light is transmitted and received through the viewport 100, the triangulation sensor 200 receives the first light L(1) reflected by the measurement light on the surface of the workpiece W and the second light L(2) reflected by the viewport 100. From the perspective of the triangulation sensor 200, the positional relationship between the workpiece W and the viewport 100 is such that the workpiece W is farther away than the viewport 100. Therefore, in the plurality of imaging elements 60 constituting the light receiving unit 64, the reflected light L(1) from the workpiece W and the reflected light L(2) from the viewport 100 are imaged at different pixel positions.

[0068] FIG. 24 shows the light receiving waveform in a normal state. The reference sign P(1) is the peak due to the reflected light L(1) from the workpiece W, and the reference sign P(2) is the peak due to the reflected light L(1) from the viewport 100. As can be seen from FIG. 24, since the peak P(1) related to the workpiece W is higher than the peak P(2) related to the viewport 100, the displacement of the workpiece can be measured normally.

[0069] FIG. 25 shows the light reception waveform during an abnormality. As can be seen from FIG. 25, since the peak P(2) related to the viewport 100 is higher than the peak P(1) related to the work W, it is practically impossible to measure the displacement of the work. By setting a mask in the pixel range illustrated by hatching in FIG. 25, the displacement of the work can be measured based on the peak P(1) related to the work W.

[0070] <Setting of Mask Region by User> FIG. 26 is a flowchart for explaining an example of a series of processes related to the setting of the mask region. FIG. 27 shows the display screen of the OELD12 when setting the mask region. In FIG. 26, image data is created based on the light reception waveform and the mask region (S41). On the display screen of the OELD12, a vertical line 90 representing the determination threshold value, a light reception peak 102, and a head part character 84 are displayed. Now, when the first and second peaks P(O), P(d) appear on the display screen of the OELD12, the user can recognize that the second peak P(d) is ambient light when considering the measurement environment and the distance from the head part 2. In other words, it can be understood that the first peak P(O) is the measurement light. Also, it can be recognized whether the measurement light and the determination threshold value are too close. If it is determined that the determination threshold value is too close, the determination threshold value can be adjusted by operating the UP / DOWN buttons 18, 20. When this adjustment is made, the vertical line 90 of the determination threshold value moves in real time on the display of the OELD12.

[0071] In step S42, it is determined whether there is an operation to change the short-distance side mask area close to the head body 2. When YES (there is an operation), the process proceeds to step S43, and the short-distance side mask area is changed according to the operation of the operation unit 402 (FIG. 10) performed by the user, and the image data is updated based on the received light waveform and the mask area (S44). The change of the mask area can be performed, for example, in units of 0.1 mm. The displacement amount for one column of the OELD 12 and the minimum changeable amount do not necessarily have a one-to-one correspondence. Here, since the displacement amount for one column of the OELD 12 depends on the size (resolution) of the display portion of the OELD 12 and the maximum detectable range, the processor 68 may determine whether there is a change of one column or more of the OELD 12, and change the display of the mask area only when there is a change of one column or more.

[0072] The processing of the received light waveform is to acquire the peak position and calculate at which position of the OELD 12 the acquired peak position should be drawn. As a modified example, based on the maximum detectable range of the triangulation sensor 200 and the peak light reception amount of the received light waveform, a process of normalizing the received light waveform in the display area of the OELD 12 is performed. In FIG. 28, the area Ms(1) illustrated by the slanted lines in the display screen of the OELD 12 is the short-distance side mask area. The short-distance side mask area Ms(1) changes in real time according to the operation of the user's operation unit 402. On the left side (I), the boundary of the short-distance side mask area Ms(1) being 12.0 mm from the head portion 2 is numerically displayed. On the right side (II), the boundary of the short-distance side mask area Ms(1) being 30.0 mm from the head portion 2 is numerically displayed. This numerical value also changes in real time according to the operation of the user's operation unit 402.

[0073] When the setting of the near - distance side mask area is completed, the process proceeds from step S45 to step S46 to update the image data. The mask area is not set in this embodiment. When equipped with an auto - mask area setting function to be described later, the automatically set mask area may be displayed. Next, in step S47, it is determined whether there is an operation to change the far - distance side mask area that is far from the head unit 2. When YES (there is an operation), the process proceeds to step S48, and the far - distance side mask area is changed according to the operation of the operation unit 402 performed by the user, and the image data is immediately updated (S49). Referring to FIG. 29, the area Ms(2) illustrated by hatching is the far - distance side mask area. The far - distance side mask area Ms(2) changes in real time according to the operation of the user's operation unit 402. In the left - hand side (I), the numerical value indicating that the boundary of the far - distance side mask area Ms(2) is 45.0 mm from the head unit 2 is displayed. In the right - hand side (II), the numerical value indicating that the boundary of the far - distance side mask area Ms(2) is 40.0 mm from the head unit 2 is displayed. This numerical value also changes in real time according to the operation of the user's operation unit 402.

[0074] If the boundary of the near - distance side mask area Ms(1) is called "lower limit" and the boundary of the far - distance side mask area Ms(2) is called "upper limit", the user can perform the setting operation of the mask area so as to surely mask by arbitrarily specifying the upper limit and the lower limit while looking at the display of the OELD12.

[0075] In the mask setting to be described later with reference to FIG. 32, the mask area Ms is determined based on the peak detection distance. After the mask area Ms is determined based on such a predetermined algorithm, it is preferably configured so that the mask area Ms can be adjusted by the user's operation.

[0076] The distances of the boundaries of the near - side mask region Ms(1), for example, the numerical value of "12.0 mm", and the distances of the boundaries of the far - side mask region Ms(2), for example, the numerical value of "45.0 mm" are preferably displayed at positions closer to the center of the horizontally - long OELD12, as can be seen from FIGS. 28 and 29. When designing for miniaturization of the main body 4, the vertical and horizontal dimensions of the horizontally - long OELD12 are limited. Therefore, by displaying the numerical values of the distances of the boundaries of the mask regions Ms(1) and (2) that the user pays attention to at positions closer to the center of the OELD12, the visibility is good for the user.

[0077] In the flowchart of FIG. 26, when the setting of the far - side mask region is completed, the process proceeds from step S50 to step S52 to obtain the received light amount from each pixel of the imaging device 60, and obtain the peak position of the received light amount (the current peak position) from the region where no mask is set. Then, the current peak position is compared with the threshold value (S53). And the display process is performed in the next step S54. This display process will be described next based on FIGS. 30 and 31.

[0078] The mask setting display screen is roughly divided into two display modes. FIG. 30 shows a specific example of the mask setting display screen. (I) and (II) in FIG. 30 show the first display mode in which the boundaries of the mask region are displayed numerically. The first display mode (FIG. 30 (I)) includes the threshold value of "5.0", the boundary of the mask region of "12.3", the "+" indicating the near - distance mask region, and the above - mentioned circular character 85 indicating that a determination threshold value for stable operation is set. As can be seen from FIG. 30 (II), the display of the circular character 85 may be omitted from the first display mode (FIG. 30 (I)).

[0079] (III) of FIG. 30 shows a second display mode in which the mask areas are pictorially shown by hatching. In the illustrated example of the display, it is a display when the mask areas Ms(1) and Ms(2) on the near side and the far side are set. In the second display mode, the character 90 of the vertical line meaning the threshold value, the character 84 meaning the head part 2, and the character 102P meaning the disturbance peak are displayed. The peak character 102P is drawn in a shape that gives an image of a telescope, and the magnitude of the peak light reception amount is displayed in a telescopic figure that gradually extends upward. Thereby, the user can intuitively grasp the magnitude of the peak light reception amount by looking at the shape of the peak character 102P.

[0080] FIG. 31 is a flowchart for explaining an example of the display process. In step S61, the set display mode is determined. When the first display mode is set, the process proceeds to step S62 to determine whether the number of peaks of the light reception waveform is one. If it is one, the process proceeds to step S63 to generate display screen information based on the first pattern A (FIG. 30(I)) of the first display mode. In step S62 above, when the number of peaks of the light reception waveform is plural, the process proceeds to step S64 to generate display screen information based on the second pattern B (FIG. 30(II)) of the first display mode. Also, in step S61 above, when the second display mode is set, the process proceeds to step S66 to generate display screen information based on the second display mode (FIG. 30(III)). In the next step S65, it is drawn on the OELD12 based on the generated display screen information.

[0081] <Automatic Mask Area Setting> FIG. 32 is a flowchart for explaining an example of the process of automatically setting the mask area. The automatic setting of the mask area is not limited to setting the mask area by the internal process of the main body 4 according to the user's request, but is also applicable to correcting or changing the mask area set manually by the user as described above.

[0082] Referring to FIG. 32, in step S71, a received light waveform is acquired. In the next step S72, a peak detection distance is acquired from the received light waveform. Then, in step S73, based on the peak detection distance, a mask region Ms that can mask the relevant portion is determined. For example, based on the peak detection position on the near - distance side, the mask region is automatically determined such that this position becomes the center of the detection range. Then, image data is generated based on the received light waveform and the current mask region Ms (S74). Thereby, the mask region Ms is automatically set. Here, the mask region Ms may be arbitrarily set and changed, such as setting upper and lower limits or changing the mask region later.

[0083] In the next step S75, it is determined whether there is an instruction to change the mask region. If there is an instruction to change the mask region, in step S76, the screen data is updated based on the received light waveform and the mask region. Then, in step S77, it is determined whether there is an operation to change the mask region. If there is an operation by the user to change the mask region, the mask region is changed according to the operation amount (S78). And in the next step S79, the screen data is updated based on the received light waveform and the mask region. When the setting of the mask region Ms is completed, the process proceeds from step S80 to step S81, and the pixels of the mask region Ms are set as invalid pixels. In the next step S82, the received light amount is acquired from each pixel of the valid pixels. In the next step S83, a received light waveform is generated based on the received light amount of the valid pixels (S83). Next, the peak position is acquired from the region where the mask is not set (S84), and the displacement is calculated from this peak position (S85). Next, a received light waveform is generated from the received light amount of these valid pixels (S86), the peak position is acquired from this received light waveform (S87), and this peak position is compared with a threshold value (S88). Then, the display process is performed in the next step S89. The display process is the same as that described above based on FIGS. 30 and 31.

[0084] The mask automatic setting described with reference to FIG. 32 is effectively used when realizing a high-speed response. When automatically setting the mask area to achieve this high-speed response, it may be necessary to limit the data acquisition area in order to ensure the response time. In this case, the change of the mask area by the user may be configured such that it can be changed only in the direction in which the mask area is increased, that is, in the direction of narrowing the detection area, for example, compared to the automatically set mask area, or it may be such that the automatically set mask area is translated. In this case, the set mask area is set as invalid pixels, and the response time can be shortened by acquiring the light reception data from the valid pixels.

[0085] When setting the mask in the triangulation distance sensor 200, the imaging pixels in the mask area may be set as invalid pixels, or the mask area may be excluded from the peak detection range. When invalid pixels are set, the light reception amount data is not acquired from the mask area. In this case, the set mask area is set as invalid pixels, and the peak position is acquired based on the light reception information acquired at the pixels that are not invalid pixels, that is, valid pixels, and measurements such as the displacement of the workpiece may be performed based on the peak position. In this case, since the area for acquiring data is reduced, it is possible to realize a high-speed response.

[0086] Also, when setting the mask, the peak position may be acquired based on the light reception information acquired at all pixels, and the measurement may be performed based on whether the acquired peak position is within the mask area. That is, if the acquired peak position is not in the mask area, the position is acquired as the peak position. On the other hand, if the acquired peak position is in the mask area, the position is not acquired as the peak position, but the second peak position (that is, the position where the light reception amount is the second) is acquired, and it is determined whether this second peak position is in the mask area. If the second peak position is not in the mask area, the position is acquired as the peak position.

[0087] <Display related to the gyro sensor> In the triangulation sensor 200 of the embodiment, a gyro sensor 50 is mounted on the head portion 2 as an example of a motion sensor, and the gyro sensor 50 detects a change in the installation posture of the head portion 2, that is, an optical axis displacement. An example of this process will be described based on the flowchart shown in FIG. 33. Step S91 is a process of initial setting performed by the manufacturer of the triangulation sensor 200 at the time of shipment. This initial setting may be performed by the user. In this initial setting, the sampling frequency and detection range of the gyro sensor are set. It is reset for each set sampling frequency, that is, for each predetermined time.

[0088] In step S92, three-axis angular velocity information is acquired from the gyro sensor. In the next step S93, the angular velocity values of the three axes for a certain period are averaged respectively to generate the current angular velocity information of the three axes, and for example, the largest value is set as the current value from the three-axis angular velocity information (S94). In the next step S95, it is determined whether the current value is equal to or greater than the threshold value. If YES, that is, when the current value is equal to or greater than the threshold value, it is assumed that the optical axis of the head portion 2 is displaced and affects the detection accuracy, and the process proceeds to step S96 to start measurement for ON output and elapsed time display. As a result, for example, the operation indicator lights 70, 76, and 14 blink in red. Thereby, the user can know that an abnormality has occurred regarding the installation of the head portion 2. The ON output and the elapsed time since the occurrence of the optical axis displacement are displayed on the OELD12 of the main body portion 4. This display example will be described later.

[0089] The measurement for ON output and elapsed time display in step S96 continues until the user presses the SET button 16 and performs a clear operation, for example, when the SET button 16 is assigned a clear processing function (S97, S98). This clear processing may be performed by a clear instruction based on a signal input from an external device such as the PLC 10 (FIG. 1). The clear processing of the timer for the elapsed time includes stopping the count and resetting the count value.

[0090] Figure 34 shows an example of a gyro monitor display that is displayed on the OELD 12 according to the user's selection. In Figure 34, reference numeral 120 indicates the character of the gyro sensor. The gyro character 120 is composed of two arcs with arrows opposing each other. While the gyro sensor is detecting the angular velocity, for example, three frames are sequentially displayed as shown in Figure 35. By the user seeing the character 120 in which the two arcs with arrows rotate in a circle, it is possible to know that the gyro sensor is detecting the angular velocity.

[0091] In the gyro monitor display of Figure 36, reference numeral 122 indicates the current value shown in bar form. The longer this current value bar extends from left to right, the larger the value means. Reference numeral 136 is a vertical line indicating the threshold value. In the illustrated bar monitor display, reference numeral 126 indicates the character of the vertical line showing the maximum value of the angle change (optical axis displacement) that the head portion 2 has acquired so far. In order to differentiate it from the character 136 of the vertical line indicating the threshold value, it is preferable to display a character 128 such as "P" on the maximum value line 126.

[0092] The threshold value regarding the optical axis displacement can be changed by the user operating the UP button 18 and / or the DOWN button 20. This change is reflected in real time on the threshold value display line 124. When an operation to increase the threshold value, for example, is performed, the vertical line of the threshold value character 124 moves to the left.

[0093] In order to simplify the user's threshold value change, it is preferable to divide the setting levels of the magnitude of the threshold value into, for example, five classes, so that the user can select from class 1 that reacts sensitively to a slight optical axis displacement to class 5 that reacts relatively insensitively. It is preferable to display the class selected by the user with characters 130 such as "1" to "5". The display example of Figure 36 shows an example of displaying the class character 110 above the threshold value line character 124. The class character 110 of "5" above the illustrated threshold value line character 124 indicates that the class selected by the user is "5".

[0094] When the displacement amount calculated based on the angular velocity detected by the gyro sensor 50 is greater than the threshold value, an abnormality occurrence signal (indicating the occurrence of an optical axis displacement) is generated and output. Alternatively, instead of outputting the abnormality occurrence signal, preferably, the display of the OELD 12 immediately switches from the normal operation display to the alarm display illustrated in FIG. 37. The alarm display includes a first alarm display mode in which "Position deviation detected" is displayed in characters, and a second alarm display mode in which the elapsed time from the time when it is detected that the displacement amount based on the angular velocity detected by the gyro sensor is equal to or greater than the threshold value is displayed. It is preferable to alternately display the first and second alarm display modes.

[0095] <Pairing display> FIG. 38 shows a display example related to pairing. This display example is not limited to the triangulation sensor 200 of the embodiment. It is generally applicable to displacement sensors. Pairing means that the head unit 2 and the main body unit 4 that form a pair operate in normal cooperation. During the pairing of the head unit 2 and the main body unit 4, the character 84 of the head unit is displayed together with the character display of "PAIRING". When the pairing is successful, the character of "PAIRING" is emphasized and the character 140 indicating normal cooperation operation is displayed on the character 84 of the head unit. By the user seeing this, it can be confirmed that the head unit 2 and the main body unit 4 of the pair are normally paired. For example, in an environment where a large number of head units 2 are installed, by performing the above pairing display on the OELD 12 of the main body unit 4, confusion regarding the correspondence between the head unit 2 and the main body unit 4 of the pair can be prevented.

Explanation of symbols

[0096] 200 Optical triangulation sensor 2 Head unit of the triangulation sensor 4 Main body unit of the triangulation sensor 6 Relay cable 8 Output cable 12 OELD (display unit) 52 Light projecting unit 64 Light receiver 684 Peak position detector (measurement unit)

Claims

1. A light projecting unit that projects measurement light toward a detection area; A light receiving unit that photoelectrically converts the measurement light reflected in the detection area with a plurality of pixels to generate a light receiving waveform indicating a light receiving signal corresponding to each pixel; A measuring unit that measures the displacement of a detection target based on the peak of the light receiving waveform generated by the light receiving unit; A determination unit that generates a determination signal based on a comparison between a threshold value and the displacement of the detection target measured by the measuring unit; An elongated dot matrix display; Generating a display screen in which the longitudinal direction of the dot matrix display indicates the amount of displacement, Obtaining the position of the peak of the light receiving waveform, performing light receiving waveform processing to calculate at which position on the display screen of the dot matrix display the obtained position of the peak of the light receiving waveform should be drawn, and on the display screen, at the position calculated by the light receiving waveform processing, displaying a peak character indicating the position of the peak of the light receiving waveform corresponding to the displacement of the detection target measured by the measuring unit, On the display screen, displaying a threshold character meaning the threshold value side by side with the peak character in the longitudinal direction of the dot matrix display; A display generation unit that generates a display screen for displaying a mask area on the display screen of the dot matrix display, and displaying the peak character indicating the position of the peak of the light receiving waveform and a mask area that changes along the longitudinal direction of the dot matrix display; and The triangulation displacement sensor, wherein the measuring unit measures the displacement of the detection target based on the peak of the light receiving waveform outside the mask area.

2. The triangulation displacement sensor according to claim 1, wherein the display generation unit displays a threshold character indicating the threshold value at a position corresponding to the position of the peak of the light receiving waveform together with the position of the peak of the light receiving waveform, and generates a display screen in which the displayed threshold character moves along the longitudinal direction of the dot matrix display following a change in the setting of the threshold value.

3. The triangulation displacement sensor according to claim 1, wherein the display generation unit displays a mask area that can be set together with the position of the peak of the light receiving waveform, and generates a display screen in which the displayed mask area changes along the longitudinal direction of the dot matrix display following a change in the setting of the mask area.

4. The display generation unit displays a numerical value indicating the boundary of the mask region together with the settable mask region, and generates a display screen in which the numerical value indicating the boundary changes as the displayed mask region follows the setting change of the mask region. The triangulation displacement sensor according to claim 3.

5. Further comprising a head portion where the light projecting unit and the light receiving unit are arranged, The display generation unit generates a display screen that displays, as the mask region, a near-distance side mask region close to the head portion and a far-distance side mask region far from the head portion. The triangulation displacement sensor according to claim 3.

6. The display generation unit generates a display screen that displays a head character indicating the head portion at a corresponding position together with the mask region. The triangulation displacement sensor according to claim 5.

7. Further comprising an automatic mask setting means for setting the mask region based on the peak of the received light waveform. The triangulation displacement sensor according to claim 1.

8. The automatic mask setting means sets the mask region based on the peak of the received light waveform on the near-distance side among the peaks of the received light waveform. The triangulation displacement sensor according to claim 7.

9. Further comprising a mask changing means for changing the mask region set by the automatic mask setting means according to a user operation. The triangulation displacement sensor according to claim 8.

10. The display generation unit generates a display screen that displays the position of the peak of the received light waveform as a telescopic figure that extends upward step by step. The triangulation displacement sensor according to claim 1.

11. The display generation unit displays a threshold character indicating the threshold value at a position corresponding to the position of the peak of the received light waveform together with the position of the peak of the received light waveform, and the displayed threshold character follows the setting change of the threshold value and moves along the longitudinal direction of the dot matrix display. The triangulation displacement sensor according to claim 10.

12. Further comprising a head portion where the light projecting unit and the light receiving unit are arranged, The display generation unit, as the mask region, Generates a display screen that displays a near-distance side mask region close to the head portion and a far-distance side mask region far from the head portion. The triangulation displacement sensor according to claim 11.

13. The triangulation displacement sensor according to claim 4, wherein the display generation unit changes the display of the mask area only when there is a change of one or more columns of the dot matrix display in response to a change in a numerical value indicating the boundary of the mask area.

Citation Information

Patent Citations

  • Displacement sensor equipped with automatic setting means of measuring region

    JP2006292731A

  • Displacement sensor

    JP2008076119A

  • Optical displacement sensor system, console, controller and program

    JP2010122127A

  • Photoelectric switch

    JP2013127943A

  • Photoelectronic sensor

    JP2015081870A