WO2020031964A1 - Measurement system, measurement method, and measurement program - Google Patents

Measurement system, measurement method, and measurement program Download PDF

Info

Publication number
WO2020031964A1
WO2020031964A1 PCT/JP2019/030740 JP2019030740W WO2020031964A1 WO 2020031964 A1 WO2020031964 A1 WO 2020031964A1 JP 2019030740 W JP2019030740 W JP 2019030740W WO 2020031964 A1 WO2020031964 A1 WO 2020031964A1
Authority
WO
WIPO (PCT)
Prior art keywords
measurement
unit
sensor
imaging
displacement
Prior art date
Application number
PCT/JP2019/030740
Other languages
French (fr)
Japanese (ja)
Inventor
加藤 豊
義宏 金谷
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2020031964A1 publication Critical patent/WO2020031964A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures

Definitions

  • the present invention relates to a measurement system, a measurement method, and a measurement program for measuring each of a plurality of measurement portions.
  • FA factory automation
  • Patent Literature 1 discloses a method of identifying a position and a posture of a work from an image obtained by imaging the work to be measured. A technique is disclosed in which a displacement meter and a workpiece are relatively moved on the basis of the position and orientation of a master image and a measurement location designated with respect to a master image to obtain a height measurement value.
  • Patent Literature 1 measures a measurement point in an image obtained by imaging a measurement target with a sensor such as a displacement meter, and changes an imaging area of a camera to cover a wide area. The measurement was not sufficiently considered.
  • the present invention has an object to provide a measurement system, a measurement device, and a measurement method suitable for performing a wide range of measurement by changing a measurable range.
  • a measurement system for measuring each of a plurality of measurement portions includes an imaging unit, a sensor, a base unit on which the imaging unit and the sensor are arranged, a change mechanism that changes a relative position between the base unit and the measurement target, an imaging unit with respect to a traveling direction of the base unit, and An adjusting mechanism for adjusting the positional relationship between the sensors, position determining means for determining a measurement position to be measured by the sensor based on an image of the measurement portion taken by the imaging unit, and a position of the imaging unit with respect to the traveling direction of the base unit.
  • the measurement position determined by the position determination means for each of the plurality of measurement portions passes through the measurement range of the sensor.
  • Control means for controlling the change mechanism and the adjustment mechanism.
  • the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position.
  • the change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement system suitable for performing measurement over a wide range by changing the measurable range is provided.
  • the adjustment mechanism may be a rotation mechanism that rotates the base. According to this disclosure, since the positional relationship between the imaging unit and the sensor can be adjusted by a simple mechanism called rotation, the adjustment is easy.
  • the measurement system may be configured such that, for at least one of the plurality of measurement portions, a plurality of measurement positions are predetermined with respect to a position of an image feature obtained by imaging the measurement portion. Good.
  • the position determining means may determine each of the plurality of measurement positions for the position of the image feature by specifying the position of the image feature based on the image of the measurement portion.
  • a plurality of measurement positions are determined in advance for one measurement portion, and each of the plurality of measurement positions is determined in one imaging, so that the number of imagings can be reduced, and as a result, Overall measurement time can be shortened.
  • the senor may be a displacement sensor.
  • a reference path including the displacement of the change mechanism and the displacement of the adjustment mechanism associated with the displacement of the change mechanism may be predetermined.
  • the control means controls the change mechanism and the adjustment mechanism along the reference path so that each of the plurality of measurement parts passes through the imaging field of view of the imaging unit, and for each of the plurality of measurement parts, the position determination is performed.
  • the reference route may be modified so that the measurement position determined by the means passes through the measurement range of the sensor.
  • the processing of the entire measurement system can be simplified, and as a result, the processing load on the measurement system can be reduced.
  • control unit may correct the displacement of the adjusting mechanism without correcting the displacement of the changing mechanism in the reference path for each of the plurality of measurement portions.
  • the number of correction targets is small, and the processing of the entire measurement system can be simplified. As a result, the processing load on the measurement system can be reduced.
  • the position determination unit may further include an acquisition unit configured to acquire a position shift value of the measurement part with respect to a reference position determined according to the reference route, based on the image of the measurement part.
  • the measurement system further includes a determination unit configured to determine whether the displacement value acquired by the acquisition unit exceeds a predetermined allowable value, and a notification unit configured to notify a user of the determination result of the determination unit. May be.
  • the present disclosure it is possible to notify the user when the displacement of the measurement portion with respect to the reference position is large and the amount of correction of the reference route is large, thereby providing a user-friendly measurement system.
  • a measurement method for measuring each of a plurality of measurement portions is provided.
  • the imaging unit and the sensor are arranged on the base unit, and the relative position between the base unit and the measurement target can be changed, and the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit is determined. It is configured to be adjustable.
  • the measurement method includes a first step in which the measurement portion passes through the imaging field of view of the imaging unit while the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor; A second step of determining a measurement position to be measured by the sensor based on an image of a measurement portion obtained when passing through the sensor, and a third step in which the measurement position determined in the second step passes through a measurement range of the sensor. And the steps from the first step to the third step are performed on each of the plurality of measurement portions.
  • the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position.
  • the change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement method suitable for performing a wide range of measurement by changing the measurable range is provided.
  • a measurement program for measuring each of a plurality of measurement portions is provided.
  • the imaging unit and the sensor are arranged on the base unit, and the relative position between the base unit and the measurement target can be changed by a change mechanism, and the imaging unit and the sensor with respect to the traveling direction of the base unit.
  • the positional relationship can be adjusted by an adjusting mechanism.
  • the measurement program controls the computer to control the change mechanism and the adjustment mechanism such that the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor and the measurement unit passes through the imaging field of view of the imaging unit.
  • a change mechanism and adjustment so that a measurement position measured by a sensor determined based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view in the first step passes through the measurement range of the sensor.
  • a second step of controlling the mechanism are performed for each of the plurality of measurement portions.
  • the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position.
  • the change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement program suitable for performing a wide range of measurement while changing the measurable range is provided.
  • a measurement system a measurement device, and a measurement method suitable for performing measurement over a wide range by changing a measurable range are provided.
  • FIG. 1 is a schematic diagram illustrating an overall configuration of a measurement system according to the present embodiment. It is a figure showing a standard course. It is a figure showing the outline of the correction method of a standard course. It is a flowchart which shows an example of the flow of the measurement process of a measurement system.
  • FIG. 7 is a diagram for explaining a method of specifying a measurement position.
  • FIG. 4 is a diagram for explaining a method of correcting a reference route and a measurement condition.
  • FIG. 2 is a schematic diagram illustrating a hardware configuration of the image processing apparatus.
  • FIG. 3 is a schematic diagram illustrating an example of a hardware configuration of a controller.
  • FIG. 1 is a schematic diagram illustrating an overall configuration of a measurement system according to the present embodiment. It is a figure showing a standard course. It is a figure showing the outline of the correction method of a standard course. It is a flowchart which shows an example of the flow of the measurement process of a measurement system.
  • FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a PLC.
  • FIG. 3 is a diagram illustrating an example of a functional configuration of a measurement system that functions in correcting a route.
  • FIG. 4 is a diagram illustrating an example of a functional configuration of a measurement system that functions when measuring and controlling a moving mechanism and a rotating mechanism along a route.
  • FIG. 2 is a diagram illustrating an example of a functional configuration of a setting device. It is a figure showing a measuring system concerning a modification. It is a figure showing a measuring system concerning a modification. It is a figure showing a measuring system concerning a modification. It is a figure showing a measuring system concerning a modification. It is a figure showing a measuring system concerning a modification.
  • FIG. 11 is a diagram for explaining an adjustment mechanism according to a modification.
  • FIG. 1 is a diagram schematically showing an application scene of a measurement system 1a according to the present embodiment.
  • the measurement system 1a is used for measuring each of a plurality of measurement parts.
  • the plurality of measurement portions may be set for one work, or may be set for a measurement target including a set of a plurality of works. In the example shown in FIG. 1, one work is set as a measurement target, and a plurality of measurement portions are set on the work.
  • the measurement system 1a includes an imaging unit 66a, a sensor 68a, a base unit 62a, an adjustment mechanism 64a, a change mechanism 8a, a position determination unit 14, and a control unit 17.
  • the imaging unit 66a and the sensor 68a are provided on the base unit 62a.
  • the change mechanism 8a changes the relative position between the base 62a and the work W.
  • the change mechanism 8a includes an XY stage that moves the work W as shown in FIG. 1, a robot that moves the base 62a, and the like.
  • the adjustment mechanism 64a adjusts the positional relationship between the imaging unit 66a and the sensor 68a with respect to the traveling direction of the base 62a.
  • the adjustment mechanism 64a is a rotation mechanism that rotates the base 62a.
  • the adjusting mechanism 64a is not limited to the rotating mechanism, as long as it can adjust the positional relationship between the imaging unit 66a and the sensor 68a with respect to the traveling direction of the base 62a.
  • the position determining means 14 determines the measurement position p based on the image of the measurement portion P captured by the imaging unit 66a. For example, the measurement position p may be determined in advance from the image of the measurement portion P by setting the measurement position p in advance in association with the position of the measurement portion P. The measurement position p may be determined by specifying the position to be satisfied.
  • the control means 17 controls the changing mechanism 8a and the adjusting mechanism 64a. Specifically, the control unit 17 adjusts the imaging unit 66a to the front and the sensor 68a to the rear with respect to the traveling direction of the base unit 62a and adjusts the measurement range of each of the plurality of measurement portions to the imaging range of the imaging unit 66a. Let it pass. In addition, for each of the plurality of measurement portions, the control unit 17 causes the measurement position p determined by the position determination unit 14 to pass through the measurement range of the sensor 68a.
  • the measurement position of the sensor 68a is determined by the imaging unit 66a located forward with respect to the traveling direction of the base unit 62a, and the measurement position of the sensor 68a located backward with respect to the traveling direction of the base unit 62a is determined.
  • the changing mechanism 8a and the adjusting mechanism 64a are controlled so as to pass over the measured position p where the position has been determined. Since the imaging unit 66a is controlled so that the imaging unit 66a is located forward and the sensor 68a is located rearward with respect to the traveling direction of the base unit 62a, an accurate measurement position is specified by the imaging unit 66a, and then the specified measurement position is determined. The position can be adjusted so that the sensor 68a passes.
  • the sensor 68a passes over the measurement part imaged by the imaging part 66a, so that the sensor 68a passes over the measurement part earlier than the imaging part 66a.
  • the loss of time and the amount of movement can be reduced as compared with.
  • FIG. 2 is a schematic diagram illustrating an overall configuration of the measurement system 1 according to the present embodiment.
  • the measurement system 1 can be used, for example, to measure each of a plurality of measurement portions on a workpiece W as an object.
  • “measurement” includes measurement for the purpose of inspection, and includes measurement in which the final output is a measured value and measurement in which the final output is, for example, only pass / fail of the inspection.
  • the measuring system 1 includes a measuring device 6, a moving mechanism 8, a PLC (Programmable Logic Controller) 100 functioning as a control device for controlling the measuring device 6 and the moving mechanism 8, a controller 200, a servo driver 300, It includes a processing device 400 and a driver unit 500.
  • PLC Programmable Logic Controller
  • the measurement device 6 is electrically connected to each of the controller 200, the servo driver 300, and the image processing device 400.
  • the moving mechanism 8 is electrically connected to the driver unit 500.
  • the PLC 100 is connected to each of the controller 200, the servo driver 300, the image processing device 400, and the driver unit 500 via the network NW.
  • the network NW is, for example, a field network.
  • EtherCAT registered trademark
  • EtherNet / IP registered trademark
  • the measurement system 1 is configured by seven devices, but may be configured by six or less or eight or more.
  • two or more devices that are electrically connected may be configured as one device.
  • two or more devices connected via the network NW may be connected to each other via an internal bus to constitute one device.
  • the measuring device 6 includes a rotating body 62, a rotating mechanism 64, a camera 66, and a displacement sensor 68.
  • the rotating body 62 is an example of the base of the present invention, and has a camera 66 and a displacement sensor 68 attached thereto.
  • the rotating mechanism 64 changes the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 by rotating the rotating body 62.
  • the rotation mechanism 64 is, for example, a servo motor constituted by a rotary motor, and drives the rotary body 62 to rotate about an axis parallel to the Z axis.
  • the rotation mechanism 64 is an example of the adjustment mechanism of the present invention.
  • the adjusting mechanism only needs to be able to change the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62, and is not limited to the rotating mechanism 64 shown in FIG.
  • the camera 66 is an imaging unit that captures an image of each measurement portion set on the work W.
  • the displacement sensor 68 is a sensor that performs measurement for each measurement portion set on the work W.
  • the moving mechanism 8 is an example of the changing mechanism of the present invention, and changes the relative position between the work W and the measuring device 6 by moving the work W.
  • the moving mechanism 8 is, for example, an XY stage that can impart a horizontal translational movement to the work W.
  • the changing mechanism is not limited to the moving mechanism 8 shown in FIG. 2 as long as the relative position between the workpiece W and the rotating body 62 can be changed.
  • a mechanism for moving the rotating body 62 by a robot or a rotating mechanism A mechanism for moving each of the body 62 and the work W may be used.
  • the moving mechanism 8 includes an X stage 82X, a Y stage 82Y, and servo motors 84X and 84Y.
  • Each of the servomotors 84X and 84Y is constituted by a rotary motor.
  • the servo motor 84X translates and drives the X stage 82X along the X-axis direction.
  • the servo motor 84Y translates and drives the Y stage 82Y along the Y-axis direction.
  • the PLC 100 controls the controller 200, the servo driver 300, the image processing device 400, and the driver unit 500. Specifically, the PLC 100 causes the camera 66 to sequentially capture each of a plurality of measurement portions on the workpiece W, and causes the displacement sensor 68 to measure a measurement position specified based on the image captured by the camera 66.
  • the controller 200 outputs a measurement result by controlling the displacement sensor 68 according to the measurement command sent from the PLC 100.
  • the output destination may be the PLC 100 or the display unit 232 (see FIG. 9) connected to the controller 200.
  • the servo driver 300 performs feedback control on the rotation mechanism 64 so that the rotation amount of the rotating body 62 approaches the rotation command sent from the PLC 100.
  • the image processing device 400 controls the camera 66 in response to a command from the PLC 100, performs various types of image processing based on the image sent from the camera 66, and sends a processing result to the PLC 100.
  • the driver unit 500 performs feedback control on the moving mechanism 8 according to a command from the PLC 100.
  • Driver unit 500 includes servo drivers 500X and 500Y.
  • the servo driver 500X performs feedback control on the servomotor 84X so that the movement amount of the Y stage 82X approaches the movement command.
  • the servo driver 500Y performs feedback control on the servo motor 84Y so that the movement amount of the Y stage 82Y approaches the movement command.
  • the PLC 100 controls the servo driver 300 and the driver unit 500 such that the camera 66 is located forward and the displacement sensor 68 is located backward with respect to the traveling direction of the rotating body 62.
  • the image processing apparatus 400 is controlled so as to output an imaging instruction at a timing included in the imaging visual field.
  • the image processing device 400 and the PLC 100 determine the measurement position of the displacement sensor 68 based on the image captured by the camera 66.
  • the PLC 100 controls the servo driver 300 and the driver unit 500 so that the measurement position determined in the measurement range of the displacement sensor 68 passes, and outputs a measurement instruction at a timing when the measurement position is included in the measurement range of the displacement sensor 68.
  • the controller 200 is controlled to perform the operation.
  • the measurement position of the displacement sensor 68 is determined by the camera 66 located forward with respect to the traveling direction of the rotating body 62, and the displacement sensor 68 located backward with respect to the traveling direction of the rotating body 62.
  • the relative position between the displacement sensor 68 and the workpiece W is adjusted so as to pass over the measurement position where the position has been determined.
  • a reference path for sequentially imaging a plurality of measurement portions set on the work W is set in advance. Stipulated.
  • the reference path includes a change in the relative position between the rotating body 62 and the workpiece W, and a change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 associated with the change in the relative position. including. More specifically, the reference path includes the amount of movement of the moving mechanism 8 and the amount of displacement of the rotating mechanism 64 associated with the amount of movement of the moving mechanism 8.
  • the displacement The reference route is appropriately corrected so that the measurement position passes through the measurement range of the sensor 68.
  • the “measurement portion” is a portion that specifies the measurement position of the displacement sensor 68 located behind the camera 66 located in the front, and may be set continuously on the workpiece W. , May be set discontinuously.
  • FIG. 3 is a diagram showing a reference route. Although the position of the work W is actually changed by the moving mechanism 8, the position of the rotating body 62 is fixed. It is expressed as if it is moving above.
  • a solid line is a path L ⁇ b> 1 indicating a change in the relative position between the rotation center O of the rotating body 62 and the workpiece W when the moving mechanism 8 is controlled according to the reference path.
  • Dashed line when the moving mechanism 8 and the rotating mechanism 64 is controlled according to the reference path is a path L 2 showing the change in the relative position between the displacement sensor 68 and the workpiece W.
  • FIG. 3 for convenience, it is expressed by eliminating the overlap of the paths L 1 and the path L 2.
  • FIG. 3 is expressed by eliminating the overlap of the paths L 1 and the path L 2.
  • the camera 66 is represented by a square, and the displacement sensor 68 is represented by a triangle.
  • some symbols are omitted from the measurement position p, the rotating body 62, the camera 66, and the displacement sensor 68 for convenience.
  • FIG. 3 it is assumed that a first measurement portion P 1 to a sixth measurement portion P 6 are set as the measurement portion P.
  • the reference path is generated, for example, based on the design appearance of the work W.
  • the generation of the reference path determines how the moving mechanism 8 and the rotating mechanism 64 move over time.
  • the reference route is generated such that the measurement of the workpiece W is started from a predetermined reference state.
  • the reference state is a concept including a relative position between the work W and the rotating body 62 and a posture of the work W with respect to the rotating body 62.
  • the measurement of the work W does not always start from the reference state, and the work W is not always as designed. Therefore, depending on the deviation from the reference state and the deviation between the set work W and the design value of the work W, even if the moving mechanism 8 and the rotation mechanism 64 are controlled according to the reference path as shown in FIG.
  • the measurement range of the displacement sensor 68 does not pass over the measurement position p of the measurement portion P. It is assumed that each of the plurality of measurement portions P passes through the imaging range of the camera 66 even when the moving mechanism 8 and the rotating mechanism 64 are controlled according to the reference path. Here, that the measurement portion P passes through the imaging range is only required that the camera 66 can image a characteristic portion for specifying the position of the measurement portion P. Note that the imaging range of the camera 66 is wider than the measurement range of the displacement sensor 68.
  • FIG. 4 is a diagram illustrating an outline of a method of correcting the reference route.
  • FIG. 4 the movement of the rotating body 62, the path of the rotation center O, and the path of the displacement sensor 68 are shown separately.
  • the path when the moving mechanism 8 and the rotation mechanism 64 are controlled according to the reference path is indicated by a broken line, and the corrected path is indicated by a solid line.
  • the reference path is corrected by correcting the path of the displacement sensor 68 without changing the path of the rotation center O of the rotating body 62. More specifically, the measurement system 1 in the present embodiment corrects the reference path by changing the temporal movement of the rotating mechanism 64 without changing the temporal movement of the moving mechanism 8 from the setting.
  • the moving mechanism 8 is a mechanism that changes the relative position between the workpiece W and the measuring device 6, whereas the rotating mechanism 64 is a mechanism that determines the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62. It is a mechanism that changes. That is, the reference path is corrected by changing the time-dependent movement of the rotation mechanism 64 without changing the time-dependent movement of the moving mechanism 8, which means that the path of the relative position between the workpiece W and the measuring device 6 is changed. By adjusting the change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 without changing the reference path, the reference path is corrected.
  • the reference path is adjusted by adjusting only the change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 without changing the path of the relative position between the workpiece W and the measuring device 6. Since the correction is performed, the number of correction targets is small, and the processing can be simplified. As a result, the processing load required for the correction can be reduced. More specifically, the calculation required for the correction can be simplified. In particular, in the present embodiment, since only the movement of the rotating mechanism 64 that rotates the rotating body 62 is adjusted to correct the reference path, only one variable called the rotation amount of the rotating body 62 needs to be calculated. , The operation required for correction can be further simplified.
  • FIG. 5 is a flowchart illustrating an example of the flow of the measurement process of the measurement system 1.
  • the measurement process is a process started based on the work W being set on the moving mechanism 8.
  • step S1 the PLC 100 controls the moving mechanism 8 and the rotating mechanism 64 according to the set route.
  • the set route is the route after the correction when the reference route is corrected, and is the reference route when the reference route is not corrected.
  • step S2 the PLC 100 determines whether or not the imaging condition of the camera 66 is satisfied.
  • the imaging condition is, for example, that the measurement part P is located in the imaging range of the camera 66.
  • the amount of movement of the moving mechanism 8 and the amount of rotation of the rotating mechanism 64 when the measurement portion P is located in the imaging range of the camera 66 are determined in advance according to the reference path. That is, the imaging condition in the present embodiment is satisfied when the moving amount of the moving mechanism 8 reaches the predetermined target amount and the rotation amount of the rotating mechanism 64 reaches the predetermined target amount.
  • step S3 the camera 66 takes an image of the measurement portion P in accordance with an imaging command output from the image processing device 400 based on an imaging instruction from the PLC 100.
  • the PLC 100 may output an instruction to stop the moving mechanism 8 and the rotating mechanism 64.
  • step S4 the PLC 100 specifies the measurement position p based on the image captured by the camera 66.
  • the measurement position p is predetermined in association with, for example, the position and orientation of the measurement portion P.
  • the image processing device 400 specifies the position and orientation of the measurement portion P from the image captured by the camera 66 using known pattern matching, and outputs it to the PLC 100.
  • the PLC 100 specifies the measurement position p from the output position and orientation of the measurement portion P. Note that when the shape of the measurement portion P is a shape like a vertically symmetrical circle, it is not necessary to specify the posture.
  • step S5 the PLC 100 corrects the reference route based on the specified measurement position p. Specifically, the PLC 100 corrects the reference path so that the measurement position p specified within the measurement range of the displacement sensor 68 passes. Thereby, the amount of movement of the moving mechanism 8 when the specified measurement position p is located within the measurement range of the displacement sensor 68 and the amount of rotation of the rotating mechanism 64 are specified.
  • the PLC 100 may not modify the path after the measurement range of the displacement sensor 68 has passed over the measurement position p. That is, after the measurement range of the displacement sensor 68 has passed over the measurement position p, the movement mechanism 8 and the rotation mechanism 64 are controlled according to the reference path.
  • step S6 the PLC 100 determines whether the measurement condition is satisfied.
  • the measurement condition is that the specified measurement position p is located within the measurement range of the displacement sensor 68. More specifically, in step S5, the amount of movement of the moving mechanism 8 and the amount of rotation of the rotating mechanism 64 when the specified measurement position p is located within the measurement range of the displacement sensor 68 are specified. The condition is satisfied when the movement amount of the movement mechanism 8 and the rotation amount of the rotation mechanism 64 reach the values specified in step S5.
  • step S7 the displacement sensor 68 performs measurement.
  • the controller 200 receives a signal from the displacement sensor 68 and calculates a measurement result.
  • the PLC 100 may output an instruction to stop the moving mechanism 8 and the rotating mechanism 64.
  • step S8 the PLC 100 determines whether or not the measurement of all the set measurement portions has been completed. The processing from step S2 to step S8 is repeated until it is determined that the measurement of all the set measurement parts is completed, and when it is determined that the measurement of all the set measurement parts is completed, The measurement processing ends.
  • the PLC 100 and the image processing device 400 specify the measurement position p based on the image captured by the camera 66.
  • FIG. 6 is a diagram for explaining a method of specifying the measurement position p.
  • the image processing device 400 specifies the position and orientation of the measurement portion P by using known pattern matching. More specifically, by specifying the position and orientation of the image feature predetermined for each measurement portion P, the position and orientation of the measurement portion P (referred to as “actually measured position and orientation SP m ”) are specified. be able to. In FIG. 6, two line segments are image features of the measurement portion P.
  • the PLC 100 from the measured position and orientation SP m calculates a positional deviation amount of the measurement portion.
  • a reference measurement portion P t the measured position and orientation SP m which is measured based on the image captured, obtained under the conditions of setting of the reference path measurement portion P of The position and posture (referred to as “reference position / posture SP t ”) are compared to calculate the amount of positional deviation.
  • the PLC 100 has a rotation amount of the movement amount and the rotation mechanism 64 of the moving mechanism 8 when obtaining the actual measured position and orientation SP m can be identified.
  • the position and orientation of the measurement portion of the case of controlling the moving mechanism 8 and the rotating mechanism 64 in the movement amount and the rotation amount specified corresponds to the reference position and orientation SP t.
  • PLC100 acquires the reference position and orientation SP t, according to equation (1) obtains the position deviation amount ⁇ P from the reference position and orientation SP t.
  • the reference position and orientation SP t is an example of the reference position determined in accordance with the reference path of the present invention.
  • the measurement position is predetermined in association with the position of the measurement portion P.
  • a plurality of measurement positions p are set for one measurement portion P.
  • the reference position measuring position relative to a reference measurement portion P t sp t (x t, y t) and, measured measurement position for the actual measurement portion P position sp m (x m, y m ) and.
  • T () represents a conversion equation corresponding to translation, and is determined based on the displacement amount ⁇ X of the X coordinate and the displacement amount ⁇ Y of the Y coordinate.
  • R () indicates a conversion formula corresponding to the rotational movement, and is determined based on the positional deviation amount ⁇ in the rotational direction. Note that T () and R () can be obtained from Expression (3). That is, based on the reference position and orientation SP t and the actually measured position and orientation SP m, R () and T () is calculated.
  • the PLC 100 and the image processing apparatus 400, the camera 66 to identify the actual position sp m on the basis of the image captured.
  • the image processing apparatus 400, the camera 66 may identify the actual position sp m on the basis of the image captured.
  • the image processing apparatus 400 of information about the amount of rotation of the moving amount and the rotation mechanism 64 of the moving mechanism 8 when obtaining the actual measured position and orientation SP m measurement portion P receives.
  • FIG. 7 is a diagram for explaining a method of correcting the reference route.
  • the solid line through the middle of FIG. 7 represents the path L 1 the rotational center O of the rotating body 62 passes.
  • the reference path is corrected by rotating the rotating body 62 without correcting the path through which the rotation center O of the rotating body 62 passes, and the measurement position p is displaced. It passes through the measurement range of the sensor 68.
  • the displacement sensor 68 since the displacement sensor 68 is fixed to the rotating body 62, the displacement sensor 68 rotates around the rotation center O. Assuming that the distance between the displacement sensor 68 and the rotation center O is the radius R, the PLC 100 measures the measurement position based on the distance r obtained by converting the radius R into a pixel value in the image, the path L 1 , and the specified measurement position p. position C (x c, y c) of the rotation center O when the upper p is the displacement sensor 68 to pass, it can be obtained and a rotation angle theta s.
  • PLC100 the calculated position C (x c, y c) and, measured position sp m (x m, y m ) and, based on the radius r, and calculates the rotation angle theta s.
  • the rotation center O of the rotating body 62 is positioned C (x c, y c) by the time it passes through the rotation angle of the rotating body 62 controls the rotating mechanism 64 so that theta s.
  • the PLC 100 is the rotational center O position C (x c, y c) of the rotary body 62 there is time to pass through the, when the rotation angle of the rotating body 62 becomes theta s, measurement conditions is satisfied As such, it outputs a measurement command to the controller 200.
  • the measurement instruction, the position C (x c, y c) contains information, the controller 200, based on a signal from the displacement sensor 68 at the position C (x c, y c) and the position C, and the measurement results Calculate and output.
  • FIG. 8 is a schematic diagram illustrating a hardware configuration of the image processing apparatus 400.
  • the image processing apparatus 400 includes a processor 402 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 404, a display controller 406, a system controller 408, and an I / O (Input / Output). Output) It includes a controller 410, a hard disk 412, a camera interface 414, a controller interface 418, a communication interface 420, and a memory card interface 422. These units are connected to each other so as to enable data communication with the system controller 408 at the center.
  • a processor 402 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 404, a display controller 406, a system controller 408, and an I / O (Input / Output). Output) It includes a controller 410, a hard disk
  • the processor 402 exchanges programs (codes) with the system controller 408 and executes the programs (codes) in a predetermined order, thereby realizing the intended arithmetic processing.
  • the system controller 408 is connected to the processor 402, the RAM 404, the display controller 406, and the I / O controller 410 via buses, respectively, exchanges data with each unit, and performs processing of the entire image processing apparatus 400. Govern.
  • the RAM 404 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory), and is a program read from the hard disk 412, an image (image data) acquired by the camera 66, and a process for the image. Holds results and work data.
  • DRAM Dynamic Random Access Memory
  • the display controller 406 is connected to the display unit 432, and outputs a signal for displaying various information to the display unit 432 according to an internal command from the system controller 408.
  • the I / O controller 410 controls data exchange between a recording medium connected to the image processing apparatus 400 and an external device. More specifically, I / O controller 410 is connected to hard disk 412, camera interface 414, input interface 416, controller interface 418, communication interface 420, and memory card interface 422.
  • the hard disk 412 is an example of a storage device, and includes an image processing program 440 executed by the processor 402 and a project file 442.
  • the storage device is not limited to a nonvolatile magnetic storage device such as the hard disk 412, but may be a semiconductor storage device such as a flash memory or an optical storage device such as a DVD-RAM (Digital Versatile Disk Random Access Memory). There may be.
  • the image processing program 440 is a program for executing a process of acquiring an image according to an imaging command from the PLC 100 and a process of performing pattern matching. More specifically, the image processing program 440 executes a process for specifying the position and orientation of the measurement portion P according to the setting conditions stored in the project file 442.
  • the image processing program 440 may be provided by being incorporated in a part of another program. In that case, the image processing program 440 itself executes a predetermined process in cooperation with another program. That is, the image processing program 440 may be in a form incorporated in such another program. Alternatively, part or all of the functions provided by executing the image processing program 440 may be implemented as a dedicated hardware circuit.
  • the camera interface 414 corresponds to an input unit that receives image data generated by photographing the work W, and mediates data transmission between the camera 66 and the processor 402. More specifically, the camera interface 414 can be connected to one or more cameras 66, and a shooting instruction is output from the processor 402 to the camera 66 via the camera interface 414. Accordingly, the camera 66 captures an image of the subject and outputs the generated image to the processor 402 via the camera interface 414.
  • the input interface 416 mediates data transmission between the processor 402 and input devices such as a keyboard 434, a mouse, a touch panel, and a dedicated console.
  • the controller interface 418 mediates data transmission between the PLC 100 and the processor 402. More specifically, the controller interface 418 transmits information on the state of the production line controlled by the PLC 100, information on the work W, an imaging command, and the like to the processor 402.
  • the communication interface 420 mediates data transmission between the processor 402 and another personal computer or server (not shown).
  • the communication interface 420 is typically made of Ethernet (registered trademark), USB (Universal Serial Bus), or the like.
  • the memory card interface 422 mediates data transmission between the processor 402 and the memory card 436 as a recording medium.
  • the memory card 436 distributes an image processing program 440 executed by the image processing apparatus 400 in a stored state, and the memory card interface 422 reads out these programs from the memory card 436.
  • the memory card 436 can be a general-purpose semiconductor storage device such as SD (Secure Digital), a magnetic recording medium such as a flexible disk (Flexible Disk), or an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory). Become.
  • a program downloaded from a distribution server or the like may be installed in the image processing apparatus 400 via the communication interface 420.
  • FIG. 9 is a schematic diagram illustrating an example of a hardware configuration of the controller 200.
  • the controller 200 includes a processor 202 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 204, a display controller 206, a system controller 208, and an I / O (Input Output). It includes a controller 210, a hard disk 212, a sensor interface 214, a controller interface 218, a communication interface 220, and a memory card interface 222. These units are connected to each other so as to be able to perform data communication with each other with the system controller 208 being the center.
  • a processor 202 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 204, a display controller 206, a system controller 208, and an I / O (Input Output). It includes a controller 210, a hard disk 212, a sensor interface 214, a controller interface 218, a communication interface 220, and
  • the processor 202 exchanges programs (codes) and the like with the system controller 208 and executes them in a predetermined order, thereby realizing the intended arithmetic processing.
  • the system controller 208 is connected to each of the processor 202, the RAM 204, the display controller 206, and the I / O controller 210 via a bus, exchanges data with each unit, and performs processing of the entire image processing apparatus 400. Govern.
  • the RAM 204 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory), and stores a program read from the hard disk 212, an image (image data) acquired by the displacement sensor 68, and an image. Holds processing results and work data.
  • DRAM Dynamic Random Access Memory
  • the display controller 206 is connected to the display unit 232, and outputs a signal for displaying various information to the display unit 232 according to an internal command from the system controller 208.
  • the I / O controller 210 controls data exchange between a recording medium connected to the controller 200 and an external device. More specifically, I / O controller 210 is connected to hard disk 212, sensor interface 214, input interface 216, controller interface 218, communication interface 220, and memory card interface 222.
  • the hard disk 212 is an example of a storage device and includes a measurement program 240 executed by the processor 202.
  • the storage device is not limited to a nonvolatile magnetic storage device such as the hard disk 212, but may be a semiconductor storage device such as a flash memory or an optical storage device such as a DVD-RAM (Digital Versatile Disk Random Access Memory). There may be.
  • the measurement program 240 outputs a process of acquiring a signal from the displacement sensor 68 in accordance with a measurement command from the PLC 100, a process of calculating a measurement result for the measurement portion P based on the obtained signal, and outputting the calculated measurement result.
  • This is a program for executing processing and the like.
  • the measurement program 240 may be provided by being incorporated in a part of another program. In that case, the measurement program 240 itself executes a predetermined process in cooperation with another program. That is, the measurement program 240 may be in a form incorporated in such another program. Alternatively, part or all of the functions provided by executing the measurement program 240 may be implemented as a dedicated hardware circuit.
  • the sensor interface 214 corresponds to an input unit that receives a signal from the displacement sensor 68 and an output unit that outputs a measurement instruction to the displacement sensor 68, and mediates data transmission between the displacement sensor 68 and the processor 202. More specifically, the sensor interface 214 can be connected to one or more displacement sensors 68, and a measurement instruction is output from the processor 202 to the displacement sensor 68 via the sensor interface 214. As a result, light is projected from the light projecting unit 61 of the displacement sensor 68 toward the measurement position p, and a signal from the light receiving unit 63 that receives the light reflected at the measurement position p is sent to the processor 202 via the sensor interface 214. Is output.
  • the input interface 216 mediates data transmission between the processor 202 and input devices such as a keyboard 234, a mouse, a touch panel, and a dedicated console.
  • the controller interface 218 mediates data transmission between the PLC 100 and the processor 202. More specifically, the controller interface 218 transmits, to the processor 202, information on the state of the production line controlled by the PLC 100, information on the work W, an imaging command, and the like.
  • the communication interface 220 mediates data transmission between the processor 202 and another personal computer or server (not shown).
  • the communication interface 220 is typically made of Ethernet (registered trademark), USB (Universal Serial Bus), or the like.
  • the memory card interface 222 mediates data transmission between the processor 202 and the memory card 236 as a recording medium.
  • the memory card 236 distributes a state in which measurement programs 240 and the like executed by the controller 200 are stored, and the memory card interface 222 reads these programs from the memory card 236.
  • the memory card 236 can be a general-purpose semiconductor storage device such as an SD (Secure Digital), a magnetic recording medium such as a flexible disk (Flexible Disk), or an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory). Become.
  • a program downloaded from a distribution server or the like may be installed in the image processing apparatus 400 via the communication interface 420.
  • FIG. 10 is a schematic diagram illustrating an example of a hardware configuration of the PLC 100.
  • the PLC 100 includes a chipset 112, a processor 114, a non-volatile memory 116, a main memory 118, a system clock 120, a memory card interface 122, a communication interface 128, an internal bus controller 130, and a field bus controller 138. including.
  • the chipset 112 and other components are respectively connected via various buses.
  • the processor 114 and the chipset 112 typically have a configuration according to a general-purpose computer architecture. That is, the processor 114 interprets and executes the instruction codes sequentially supplied from the chipset 112 according to the internal clock.
  • the chipset 112 exchanges internal data with various connected components and generates instruction codes required for the processor 114.
  • the system clock 120 generates a system clock having a predetermined cycle and outputs the generated system clock to the processor 114.
  • the chipset 112 has a function of caching data and the like obtained as a result of execution of arithmetic processing by the processor 114.
  • the PLC 100 has a nonvolatile memory 116 and a main memory 118 as storage means.
  • the nonvolatile memory 116 holds the OS, the system program, the user program 140, log information, and the like in a nonvolatile manner.
  • the main memory 118 is a volatile storage area that holds various programs to be executed by the processor 114 and is also used as a work memory when executing various programs.
  • the user program 140 is a program created by the user, and is sent from an external PC for setting connected via the communication interface 128 or distributed in a state stored in the memory card 124.
  • the PLC 100 has a communication interface 128, an internal bus controller 130, and a field bus controller 138 as communication means. These communication circuits transmit and receive data.
  • the communication interface 128 exchanges data with the controller 200 and the image processing device 400.
  • the PLC 100 outputs an imaging instruction to the image processing device 400 via the communication interface 128.
  • the PLC 100 receives a measurement result regarding the position and orientation of the measurement portion P from the image processing device 400 via the communication interface 128. Further, the PLC 100 outputs a measurement instruction to the controller 200 via the communication interface 128.
  • the internal bus controller 130 controls data exchange via the internal bus 126. More specifically, the internal bus controller 130 includes a DMA (Dynamic Memory Access) control circuit 132, an internal bus control circuit 134, and a buffer memory 136.
  • DMA Dynamic Memory Access
  • the memory card interface 122 connects the memory card 124 detachable to the PLC 100 and the processor 114.
  • the fieldbus controller 138 is a communication interface for connecting to a field network.
  • the PLC 100 is connected to the servo driver 300 and the driver unit 500 via the field bus controller 138.
  • FIG. 11 is a diagram illustrating an example of a functional configuration of the measurement system 1 that functions in correcting a route.
  • FIG. 12 is a diagram illustrating an example of a functional configuration of the measurement system 1 that functions when measuring and when controlling the moving mechanism and the rotating mechanism along the path.
  • the various functions of the PLC 100 are realized by executing the user program 140.
  • Various functions of the image processing apparatus 400 are realized by executing processing according to the image processing program 440 and the project file 442.
  • the image processing device 400 includes an imaging control unit 42, a position / posture measuring unit 44, and model image data 46.
  • the model image data 46 is data included in the project file 442, and is generated by setting for generating a reference route.
  • the model image data 46 is image data indicating an image feature predetermined for each measurement portion P.
  • the model image data 46 is stored in association with a measurement number for identifying each of the plurality of measurement portions P.
  • the image processing device 400 measures the position and orientation of the measurement portion P based on the imaging command sent from the PLC 100 and the measurement number of the measurement portion P included in the imaging field of view, and measures the actual measurement position and orientation illustrated in FIG. Obtain SP m .
  • the imaging control unit 42 instructs the camera 66 to perform imaging according to an imaging command from the PLC 100.
  • the position / posture measurement unit 44 compares the image data obtained by the camera 66 taking an image according to the imaging instruction from the imaging control unit 42 with the model image data 46 corresponding to the measurement number sent from the PLC 100. measures the position and orientation of the measurement portion P, obtain measured position and orientation SP m. Position and orientation measuring unit 44 transmits the measured position and orientation SP m obtained by measuring the the PLC 100.
  • the PLC 100 includes the imaging condition determination unit 12, the imaging condition data 182, the position / posture acquisition unit 142, the position / posture data 184, the displacement amount calculation unit 144, the measurement position calculation unit 146, and the measurement position data 186. And a measurement point calculation unit 162, route data 190, a rotation angle calculation unit 164, a movement amount calculation unit 166, a trajectory correction unit 168, a measurement condition correction unit 170, and measurement condition data 196.
  • the PLC 100 acquires an encoder value from each of the servo drivers 300, 500X, 500Y for each control cycle.
  • Each of the moving mechanism 8 and the rotating mechanism 64 includes an encoder for each servomotor.
  • the encoder generates a pulse signal according to the amount of movement of the servomotor, and measures the amount of movement as an encoder value. That is, the encoder value from the servo driver 300 corresponds to the rotational movement amount of the rotating body 62 from the initial position.
  • the encoder value from the servo driver 500X corresponds to the translation amount of the X stage 84X from the initial position.
  • the encoder value from the servo driver 500Y corresponds to the translation amount of the Y stage 84Y from the initial position.
  • the imaging condition data 182 is data indicating imaging conditions, information obtained by generating a reference route, and is stored for each measurement portion P.
  • the imaging conditions include, for example, a combination of a rotational movement amount of the rotating body 62 when the measurement portion P is positioned in an imaging range of the camera 66, a translation movement amount of the X stage 84X, and a translation movement amount of the Y stage 84Y.
  • the imaging condition data 182 includes a combination of a measurement number for identifying the measurement portion P and an imaging condition of the measurement portion P indicated by the measurement number.
  • the imaging condition determination unit 12 determines whether the imaging condition is satisfied based on the encoder value and the imaging condition data 182 acquired for each control cycle. When determining that the imaging condition is satisfied, the imaging condition determination unit 12 sends an imaging command to the imaging control unit 42 and sets the measurement number of the measurement part P corresponding to the satisfied imaging condition to the position / posture measurement unit 44. Send to
  • the position / posture acquisition unit 142 measures a relative position between the camera 66 and the moving mechanism 8 at the time of imaging by the camera 66, and a measurement part obtained under the conditions at the time of setting the reference route, based on the position / posture data 184. Acquire the position and orientation of P. Specifically, the position and orientation acquisition unit 142 acquires the reference position and orientation SP t shown in FIG.
  • the relative position between the camera 66 and the moving mechanism 8 at the time of imaging by the camera 66 is the camera position, and the imaging condition determination unit 12 estimates the relative position between the camera 66 and the moving mechanism 8 based on the encoder value at the timing when the camera 66 images the measurement portion P.
  • Position and orientation data 184 addressed by the data indicating the relationship between the camera position and the reference position and orientation SP t, and data showing the surface of the workpiece W to be used when setting the reference path, based on the installation position of the workpiece W when setting Obtained.
  • Position and orientation acquisition unit 142 the position and orientation data 184, to obtain the reference position and orientation SP t corresponding to the camera position where the imaging condition judging unit 12 is estimated.
  • Positional shift amount calculating unit 144 in accordance with equation (1) described above, based on the measured position and orientation SP m obtained from the position and orientation measurement unit 44, and the reference position and orientation SP t the position and orientation acquisition unit 142 acquires The position shift amount ⁇ P is calculated.
  • the measurement position calculation unit 146 calculates the actual measurement position sp m based on the measurement position data 186 indicating the correspondence between the reference measurement portion P t and the reference position sp t in accordance with the above-described equation (2), and the displacement ⁇ P. Is calculated.
  • Measurement position data 186, and measurement portion P measured partial camera coordinate values of the measurement position p which has been set for the P a (sp t) and is associated data, indicating the measurement number and the measurement number is composed of a combination of the reference position sp t corresponding to the measurement portion, is data generated when setting the measurement conditions.
  • Measurement position calculation unit 146 based on the measurement number of measurement portions P which is a measurement target, and obtaining the reference position sp t corresponding to the measured number from the measurement position data 186, the acquired reference position sp t, location It reflects the deviation amount [Delta] P, and calculates the actual position sp m.
  • Measuring point calculating unit 162 position C (x c, y c) of the rotation center O when the upper measuring position p is the displacement sensor 68 passes is calculated.
  • Measuring point calculating unit 162, the measured position sp m that measurement position calculation unit 146 has calculated, on the basis of the translation data 192 indicating the path whereby the rotational center O of the rotating body 62 passes the position C of the camera coordinate system (X c , y c ) is calculated.
  • the path data 190 is data including a change in the relative position between the work W and the rotating body 62 and a change in the relative position between the work W and the displacement sensor 68.
  • the path data 190 includes translational movement data 192 indicating the movement of the moving mechanism 8 over time, and rotational movement data 194 indicating the movement of the rotating mechanism 64 over time.
  • the translational movement data 192 corresponds to data indicating a change in the relative position between the workpiece W and the rotating body 62.
  • the translational movement data 192 is a path along which the rotation center O of the rotating body 62 moves on the workpiece W. corresponding to the path L 1.
  • the position C is calculated by finding the intersection with.
  • Movement amount calculating section 166 the translational movement of the moving mechanism 8 when the rotation center O on position C of the camera coordinate system is located ([Delta] X, [Delta] Y) and rotational movement of the rotating mechanism 64 as a rotation angle theta s ( ⁇ ) is calculated.
  • the trajectory correction unit 168 corrects the rotation movement data 194 in association with the translation movement data 192 so that the rotation movement amount ( ⁇ ) reaches the translation movement amount ( ⁇ X, ⁇ Y) calculated by the movement amount calculation unit 166. I do.
  • the measurement condition correction unit 170 corrects the measurement condition data 196 indicating the measurement condition of the displacement sensor 68. Specifically, the measurement condition correction unit 170 sets one measurement condition when the translation amount ( ⁇ X, ⁇ Y) obtained by the movement amount calculation unit 166 and the rotation amount ( ⁇ ) are reached. .
  • the PLC 100 may further include the determination unit 176.
  • the determination unit 176 determines whether the positional deviation amount ⁇ P calculated by the positional deviation amount calculation unit 144 exceeds a predetermined allowable value.
  • the predetermined allowable value is, for example, a value indicating a range that can be dealt with simply by rotating the rotating body 62 and adjusting the relative position between the displacement sensor 68 and the workpiece W. Specifically, when the displacement amount is equal to or more than the value corresponding to the distance R between the displacement sensor 68 and the rotation center O of the rotating body 62, even if the rotating body 62 is rotated, the displacement sensor 68 The measurement position p cannot be located within the range.
  • the determination unit 176 outputs the determination result to the notification unit 178 to notify the user of the determination result when the positional deviation amount ⁇ P exceeds a predetermined allowable value.
  • the notification unit 178 can notify the user in various ways, such as a notification by display, a notification by a lamp, a notification by sound, or a notification by outputting a stop signal to stop processing.
  • the notification may be made in any suitable manner.
  • the function of the position determining means of the present invention is realized by the position / posture measuring unit 44, the displacement calculating unit 144, and the measured position calculating unit 146 shown in FIG.
  • the function of the position determining means is realized by the image processing device 400 and the PLC 100, but may be realized only by the PLC 100, or may be realized only by the image processing device 400. And may be realized by three or more devices including other different devices.
  • the PLC 100 includes a target movement amount designation unit 174.
  • the target movement amount designation unit 174 designates a target movement amount according to the route data 190.
  • the route data 190 is information for sequentially capturing each of the plurality of measurement portions P by the camera 66 and for allowing each of the measurement positions p to pass through the measurement range of the displacement sensor 68, as described above. Each time the measurement part is imaged, it is appropriately corrected.
  • the target movement amount specifying unit 174 calculates the target movement amounts MVX, MVY, and MV ⁇ of each of the servo drivers 300, 500X, and 500Y. Is calculated, and a movement command is issued to each of the servo drivers 300, 500X, and 500Y.
  • the PLC 100 includes a measurement condition determination unit 172.
  • the measurement condition determination unit 172 determines whether the measurement condition is satisfied based on the encoder value and the measurement condition data 196 acquired for each control cycle.
  • the measurement condition data 196 is data indicating measurement conditions, and includes a measurement position, a translational movement amount ( ⁇ X, ⁇ Y) and a rotational movement amount ( ⁇ ) when the measurement position of the displacement sensor 68 is located at the measurement position. And a combination.
  • the measurement condition determination unit 172 determines whether or not the movement amount calculated from the encoder value has reached the translation movement amount ( ⁇ X, ⁇ Y) and the rotation movement amount ( ⁇ ) indicated by the measurement condition data 196. If it is determined that there is, a measurement instruction is issued to the controller 200.
  • the controller 200 controls the displacement sensor 68 according to the measurement instruction to obtain a measurement result.
  • the measurement instruction includes position information of the measurement position p.
  • the controller 200 can obtain the shape of the part specified by the plurality of measurement positions p.
  • the measurement system 1 may further include a setting device 70 for setting a reference path, an imaging condition, and a measurement position corresponding to each measurement portion.
  • FIG. 13 is a diagram illustrating an example of a functional configuration of the setting device 70.
  • the setting device 70 includes a display unit 71, a storage unit 72, a measurement position determination unit 73, a model image generation unit 74, a path generation unit 75, a movement amount determination unit 76, an imaging condition determination unit 77, A posture information generation unit 78 and a measurement condition determination unit 79;
  • the display unit 71 is, for example, a touch panel.
  • the storage unit 72 is, for example, an auxiliary storage device such as a hard disk drive or a solid state drive, and includes a measurement position determination unit 73, a model image generation unit 74, a path generation unit 75, a movement amount determination unit 76, an imaging condition A processing program executed by the determining unit 77, the position / posture information generating unit 78, and the measurement condition determining unit 79, data indicating information on setting of a designated path, data obtained by executing the processing program, and the like. Is stored.
  • the measurement position determination unit 73 reads three-dimensional design data (for example, CAD (Computer-Aided Design) data) indicating the design surface of the work W stored in the storage unit 72, and displays the design W of the work W on the display unit 71. Is displayed.
  • the measurement position determination unit 73 determines a plurality of measurement portions on the workpiece W and measurement positions corresponding to the measurement portions in accordance with the user input, and generates measurement position data 186 indicating the correspondence between the measurement portions and the measurement positions.
  • the model image generation unit 74 stores the model image indicating the measurement part determined by the measurement position determination unit 73 according to the user input in association with each measurement part, and generates the model image data 46.
  • the path generation unit 75 generates a path such that each of the plurality of measurement positions determined by the measurement position determination unit 73 passes through the measurement range of the displacement sensor 68.
  • the route generating unit 75 may input a line connecting each of the measurement positions by the user himself, and may generate a route according to the input, or may automatically generate a route satisfying a predetermined condition.
  • the predetermined condition includes, for example, that the length of the route is the shortest.
  • the movement amount determination unit 76 determines, based on the path generated by the path generation unit 75, the displacement of the translation amount that can realize the generated path and the displacement of the rotation amount associated with the displacement of the translation amount. By doing so, the route data 190 is generated.
  • the imaging condition determination unit 77 determines the measurement part based on the displacement of the translation amount determined by the movement amount determination unit 76, the displacement of the rotational movement amount associated with the displacement of the translation amount, and the position of the measurement part. The combination of the translational movement amount and the rotational movement amount when is located in the imaging range of the camera 66 is specified. The imaging condition determination unit 77 determines the combination of the specified translational movement amount and rotational movement amount as the imaging condition, and generates the imaging condition data 182.
  • the position / posture information generation unit 78 specifies the position and orientation of the measurement part when the measurement part is imaged under the imaging conditions determined by the imaging condition determination unit 77, and generates the position / posture data 184. Since the relative position between the camera 66 and the workpiece W is specified based on the translation amount and the rotation amount, the relationship between the translation amount, the rotation amount, and the position and orientation of the measurement part in the camera coordinate system is determined. , The relationship may be used as the position / posture data 184.
  • the measurement condition determination unit 79 calculates, for each measurement position, the displacement of the translation amount determined by the movement amount determination unit 76, the displacement of the rotational movement amount associated with the displacement of the translation amount, and the measurement position.
  • the translation amount and the rotation amount when the measurement position is within the measurement range of the displacement sensor 68 are specified.
  • the measurement condition determining unit 79 generates measurement condition data 196 using the relationship between the translational movement amount and the rotational movement amount specified for each measurement position as a measurement condition.
  • the data (measurement position data 186, model image data 46, route data 190, imaging condition data 182, position / posture data 184, measurement condition data 196) generated by the setting device 70 is sent to the PLC 100.
  • the PLC 100 sends the model image data 46 to the image processing device 400.
  • each of the plurality of measurement portions is imaged so that the camera 66 is positioned forward with respect to the traveling direction of the rotating body 62, and is obtained by imaging.
  • the measurement position to be measured by the displacement sensor 68 is determined based on the image thus obtained, and the rotation mechanism 64 and the moving mechanism 8 are controlled so that the measurement range of the displacement sensor 68 passes over the determined measurement position. Therefore, since the camera 66 is controlled so that the forward direction and the displacement sensor 68 are backward with respect to the traveling direction of the rotating body 62, the camera 66 specifies the accurate measurement position, and Can be adjusted so that the displacement sensor 68 passes through the position.
  • the displacement sensor 68 passes over the measurement portion captured by the camera 66. Therefore, when the displacement sensor 68 passes over the measurement portion earlier than the camera 66, In comparison, it is possible to reduce the loss of time and movement amount.
  • a rotating mechanism 64 that rotates the rotating body 62 is used as an adjusting mechanism that adjusts the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62.
  • the positional relationship between the camera 66 and the displacement sensor 68 can be adjusted by a simple mechanism called rotation, and thus can be easily adjusted.
  • a plurality of measurement positions are set for one measurement portion, and by specifying the position of one measurement portion, a plurality of measurement positions corresponding to the measurement position are specified. Are specified. Thereby, the number of times of imaging can be reduced, and as a result, the overall measurement time can be shortened.
  • the reference route is predetermined, and is corrected each time the measurement position is specified. Therefore, the processing of the entire measurement system can be simplified as compared with the case where the reference route is not predetermined, and as a result, the processing load on the measurement system can be reduced.
  • the determination result is notified to the user. Therefore, it is possible to notify the user when the displacement of the measurement portion with respect to the reference position is large and the amount of correction of the reference route is large, thereby providing a user-friendly measurement system.
  • the trajectory correction unit 168 corrects the rotation movement data 194 so that the rotation movement data ( ⁇ ) reaches the translation movement amount ( ⁇ X, ⁇ Y) calculated by the movement amount calculation unit 166. I did.
  • the time until the translation amount is reached may be adjusted, or the time until the rotation amount may be adjusted.
  • the measurement range of the displacement sensor 68 is set on the measurement position by setting a reference route in advance, specifying the measurement position based on the image captured by the camera 66, and appropriately correcting the reference route. I let it pass.
  • the reference route need not be set in advance.
  • the characteristic image of the measurement part is set, the moving mechanism 8 and the rotating mechanism 64 are controlled so as to search for the characteristic image, and the measurement position is specified each time the characteristic image is located in the field of view of the camera 66.
  • a trajectory may be generated such that the measurement range of the displacement sensor 68 passes over the specified measurement position.
  • Modification of Measurement System 1> 14 to 17 are diagrams showing a measurement system according to a modification.
  • the measurement system 1b shown in FIG. 14 differs from the measurement system 1 shown in FIG. 2 in that the relative position between the measurement device 6 and the work W is changed by the robot 52.
  • the robot 52 is controlled by a robot controller 50, and the robot controller 50 controls the robot 52 according to an instruction from the PLC 100.
  • the measuring device 6 is moved by the robot 52 and the work W is placed on the turntable 91. You may. That is, the relative position between the measuring device 6 and the work W may be changed by moving both the measuring device 6 and the work W.
  • the rotary table 91 rotates according to an instruction from the robot controller 50. Thereby, the relative position between the workpiece W and the measuring device 6 can be easily changed.
  • the robot 52 may be a robot other than the vertical articulated robot.
  • an orthogonal robot 52a may be used.
  • another robot such as a horizontal articulated robot may be used.
  • FIG. 18 is a diagram illustrating an adjustment mechanism according to a modification.
  • a displacement sensor 68b is installed at the rotation center of the rotating body 62b, a plurality of cameras 66b are arranged around the displacement sensor 68b, and one of the plurality of cameras 66b is arranged in accordance with the traveling direction.
  • the measurement portion may be taken with the camera 66b before the displacement sensor 68b.
  • the camera may be installed at the center of the rotating body, and a plurality of displacement sensors may be provided.
  • the displacement sensor 68 that measures a measurement point designated as a sensor has been described as an example.
  • the sensor may be a displacement sensor that measures an arbitrary measurement point on a specified line, or a sensor that has a smaller measurement range than an imaging unit that captures an image for specifying a measurement position. If it is, an image sensor may be used.
  • the image sensor is an image sensor having a narrower visual field and a higher resolution than the imaging unit.
  • the sensor is not limited to a sensor for inspecting the appearance, but may be a temperature sensor, a hardness meter, an ultrasonic sensor, or the like.
  • the measurement system is a system in which one work is set as a measurement target, a plurality of measurement parts are set on the work, and the set measurement parts are sequentially imaged and measured. .
  • a set of a plurality of works may be set as a measurement target, and a plurality of measurement portions may be set for a measurement target including a set of a plurality of works. More specifically, for a measurement target in which each of a plurality of works is arranged at a predetermined position, the position where each work is arranged may be set as a measurement portion, and the work itself may be used as a feature image.
  • the position and orientation of each of the arranged works may be different for each work, the position and orientation of the work can be specified by the imaging unit, and the position of the sensor can be adjusted according to the specified position and orientation.
  • the measurement position is determined in advance, but only the measurement portion is determined in advance, and a position that satisfies the predetermined measurement condition is set to an image captured by the imaging unit.
  • the appearance inspection may be performed with low accuracy based on the image captured by the imaging unit, the position picked up by the appearance inspection may be set as the measurement position, and the appearance inspection may be performed with high accuracy using the sensor.
  • a scratch or dent is detected by a camera, the position of the scratch or dent is specified, and then the depth of the scratch or dent at the specified position is detected by a displacement sensor.
  • a measurement system may be provided as an application for determining whether or not the inspection criterion is satisfied. In such a measurement system, it is possible to accurately determine whether or not a defect exists.
  • a plurality of measurement positions are predetermined with respect to a position of an image feature obtained by imaging the measurement portion,
  • the configuration according to configuration 1 or 2 wherein the position determining unit determines each of the plurality of measurement positions with respect to the position of the image feature by specifying a position of the image feature based on an image of the measurement portion. Measurement system.
  • a reference path including the displacement of the change mechanism and the displacement of the adjustment mechanism associated with the displacement of the change mechanism is predetermined,
  • the control unit controls the change mechanism and the adjustment mechanism along the reference path so that each of the plurality of measurement portions passes through the imaging field of view of the imaging unit, and the plurality of measurement portions In each of (1) and (2), the reference path is corrected so that the measurement position determined by the position determination unit passes through the measurement range of the sensor (168). Measurement system.
  • the position determination unit further includes an acquisition unit (144) that acquires a displacement value of the measurement portion with respect to a reference position determined according to the reference route, based on an image of the measurement portion, Determining means (176) for determining whether or not the displacement value obtained by the obtaining means exceeds a predetermined allowable value; 7.
  • ⁇ Configuration 8> A measurement method for measuring each of a plurality of measurement portions,
  • the imaging section (66, 66a, 66b) and the sensor (68, 68a, 68b) are arranged on the base section (64, 64a), and the relative position between the base section and the measurement target can be changed.
  • a measurement method comprising: performing the steps from the first step to the third step on each of the plurality of measurement portions.
  • a measurement program (140) for measuring each of the plurality of measurement portions An imaging section (66, 66a, 66b) and a sensor (68, 68a, 68b) are arranged on a base section (64, 64a), and a relative position between the base section and a measurement target is changed by a mechanism (8, 8a), and the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit can be adjusted by an adjustment mechanism (64, 64a).
  • the measurement program is a computer, A first control unit that controls the change mechanism and the adjustment mechanism such that the measurement unit passes through the imaging field of view of the imaging unit while the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor.
  • Steps (S1 to S3) In the first step, the measurement position measured by the sensor determined based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view passes through a measurement range of the sensor.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The purpose of the present invention is to provide a measurement system, measurement device, and measurement method suitable for measuring over a wide range by changing a measurable range. In this measurement system, a changing mechanism and adjustment mechanism are controlled such that each of a plurality of measurement portions is imaged using an imaging unit while the position of the imaging unit in the forward movement direction of a base part is made to be forward from a sensor. The changing mechanism and adjustment mechanism are controlled such that measurement positions for each of the plurality of measurement portions determined on the basis of images imaged by the imaging unit pass through the measurement range of the sensor.

Description

計測システム、計測方法、および計測プログラムMeasurement system, measurement method, and measurement program
 複数の計測部分の各々を計測するための計測システム、計測方法、および計測プログラムに関する。 (4) The present invention relates to a measurement system, a measurement method, and a measurement program for measuring each of a plurality of measurement portions.
 FA(Factory Automation)分野において、計測対象の形状を計測する計測システムが知られている。 2. Description of the Related Art In the field of factory automation (FA), a measurement system that measures a shape of a measurement target is known.
 計測対象の形状を計測する計測システムとして、例えば、特開2016-48195号公報(特許文献1)は、測定対象であるワークを撮像して得られる画像からワークの位置および姿勢を特定し、ワークの位置および姿勢ならびに、マスター画像に対して指定された測定箇所に基づいて、変位計とワークとを相対的に移動させて、高さの測定値を求める技術が開示されている。 As a measurement system for measuring the shape of a measurement target, for example, Japanese Patent Application Laid-Open No. 2016-48195 (Patent Literature 1) discloses a method of identifying a position and a posture of a work from an image obtained by imaging the work to be measured. A technique is disclosed in which a displacement meter and a workpiece are relatively moved on the basis of the position and orientation of a master image and a measurement location designated with respect to a master image to obtain a height measurement value.
特開2016-48195号公報JP 2016-48195 A
 しかし、特許文献1に開示された計測システムは、測定対象を撮像して得られる画像内の測定箇所を変位計のようなセンサで計測するものであって、カメラの撮像領域を変え、広範囲の計測を行なうことについて十分に考慮されていなかった。 However, the measurement system disclosed in Patent Literature 1 measures a measurement point in an image obtained by imaging a measurement target with a sensor such as a displacement meter, and changes an imaging area of a camera to cover a wide area. The measurement was not sufficiently considered.
 本願発明は、計測可能な範囲を変えて、広範囲の計測を行なうのに適した計測システム、計測装置、および計測方法を提供することを目的とする。 The present invention has an object to provide a measurement system, a measurement device, and a measurement method suitable for performing a wide range of measurement by changing a measurable range.
 本開示の一例によれば、複数の計測部分の各々を計測するための計測システムが提供される。計測システムは、撮像部と、センサと、撮像部およびセンサが配置されるベース部と、ベース部と計測対象との間の相対位置を変化させる変化機構と、ベース部の進行方向に対する撮像部およびセンサの位置関係を調整する調整機構と、撮像部により撮像された計測部分の画像に基づいて、センサにより計測する計測位置を決定する位置決定手段と、ベース部の進行方向に対する撮像部の位置がセンサの前方となるようにしつつ複数の計測部分の各々を撮像部の撮像視野を通過させるとともに、複数の計測部分の各々について位置決定手段により決定された計測位置がセンサの計測範囲を通過するように、変化機構および調整機構を制御する制御手段とを含む。 According to an example of the present disclosure, a measurement system for measuring each of a plurality of measurement portions is provided. The measurement system includes an imaging unit, a sensor, a base unit on which the imaging unit and the sensor are arranged, a change mechanism that changes a relative position between the base unit and the measurement target, an imaging unit with respect to a traveling direction of the base unit, and An adjusting mechanism for adjusting the positional relationship between the sensors, position determining means for determining a measurement position to be measured by the sensor based on an image of the measurement portion taken by the imaging unit, and a position of the imaging unit with respect to the traveling direction of the base unit. While allowing each of the plurality of measurement portions to pass through the imaging field of view of the imaging section while being in front of the sensor, the measurement position determined by the position determination means for each of the plurality of measurement portions passes through the measurement range of the sensor. Control means for controlling the change mechanism and the adjustment mechanism.
 この開示によれば、ベース部の進行方向に対して前方に位置する撮像部により撮像された画像に基づいてセンサの計測位置を決定し、決定した計測位置に合わせてセンサの計測範囲を計測位置が通過するように変化機構および調整機構が制御される。そのため、先に撮像部で計測部位を撮像した後、撮像部が撮像した計測部位上をセンサが通過することとなるため、撮像部よりも先にセンサが計測部位上を通過する場合に比べて、時間や移動量のロスを減らすことができる。その結果、計測可能な範囲を変えて、広範囲の計測を行なうのに適した計測システムが提供される。 According to the present disclosure, the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position. The change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement system suitable for performing measurement over a wide range by changing the measurable range is provided.
 上述の開示において、調整機構は、ベース部を回転させる回転機構であってもよい。
 この開示によれば、回転というシンプルな機構で撮像部とセンサとの間の位置関係を調整することができるため、調整が容易である。
In the above disclosure, the adjustment mechanism may be a rotation mechanism that rotates the base.
According to this disclosure, since the positional relationship between the imaging unit and the sensor can be adjusted by a simple mechanism called rotation, the adjustment is easy.
 上述の開示において、計測システムは、複数の計測部分のうちの少なくとも一の計測部分について、計測部分を撮像して得られる画像特徴の位置に対して、複数の計測位置が予め定められていてもよい。位置決定手段は、計測部分の画像に基づいて画像特徴の位置を特定することで、画像特徴の位置に対する複数の計測位置の各々を決定してもよい。 In the above disclosure, the measurement system may be configured such that, for at least one of the plurality of measurement portions, a plurality of measurement positions are predetermined with respect to a position of an image feature obtained by imaging the measurement portion. Good. The position determining means may determine each of the plurality of measurement positions for the position of the image feature by specifying the position of the image feature based on the image of the measurement portion.
 この開示によれば、一の計測部分に対して複数の計測位置が予め定められており、一の撮像で複数の計測位置の各々が決定するため、撮像回数を減らすことができ、その結果、全体の計測時間を短くすることができる。 According to this disclosure, a plurality of measurement positions are determined in advance for one measurement portion, and each of the plurality of measurement positions is determined in one imaging, so that the number of imagings can be reduced, and as a result, Overall measurement time can be shortened.
 上述の開示において、センサは、変位センサであってもよい。
 上述の開示において、変化機構の変位、および変化機構の変位に対応付けられた調整機構の変位からなる基準経路が予め定められていてもよい。制御手段は、基準経路に沿って変化機構および調整機構を制御することで複数の計測部分の各々が撮像部の撮像視野を通過させるようにするとともに、複数の計測部分の各々については、位置決定手段により決定された計測位置がセンサの計測範囲を通過するように基準経路を修正してもよい。
In the above disclosure, the sensor may be a displacement sensor.
In the above disclosure, a reference path including the displacement of the change mechanism and the displacement of the adjustment mechanism associated with the displacement of the change mechanism may be predetermined. The control means controls the change mechanism and the adjustment mechanism along the reference path so that each of the plurality of measurement parts passes through the imaging field of view of the imaging unit, and for each of the plurality of measurement parts, the position determination is performed. The reference route may be modified so that the measurement position determined by the means passes through the measurement range of the sensor.
 この開示によれば、基準経路が予め定められているため、計測システム全体の処理を簡略化することができ、その結果、計測システムにおける処理負担を軽減することができる。 According to this disclosure, since the reference route is determined in advance, the processing of the entire measurement system can be simplified, and as a result, the processing load on the measurement system can be reduced.
 上述の開示において、制御手段は、複数の計測部分の各々については、基準経路のうちの変化機構の変位を修正することなく調整機構の変位を修正してもよい。 In the above disclosure, the control unit may correct the displacement of the adjusting mechanism without correcting the displacement of the changing mechanism in the reference path for each of the plurality of measurement portions.
 この開示によれば、調整機構の変位だけを修正するため、修正対象が少なく、計測システム全体の処理を簡略化することができ、その結果、計測システムにおける処理負担を軽減することができる。 According to this disclosure, since only the displacement of the adjustment mechanism is corrected, the number of correction targets is small, and the processing of the entire measurement system can be simplified. As a result, the processing load on the measurement system can be reduced.
 上述の開示において、位置決定手段は、計測部分の画像に基づいて、基準経路に応じて定められる基準位置に対する計測部分の位置ずれ値を取得する取得手段をさらに含んでもよい。計測システムは、取得手段により取得された位置ずれ値が、予め定められた許容値を超えているか否かを判定する判定手段と、判定手段の判定結果をユーザに通知する通知手段とをさらに含んでもよい。 In the above disclosure, the position determination unit may further include an acquisition unit configured to acquire a position shift value of the measurement part with respect to a reference position determined according to the reference route, based on the image of the measurement part. The measurement system further includes a determination unit configured to determine whether the displacement value acquired by the acquisition unit exceeds a predetermined allowable value, and a notification unit configured to notify a user of the determination result of the determination unit. May be.
 この開示によれば、基準位置に対する計測部分の位置ずれが大きく、基準経路の修正量が多くなるような場合にユーザに通知することができ、ユーザフレンドリーな計測システムを提供することができる。 According to the present disclosure, it is possible to notify the user when the displacement of the measurement portion with respect to the reference position is large and the amount of correction of the reference route is large, thereby providing a user-friendly measurement system.
 本開示の別の一例によれば、複数の計測部分の各々を計測するための計測方法が提供される。この計測方法においては、撮像部とセンサとがベース部に配置されているとともに、ベース部と計測対象との相対位置を変化可能であり、ベース部の進行方向に対する撮像部およびセンサの位置関係を調整可能に構成されている。計測方法は、ベース部の進行方向に対する撮像部の位置がセンサの前方となるようにしつつ計測部分が撮像部の撮像視野を通過する第1のステップと、第1のステップにおいて計測部分が撮像視野を通過するときに得られる計測部分の画像に基づいて、センサにより計測する計測位置を決定する第2のステップと、第2のステップにおいて決定された計測位置がセンサの計測範囲を通過する第3のステップとを含み、複数の計測部分の各々に対して第1のステップから第3のステップまでのステップを行う。 According to another example of the present disclosure, a measurement method for measuring each of a plurality of measurement portions is provided. In this measurement method, the imaging unit and the sensor are arranged on the base unit, and the relative position between the base unit and the measurement target can be changed, and the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit is determined. It is configured to be adjustable. The measurement method includes a first step in which the measurement portion passes through the imaging field of view of the imaging unit while the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor; A second step of determining a measurement position to be measured by the sensor based on an image of a measurement portion obtained when passing through the sensor, and a third step in which the measurement position determined in the second step passes through a measurement range of the sensor. And the steps from the first step to the third step are performed on each of the plurality of measurement portions.
 この開示によれば、ベース部の進行方向に対して前方に位置する撮像部により撮像された画像に基づいてセンサの計測位置を決定し、決定した計測位置に合わせてセンサの計測範囲を計測位置が通過するように変化機構および調整機構が制御される。そのため、先に撮像部で計測部位を撮像した後、撮像部が撮像した計測部位上をセンサが通過することとなるため、撮像部よりも先にセンサが計測部位上を通過する場合に比べて、時間や移動量のロスを減らすことができる。その結果、計測可能な範囲を変えて、広範囲の計測を行なうのに適した計測方法が提供される。 According to the present disclosure, the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position. The change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement method suitable for performing a wide range of measurement by changing the measurable range is provided.
 本開示の別の一例によれば、複数の計測部分の各々を計測するための計測プログラムが提供される。この計測プログラムにおいては、撮像部とセンサとがベース部に配置されているとともに、ベース部と計測対象との相対位置を変化機構により変化可能であり、ベース部の進行方向に対する撮像部およびセンサの位置関係を調整機構により調整可能に構成されている。計測プログラムは、コンピュータに、ベース部の進行方向に対する撮像部の位置がセンサの前方となるようにしつつ計測部分が撮像部の撮像視野を通過するように変化機構および調整機構を制御する第1のステップと、第1のステップにおいて撮像視野を計測部分が通過するときに得られる計測部分の画像に基づいて決定されるセンサにより計測する計測位置がセンサの計測範囲を通過するように変化機構および調整機構を制御する第2ステップとを、複数の計測部分の各々に対して実行させる。 According to another example of the present disclosure, a measurement program for measuring each of a plurality of measurement portions is provided. In this measurement program, the imaging unit and the sensor are arranged on the base unit, and the relative position between the base unit and the measurement target can be changed by a change mechanism, and the imaging unit and the sensor with respect to the traveling direction of the base unit. The positional relationship can be adjusted by an adjusting mechanism. The measurement program controls the computer to control the change mechanism and the adjustment mechanism such that the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor and the measurement unit passes through the imaging field of view of the imaging unit. And a change mechanism and adjustment so that a measurement position measured by a sensor determined based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view in the first step passes through the measurement range of the sensor. And a second step of controlling the mechanism are performed for each of the plurality of measurement portions.
 この開示によれば、ベース部の進行方向に対して前方に位置する撮像部により撮像された画像に基づいてセンサの計測位置を決定し、決定した計測位置に合わせてセンサの計測範囲を計測位置が通過するように変化機構および調整機構が制御される。そのため、先に撮像部で計測部位を撮像した後、撮像部が撮像した計測部位上をセンサが通過することとなるため、撮像部よりも先にセンサが計測部位上を通過する場合に比べて、時間や移動量のロスを減らすことができる。その結果、計測可能な範囲を変えて、広範囲の計測を行なうのに適した計測プログラムが提供される。 According to the present disclosure, the measurement position of the sensor is determined based on the image captured by the imaging unit positioned forward with respect to the traveling direction of the base unit, and the measurement range of the sensor is measured according to the determined measurement position. The change mechanism and the adjustment mechanism are controlled so that the light passes. For this reason, after the measurement site is imaged by the imaging unit first, the sensor passes over the measurement site imaged by the imaging unit, so that the sensor passes over the measurement site earlier than the imaging unit. , The loss of time and travel distance can be reduced. As a result, a measurement program suitable for performing a wide range of measurement while changing the measurable range is provided.
 本開示の一例によれば、計測可能な範囲を変えて、広範囲の計測を行なうのに適した計測システム、計測装置、および計測方法が提供される。 According to an example of the present disclosure, a measurement system, a measurement device, and a measurement method suitable for performing measurement over a wide range by changing a measurable range are provided.
 本開示の上記および他の目的、特徴、局面および利点は、添付の図面と関連して理解される本発明に関する次の詳細な説明から明らかとなるであろう。 The above and other objects, features, aspects and advantages of the present disclosure will become apparent from the following detailed description of the present invention that is understood in connection with the accompanying drawings.
本実施の形態に係る計測システムの適用場面を模式的に示す図である。It is a figure which shows typically the application scene of the measurement system which concerns on this Embodiment. 本実施の形態に係る計測システムの全体構成を示す模式図である。FIG. 1 is a schematic diagram illustrating an overall configuration of a measurement system according to the present embodiment. 基準経路を示す図である。It is a figure showing a standard course. 基準経路の修正方法の概略を示す図である。It is a figure showing the outline of the correction method of a standard course. 計測システムの計測処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the measurement process of a measurement system. 計測位置の特定方法を説明するための図である。FIG. 7 is a diagram for explaining a method of specifying a measurement position. 基準経路および計測条件の修正方法を説明するための図である。FIG. 4 is a diagram for explaining a method of correcting a reference route and a measurement condition. 画像処理装置のハードウェア構成を示す模式図である。FIG. 2 is a schematic diagram illustrating a hardware configuration of the image processing apparatus. コントローラのハードウェア構成の一例を示す模式図である。FIG. 3 is a schematic diagram illustrating an example of a hardware configuration of a controller. PLCのハードウェア構成の一例を示す模式図である。FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a PLC. 経路の修正において機能する計測システムの機能構成の一例を示す図である。FIG. 3 is a diagram illustrating an example of a functional configuration of a measurement system that functions in correcting a route. 計測時ならびに経路に沿って移動機構および回転機構を制御するときに機能する計測システムの機能構成の一例を示す図である。FIG. 4 is a diagram illustrating an example of a functional configuration of a measurement system that functions when measuring and controlling a moving mechanism and a rotating mechanism along a route. 設定装置70の機能構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a functional configuration of a setting device. 変形例に係る計測システムを示す図である。It is a figure showing a measuring system concerning a modification. 変形例に係る計測システムを示す図である。It is a figure showing a measuring system concerning a modification. 変形例に係る計測システムを示す図である。It is a figure showing a measuring system concerning a modification. 変形例に係る計測システムを示す図である。It is a figure showing a measuring system concerning a modification. 変形例に係る調整機構を説明するための図である。FIG. 11 is a diagram for explaining an adjustment mechanism according to a modification.
 以下、図面を参照しつつ、本発明に従う各実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。なお、以下で説明される各実施の形態および各変形例は、適宜選択的に組み合わせてもよい。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are the same. Therefore, detailed description thereof will not be repeated. In addition, each embodiment and each modified example described below may be appropriately selectively combined.
 §1 適用例
 図1を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係る計測システム1aの適用場面を模式的に示す図である。計測システム1aは、複数の計測部分の各々を計測するために利用される。複数の計測部分は、一のワークに対して設定されていてもよく、また、複数のワークの集合からなる計測対象に対して設定されていてもよい。なお、図1に示す例では、一のワークが計測対象として設定されており、ワーク上に複数の計測部分が設定されている。
§1 Application Example An example of a scene to which the present invention is applied will be described with reference to FIG. FIG. 1 is a diagram schematically showing an application scene of a measurement system 1a according to the present embodiment. The measurement system 1a is used for measuring each of a plurality of measurement parts. The plurality of measurement portions may be set for one work, or may be set for a measurement target including a set of a plurality of works. In the example shown in FIG. 1, one work is set as a measurement target, and a plurality of measurement portions are set on the work.
 計測システム1aは、撮像部66aと、センサ68aと、ベース部62aと、調整機構64aと、変化機構8aと、位置決定手段14と、制御手段17とを備える。 The measurement system 1a includes an imaging unit 66a, a sensor 68a, a base unit 62a, an adjustment mechanism 64a, a change mechanism 8a, a position determination unit 14, and a control unit 17.
 撮像部66aおよびセンサ68aは、ベース部62aに設けられている。変化機構8aは、ベース部62aとワークWとの相対位置を変化させる。たとえば、変化機構8aは、図1に示すようなワークWを移動させるXYステージや、また、ベース部62aを動かすロボットなどを含む。 The imaging unit 66a and the sensor 68a are provided on the base unit 62a. The change mechanism 8a changes the relative position between the base 62a and the work W. For example, the change mechanism 8a includes an XY stage that moves the work W as shown in FIG. 1, a robot that moves the base 62a, and the like.
 調整機構64aは、ベース部62aの進行方向に対する撮像部66aとセンサ68aとの間の位置関係を調整する。たとえば、調整機構64aは、ベース部62aを回転させる回転機構である。なお、調整機構64aは、ベース部62aの進行方向に対する撮像部66aとセンサ68aとの間の位置関係を調整できればよく、回転機構に限られない。 The adjustment mechanism 64a adjusts the positional relationship between the imaging unit 66a and the sensor 68a with respect to the traveling direction of the base 62a. For example, the adjustment mechanism 64a is a rotation mechanism that rotates the base 62a. The adjusting mechanism 64a is not limited to the rotating mechanism, as long as it can adjust the positional relationship between the imaging unit 66a and the sensor 68a with respect to the traveling direction of the base 62a.
 位置決定手段14は、撮像部66aが撮像した計測部分Pの画像に基づいて、計測位置pを決定する。たとえば、計測部分Pの位置に対応付けて計測位置pを予め設定しておくことで計測部分Pの画像から計測位置pを決定してもよく、また、計測条件を予め設定し、計測条件を満たす位置を特定することで計測位置pを決定してもよい。 The position determining means 14 determines the measurement position p based on the image of the measurement portion P captured by the imaging unit 66a. For example, the measurement position p may be determined in advance from the image of the measurement portion P by setting the measurement position p in advance in association with the position of the measurement portion P. The measurement position p may be determined by specifying the position to be satisfied.
 制御手段17は、変化機構8aおよび調整機構64aを制御する。具体的には、制御手段17は、ベース部62aの進行方向に対して撮像部66aが前、センサ68aが後ろとなるように調整しながら複数の計測部分の各々が撮像部66aの撮像範囲を通過させるようにする。また、複数の計測部分の各々について、制御手段17は、位置決定手段14により決定された計測位置pがセンサ68aの計測範囲を通過するようにする。 The control means 17 controls the changing mechanism 8a and the adjusting mechanism 64a. Specifically, the control unit 17 adjusts the imaging unit 66a to the front and the sensor 68a to the rear with respect to the traveling direction of the base unit 62a and adjusts the measurement range of each of the plurality of measurement portions to the imaging range of the imaging unit 66a. Let it pass. In addition, for each of the plurality of measurement portions, the control unit 17 causes the measurement position p determined by the position determination unit 14 to pass through the measurement range of the sensor 68a.
 すなわち、計測システム1aにおいては、ベース部62aの進行方向に対して前方に位置する撮像部66aによりセンサ68aの計測位置を決定し、ベース部62aの進行方向に対して後方に位置するセンサ68aの位置を決定した計測位置p上を通過するように変化機構8aおよび調整機構64aが制御される。ベース部62aの進行方向に対して撮像部66aが前方、センサ68aが後方となるように制御されるため、撮像部66aにより正確な計測位置を特定した上で、その特定された計測位置上をセンサ68aが通過するように位置を調整することができる。また、撮像部66aで計測部位を撮像した後、撮像部66aが撮像した計測部位上をセンサ68aが通過することとなるため、撮像部66aよりも先にセンサ68aが計測部位上を通過する場合に比べて、時間や移動量のロスを減らすことができる。 That is, in the measurement system 1a, the measurement position of the sensor 68a is determined by the imaging unit 66a located forward with respect to the traveling direction of the base unit 62a, and the measurement position of the sensor 68a located backward with respect to the traveling direction of the base unit 62a is determined. The changing mechanism 8a and the adjusting mechanism 64a are controlled so as to pass over the measured position p where the position has been determined. Since the imaging unit 66a is controlled so that the imaging unit 66a is located forward and the sensor 68a is located rearward with respect to the traveling direction of the base unit 62a, an accurate measurement position is specified by the imaging unit 66a, and then the specified measurement position is determined. The position can be adjusted so that the sensor 68a passes. Also, after the measurement part is imaged by the imaging part 66a, the sensor 68a passes over the measurement part imaged by the imaging part 66a, so that the sensor 68a passes over the measurement part earlier than the imaging part 66a. The loss of time and the amount of movement can be reduced as compared with.
 §2 具体例
 以下、本発明のより具体的な応用例として、本実施の形態に係る計測システム1のより詳細な構成および処理について説明する。
§2 Specific Example Hereinafter, as a more specific application example of the present invention, a more detailed configuration and processing of the measurement system 1 according to the present embodiment will be described.
 <A.計測システムの全体構成>
 図2は、本実施の形態に係る計測システム1の全体構成を示す模式図である。計測システム1は、たとえば、対象物であるワークW上の複数の計測部分の各々を計測するために利用可能である。ここで、「計測」は、検査を目的とする計測を含み、最終的な出力が計測値である計測と、最終的な出力がたとえば検査の合否だけである計測とを含む。
<A. Overall configuration of measurement system>
FIG. 2 is a schematic diagram illustrating an overall configuration of the measurement system 1 according to the present embodiment. The measurement system 1 can be used, for example, to measure each of a plurality of measurement portions on a workpiece W as an object. Here, “measurement” includes measurement for the purpose of inspection, and includes measurement in which the final output is a measured value and measurement in which the final output is, for example, only pass / fail of the inspection.
 計測システム1は、計測装置6と、移動機構8と、計測装置6および移動機構8とを制御する制御装置として機能するPLC(Programmable Logic Controller)100と、コントローラ200と、サーボドライバ300と、画像処理装置400と、ドライバユニット500とを備える。 The measuring system 1 includes a measuring device 6, a moving mechanism 8, a PLC (Programmable Logic Controller) 100 functioning as a control device for controlling the measuring device 6 and the moving mechanism 8, a controller 200, a servo driver 300, It includes a processing device 400 and a driver unit 500.
 計測装置6は、コントローラ200、サーボドライバ300、および画像処理装置400の各々と電気的に接続されている。移動機構8は、ドライバユニット500と電気的に接続されている。PLC100は、コントローラ200、サーボドライバ300、画像処理装置400およびドライバユニット500のそれぞれとネットワークNWを介して接続されている。ネットワークNWは、たとえば、フィールドネットワークである。一例としては、ネットワークNWには、EtherCAT(登録商標)やEtherNet/IP(登録商標)などが採用される。 The measurement device 6 is electrically connected to each of the controller 200, the servo driver 300, and the image processing device 400. The moving mechanism 8 is electrically connected to the driver unit 500. The PLC 100 is connected to each of the controller 200, the servo driver 300, the image processing device 400, and the driver unit 500 via the network NW. The network NW is, for example, a field network. As an example, EtherCAT (registered trademark), EtherNet / IP (registered trademark), or the like is adopted for the network NW.
 なお、本実施の形態において、計測システム1は、7つの装置から構成されるとしたが、6つ以下、あるいは、8つ以上で構成されてもよい。たとえば、電気的に接続されている2以上の装置は、1の装置として構成してもよい。また、ネットワークNWを介して接続されている2以上の装置は、互いに内部バスを介して接続させて1の装置として構成してもよい。 In the present embodiment, the measurement system 1 is configured by seven devices, but may be configured by six or less or eight or more. For example, two or more devices that are electrically connected may be configured as one device. Further, two or more devices connected via the network NW may be connected to each other via an internal bus to constitute one device.
 計測装置6は、回転体62、回転機構64、カメラ66、および変位センサ68を備える。回転体62は、本願発明のベース部の一例であって、カメラ66および変位センサ68が取り付けられている。 The measuring device 6 includes a rotating body 62, a rotating mechanism 64, a camera 66, and a displacement sensor 68. The rotating body 62 is an example of the base of the present invention, and has a camera 66 and a displacement sensor 68 attached thereto.
 回転機構64は、回転体62を回転させることで、回転体62の進行方向に対するカメラ66および変位センサ68の位置関係を変化させる。回転機構64は、たとえば、回転式モータで構成されたサーボモータであって、Z軸に平行な軸を中心に回転体62を回転駆動する。なお、回転機構64は、本願発明の調整機構の一例である。調整機構は、回転体62の進行方向に対するカメラ66および変位センサ68の位置関係を変化させることができればよく、図2に示した回転機構64に限られない。 The rotating mechanism 64 changes the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 by rotating the rotating body 62. The rotation mechanism 64 is, for example, a servo motor constituted by a rotary motor, and drives the rotary body 62 to rotate about an axis parallel to the Z axis. Note that the rotation mechanism 64 is an example of the adjustment mechanism of the present invention. The adjusting mechanism only needs to be able to change the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62, and is not limited to the rotating mechanism 64 shown in FIG.
 カメラ66は、ワークW上に設定された計測部分の各々を撮像する撮像部である。変位センサ68は、ワークW上に設定された計測部分の各々について、計測を行なうセンサである。 The camera 66 is an imaging unit that captures an image of each measurement portion set on the work W. The displacement sensor 68 is a sensor that performs measurement for each measurement portion set on the work W.
 移動機構8は、本願発明の変化機構の一例であって、ワークWを移動させることで、ワークWと計測装置6との間の相対位置を変化させる。移動機構8は、たとえば、水平方向の並進移動をワークWに与えることができるXYステージである。なお、変化機構は、ワークWと回転体62との相対位置を変化させることができれば、図2に示した移動機構8に限られず、たとえば、回転体62をロボットなどにより移動させる機構や、回転体62およびワークWの各々を移動させる機構であってもよい。 The moving mechanism 8 is an example of the changing mechanism of the present invention, and changes the relative position between the work W and the measuring device 6 by moving the work W. The moving mechanism 8 is, for example, an XY stage that can impart a horizontal translational movement to the work W. The changing mechanism is not limited to the moving mechanism 8 shown in FIG. 2 as long as the relative position between the workpiece W and the rotating body 62 can be changed. For example, a mechanism for moving the rotating body 62 by a robot or a rotating mechanism A mechanism for moving each of the body 62 and the work W may be used.
 移動機構8は、Xステージ82Xと、Yステージ82Yと、サーボモータ84X,84Yとを備える。サーボモータ84X,84Yの各々は、回転式モータで構成される。サーボモータ84Xは、Xステージ82XをX軸方向に沿って並進駆動する。サーボモータ84Yは、Yステージ82YをY軸方向に沿って並進駆動する。 The moving mechanism 8 includes an X stage 82X, a Y stage 82Y, and servo motors 84X and 84Y. Each of the servomotors 84X and 84Y is constituted by a rotary motor. The servo motor 84X translates and drives the X stage 82X along the X-axis direction. The servo motor 84Y translates and drives the Y stage 82Y along the Y-axis direction.
 PLC100は、コントローラ200、サーボドライバ300、画像処理装置400およびドライバユニット500を制御する。具体的には、PLC100は、ワークW上の複数の計測部分の各々をカメラ66に順次撮像させるとともに、カメラ66が撮像した画像に基づいて特定される計測位置を変位センサ68に計測させる。 The PLC 100 controls the controller 200, the servo driver 300, the image processing device 400, and the driver unit 500. Specifically, the PLC 100 causes the camera 66 to sequentially capture each of a plurality of measurement portions on the workpiece W, and causes the displacement sensor 68 to measure a measurement position specified based on the image captured by the camera 66.
 コントローラ200は、PLC100から送られる計測命令に従って変位センサ68を制御することで、計測結果を出力する。出力先は、PLC100であってもよく、また、コントローラ200に接続されている表示部232(図9参照)であってもよい。 The controller 200 outputs a measurement result by controlling the displacement sensor 68 according to the measurement command sent from the PLC 100. The output destination may be the PLC 100 or the display unit 232 (see FIG. 9) connected to the controller 200.
 サーボドライバ300は、回転体62の回転量が、PLC100から送られる回転指令に近付くように、回転機構64に対してフィードバック制御を行なう。 The servo driver 300 performs feedback control on the rotation mechanism 64 so that the rotation amount of the rotating body 62 approaches the rotation command sent from the PLC 100.
 画像処理装置400は、PLC100からの指令に応じて、カメラ66を制御し、カメラ66から送られる画像に基づいて、各種画像処理を行ない、処理結果をPLC100に送る。 (4) The image processing device 400 controls the camera 66 in response to a command from the PLC 100, performs various types of image processing based on the image sent from the camera 66, and sends a processing result to the PLC 100.
 ドライバユニット500は、PLC100からの指令に応じて移動機構8に対するフィードバック制御を行なう。ドライバユニット500は、サーボドライバ500X,500Yを含む。サーボドライバ500Xは、Yステージ82Xの移動量が移動指令に近付くように、サーボモータ84Xに対してフィードバック制御を行なう。サーボドライバ500Yは、Yステージ82Yの移動量が移動指令に近付くように、サーボモータ84Yに対してフィードバック制御を行なう。 (4) The driver unit 500 performs feedback control on the moving mechanism 8 according to a command from the PLC 100. Driver unit 500 includes servo drivers 500X and 500Y. The servo driver 500X performs feedback control on the servomotor 84X so that the movement amount of the Y stage 82X approaches the movement command. The servo driver 500Y performs feedback control on the servo motor 84Y so that the movement amount of the Y stage 82Y approaches the movement command.
 PLC100は、回転体62の進行方向に対してカメラ66が前方、変位センサ68が後方となるようにサーボドライバ300およびドライバユニット500を制御し、ワークW上の計測部分の少なくとも一部がカメラ66の撮像視野に含まれたタイミングで撮像指示を出力するように画像処理装置400を制御する。画像処理装置400およびPLC100は、カメラ66が撮像した画像に基づいて、変位センサ68の計測位置を決定する。 The PLC 100 controls the servo driver 300 and the driver unit 500 such that the camera 66 is located forward and the displacement sensor 68 is located backward with respect to the traveling direction of the rotating body 62. The image processing apparatus 400 is controlled so as to output an imaging instruction at a timing included in the imaging visual field. The image processing device 400 and the PLC 100 determine the measurement position of the displacement sensor 68 based on the image captured by the camera 66.
 PLC100は、変位センサ68の計測範囲内を決定した計測位置が通過するようにサーボドライバ300およびドライバユニット500を制御し、変位センサ68の計測範囲内に計測位置が含まれるタイミングで計測指示を出力するようにコントローラ200を制御する。 The PLC 100 controls the servo driver 300 and the driver unit 500 so that the measurement position determined in the measurement range of the displacement sensor 68 passes, and outputs a measurement instruction at a timing when the measurement position is included in the measurement range of the displacement sensor 68. The controller 200 is controlled to perform the operation.
 すなわち、計測システム1においては、回転体62の進行方向に対して前方に位置するカメラ66により変位センサ68の計測位置を決定し、回転体62の進行方向に対して後方に位置する変位センサ68の位置を決定した計測位置上を通過するように変位センサ68とワークWとの間の相対位置を調整する。 That is, in the measurement system 1, the measurement position of the displacement sensor 68 is determined by the camera 66 located forward with respect to the traveling direction of the rotating body 62, and the displacement sensor 68 located backward with respect to the traveling direction of the rotating body 62. The relative position between the displacement sensor 68 and the workpiece W is adjusted so as to pass over the measurement position where the position has been determined.
 本実施の形態においては、回転体62の進行方向に対するカメラ66の位置を変位センサ68の前方に維持しつつ、ワークW上に設定された複数の計測部分を順次撮像するための基準経路が予め定められている。基準経路は、回転体62とワークWとの間の相対位置の変化および、相対位置の変化に対応付けられた回転体62の進行方向に対するカメラ66と変位センサ68との間の位置関係の変化を含む。より具体的には、基準経路は、移動機構8の移動量および移動機構8の移動量に対応付けられた回転機構64の変位量を含む。計測システム1においては、基準経路に沿ってカメラ66とワークWとの間の相対位置を変化させつつ、カメラ66により撮像された計測部分の画像に基づいて計測位置が特定される度に、変位センサ68の計測範囲を計測位置が通過するように適宜基準経路が修正される。なお、「計測部分」とは、前方に位置するカメラ66で、後方に位置する変位センサ68の計測位置を特定する部分であって、ワークW上に連続して設定されていてもよく、また、非連続に設定されていてもよい。 In the present embodiment, while maintaining the position of the camera 66 with respect to the traveling direction of the rotating body 62 in front of the displacement sensor 68, a reference path for sequentially imaging a plurality of measurement portions set on the work W is set in advance. Stipulated. The reference path includes a change in the relative position between the rotating body 62 and the workpiece W, and a change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 associated with the change in the relative position. including. More specifically, the reference path includes the amount of movement of the moving mechanism 8 and the amount of displacement of the rotating mechanism 64 associated with the amount of movement of the moving mechanism 8. In the measurement system 1, while changing the relative position between the camera 66 and the work W along the reference path, each time the measurement position is specified based on the image of the measurement portion captured by the camera 66, the displacement The reference route is appropriately corrected so that the measurement position passes through the measurement range of the sensor 68. The “measurement portion” is a portion that specifies the measurement position of the displacement sensor 68 located behind the camera 66 located in the front, and may be set continuously on the workpiece W. , May be set discontinuously.
 <B.基準経路>
 図3は、基準経路を示す図である。なお、実際には、移動機構8によってワークWの位置が変化するものの、回転体62の位置が固定されていることから、説明を簡略化するため、回転体62がワークWの上方のXY平面上を動いているように表現している。図3において、実線は、基準経路に従って移動機構8が制御された場合の、回転体62の回転中心OとワークWとの相対位置の変化を示す経路Lである。破線は、基準経路に従って移動機構8および回転機構64が制御された場合の、変位センサ68とワークWとの相対位置の変化を示す経路Lである。なお、図3において、便宜上、経路Lおよび経路Lの重なりを解消させて表現している。また、図3において、便宜上、カメラ66は四角形で表され、変位センサ68は三角形で表されている。また、計測位置p,回転体62,カメラ66,および変位センサ68は、便宜上、一部符号を省略している。また、図3においては、計測部分Pとして、第1計測部分P~第6計測部分Pが設定されているものとする。
<B. Standard path>
FIG. 3 is a diagram showing a reference route. Although the position of the work W is actually changed by the moving mechanism 8, the position of the rotating body 62 is fixed. It is expressed as if it is moving above. In FIG. 3, a solid line is a path L <b> 1 indicating a change in the relative position between the rotation center O of the rotating body 62 and the workpiece W when the moving mechanism 8 is controlled according to the reference path. Dashed line, when the moving mechanism 8 and the rotating mechanism 64 is controlled according to the reference path is a path L 2 showing the change in the relative position between the displacement sensor 68 and the workpiece W. In FIG. 3, for convenience, it is expressed by eliminating the overlap of the paths L 1 and the path L 2. In FIG. 3, for convenience, the camera 66 is represented by a square, and the displacement sensor 68 is represented by a triangle. In addition, some symbols are omitted from the measurement position p, the rotating body 62, the camera 66, and the displacement sensor 68 for convenience. Further, in FIG. 3, it is assumed that a first measurement portion P 1 to a sixth measurement portion P 6 are set as the measurement portion P.
 基準経路は、たとえば、ワークWの設計上の外観に基づいて生成される。基準経路が生成されることで、移動機構8および回転機構64が経時的にどのように動くが決まる。このとき、基準経路は、ワークWが予め定められた基準状態から計測が開始されるものとして生成される。ここで、基準状態は、ワークWと回転体62との間の相対位置および回転体62に対するワークWの姿勢を含む概念である。 The reference path is generated, for example, based on the design appearance of the work W. The generation of the reference path determines how the moving mechanism 8 and the rotating mechanism 64 move over time. At this time, the reference route is generated such that the measurement of the workpiece W is started from a predetermined reference state. Here, the reference state is a concept including a relative position between the work W and the rotating body 62 and a posture of the work W with respect to the rotating body 62.
 実際の計測時においては、ワークWの計測が基準状態から開始するとは限らず、また、設計通りのワークWであるとは限らない。そのため、基準状態からのズレ、および、設置されたワークWとワークWの設計値とのズレによっては、図3に示すように、基準経路に従って移動機構8および回転機構64が制御されたとしても、計測部分Pの計測位置p上を変位センサ68の計測範囲が通過しない。なお、基準経路に従って移動機構8および回転機構64が制御されたとしても、カメラ66の撮像範囲を複数の計測部分Pの各々が通過するものとする。ここで、計測部分Pが撮像範囲を通過するとは、計測部分Pの位置を特定するための特徴部位をカメラ66が撮像可能であればよい。なお、カメラ66の撮像範囲は、変位センサ68の計測範囲に比べて広いものとする。 (4) At the time of actual measurement, the measurement of the work W does not always start from the reference state, and the work W is not always as designed. Therefore, depending on the deviation from the reference state and the deviation between the set work W and the design value of the work W, even if the moving mechanism 8 and the rotation mechanism 64 are controlled according to the reference path as shown in FIG. The measurement range of the displacement sensor 68 does not pass over the measurement position p of the measurement portion P. It is assumed that each of the plurality of measurement portions P passes through the imaging range of the camera 66 even when the moving mechanism 8 and the rotating mechanism 64 are controlled according to the reference path. Here, that the measurement portion P passes through the imaging range is only required that the camera 66 can image a characteristic portion for specifying the position of the measurement portion P. Note that the imaging range of the camera 66 is wider than the measurement range of the displacement sensor 68.
 <C.基準経路の修正>
 図3に示すように、基準経路に従って移動機構8および回転機構64が制御されたとしても、計測部分Pの計測位置p上を変位センサ68が通過しない。図4を参照して、基準経路の修正方法について説明する。図4は、基準経路の修正方法の概略を示す図である。
<C. Correction of reference route>
As shown in FIG. 3, even if the moving mechanism 8 and the rotating mechanism 64 are controlled according to the reference path, the displacement sensor 68 does not pass over the measurement position p of the measurement portion P. With reference to FIG. 4, a method of correcting the reference route will be described. FIG. 4 is a diagram illustrating an outline of a method of correcting the reference route.
 ここでは、第1計測部分P上を回転体62が通過するときを例に説明する。図4においては、回転体62の動きと、回転中心Oの経路と、変位センサ68の経路とを別々に示す。また、図4において、基準経路に従って移動機構8および回転機構64が制御された場合の経路は破線で示されており、修正後の経路は実線で示されている。 Here, a description will be given of when the first measurement portion P 1 on the rotating member 62 through an example. In FIG. 4, the movement of the rotating body 62, the path of the rotation center O, and the path of the displacement sensor 68 are shown separately. In FIG. 4, the path when the moving mechanism 8 and the rotation mechanism 64 are controlled according to the reference path is indicated by a broken line, and the corrected path is indicated by a solid line.
 図4に示すように、回転体62の回転中心Oの経路を変えることなく、変位センサ68の経路を修正することで、基準経路が修正される。より具体的には、本実施の形態における計測システム1は、移動機構8の経時的な動きを設定時から変えることなく、回転機構64の経時的な動きを変えることで基準経路を修正する。 (4) As shown in FIG. 4, the reference path is corrected by correcting the path of the displacement sensor 68 without changing the path of the rotation center O of the rotating body 62. More specifically, the measurement system 1 in the present embodiment corrects the reference path by changing the temporal movement of the rotating mechanism 64 without changing the temporal movement of the moving mechanism 8 from the setting.
 移動機構8は、ワークWと計測装置6との間の相対位置を変化させる機構であるのに対して、回転機構64は、回転体62の進行方向に対するカメラ66および変位センサ68の位置関係を変化させる機構である。すなわち、移動機構8の経時的な動きを変えることなく、回転機構64の経時的な動きを変えることで基準経路が修正されるとは、ワークWと計測装置6との間の相対位置の経路を変えることなく、回転体62の進行方向に対するカメラ66および変位センサ68の位置関係の変化を調整することで、基準経路が修正されることを意味する。 The moving mechanism 8 is a mechanism that changes the relative position between the workpiece W and the measuring device 6, whereas the rotating mechanism 64 is a mechanism that determines the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62. It is a mechanism that changes. That is, the reference path is corrected by changing the time-dependent movement of the rotation mechanism 64 without changing the time-dependent movement of the moving mechanism 8, which means that the path of the relative position between the workpiece W and the measuring device 6 is changed. By adjusting the change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 without changing the reference path, the reference path is corrected.
 このように、ワークWと計測装置6との間の相対位置の経路を変えることなく、回転体62の進行方向に対するカメラ66および変位センサ68の位置関係の変化だけを調整することで基準経路が修正されるため、修正対象が少なく、処理を簡略化することができ、その結果、修正に要する処理負担を軽減することができる。より具体的には、修正に要する演算を簡略化することができる。特に、本実施の形態においては、回転体62を回転させる回転機構64の動きのみを調整することで基準経路が修正されるため、回転体62の回転量という1の変数のみを算出すればよく、修正に要する演算をより簡略化することができる。 As described above, the reference path is adjusted by adjusting only the change in the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62 without changing the path of the relative position between the workpiece W and the measuring device 6. Since the correction is performed, the number of correction targets is small, and the processing can be simplified. As a result, the processing load required for the correction can be reduced. More specifically, the calculation required for the correction can be simplified. In particular, in the present embodiment, since only the movement of the rotating mechanism 64 that rotates the rotating body 62 is adjusted to correct the reference path, only one variable called the rotation amount of the rotating body 62 needs to be calculated. , The operation required for correction can be further simplified.
 <D.計測の流れ>
 図5を参照して、本実施の形態の計測システム1の計測処理の流れの一例について説明する。図5は、計測システム1の計測処理の流れの一例を示すフローチャートである。
<D. Measurement Flow>
An example of the flow of the measurement process of the measurement system 1 according to the present embodiment will be described with reference to FIG. FIG. 5 is a flowchart illustrating an example of the flow of the measurement process of the measurement system 1.
 計測処理は、移動機構8上にワークWが設置されたことに基づいて開始される処理である。 The measurement process is a process started based on the work W being set on the moving mechanism 8.
 ステップS1において、PLC100は、設定されている経路に従って移動機構8および回転機構64を制御する。設定されている経路は、基準経路が修正されている場合は、修正後の経路であり、基準経路が修正されていない場合は、基準経路である。 In step S1, the PLC 100 controls the moving mechanism 8 and the rotating mechanism 64 according to the set route. The set route is the route after the correction when the reference route is corrected, and is the reference route when the reference route is not corrected.
 ステップS2において、PLC100は、カメラ66の撮像条件が成立したか否かを判定する。撮像条件は、たとえば、計測部分Pがカメラ66の撮像範囲に位置したことである。計測部分Pがカメラ66の撮像範囲に位置するときの移動機構8の移動量および回転機構64の回転量は、基準経路にしたがって予め定められている。すなわち、本実施の形態における撮像条件は、移動機構8の移動量が予め定められた目標量に達し、かつ、回転機構64の回転量が予め定められた目標量に達したことを以て成立する。 In step S2, the PLC 100 determines whether or not the imaging condition of the camera 66 is satisfied. The imaging condition is, for example, that the measurement part P is located in the imaging range of the camera 66. The amount of movement of the moving mechanism 8 and the amount of rotation of the rotating mechanism 64 when the measurement portion P is located in the imaging range of the camera 66 are determined in advance according to the reference path. That is, the imaging condition in the present embodiment is satisfied when the moving amount of the moving mechanism 8 reaches the predetermined target amount and the rotation amount of the rotating mechanism 64 reaches the predetermined target amount.
 ステップS3において、カメラ66は、PLC100からの撮像指示に基づいて画像処理装置400から出力される撮像命令に従い、計測部分Pを撮像する。このとき、PLC100は、移動機構8および回転機構64を停止するための指示を出力するようにしてもよい。 In step S3, the camera 66 takes an image of the measurement portion P in accordance with an imaging command output from the image processing device 400 based on an imaging instruction from the PLC 100. At this time, the PLC 100 may output an instruction to stop the moving mechanism 8 and the rotating mechanism 64.
 ステップS4において、PLC100は、カメラ66が撮像した画像に基づいて計測位置pを特定する。計測位置pは、たとえば、計測部分Pの位置および姿勢に対応付けて予め定められている。画像処理装置400は、カメラ66が撮像した画像から、公知のパターンマッチングを利用して計測部分Pの位置および姿勢を特定し、PLC100に出力する。PLC100は、出力された計測部分Pの位置および姿勢から計測位置pを特定する。なお、計測部分Pの形状が上下左右対称の円のような形状である場合、姿勢を特定する必要はない。 In step S4, the PLC 100 specifies the measurement position p based on the image captured by the camera 66. The measurement position p is predetermined in association with, for example, the position and orientation of the measurement portion P. The image processing device 400 specifies the position and orientation of the measurement portion P from the image captured by the camera 66 using known pattern matching, and outputs it to the PLC 100. The PLC 100 specifies the measurement position p from the output position and orientation of the measurement portion P. Note that when the shape of the measurement portion P is a shape like a vertically symmetrical circle, it is not necessary to specify the posture.
 ステップS5において、PLC100は、特定した計測位置pに基づいて、基準経路を修正する。具体的には、PLC100は、変位センサ68の計測範囲内を特定した計測位置pが通過するように基準経路を修正する。これにより、変位センサ68の計測範囲内に特定した計測位置pが位置するときの移動機構8の移動量と、回転機構64の回転量とが特定される。なお、ステップS5において、PLC100は、計測位置p上を変位センサ68の計測範囲が通過した後の経路については、修正しないようにしてもよい。すなわち、計測位置p上を変位センサ68の計測範囲が通過した後は、基準経路に従って移動機構8および回転機構64が制御される。 In step S5, the PLC 100 corrects the reference route based on the specified measurement position p. Specifically, the PLC 100 corrects the reference path so that the measurement position p specified within the measurement range of the displacement sensor 68 passes. Thereby, the amount of movement of the moving mechanism 8 when the specified measurement position p is located within the measurement range of the displacement sensor 68 and the amount of rotation of the rotating mechanism 64 are specified. In step S5, the PLC 100 may not modify the path after the measurement range of the displacement sensor 68 has passed over the measurement position p. That is, after the measurement range of the displacement sensor 68 has passed over the measurement position p, the movement mechanism 8 and the rotation mechanism 64 are controlled according to the reference path.
 ステップS6において、PLC100は、計測条件が成立しているか否かを判定する。計測条件は、変位センサ68の計測範囲内に特定した計測位置pが位置していることである。より具体的には、ステップS5において、変位センサ68の計測範囲内に特定した計測位置pが位置するときの移動機構8の移動量と、回転機構64の回転量とが特定されるため、計測条件は、移動機構8の移動量と、回転機構64の回転量とがステップS5において特定された値に達したことで成立する。 In step S6, the PLC 100 determines whether the measurement condition is satisfied. The measurement condition is that the specified measurement position p is located within the measurement range of the displacement sensor 68. More specifically, in step S5, the amount of movement of the moving mechanism 8 and the amount of rotation of the rotating mechanism 64 when the specified measurement position p is located within the measurement range of the displacement sensor 68 are specified. The condition is satisfied when the movement amount of the movement mechanism 8 and the rotation amount of the rotation mechanism 64 reach the values specified in step S5.
 ステップS7において、変位センサ68は、計測を行なう。コントローラ200は、変位センサ68からの信号を受け、計測結果を算出する。このとき、PLC100は、移動機構8および回転機構64を停止するための指示を出力するようにしてもよい。 In step S7, the displacement sensor 68 performs measurement. The controller 200 receives a signal from the displacement sensor 68 and calculates a measurement result. At this time, the PLC 100 may output an instruction to stop the moving mechanism 8 and the rotating mechanism 64.
 ステップS8において、PLC100は、設定されている全ての計測部分の計測が完了したか否かを判定する。設定されている全ての計測部分の計測が完了したと判定されるまで、ステップS2~ステップS8までの処理が繰り返され、設定されている全ての計測部分の計測が完了したと判定されると、計測処理は終了される。 In step S8, the PLC 100 determines whether or not the measurement of all the set measurement portions has been completed. The processing from step S2 to step S8 is repeated until it is determined that the measurement of all the set measurement parts is completed, and when it is determined that the measurement of all the set measurement parts is completed, The measurement processing ends.
 <E.計測位置の特定>
 PLC100および画像処理装置400は、カメラ66が撮像した画像に基づいて計測位置pを特定する。図6は、計測位置pの特定方法を説明するための図である。画像処理装置400は、まず、計測部分Pの位置および姿勢を公知のパターンマッチングを利用して特定する。より具体的には、計測部分Pごとに予め定められている画像特徴の位置および姿勢を特定することで、計測部分Pの位置および姿勢(「実測位置姿勢SP」とする。)を特定することができる。図6においては、2本の線分が計測部分Pの画像特徴である。
<E. Determination of measurement position>
The PLC 100 and the image processing device 400 specify the measurement position p based on the image captured by the camera 66. FIG. 6 is a diagram for explaining a method of specifying the measurement position p. First, the image processing device 400 specifies the position and orientation of the measurement portion P by using known pattern matching. More specifically, by specifying the position and orientation of the image feature predetermined for each measurement portion P, the position and orientation of the measurement portion P (referred to as “actually measured position and orientation SP m ”) are specified. be able to. In FIG. 6, two line segments are image features of the measurement portion P.
 次に、PLC100は、実測位置姿勢SPから、計測部分の位置ずれ量を算出する。具体的には、実際に撮像した画像に基づいて計測された実測位置姿勢SPと、基準経路の設定時の条件下で得られる計測部分P(「基準計測部分P」とする。)の位置および姿勢(「基準位置姿勢SP」とする。)とを比較して、位置ずれ量を算出する。 Next, the PLC 100 from the measured position and orientation SP m, calculates a positional deviation amount of the measurement portion. Specifically, (a "reference measurement portion P t".) Indeed the measured position and orientation SP m which is measured based on the image captured, obtained under the conditions of setting of the reference path measurement portion P of The position and posture (referred to as “reference position / posture SP t ”) are compared to calculate the amount of positional deviation.
 より具体的には、PLC100は、実測位置姿勢SPを取得したときの移動機構8の移動量と回転機構64の回転量とを特定することができる。基準経路の設定時の条件下で、特定した移動量および回転量で移動機構8および回転機構64を制御した場合の計測部分の位置および姿勢が基準位置姿勢SPに相当する。PLC100は、基準位置姿勢SPを取得し、式(1)に従って、基準位置姿勢SPからの位置ずれ量ΔPを求める。なお、基準位置姿勢SPは、本願発明の基準経路に応じて定められる基準位置の一例である。
Figure JPOXMLDOC01-appb-M000001
More specifically, the PLC 100 has a rotation amount of the movement amount and the rotation mechanism 64 of the moving mechanism 8 when obtaining the actual measured position and orientation SP m can be identified. Under conditions when setting the reference trajectory, the position and orientation of the measurement portion of the case of controlling the moving mechanism 8 and the rotating mechanism 64 in the movement amount and the rotation amount specified corresponds to the reference position and orientation SP t. PLC100 acquires the reference position and orientation SP t, according to equation (1) obtains the position deviation amount ΔP from the reference position and orientation SP t. The reference position and orientation SP t is an example of the reference position determined in accordance with the reference path of the present invention.
Figure JPOXMLDOC01-appb-M000001
 計測位置は、計測部分Pの位置に対応付けて予め定められている。図6に示す例では、1つの計測部分Pに対して、複数の計測位置pが設定されている。なお、基準計測部分Pに対する計測位置を基準位置sp(x,y)とし、実際の計測部分Pに対する計測位置を実測位置sp(x,y)とする。 The measurement position is predetermined in association with the position of the measurement portion P. In the example shown in FIG. 6, a plurality of measurement positions p are set for one measurement portion P. The reference position measuring position relative to a reference measurement portion P t sp t (x t, y t) and, measured measurement position for the actual measurement portion P position sp m (x m, y m ) and.
 基準位置spに位置ずれ量ΔPを反映することで、実測位置spを算出することができる。具体的には、式(2)に基づいて算出される。
Figure JPOXMLDOC01-appb-M000002
By reflecting the positional deviation amount ΔP to the reference position sp t, it can be calculated measured positions sp m. Specifically, it is calculated based on equation (2).
Figure JPOXMLDOC01-appb-M000002
 式(1)において、T( )は、並進移動に対応する変換式を示し、X座標の位置ずれ量ΔXおよびY座標の位置ずれ量ΔYに基づいて定められる。また、R( )は、回転移動に対応する変換式を示し、回転方向の位置ずれ量Δθに基づいて定められる。なお、T( )およびR( )は、式(3)から求めることができる。すなわち、基準位置姿勢SPおよび実測位置姿勢SPに基づいて、R( )およびT( )が算出される。
Figure JPOXMLDOC01-appb-M000003
In equation (1), T () represents a conversion equation corresponding to translation, and is determined based on the displacement amount ΔX of the X coordinate and the displacement amount ΔY of the Y coordinate. R () indicates a conversion formula corresponding to the rotational movement, and is determined based on the positional deviation amount Δθ in the rotational direction. Note that T () and R () can be obtained from Expression (3). That is, based on the reference position and orientation SP t and the actually measured position and orientation SP m, R () and T () is calculated.
Figure JPOXMLDOC01-appb-M000003
 以上のように、PLC100および画像処理装置400は、カメラ66が撮像した画像に基づいて実測位置spを特定する。なお、画像処理装置400が、カメラ66が撮像した画像に基づいて実測位置spを特定するようにしてもよい。この場合、PLC100から、計測部分Pの実測位置姿勢SPを取得したときの移動機構8の移動量と回転機構64の回転量に関する情報を画像処理装置400は受信する。 As described above, the PLC 100 and the image processing apparatus 400, the camera 66 to identify the actual position sp m on the basis of the image captured. The image processing apparatus 400, the camera 66 may identify the actual position sp m on the basis of the image captured. In this case, from the PLC 100, the image processing apparatus 400 of information about the amount of rotation of the moving amount and the rotation mechanism 64 of the moving mechanism 8 when obtaining the actual measured position and orientation SP m measurement portion P receives.
 <F.基準経路の修正>
 PLC100は、計測位置pが変位センサ68の計測範囲内を通過するように、基準経路を修正する。図7は、基準経路の修正方法を説明するための図である。
<F. Correction of reference route>
The PLC 100 corrects the reference path so that the measurement position p passes within the measurement range of the displacement sensor 68. FIG. 7 is a diagram for explaining a method of correcting the reference route.
 図7の中央を通る実線は、回転体62の回転中心Oが通過する経路Lを表す。前述のように、本実施の形態においては、回転体62の回転中心Oが通過する経路を修正することなく、回転体62を回転させることで、基準経路を修正して、計測位置pが変位センサ68の計測範囲内を通過するようにする。 The solid line through the middle of FIG. 7 represents the path L 1 the rotational center O of the rotating body 62 passes. As described above, in the present embodiment, the reference path is corrected by rotating the rotating body 62 without correcting the path through which the rotation center O of the rotating body 62 passes, and the measurement position p is displaced. It passes through the measurement range of the sensor 68.
 具体的には、回転体62の回転中心Oが通過する経路は修正されないため、カメラ66座標内における経路Lは、カメラ座標の関数(y=f(x))で表すことができる。また、変位センサ68は、回転体62に固定されているため、回転中心Oを中心に回転する。PLC100は、変位センサ68と回転中心Oとの距離を半径Rとすると、半径Rを画像内のピクセル値に変換した距離r、経路L、および特定された計測位置pに基づいて、計測位置p上を変位センサ68が通過するときの回転中心Oの位置C(x,y)と、回転角度θとを求めることができる。 Specifically, since the path whereby the rotational center O of the rotating body 62 passes is not modified, the path L 1 in the camera 66 in coordinates can be expressed by a function of the camera coordinate (y = f (x)) . Further, since the displacement sensor 68 is fixed to the rotating body 62, the displacement sensor 68 rotates around the rotation center O. Assuming that the distance between the displacement sensor 68 and the rotation center O is the radius R, the PLC 100 measures the measurement position based on the distance r obtained by converting the radius R into a pixel value in the image, the path L 1 , and the specified measurement position p. position C (x c, y c) of the rotation center O when the upper p is the displacement sensor 68 to pass, it can be obtained and a rotation angle theta s.
 具体的には、PLC100は、計測位置pを中心とした半径rの円と、経路Lを表すy=f(x)の直線との交点を求め、回転体62の進行方向に対して、計測位置pよりも前方に位置するという制限を設けることで、位置C(x,y)が算出される。PLC100は、算出した位置C(x,y)と、実測位置sp(x,y)と、半径rとに基づいて、回転角度θを算出する。 Specifically, the PLC 100 calculates a circle of radius r centered at the measurement position p, the intersection of the straight line of y = f (x) representative of the path L 1, the traveling direction of the rotating body 62, by providing the restriction that is positioned further forward than the measurement position p, the position C (x c, y c) are calculated. PLC100 the calculated position C (x c, y c) and, measured position sp m (x m, y m ) and, based on the radius r, and calculates the rotation angle theta s.
 PLC100は、回転体62の回転中心Oが位置C(x,y)を通過するときまでに、回転体62の回転角度がθとなるように回転機構64を制御する。また、PLC100は、回転体62の回転中心Oが位置C(x,y)を通過するときであって、回転体62の回転角度がθとなったときに、計測条件が成立したものとして、コントローラ200に計測指令を出力する。計測指令には、位置C(x,y)の情報が含まれ、コントローラ200は、位置C(x,y)および位置Cにおける変位センサ68からの信号に基づいて、計測結果を算出し、出力する。 PLC100 the rotation center O of the rotating body 62 is positioned C (x c, y c) by the time it passes through the rotation angle of the rotating body 62 controls the rotating mechanism 64 so that theta s. Also, the PLC 100 is the rotational center O position C (x c, y c) of the rotary body 62 there is time to pass through the, when the rotation angle of the rotating body 62 becomes theta s, measurement conditions is satisfied As such, it outputs a measurement command to the controller 200. The measurement instruction, the position C (x c, y c) contains information, the controller 200, based on a signal from the displacement sensor 68 at the position C (x c, y c) and the position C, and the measurement results Calculate and output.
 <G.ハードウェア構成>
 次に、上記で説明した計測を実現するための、計測システム1を構成する各種装置のハードウェア構成について説明する。
<G. Hardware Configuration>
Next, a description will be given of a hardware configuration of various devices constituting the measurement system 1 for implementing the above-described measurement.
 (g1.画像処理装置のハードウェア構成)
 図8は、画像処理装置400のハードウェア構成を示す模式図である。画像処理装置400は、CPU(Central Processing Unit)やMPU(Micro-Processing Unit)などのプロセッサ402と、RAM(Random Access Memory)404と、表示コントローラ406と、システムコントローラ408と、I/O(Input Output)コントローラ410と、ハードディスク412と、カメラインターフェイス414と、コントローラインターフェイス418と、通信インターフェイス420と、メモリカードインターフェイス422とを含む。これらの各部は、システムコントローラ408を中心として、互いにデータ通信可能に接続される。
(G1. Hardware configuration of image processing apparatus)
FIG. 8 is a schematic diagram illustrating a hardware configuration of the image processing apparatus 400. The image processing apparatus 400 includes a processor 402 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 404, a display controller 406, a system controller 408, and an I / O (Input / Output). Output) It includes a controller 410, a hard disk 412, a camera interface 414, a controller interface 418, a communication interface 420, and a memory card interface 422. These units are connected to each other so as to enable data communication with the system controller 408 at the center.
 プロセッサ402は、システムコントローラ408との間でプログラム(コード)などを交換して、これらを所定順序で実行することで、目的の演算処理を実現する。 The processor 402 exchanges programs (codes) with the system controller 408 and executes the programs (codes) in a predetermined order, thereby realizing the intended arithmetic processing.
 システムコントローラ408は、プロセッサ402、RAM404、表示コントローラ406およびI/Oコントローラ410とそれぞれバスを介して接続されており、各部との間でデータ交換などを行うとともに、画像処理装置400全体の処理を司る。 The system controller 408 is connected to the processor 402, the RAM 404, the display controller 406, and the I / O controller 410 via buses, respectively, exchanges data with each unit, and performs processing of the entire image processing apparatus 400. Govern.
 RAM404は、典型的には、DRAM(Dynamic Random Access Memory)などの揮発性の記憶装置であり、ハードディスク412から読み出されたプログラムや、カメラ66によって取得された画像(画像データ)、画像に対する処理結果およびワークデータなどを保持する。 The RAM 404 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory), and is a program read from the hard disk 412, an image (image data) acquired by the camera 66, and a process for the image. Holds results and work data.
 表示コントローラ406は、表示部432と接続されており、システムコントローラ408からの内部コマンドに従って、各種の情報を表示するための信号を表示部432へ出力する。 The display controller 406 is connected to the display unit 432, and outputs a signal for displaying various information to the display unit 432 according to an internal command from the system controller 408.
 I/Oコントローラ410は、画像処理装置400に接続される記録媒体や外部機器との間のデータ交換を制御する。より具体的には、I/Oコントローラ410は、ハードディスク412と、カメラインターフェイス414と、入力インターフェイス416と、コントローラインターフェイス418と、通信インターフェイス420と、メモリカードインターフェイス422と接続される。 The I / O controller 410 controls data exchange between a recording medium connected to the image processing apparatus 400 and an external device. More specifically, I / O controller 410 is connected to hard disk 412, camera interface 414, input interface 416, controller interface 418, communication interface 420, and memory card interface 422.
 ハードディスク412は、記憶装置の一例であって、プロセッサ402で実行される画像処理プログラム440およびプロジェクトファイル442を含む。記憶装置は、ハードディスク412のような不揮発性の磁気記憶装置に限らず、フラッシュメモリなどの半導体記憶装置であってもよいし、DVD-RAM(Digital Versatile Disk Random Access Memory)などの光学記憶装置であってもよい。 The hard disk 412 is an example of a storage device, and includes an image processing program 440 executed by the processor 402 and a project file 442. The storage device is not limited to a nonvolatile magnetic storage device such as the hard disk 412, but may be a semiconductor storage device such as a flash memory or an optical storage device such as a DVD-RAM (Digital Versatile Disk Random Access Memory). There may be.
 画像処理プログラム440は、PLC100からの撮像指令に従った画像を取得する処理や、パターンマッチングを行なうための処理を実行するためのプログラムである。より具体的には、画像処理プログラム440は、プロジェクトファイル442に格納された設定条件にしたがって、計測部分Pの位置および姿勢を特定するための処理を実行する。画像処理プログラム440は、他のプログラムの一部に組み込まれて提供されるものであってもよい。その場合、画像処理プログラム440自体は、他のプログラムと協働して予め定められた処理を実行する。すなわち、画像処理プログラム440としては、このような他のプログラムに組み込まれた形態であってもよい。また、代替的に、画像処理プログラム440の実行により提供される機能の一部もしくは全部を専用のハードウェア回路として実装してもよい。 The image processing program 440 is a program for executing a process of acquiring an image according to an imaging command from the PLC 100 and a process of performing pattern matching. More specifically, the image processing program 440 executes a process for specifying the position and orientation of the measurement portion P according to the setting conditions stored in the project file 442. The image processing program 440 may be provided by being incorporated in a part of another program. In that case, the image processing program 440 itself executes a predetermined process in cooperation with another program. That is, the image processing program 440 may be in a form incorporated in such another program. Alternatively, part or all of the functions provided by executing the image processing program 440 may be implemented as a dedicated hardware circuit.
 カメラインターフェイス414は、ワークWを撮影することで生成された画像データを受け付ける入力部に相当し、カメラ66とプロセッサ402との間のデータ伝送を仲介する。より具体的には、カメラインターフェイス414は、1つ以上のカメラ66と接続が可能であり、プロセッサ402からカメラインターフェイス414を介してカメラ66に撮影指示が出力される。これにより、カメラ66は、被写体を撮影し、生成した画像をカメラインターフェイス414を介してプロセッサ402に出力する。 The camera interface 414 corresponds to an input unit that receives image data generated by photographing the work W, and mediates data transmission between the camera 66 and the processor 402. More specifically, the camera interface 414 can be connected to one or more cameras 66, and a shooting instruction is output from the processor 402 to the camera 66 via the camera interface 414. Accordingly, the camera 66 captures an image of the subject and outputs the generated image to the processor 402 via the camera interface 414.
 入力インターフェイス416は、プロセッサ402とキーボード434、マウス、タッチパネル、専用コンソールなどの入力装置との間のデータ伝送を仲介する。 The input interface 416 mediates data transmission between the processor 402 and input devices such as a keyboard 434, a mouse, a touch panel, and a dedicated console.
 コントローラインターフェイス418は、PLC100とプロセッサ402との間のデータ伝送を仲介する。より具体的には、コントローラインターフェイス418は、PLC100によって制御される生産ラインの状態に係る情報やワークWに係る情報、撮像指令などをプロセッサ402へ伝送する。 The controller interface 418 mediates data transmission between the PLC 100 and the processor 402. More specifically, the controller interface 418 transmits information on the state of the production line controlled by the PLC 100, information on the work W, an imaging command, and the like to the processor 402.
 通信インターフェイス420は、プロセッサ402と図示しない他のパーソナルコンピュータやサーバ装置などとの間のデータ伝送を仲介する。通信インターフェイス420は、典型的には、イーサネット(登録商標)やUSB(Universal Serial Bus)などからなる。 The communication interface 420 mediates data transmission between the processor 402 and another personal computer or server (not shown). The communication interface 420 is typically made of Ethernet (registered trademark), USB (Universal Serial Bus), or the like.
 メモリカードインターフェイス422は、プロセッサ402と記録媒体であるメモリカード436との間のデータ伝送を仲介する。メモリカード436には、画像処理装置400で実行される画像処理プログラム440などが格納された状態で流通し、メモリカードインターフェイス422は、このメモリカード436からこれらのプログラムを読み出す。メモリカード436は、SD(Secure Digital)などの汎用的な半導体記憶デバイスや、フレキシブルディスク(Flexible Disk)などの磁気記録媒体や、CD-ROM(Compact Disk Read Only Memory)などの光学記録媒体等からなる。あるいは、通信インターフェイス420を介して、配信サーバなどからダウンロードしたプログラムを画像処理装置400にインストールしてもよい。 The memory card interface 422 mediates data transmission between the processor 402 and the memory card 436 as a recording medium. The memory card 436 distributes an image processing program 440 executed by the image processing apparatus 400 in a stored state, and the memory card interface 422 reads out these programs from the memory card 436. The memory card 436 can be a general-purpose semiconductor storage device such as SD (Secure Digital), a magnetic recording medium such as a flexible disk (Flexible Disk), or an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory). Become. Alternatively, a program downloaded from a distribution server or the like may be installed in the image processing apparatus 400 via the communication interface 420.
 (g2.コントローラ200のハードウェア構成)
 図9を参照して、変位センサ68を制御するコントローラ200のハードウェア構成について説明する。図9は、コントローラ200のハードウェア構成の一例を示す模式図である。
(G2. Hardware configuration of controller 200)
The hardware configuration of the controller 200 that controls the displacement sensor 68 will be described with reference to FIG. FIG. 9 is a schematic diagram illustrating an example of a hardware configuration of the controller 200.
 コントローラ200は、CPU(Central Processing Unit)やMPU(Micro-Processing Unit)などのプロセッサ202と、RAM(Random Access Memory)204と、表示コントローラ206と、システムコントローラ208と、I/O(Input Output)コントローラ210と、ハードディスク212と、センサインターフェイス214と、コントローラインターフェイス218と、通信インターフェイス220と、メモリカードインターフェイス222とを含む。これらの各部は、システムコントローラ208を中心として、互いにデータ通信可能に接続される。 The controller 200 includes a processor 202 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a RAM (Random Access Memory) 204, a display controller 206, a system controller 208, and an I / O (Input Output). It includes a controller 210, a hard disk 212, a sensor interface 214, a controller interface 218, a communication interface 220, and a memory card interface 222. These units are connected to each other so as to be able to perform data communication with each other with the system controller 208 being the center.
 プロセッサ202は、システムコントローラ208との間でプログラム(コード)などを交換して、これらを所定順序で実行することで、目的の演算処理を実現する。 The processor 202 exchanges programs (codes) and the like with the system controller 208 and executes them in a predetermined order, thereby realizing the intended arithmetic processing.
 システムコントローラ208は、プロセッサ202、RAM204、表示コントローラ206およびI/Oコントローラ210とそれぞれバスを介して接続されており、各部との間でデータ交換などを行うとともに、画像処理装置400全体の処理を司る。 The system controller 208 is connected to each of the processor 202, the RAM 204, the display controller 206, and the I / O controller 210 via a bus, exchanges data with each unit, and performs processing of the entire image processing apparatus 400. Govern.
 RAM204は、典型的には、DRAM(Dynamic Random Access Memory)などの揮発性の記憶装置であり、ハードディスク212から読み出されたプログラムや、変位センサ68によって取得された画像(画像データ)、画像に対する処理結果およびワークデータなどを保持する。 The RAM 204 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory), and stores a program read from the hard disk 212, an image (image data) acquired by the displacement sensor 68, and an image. Holds processing results and work data.
 表示コントローラ206は、表示部232と接続されており、システムコントローラ208からの内部コマンドに従って、各種の情報を表示するための信号を表示部232へ出力する。 The display controller 206 is connected to the display unit 232, and outputs a signal for displaying various information to the display unit 232 according to an internal command from the system controller 208.
 I/Oコントローラ210は、コントローラ200に接続される記録媒体や外部機器との間のデータ交換を制御する。より具体的には、I/Oコントローラ210は、ハードディスク212と、センサインターフェイス214と、入力インターフェイス216と、コントローラインターフェイス218と、通信インターフェイス220と、メモリカードインターフェイス222と接続される。 The I / O controller 210 controls data exchange between a recording medium connected to the controller 200 and an external device. More specifically, I / O controller 210 is connected to hard disk 212, sensor interface 214, input interface 216, controller interface 218, communication interface 220, and memory card interface 222.
 ハードディスク212は、記憶装置の一例であって、プロセッサ202で実行される計測プログラム240を含む。記憶装置は、ハードディスク212のような不揮発性の磁気記憶装置に限らず、フラッシュメモリなどの半導体記憶装置であってもよいし、DVD-RAM(Digital Versatile Disk Random Access Memory)などの光学記憶装置であってもよい。 The hard disk 212 is an example of a storage device and includes a measurement program 240 executed by the processor 202. The storage device is not limited to a nonvolatile magnetic storage device such as the hard disk 212, but may be a semiconductor storage device such as a flash memory or an optical storage device such as a DVD-RAM (Digital Versatile Disk Random Access Memory). There may be.
 計測プログラム240は、PLC100からの計測指令に従った変位センサ68からの信号を取得する処理や、取得した信号に基づいて計測部分Pに対する計測結果を算出する処理や、算出した計測結果を出力する処理などを実行するためのプログラムである。計測プログラム240は、他のプログラムの一部に組み込まれて提供されるものであってもよい。その場合、計測プログラム240自体は、他のプログラムと協働して予め定められた処理を実行する。すなわち、計測プログラム240としては、このような他のプログラムに組み込まれた形態であってもよい。また、代替的に、計測プログラム240の実行により提供される機能の一部もしくは全部を専用のハードウェア回路として実装してもよい。 The measurement program 240 outputs a process of acquiring a signal from the displacement sensor 68 in accordance with a measurement command from the PLC 100, a process of calculating a measurement result for the measurement portion P based on the obtained signal, and outputting the calculated measurement result. This is a program for executing processing and the like. The measurement program 240 may be provided by being incorporated in a part of another program. In that case, the measurement program 240 itself executes a predetermined process in cooperation with another program. That is, the measurement program 240 may be in a form incorporated in such another program. Alternatively, part or all of the functions provided by executing the measurement program 240 may be implemented as a dedicated hardware circuit.
 センサインターフェイス214は、変位センサ68からの信号を受け付ける入力部および、変位センサ68に計測指示を出力する出力部に相当し、変位センサ68とプロセッサ202との間のデータ伝送を仲介する。より具体的には、センサインターフェイス214は、1つ以上の変位センサ68と接続が可能であり、プロセッサ202からセンサインターフェイス214を介して変位センサ68に計測指示が出力される。これにより、変位センサ68の投光部61から計測位置pに向けて光が投光され、計測位置pに反射した光を受光した受光部63からの信号がセンサインターフェイス214を介してプロセッサ202に出力される。 The sensor interface 214 corresponds to an input unit that receives a signal from the displacement sensor 68 and an output unit that outputs a measurement instruction to the displacement sensor 68, and mediates data transmission between the displacement sensor 68 and the processor 202. More specifically, the sensor interface 214 can be connected to one or more displacement sensors 68, and a measurement instruction is output from the processor 202 to the displacement sensor 68 via the sensor interface 214. As a result, light is projected from the light projecting unit 61 of the displacement sensor 68 toward the measurement position p, and a signal from the light receiving unit 63 that receives the light reflected at the measurement position p is sent to the processor 202 via the sensor interface 214. Is output.
 入力インターフェイス216は、プロセッサ202とキーボード234、マウス、タッチパネル、専用コンソールなどの入力装置との間のデータ伝送を仲介する。 The input interface 216 mediates data transmission between the processor 202 and input devices such as a keyboard 234, a mouse, a touch panel, and a dedicated console.
 コントローラインターフェイス218は、PLC100とプロセッサ202との間のデータ伝送を仲介する。より具体的には、コントローラインターフェイス218は、PLC100によって制御される生産ラインの状態に係る情報やワークWに係る情報、撮像指令などをプロセッサ202へ伝送する。 The controller interface 218 mediates data transmission between the PLC 100 and the processor 202. More specifically, the controller interface 218 transmits, to the processor 202, information on the state of the production line controlled by the PLC 100, information on the work W, an imaging command, and the like.
 通信インターフェイス220は、プロセッサ202と図示しない他のパーソナルコンピュータやサーバ装置などとの間のデータ伝送を仲介する。通信インターフェイス220は、典型的には、イーサネット(登録商標)やUSB(Universal Serial Bus)などからなる。 The communication interface 220 mediates data transmission between the processor 202 and another personal computer or server (not shown). The communication interface 220 is typically made of Ethernet (registered trademark), USB (Universal Serial Bus), or the like.
 メモリカードインターフェイス222は、プロセッサ202と記録媒体であるメモリカード236との間のデータ伝送を仲介する。メモリカード236には、コントローラ200で実行される計測プログラム240などが格納された状態で流通し、メモリカードインターフェイス222は、このメモリカード236からこれらのプログラムを読み出す。メモリカード236は、SD(Secure Digital)などの汎用的な半導体記憶デバイスや、フレキシブルディスク(Flexible Disk)などの磁気記録媒体や、CD-ROM(Compact Disk Read Only Memory)などの光学記録媒体等からなる。あるいは、通信インターフェイス420を介して、配信サーバなどからダウンロードしたプログラムを画像処理装置400にインストールしてもよい。 The memory card interface 222 mediates data transmission between the processor 202 and the memory card 236 as a recording medium. The memory card 236 distributes a state in which measurement programs 240 and the like executed by the controller 200 are stored, and the memory card interface 222 reads these programs from the memory card 236. The memory card 236 can be a general-purpose semiconductor storage device such as an SD (Secure Digital), a magnetic recording medium such as a flexible disk (Flexible Disk), or an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory). Become. Alternatively, a program downloaded from a distribution server or the like may be installed in the image processing apparatus 400 via the communication interface 420.
 (g3.PLC100のハードウェア構成)
 図10を参照して、PLC100のハードウェア構成について説明する。図10は、PLC100のハードウェア構成の一例を示す模式図である。
(G3. Hardware configuration of PLC 100)
The hardware configuration of the PLC 100 will be described with reference to FIG. FIG. 10 is a schematic diagram illustrating an example of a hardware configuration of the PLC 100.
 PLC100は、チップセット112と、プロセッサ114と、不揮発性メモリ116と、主メモリ118と、システムクロック120と、メモリカードインターフェイス122と、通信インターフェイス128と、内部バスコントローラ130と、フィールドバスコントローラ138とを含む。チップセット112と他のコンポーネントとの間は、各種のバスを介してそれぞれ結合されている。 The PLC 100 includes a chipset 112, a processor 114, a non-volatile memory 116, a main memory 118, a system clock 120, a memory card interface 122, a communication interface 128, an internal bus controller 130, and a field bus controller 138. including. The chipset 112 and other components are respectively connected via various buses.
 プロセッサ114およびチップセット112は、典型的には、汎用的なコンピュータアーキテクチャに従う構成を有している。すなわち、プロセッサ114は、チップセット112から内部クロックに従って順次供給される命令コードを解釈して実行する。チップセット112は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、プロセッサ114に必要な命令コードを生成する。システムクロック120は、予め定められた周期のシステムクロックを発生してプロセッサ114に出力する。チップセット112は、プロセッサ114での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。 The processor 114 and the chipset 112 typically have a configuration according to a general-purpose computer architecture. That is, the processor 114 interprets and executes the instruction codes sequentially supplied from the chipset 112 according to the internal clock. The chipset 112 exchanges internal data with various connected components and generates instruction codes required for the processor 114. The system clock 120 generates a system clock having a predetermined cycle and outputs the generated system clock to the processor 114. The chipset 112 has a function of caching data and the like obtained as a result of execution of arithmetic processing by the processor 114.
 PLC100は、記憶手段として、不揮発性メモリ116および主メモリ118を有する。不揮発性メモリ116は、OS、システムプログラム、ユーザプログラム140、ログ情報などを不揮発的に保持する。主メモリ118は、揮発性の記憶領域であり、プロセッサ114で実行されるべき各種プログラムを保持するとともに、各種プログラムの実行時の作業用メモリとしても使用される。 The PLC 100 has a nonvolatile memory 116 and a main memory 118 as storage means. The nonvolatile memory 116 holds the OS, the system program, the user program 140, log information, and the like in a nonvolatile manner. The main memory 118 is a volatile storage area that holds various programs to be executed by the processor 114 and is also used as a work memory when executing various programs.
 ユーザプログラム140は、ユーザによって作成されるプログラムであって、通信インターフェイス128を介して接続される設定用の外部PCから送られたり、または、メモリカード124に格納された状態で流通したりする。 The user program 140 is a program created by the user, and is sent from an external PC for setting connected via the communication interface 128 or distributed in a state stored in the memory card 124.
 PLC100は、通信手段として、通信インターフェイス128と、内部バスコントローラ130と、フィールドバスコントローラ138とを有する。これらの通信回路は、データの送信および受信を行なう。 The PLC 100 has a communication interface 128, an internal bus controller 130, and a field bus controller 138 as communication means. These communication circuits transmit and receive data.
 通信インターフェイス128は、コントローラ200や画像処理装置400との間でデータを遣り取りする。一例として、PLC100は、通信インターフェイス128を介して画像処理装置400に対して撮像指示を出力する。あるいは、PLC100は、通信インターフェイス128を介して画像処理装置400から計測部分Pの位置および姿勢に関する計測結果を受け付ける。また、PLC100は、通信インターフェイス128を介してコントローラ200に対して計測指示を出力する。 The communication interface 128 exchanges data with the controller 200 and the image processing device 400. As an example, the PLC 100 outputs an imaging instruction to the image processing device 400 via the communication interface 128. Alternatively, the PLC 100 receives a measurement result regarding the position and orientation of the measurement portion P from the image processing device 400 via the communication interface 128. Further, the PLC 100 outputs a measurement instruction to the controller 200 via the communication interface 128.
 内部バスコントローラ130は、内部バス126を介したデータの遣り取りを制御する。より具体的には、内部バスコントローラ130は、DMA(Dynamic Memory Access)制御回路132と、内部バス制御回路134と、バッファメモリ136とを含む。 (4) The internal bus controller 130 controls data exchange via the internal bus 126. More specifically, the internal bus controller 130 includes a DMA (Dynamic Memory Access) control circuit 132, an internal bus control circuit 134, and a buffer memory 136.
 メモリカードインターフェイス122は、PLC100に対して着脱可能なメモリカード124とプロセッサ114とを接続する。 (4) The memory card interface 122 connects the memory card 124 detachable to the PLC 100 and the processor 114.
 フィールドバスコントローラ138は、フィールドネットワークに接続するための通信インターフェイスである。PLC100は、フィールドバスコントローラ138を介してサーボドライバ300やドライバユニット500と接続される。 The fieldbus controller 138 is a communication interface for connecting to a field network. The PLC 100 is connected to the servo driver 300 and the driver unit 500 via the field bus controller 138.
 <H.機能構成>
 図11および図12を参照して、本実施の形態の計測システム1の機能全体について説明する。図11は、経路の修正において機能する計測システム1の機能構成の一例を示す図である。図12は、計測時ならびに経路に沿って移動機構および回転機構を制御するときに機能する計測システム1の機能構成の一例を示す図である。なお、PLC100の各種機能は、ユーザプログラム140が実行されることで実現される。画像処理装置400の各種機能は画像処理プログラム440およびプロジェクトファイル442に従って処理が実行されることで実現される。
<H. Functional Configuration>
With reference to FIG. 11 and FIG. 12, the overall function of the measurement system 1 of the present embodiment will be described. FIG. 11 is a diagram illustrating an example of a functional configuration of the measurement system 1 that functions in correcting a route. FIG. 12 is a diagram illustrating an example of a functional configuration of the measurement system 1 that functions when measuring and when controlling the moving mechanism and the rotating mechanism along the path. The various functions of the PLC 100 are realized by executing the user program 140. Various functions of the image processing apparatus 400 are realized by executing processing according to the image processing program 440 and the project file 442.
 (h1.経路の修正)
 画像処理装置400は、撮像制御部42、位置・姿勢計測部44、およびモデル画像データ46を備える。
(H1. Correction of route)
The image processing device 400 includes an imaging control unit 42, a position / posture measuring unit 44, and model image data 46.
 モデル画像データ46は、プロジェクトファイル442に含まれるデータであって、基準経路を生成するための設定が行われることで生成される。モデル画像データ46は、計測部分Pごとに予め定められている画像特徴を示す画像データである。モデル画像データ46は、複数の計測部分Pの各々を識別するための計測番号と対応付けて記憶されている。 The model image data 46 is data included in the project file 442, and is generated by setting for generating a reference route. The model image data 46 is image data indicating an image feature predetermined for each measurement portion P. The model image data 46 is stored in association with a measurement number for identifying each of the plurality of measurement portions P.
 画像処理装置400は、PLC100から送られる、撮像指令と、撮像視野内に含まれる計測部分Pの計測番号とに基づいて計測部分Pの位置および姿勢を計測し、図6に示した実測位置姿勢SPを得る。 The image processing device 400 measures the position and orientation of the measurement portion P based on the imaging command sent from the PLC 100 and the measurement number of the measurement portion P included in the imaging field of view, and measures the actual measurement position and orientation illustrated in FIG. Obtain SP m .
 具体的には、撮像制御部42は、PLC100からの撮像指令に従ってカメラ66に撮像を指示する。 {Specifically, the imaging control unit 42 instructs the camera 66 to perform imaging according to an imaging command from the PLC 100.
 位置・姿勢計測部44は、撮像制御部42からの撮像指示に従ってカメラ66が撮像することで得られる画像データと、PLC100から送られた計測番号に対応するモデル画像データ46とを比較することで、計測部分Pの位置および姿勢を計測し、実測位置姿勢SPを得る。位置・姿勢計測部44が計測して得られる実測位置姿勢SPをPLC100に送信する。 The position / posture measurement unit 44 compares the image data obtained by the camera 66 taking an image according to the imaging instruction from the imaging control unit 42 with the model image data 46 corresponding to the measurement number sent from the PLC 100. measures the position and orientation of the measurement portion P, obtain measured position and orientation SP m. Position and orientation measuring unit 44 transmits the measured position and orientation SP m obtained by measuring the the PLC 100.
 PLC100は、撮像条件判定部12と、撮像条件データ182と、位置・姿勢取得部142と、位置・姿勢データ184と、位置ずれ量算出部144と、計測位置算出部146と、計測位置データ186と、計測ポイント算出部162と、経路データ190と、回転角度算出部164と、移動量算出部166と、軌道修正部168と、計測条件修正部170と、計測条件データ196とを備える。 The PLC 100 includes the imaging condition determination unit 12, the imaging condition data 182, the position / posture acquisition unit 142, the position / posture data 184, the displacement amount calculation unit 144, the measurement position calculation unit 146, and the measurement position data 186. And a measurement point calculation unit 162, route data 190, a rotation angle calculation unit 164, a movement amount calculation unit 166, a trajectory correction unit 168, a measurement condition correction unit 170, and measurement condition data 196.
 PLC100は、制御周期ごとに各サーボドライバ300,500X,500Yからエンコーダ値を取得する。移動機構8および回転機構64の各々は、サーボモータごとにエンコーダを備えている。エンコーダはサーボモータの移動量に応じたパルス信号を発生させ、移動量をエンコーダ値として計測する。すなわち、サーボドライバ300からのエンコーダ値は、回転体62の初期位置からの回転移動量に相当する。サーボドライバ500Xからのエンコーダ値は、Xステージ84Xの初期位置からの並進移動量に相当する。サーボドライバ500Yからのエンコーダ値は、Yステージ84Yの初期位置からの並進移動量に相当する。 @The PLC 100 acquires an encoder value from each of the servo drivers 300, 500X, 500Y for each control cycle. Each of the moving mechanism 8 and the rotating mechanism 64 includes an encoder for each servomotor. The encoder generates a pulse signal according to the amount of movement of the servomotor, and measures the amount of movement as an encoder value. That is, the encoder value from the servo driver 300 corresponds to the rotational movement amount of the rotating body 62 from the initial position. The encoder value from the servo driver 500X corresponds to the translation amount of the X stage 84X from the initial position. The encoder value from the servo driver 500Y corresponds to the translation amount of the Y stage 84Y from the initial position.
 撮像条件データ182は、撮像条件を示すデータであって、基準経路が生成されることで得られる情報であって、計測部分Pごとに記憶されている。撮像条件は、たとえば、カメラ66の撮像範囲に計測部分Pが位置するときの回転体62の回転移動量と、Xステージ84Xの並進移動量と、Yステージ84Yの並進移動量との組合せからなる。撮像条件データ182は、計測部分Pを識別するための計測番号と、計測番号が示す計測部分Pの撮像条件との組合せから構成される。 The imaging condition data 182 is data indicating imaging conditions, information obtained by generating a reference route, and is stored for each measurement portion P. The imaging conditions include, for example, a combination of a rotational movement amount of the rotating body 62 when the measurement portion P is positioned in an imaging range of the camera 66, a translation movement amount of the X stage 84X, and a translation movement amount of the Y stage 84Y. . The imaging condition data 182 includes a combination of a measurement number for identifying the measurement portion P and an imaging condition of the measurement portion P indicated by the measurement number.
 撮像条件判定部12は、制御周期ごとに取得するエンコーダ値および撮像条件データ182に基づいて、撮像条件が成立したか否かを判定する。撮像条件判定部12は、撮像条件が成立したと判定した場合、撮像制御部42に対して撮像指令を送るとともに、成立した撮像条件に対応する計測部分Pの計測番号を位置・姿勢計測部44に送る。 The imaging condition determination unit 12 determines whether the imaging condition is satisfied based on the encoder value and the imaging condition data 182 acquired for each control cycle. When determining that the imaging condition is satisfied, the imaging condition determination unit 12 sends an imaging command to the imaging control unit 42 and sets the measurement number of the measurement part P corresponding to the satisfied imaging condition to the position / posture measurement unit 44. Send to
 位置・姿勢取得部142は、カメラ66の撮像時におけるカメラ66と移動機構8との間の相対位置と、位置・姿勢データ184に基づいて、基準経路の設定時の条件下で得られる計測部分Pの位置および姿勢を取得する。具体的には、位置・姿勢取得部142は、図6に示した基準位置姿勢SPを取得する。 The position / posture acquisition unit 142 measures a relative position between the camera 66 and the moving mechanism 8 at the time of imaging by the camera 66, and a measurement part obtained under the conditions at the time of setting the reference route, based on the position / posture data 184. Acquire the position and orientation of P. Specifically, the position and orientation acquisition unit 142 acquires the reference position and orientation SP t shown in FIG.
 カメラ66の撮像時におけるカメラ66と移動機構8との間の相対位置は、カメラ位置であり、カメラ66が計測部分Pを撮像したタイミングにおけるエンコーダ値に基づいて撮像条件判定部12が推定する。 The relative position between the camera 66 and the moving mechanism 8 at the time of imaging by the camera 66 is the camera position, and the imaging condition determination unit 12 estimates the relative position between the camera 66 and the moving mechanism 8 based on the encoder value at the timing when the camera 66 images the measurement portion P.
 位置・姿勢データ184は、カメラ位置と基準位置姿勢SPとの関係を示すデータであて、基準経路の設定時に用いられるワークWの表面を示すデータと、設定時のワークWの設置位置に基づいて得られる。 Position and orientation data 184, addressed by the data indicating the relationship between the camera position and the reference position and orientation SP t, and data showing the surface of the workpiece W to be used when setting the reference path, based on the installation position of the workpiece W when setting Obtained.
 位置・姿勢取得部142は、位置・姿勢データ184から、撮像条件判定部12が推定したカメラ位置に対応する基準位置姿勢SPを取得する。 Position and orientation acquisition unit 142, the position and orientation data 184, to obtain the reference position and orientation SP t corresponding to the camera position where the imaging condition judging unit 12 is estimated.
 位置ずれ量算出部144は、上述した式(1)に従い、位置・姿勢計測部44から得られる実測位置姿勢SPと、位置・姿勢取得部142が取得する基準位置姿勢SPとに基づいて位置ずれ量ΔPを算出する。 Positional shift amount calculating unit 144 in accordance with equation (1) described above, based on the measured position and orientation SP m obtained from the position and orientation measurement unit 44, and the reference position and orientation SP t the position and orientation acquisition unit 142 acquires The position shift amount ΔP is calculated.
 計測位置算出部146は、上述した式(2)に従い、基準計測部分Pに対する基準位置spとの対応関係を示す計測位置データ186と、位置ずれ量ΔPとに基づいて、実測位置spを算出する。計測位置データ186は、計測部分Pと、計測部分Pに対して設定されている計測位置pのカメラ座標値(sp)とが対応付けられたデータであって、計測番号と計測番号が示す計測部分に対応する基準位置spとの組合せから構成され、計測条件を設定する際に生成されるデータである。計測位置算出部146は、計測対象としている計測部分Pの計測番号に基づいて、計測番号に対応する基準位置spを計測位置データ186から取得し、取得した基準位置spに対して、位置ずれ量ΔPを反映して、実測位置spを算出する。 The measurement position calculation unit 146 calculates the actual measurement position sp m based on the measurement position data 186 indicating the correspondence between the reference measurement portion P t and the reference position sp t in accordance with the above-described equation (2), and the displacement ΔP. Is calculated. Measurement position data 186, and measurement portion P, measured partial camera coordinate values of the measurement position p which has been set for the P a (sp t) and is associated data, indicating the measurement number and the measurement number is composed of a combination of the reference position sp t corresponding to the measurement portion, is data generated when setting the measurement conditions. Measurement position calculation unit 146, based on the measurement number of measurement portions P which is a measurement target, and obtaining the reference position sp t corresponding to the measured number from the measurement position data 186, the acquired reference position sp t, location It reflects the deviation amount [Delta] P, and calculates the actual position sp m.
 計測ポイント算出部162は、計測位置p上を変位センサ68が通過するときの回転中心Oの位置C(x,y)を算出する。計測ポイント算出部162は、計測位置算出部146が算出した実測位置spと、回転体62の回転中心Oが通過する経路を示す並進移動データ192とに基づいて、カメラ座標系での位置C(x,y)を算出する。 Measuring point calculating unit 162, position C (x c, y c) of the rotation center O when the upper measuring position p is the displacement sensor 68 passes is calculated. Measuring point calculating unit 162, the measured position sp m that measurement position calculation unit 146 has calculated, on the basis of the translation data 192 indicating the path whereby the rotational center O of the rotating body 62 passes the position C of the camera coordinate system (X c , y c ) is calculated.
 経路データ190は、ワークWと回転体62との相対位置の変化および、ワークWと変位センサ68との相対位置の変化を含むデータである。具体的には、経路データ190は、移動機構8の経時的な動きを示す並進移動データ192と、回転機構64の経時的な動きを示す回転移動データ194とを含む。 The path data 190 is data including a change in the relative position between the work W and the rotating body 62 and a change in the relative position between the work W and the displacement sensor 68. Specifically, the path data 190 includes translational movement data 192 indicating the movement of the moving mechanism 8 over time, and rotational movement data 194 indicating the movement of the rotating mechanism 64 over time.
 並進移動データ192は、ワークWと回転体62との相対位置の変化を示すデータに相当し、言い換えると、ワークW上を回転体62の回転中心Oが移動する経路ともいえ、図7中の経路Lに相当する。 The translational movement data 192 corresponds to data indicating a change in the relative position between the workpiece W and the rotating body 62. In other words, the translational movement data 192 is a path along which the rotation center O of the rotating body 62 moves on the workpiece W. corresponding to the path L 1.
 計測ポイント算出部162は、並進移動データ192に基づいて経路Lをカメラ座標系の関数(y=f(x))で表し、計測位置pを中心とした半径rの円と、経路Lとの交点を求めることで位置Cを算出する。 Measuring point calculating unit 162, expressed in function of the camera coordinate system path L 1 on the basis of the translation data 192 (y = f (x) ), and a circle of radius r centered at the measurement position p, the path L 1 The position C is calculated by finding the intersection with.
 回転角度算出部164は、計測ポイント算出部162が算出した位置Cと、並進移動データ192に基づいて表される経路Lのカメラ座標系の関数(y=f(x))と、実測位置spとに基づいて、回転角度θを算出する。 Rotation angle calculation unit 164, a position C where the measurement point calculator 162 is calculated, as a function of the camera coordinate system of the path L 1 which is represented on the basis of the translation data 192 (y = f (x) ), measured position based on the sp m, to calculate the rotation angle theta s.
 移動量算出部166は、カメラ座標系の位置C上に回転中心Oが位置するときの移動機構8の並進移動量(ΔX,ΔY)と、回転角度θとなる回転機構64の回転移動量(Δθ)とを算出する。 Movement amount calculating section 166, the translational movement of the moving mechanism 8 when the rotation center O on position C of the camera coordinate system is located ([Delta] X, [Delta] Y) and rotational movement of the rotating mechanism 64 as a rotation angle theta s (Δθ) is calculated.
 軌道修正部168は、移動量算出部166が求めた並進移動量(ΔX,ΔY)に達するまでに回転移動量(Δθ)に達するように並進移動データ192に対応付けて回転移動データ194を修正する。 The trajectory correction unit 168 corrects the rotation movement data 194 in association with the translation movement data 192 so that the rotation movement amount (Δθ) reaches the translation movement amount (ΔX, ΔY) calculated by the movement amount calculation unit 166. I do.
 計測条件修正部170は、変位センサ68の計測条件を示す計測条件データ196を修正する。具体的には、計測条件修正部170は、移動量算出部166が求めた並進移動量(ΔX,ΔY)に達し、かつ、回転移動量(Δθ)に達したときを一の計測条件とする。 The measurement condition correction unit 170 corrects the measurement condition data 196 indicating the measurement condition of the displacement sensor 68. Specifically, the measurement condition correction unit 170 sets one measurement condition when the translation amount (ΔX, ΔY) obtained by the movement amount calculation unit 166 and the rotation amount (Δθ) are reached. .
 これにより、回転機構64の経時的な動きと、変位センサ68の計測条件とが修正される。 Thereby, the temporal movement of the rotation mechanism 64 and the measurement conditions of the displacement sensor 68 are corrected.
 なお、PLC100は、判定部176をさらに備えてもよい。判定部176は、位置ずれ量算出部144が算出した位置ずれ量ΔPが予め定められた許容値を超えているか否かを判定する。ここで、予め定められた許容値とは、たとえば、回転体62を回転させて変位センサ68とワークWとの間の相対位置を調整するだけで対応することのできる範囲を示す値である。具体的には、位置ずれ量が、変位センサ68と回転体62の回転中心Oとの距離Rに相当する値以上である場合は、回転体62を回転させたとしても、変位センサ68の計測範囲内に計測位置pを位置させることができない。 Note that the PLC 100 may further include the determination unit 176. The determination unit 176 determines whether the positional deviation amount ΔP calculated by the positional deviation amount calculation unit 144 exceeds a predetermined allowable value. Here, the predetermined allowable value is, for example, a value indicating a range that can be dealt with simply by rotating the rotating body 62 and adjusting the relative position between the displacement sensor 68 and the workpiece W. Specifically, when the displacement amount is equal to or more than the value corresponding to the distance R between the displacement sensor 68 and the rotation center O of the rotating body 62, even if the rotating body 62 is rotated, the displacement sensor 68 The measurement position p cannot be located within the range.
 判定部176は、位置ずれ量ΔPが、予め定められた許容値を超えている場合に、ユーザに判定結果を通知するため、通知部178に判定結果を出力する。通知部178は、表示による通知、ランプによる通知、音による通知、または停止信号を出力して処理を停止することによる通知など、種々の方法でユーザに対して通知が可能であって、どのような方法で通知してもよい。 The determination unit 176 outputs the determination result to the notification unit 178 to notify the user of the determination result when the positional deviation amount ΔP exceeds a predetermined allowable value. The notification unit 178 can notify the user in various ways, such as a notification by display, a notification by a lamp, a notification by sound, or a notification by outputting a stop signal to stop processing. The notification may be made in any suitable manner.
 なお、本実施の形態において、図11に示す、位置・姿勢計測部44、位置ずれ量算出部144および計測位置算出部146によって、本願発明の位置決定手段の機能が実現される。本実施の形態においては、位置決定手段の機能が、画像処理装置400とPLC100とによって実現されるものの、PLC100だけで実現されるものであってもよく、あるいは、画像処理装置400だけで実現されるものであってもよく、また、他の別の装置を合わせた3つ以上の装置によって実現されるものであってもよい。 In the present embodiment, the function of the position determining means of the present invention is realized by the position / posture measuring unit 44, the displacement calculating unit 144, and the measured position calculating unit 146 shown in FIG. In the present embodiment, the function of the position determining means is realized by the image processing device 400 and the PLC 100, but may be realized only by the PLC 100, or may be realized only by the image processing device 400. And may be realized by three or more devices including other different devices.
 (h2.移動機構および回転機構の制御)
 図12を参照して、経路に沿って移動機構8および回転機構64を制御するときに機能する計測システム1の機能構成について説明する。PLC100は、目標移動量指定部174を備える。
(H2. Control of moving mechanism and rotating mechanism)
With reference to FIG. 12, a functional configuration of the measurement system 1 that functions when controlling the moving mechanism 8 and the rotating mechanism 64 along a route will be described. The PLC 100 includes a target movement amount designation unit 174.
 目標移動量指定部174は、経路データ190に従って目標移動量を指定する。経路データ190は、カメラ66によって複数の計測部分Pの各々を順次撮像するとともに、変位センサ68の計測範囲内を計測位置pの各々が通過するようにするための情報であって、前述のように計測部分を撮像するたびに適宜修正される。 (4) The target movement amount designation unit 174 designates a target movement amount according to the route data 190. The route data 190 is information for sequentially capturing each of the plurality of measurement portions P by the camera 66 and for allowing each of the measurement positions p to pass through the measurement range of the displacement sensor 68, as described above. Each time the measurement part is imaged, it is appropriately corrected.
 目標移動量指定部174は、サーボドライバ300,500X,500Yの各々から送られるエンコーダ値と、経路データ190とに基づいて、サーボドライバ300,500X,500Yの各々の目標移動量MVX,MVY,MVθを算出し、各サーボドライバ300,500X,500Yに移動命令を出す。 Based on the encoder value sent from each of the servo drivers 300, 500X, and 500Y and the path data 190, the target movement amount specifying unit 174 calculates the target movement amounts MVX, MVY, and MVθ of each of the servo drivers 300, 500X, and 500Y. Is calculated, and a movement command is issued to each of the servo drivers 300, 500X, and 500Y.
 (h3.変位センサによる計測)
 図12を参照して、変位センサ68により計測を行なうときに機能する計測システム1の機能構成について説明する。
(H3. Measurement by displacement sensor)
With reference to FIG. 12, a functional configuration of the measurement system 1 that functions when performing measurement by the displacement sensor 68 will be described.
 PLC100は、計測条件判定部172を備える。計測条件判定部172は、制御周期ごとに取得するエンコーダ値および計測条件データ196に基づいて、計測条件が成立したか否かを判定する。計測条件データ196は、計測条件を示すデータであって、計測位置と、計測位置に変位センサ68の計測範囲内が位置するときの並進移動量(ΔX,ΔY)および回転移動量(Δθ)の組合せとから構成される。計測条件判定部172は、エンコーダ値から算出される移動量が、計測条件データ196が示す並進移動量(ΔX,ΔY)および回転移動量(Δθ)に達しているか否かを判定し、達していると判定した場合に、コントローラ200に計測指示を出す。 The PLC 100 includes a measurement condition determination unit 172. The measurement condition determination unit 172 determines whether the measurement condition is satisfied based on the encoder value and the measurement condition data 196 acquired for each control cycle. The measurement condition data 196 is data indicating measurement conditions, and includes a measurement position, a translational movement amount (ΔX, ΔY) and a rotational movement amount (Δθ) when the measurement position of the displacement sensor 68 is located at the measurement position. And a combination. The measurement condition determination unit 172 determines whether or not the movement amount calculated from the encoder value has reached the translation movement amount (ΔX, ΔY) and the rotation movement amount (Δθ) indicated by the measurement condition data 196. If it is determined that there is, a measurement instruction is issued to the controller 200.
 コントローラ200は、計測指示に従って変位センサ68を制御して、計測結果を得る。なお、計測指示には、計測位置pの位置情報が含まれる。コントローラ200は、複数の計測位置pを計測することで、複数の計測位置pにより指定される部位の形状が得られる。 The controller 200 controls the displacement sensor 68 according to the measurement instruction to obtain a measurement result. Note that the measurement instruction includes position information of the measurement position p. By measuring the plurality of measurement positions p, the controller 200 can obtain the shape of the part specified by the plurality of measurement positions p.
 <I.基準経路の設定>
 計測システム1は、基準経路、撮像条件、および各計測部分に対応する計測位置を設定するための設定装置70をさらに備えてもよい。図13は、設定装置70の機能構成の一例を示す図である。
<I. Setting of reference route>
The measurement system 1 may further include a setting device 70 for setting a reference path, an imaging condition, and a measurement position corresponding to each measurement portion. FIG. 13 is a diagram illustrating an example of a functional configuration of the setting device 70.
 設定装置70は、表示部71と、記憶部72と、計測位置決定部73と、モデル画像生成部74と、経路生成部75と、移動量決定部76と、撮像条件決定部77と、位置・姿勢情報生成部78と、計測条件決定部79とを備える。表示部71は、たとえばタッチパネルである。記憶部72は、例えば、ハードディスクドライブ、ソリッドステートドライブ等の補助記憶装置であり、計測位置決定部73と、モデル画像生成部74と、経路生成部75と、移動量決定部76と、撮像条件決定部77と、位置・姿勢情報生成部78と、計測条件決定部79とで実行される処理プログラム、指定経路の設定に関する情報を示すデータおよび、処理プログラムが実行されることで得られるデータ等を記憶する。 The setting device 70 includes a display unit 71, a storage unit 72, a measurement position determination unit 73, a model image generation unit 74, a path generation unit 75, a movement amount determination unit 76, an imaging condition determination unit 77, A posture information generation unit 78 and a measurement condition determination unit 79; The display unit 71 is, for example, a touch panel. The storage unit 72 is, for example, an auxiliary storage device such as a hard disk drive or a solid state drive, and includes a measurement position determination unit 73, a model image generation unit 74, a path generation unit 75, a movement amount determination unit 76, an imaging condition A processing program executed by the determining unit 77, the position / posture information generating unit 78, and the measurement condition determining unit 79, data indicating information on setting of a designated path, data obtained by executing the processing program, and the like. Is stored.
 計測位置決定部73は、記憶部72に格納されたワークWの設計上の表面を示す3次元設計データ(たとえばCAD(Computer-Aided Design)データ)を読み込み、表示部71にワークWの設計上の外観を示す模式図を表示させる。計測位置決定部73は、ユーザ入力に従って、ワークW上の複数の計測部分および計測部分に対応する計測位置を決定し、計測部分と計測位置との対応関係を示す計測位置データ186を生成する。 The measurement position determination unit 73 reads three-dimensional design data (for example, CAD (Computer-Aided Design) data) indicating the design surface of the work W stored in the storage unit 72, and displays the design W of the work W on the display unit 71. Is displayed. The measurement position determination unit 73 determines a plurality of measurement portions on the workpiece W and measurement positions corresponding to the measurement portions in accordance with the user input, and generates measurement position data 186 indicating the correspondence between the measurement portions and the measurement positions.
 モデル画像生成部74は、計測位置決定部73がユーザの入力に従って決定した計測部分を示すモデル画像を計測部分ごとに対応付けて記憶し、モデル画像データ46を生成する。 The model image generation unit 74 stores the model image indicating the measurement part determined by the measurement position determination unit 73 according to the user input in association with each measurement part, and generates the model image data 46.
 経路生成部75は、計測位置決定部73が決定した複数の計測位置の各々が変位センサ68の計測範囲内を通過するような経路を生成する。経路生成部75は、ユーザ自身で計測位置の各々を繋いだ線を入力し、その入力に従って経路を生成してもよく、また、予め定められた条件を満たす経路を自動で生成してもよい。予め定められた条件は、たとえば、経路の長さが最も短くなることなどを含む。 The path generation unit 75 generates a path such that each of the plurality of measurement positions determined by the measurement position determination unit 73 passes through the measurement range of the displacement sensor 68. The route generating unit 75 may input a line connecting each of the measurement positions by the user himself, and may generate a route according to the input, or may automatically generate a route satisfying a predetermined condition. . The predetermined condition includes, for example, that the length of the route is the shortest.
 移動量決定部76は、経路生成部75が生成した経路に基づき、生成した経路を実現可能な並進移動量の変位と、並進移動量の変位に対応付けられた回転移動量の変位とを決定することで、経路データ190を生成する。 The movement amount determination unit 76 determines, based on the path generated by the path generation unit 75, the displacement of the translation amount that can realize the generated path and the displacement of the rotation amount associated with the displacement of the translation amount. By doing so, the route data 190 is generated.
 撮像条件決定部77は、移動量決定部76が決定した並進移動量の変位と、並進移動量の変位に対応付けられた回転移動量の変位と、計測部分の位置とに基づいて、計測部分がカメラ66の撮像範囲に位置するときの並進移動量と回転移動量との組合せを特定する。撮像条件決定部77は、特定した並進移動量と回転移動量との組合せを撮像条件に決定し、撮像条件データ182を生成する。 The imaging condition determination unit 77 determines the measurement part based on the displacement of the translation amount determined by the movement amount determination unit 76, the displacement of the rotational movement amount associated with the displacement of the translation amount, and the position of the measurement part. The combination of the translational movement amount and the rotational movement amount when is located in the imaging range of the camera 66 is specified. The imaging condition determination unit 77 determines the combination of the specified translational movement amount and rotational movement amount as the imaging condition, and generates the imaging condition data 182.
 位置・姿勢情報生成部78は、撮像条件決定部77が決定した撮像条件下で計測部分を撮像したときの計測部分の位置および姿勢を特定し、位置・姿勢データ184を生成する。なお、並進移動量と回転移動量とに基づいてカメラ66とワークWとの相対位置が特定されることから、並進移動量と回転移動量とカメラ座標系における計測部分の位置および姿勢との関係を求めることができるため、その関係を位置・姿勢データ184としてもよい。 The position / posture information generation unit 78 specifies the position and orientation of the measurement part when the measurement part is imaged under the imaging conditions determined by the imaging condition determination unit 77, and generates the position / posture data 184. Since the relative position between the camera 66 and the workpiece W is specified based on the translation amount and the rotation amount, the relationship between the translation amount, the rotation amount, and the position and orientation of the measurement part in the camera coordinate system is determined. , The relationship may be used as the position / posture data 184.
 計測条件決定部79は、移動量決定部76が決定した並進移動量の変位と、並進移動量の変位に対応付けられた回転移動量の変位と、計測位置とから、計測位置ごとに、その計測位置が変位センサ68の計測範囲内に位置するときの並進移動量と回転移動量とを特定する。計測条件決定部79は、計測位置ごとに特定された並進移動量と回転移動量との関係を計測条件とし、計測条件データ196を生成する。 The measurement condition determination unit 79 calculates, for each measurement position, the displacement of the translation amount determined by the movement amount determination unit 76, the displacement of the rotational movement amount associated with the displacement of the translation amount, and the measurement position. The translation amount and the rotation amount when the measurement position is within the measurement range of the displacement sensor 68 are specified. The measurement condition determining unit 79 generates measurement condition data 196 using the relationship between the translational movement amount and the rotational movement amount specified for each measurement position as a measurement condition.
 設定装置70が生成した各データ(計測位置データ186、モデル画像データ46、経路データ190、撮像条件データ182、位置・姿勢データ184、計測条件データ196)は、PLC100に送られる。PLC100は、モデル画像データ46を画像処理装置400に送る。 The data (measurement position data 186, model image data 46, route data 190, imaging condition data 182, position / posture data 184, measurement condition data 196) generated by the setting device 70 is sent to the PLC 100. The PLC 100 sends the model image data 46 to the image processing device 400.
 <J.作用・効果>
 以上のように、本実施の形態の計測システム1においては、回転体62の進行方向に対して前方にカメラ66が位置するようにして複数の計測部分の各々を撮像し、撮像して得られた画像に基づいて変位センサ68で計測する計測位置を決定して、決定した計測位置上を変位センサ68の計測範囲が通過するように回転機構64および移動機構8を制御する。そのため、回転体62の進行方向に対してカメラ66が前方、変位センサ68が後方となるように制御されるため、カメラ66により正確な計測位置を特定した上で、その特定された計測位置上を変位センサ68が通過するように位置を調整することができる。また、カメラ66で計測部分を撮像した後、カメラ66が撮像した計測部分上を変位センサ68が通過することとなるため、カメラ66よりも先に変位センサ68が計測部分上を通過する場合に比べて、時間や移動量のロスを減らすことができる。
<J. Action / Effect>
As described above, in the measurement system 1 of the present embodiment, each of the plurality of measurement portions is imaged so that the camera 66 is positioned forward with respect to the traveling direction of the rotating body 62, and is obtained by imaging. The measurement position to be measured by the displacement sensor 68 is determined based on the image thus obtained, and the rotation mechanism 64 and the moving mechanism 8 are controlled so that the measurement range of the displacement sensor 68 passes over the determined measurement position. Therefore, since the camera 66 is controlled so that the forward direction and the displacement sensor 68 are backward with respect to the traveling direction of the rotating body 62, the camera 66 specifies the accurate measurement position, and Can be adjusted so that the displacement sensor 68 passes through the position. Further, after the camera 66 captures an image of the measurement portion, the displacement sensor 68 passes over the measurement portion captured by the camera 66. Therefore, when the displacement sensor 68 passes over the measurement portion earlier than the camera 66, In comparison, it is possible to reduce the loss of time and movement amount.
 また、本実施の形態において、回転体62の進行方向に対するカメラ66と変位センサ68との位置関係を調整する調整機構として回転体62を回転させる回転機構64が用いられる。これにより、回転というシンプルな機構でカメラ66と変位センサ68との間の位置関係を調整することができるため、容易に調整することができる。 In the present embodiment, a rotating mechanism 64 that rotates the rotating body 62 is used as an adjusting mechanism that adjusts the positional relationship between the camera 66 and the displacement sensor 68 with respect to the traveling direction of the rotating body 62. Thus, the positional relationship between the camera 66 and the displacement sensor 68 can be adjusted by a simple mechanism called rotation, and thus can be easily adjusted.
 また、本実施の形態において、図6に示すように、一の計測部分に対して複数の計測位置が設定されており、一の計測部分の位置を特定することで、対応する複数の計測位置の各々が特定される。これにより、撮像回数を減らすことができ、その結果、全体の計測時間を短くすることができる。 Further, in the present embodiment, as shown in FIG. 6, a plurality of measurement positions are set for one measurement portion, and by specifying the position of one measurement portion, a plurality of measurement positions corresponding to the measurement position are specified. Are specified. Thereby, the number of times of imaging can be reduced, and as a result, the overall measurement time can be shortened.
 また、本実施の形態においては、基準経路が予め定められており、計測位置を特定する度に修正される。そのため、基準経路が予め定められていない場合に比べて、計測システム全体の処理を簡略化することができ、その結果、計測システムにおける処理負担を軽減することができる。 In addition, in the present embodiment, the reference route is predetermined, and is corrected each time the measurement position is specified. Therefore, the processing of the entire measurement system can be simplified as compared with the case where the reference route is not predetermined, and as a result, the processing load on the measurement system can be reduced.
 また、本実施の形態においては、回転機構64の変位量(回転移動データ194)のみ修正される。そのため、修正対象が少なく、計測システム全体の処理を簡略化することができ、その結果、計測システムにおける処理負担を軽減することができる。 In the present embodiment, only the displacement amount (rotational movement data 194) of the rotation mechanism 64 is corrected. Therefore, the number of correction targets is small, and the processing of the entire measurement system can be simplified. As a result, the processing load on the measurement system can be reduced.
 また、本実施の形態においては、位置ずれ量ΔPが、予め定められた許容値を超えているか否かを判定し、判定結果がユーザに通知される。そのため、基準位置に対する計測部分の位置ずれが大きく、基準経路の修正量が多くなるような場合にユーザに通知することができ、ユーザフレンドリーな計測システムを提供することができる。 Also, in the present embodiment, it is determined whether or not the positional deviation amount ΔP exceeds a predetermined allowable value, and the determination result is notified to the user. Therefore, it is possible to notify the user when the displacement of the measurement portion with respect to the reference position is large and the amount of correction of the reference route is large, thereby providing a user-friendly measurement system.
 <K.変位センサの計測範囲を通過させる方法の変形例>
 本実施の形態においては、回転移動データ194と並進移動データ192とのうち、並進移動データ192のみを修正することで、計測位置上を変位センサ68の計測範囲が通過するようにした。なお、回転移動データ194と並進移動データ192とのうち、いずれのデータも修正するようにしてもよく、また、並進移動データ192のみを修正するようにしてもよい。
<K. Modification of Method for Passing Through Measurement Range of Displacement Sensor>
In the present embodiment, of the rotation movement data 194 and the translation movement data 192, only the translation movement data 192 is corrected so that the measurement range of the displacement sensor 68 passes over the measurement position. Note that any of the rotation movement data 194 and the translation movement data 192 may be corrected, or only the translation movement data 192 may be corrected.
 また、本実施の形態において、軌道修正部168は、移動量算出部166が求めた並進移動量(ΔX,ΔY)に達するまでに回転移動量(Δθ)に達するように回転移動データ194を修正するとした。なお、修正方法としては、並進移動量に達するまでの時間を調整するようにしてもよく、または、回転移動量に達するまでの時間を調整するようにしてもよい。 In the present embodiment, the trajectory correction unit 168 corrects the rotation movement data 194 so that the rotation movement data (Δθ) reaches the translation movement amount (ΔX, ΔY) calculated by the movement amount calculation unit 166. I did. In addition, as a correction method, the time until the translation amount is reached may be adjusted, or the time until the rotation amount may be adjusted.
 また、本実施の形態においては、予め基準経路を設定し、カメラ66により撮像した画像に基づいて計測位置を特定し、適宜基準経路を修正することで計測位置上を変位センサ68の計測範囲が通過するようにした。なお、基準経路を予め設定しなくともよい。具体的には、計測部分の特徴画像を設定し、特徴画像を探索するように移動機構8および回転機構64を制御し、特徴画像がカメラ66の撮像視野に位置する度に、計測位置を特定するとともに特定した計測位置上を変位センサ68の計測範囲が通過するような軌道を生成してもよい。 Further, in the present embodiment, the measurement range of the displacement sensor 68 is set on the measurement position by setting a reference route in advance, specifying the measurement position based on the image captured by the camera 66, and appropriately correcting the reference route. I let it pass. Note that the reference route need not be set in advance. Specifically, the characteristic image of the measurement part is set, the moving mechanism 8 and the rotating mechanism 64 are controlled so as to search for the characteristic image, and the measurement position is specified each time the characteristic image is located in the field of view of the camera 66. Alternatively, a trajectory may be generated such that the measurement range of the displacement sensor 68 passes over the specified measurement position.
 <L.計測システム1の変形例>
 図14~図17は、変形例に係る計測システムを示す図である。図14に示される計測システム1bは、図2に示す計測システム1と比較して、計測装置6とワークWとの間の相対位置がロボット52により変化される点で異なる。ロボット52はロボットコントローラ50により制御され、ロボットコントローラ50は、PLC100からの指示に従ってロボット52を制御する。
<L. Modification of Measurement System 1>
14 to 17 are diagrams showing a measurement system according to a modification. The measurement system 1b shown in FIG. 14 differs from the measurement system 1 shown in FIG. 2 in that the relative position between the measurement device 6 and the work W is changed by the robot 52. The robot 52 is controlled by a robot controller 50, and the robot controller 50 controls the robot 52 according to an instruction from the PLC 100.
 また、計測装置6とワークWとの間の相対位置をロボット52により変化させる方法としては、図14に示すようにワークWを固定して計測装置6をロボット52により動かす方法と、図15に示すように計測装置6を固定し、ワークWをロボット52により動かす方法とが挙げられる。 As a method of changing the relative position between the measuring device 6 and the work W by the robot 52, a method of fixing the work W and moving the measuring device 6 by the robot 52 as shown in FIG. As shown, there is a method in which the measuring device 6 is fixed and the work W is moved by the robot 52.
 また、図16に示すように、計測装置6とワークWとの間の相対位置を変化させる方法としては、計測装置6をロボット52により動かすともに、ワークWを回転テーブル91の上に載置してもよい。すなわち、計測装置6とワークWとの双方を動かすことで計測装置6とワークWとの間の相対位置を変化させてもよい。回転テーブル91は、ロボットコントローラ50の指示に応じて回転する。これにより、ワークWと計測装置6との間の相対位置を容易に変更することができる。 As shown in FIG. 16, as a method of changing the relative position between the measuring device 6 and the work W, the measuring device 6 is moved by the robot 52 and the work W is placed on the turntable 91. You may. That is, the relative position between the measuring device 6 and the work W may be changed by moving both the measuring device 6 and the work W. The rotary table 91 rotates according to an instruction from the robot controller 50. Thereby, the relative position between the workpiece W and the measuring device 6 can be easily changed.
 なお、ロボット52は、垂直多関節ロボット以外のロボットであってもよい。たとえば、図17に示すように、直交ロボット52aであってもよい。また、水平多関節ロボットなど、他のロボットであってもよい。 The robot 52 may be a robot other than the vertical articulated robot. For example, as shown in FIG. 17, an orthogonal robot 52a may be used. Further, another robot such as a horizontal articulated robot may be used.
 <M.調整機構の変形例>
 図18は、変形例に係る調整機構を説明するための図である。本実施の形態においては、計測装置6の進行方向に対する変位センサ68とカメラ66との位置関係を回転機構64により調整する例を示した。たとえば、図18に示すように、回転体62bの回転中心に変位センサ68bを設置し、変位センサ68bの周囲に複数のカメラ66bを配置し、進行方向に合わせて複数のカメラ66bのうちの一のカメラ66bで撮像することで、変位センサ68bよりも先に計測部分をカメラ66bで撮像することができるようにしてもよい。なお、カメラを回転体の中心に設置し、変位センサを複数設けるようにしてもよい。
<M. Modification of adjustment mechanism>
FIG. 18 is a diagram illustrating an adjustment mechanism according to a modification. In the present embodiment, an example in which the positional relationship between the displacement sensor 68 and the camera 66 with respect to the traveling direction of the measuring device 6 is adjusted by the rotation mechanism 64 has been described. For example, as shown in FIG. 18, a displacement sensor 68b is installed at the rotation center of the rotating body 62b, a plurality of cameras 66b are arranged around the displacement sensor 68b, and one of the plurality of cameras 66b is arranged in accordance with the traveling direction. By taking an image with the camera 66b, the measurement portion may be taken with the camera 66b before the displacement sensor 68b. The camera may be installed at the center of the rotating body, and a plurality of displacement sensors may be provided.
 また、複数の変位センサまたは複数のカメラから一の変位センサまたはカメラを選択して利用する方法として、機械的に切り替えだけでなく、光学的に切り替えるようにしてもよい。 As a method of selecting and using one displacement sensor or camera from a plurality of displacement sensors or a plurality of cameras, not only mechanical switching but also optical switching may be used.
 <N.センサの変形例>
 本実施の形態においては、センサとして指定された計測点を計測する変位センサ68を一例に挙げた。なお、センサは、指定されたライン上の任意の計測点を計測する変位センサであってもよく、また、計測位置を特定するための画像を撮像する撮像部よりも計測範囲の狭いものであれば、画像センサであってもよい。たとえば、画像センサは、撮像部に比べて狭視野高解像度の画像センサである。また、センサは、外観を検査するためのセンサに限らず、温度センサや、硬度計、あるいは超音波センサなどであってもよい。
<N. Modified example of sensor>
In the present embodiment, the displacement sensor 68 that measures a measurement point designated as a sensor has been described as an example. Note that the sensor may be a displacement sensor that measures an arbitrary measurement point on a specified line, or a sensor that has a smaller measurement range than an imaging unit that captures an image for specifying a measurement position. If it is, an image sensor may be used. For example, the image sensor is an image sensor having a narrower visual field and a higher resolution than the imaging unit. Further, the sensor is not limited to a sensor for inspecting the appearance, but may be a temperature sensor, a hardness meter, an ultrasonic sensor, or the like.
 <O.その他の利用例>
 また、本実施の形態における計測システムは、一のワークが計測対象として設定されており、ワーク上に複数の計測部分が設定されており、設定された計測部分を順次撮像、計測するシステムである。なお、一のワークが計測対象とする例を挙げたが、複数のワークの集合を計測対象とし、複数のワークの集合からなる計測対象に対して複数の計測部分を設定してもよい。より具体的には、複数のワークの各々が予め定められた位置に配置された計測対象について、各ワークが配置される位置を計測部分として設定し、ワーク自体を特徴画像としてもよい。配置された各ワークの位置および姿勢は、各ワークで異なることがあるものの、撮像部でワークの位置および姿勢を特定し、特定した位置および姿勢に応じてセンサの位置を調整することができる。
<O. Other Usage Examples>
The measurement system according to the present embodiment is a system in which one work is set as a measurement target, a plurality of measurement parts are set on the work, and the set measurement parts are sequentially imaged and measured. . Although an example has been described in which one work is set as a measurement target, a set of a plurality of works may be set as a measurement target, and a plurality of measurement portions may be set for a measurement target including a set of a plurality of works. More specifically, for a measurement target in which each of a plurality of works is arranged at a predetermined position, the position where each work is arranged may be set as a measurement portion, and the work itself may be used as a feature image. Although the position and orientation of each of the arranged works may be different for each work, the position and orientation of the work can be specified by the imaging unit, and the position of the sensor can be adjusted according to the specified position and orientation.
 また、本実施の形態における計測システムは、計測位置が予め定められているものとしたが、計測部分のみ予め定めておき、予め定められた計測条件を満たす位置を撮像部により撮像された画像に基づいて特定し、計測条件を満たす位置を計測位置に設定してもよい。たとえば、撮像部により撮像された画像に基づいて、低い精度で外観検査を行ない、外観検査によりピックアップされた位置を計測位置とし、センサにより高い精度で外観検査を行なうようにしてもよい。より具体的には、カメラにより傷や凹みなどを検出し、傷やや凹みの位置を特定した上で、特定した位置の傷や凹みの深さを変位センサにより検出して、検出した深さが検査基準を満たすか否かを判定するアプリケーションとして、計測システムが提供されてもよい。このような計測システムにおいては、正確に欠陥か否かの判定を行なうことができる。 Further, in the measurement system according to the present embodiment, the measurement position is determined in advance, but only the measurement portion is determined in advance, and a position that satisfies the predetermined measurement condition is set to an image captured by the imaging unit. A position that satisfies the measurement condition and may be set as the measurement position. For example, the appearance inspection may be performed with low accuracy based on the image captured by the imaging unit, the position picked up by the appearance inspection may be set as the measurement position, and the appearance inspection may be performed with high accuracy using the sensor. More specifically, a scratch or dent is detected by a camera, the position of the scratch or dent is specified, and then the depth of the scratch or dent at the specified position is detected by a displacement sensor. A measurement system may be provided as an application for determining whether or not the inspection criterion is satisfied. In such a measurement system, it is possible to accurately determine whether or not a defect exists.
 §3 付記
 以上のように、本実施の形態および変形例は以下のような技術思想を開示する。
§3 Supplement As described above, the present embodiment and modifications disclose the following technical ideas.
 <構成1>
 複数の計測部分の各々を計測するための計測システム(1,1a,1b)であって、
 撮像部(66,66a,66b)と、
 センサ(68,68a,68b)と、
 前記撮像部および前記センサが配置されるベース部(64,64a)と、
 前記ベース部と計測対象との間の相対位置を変化させる変化機構(8,8a)と、
 前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整する調整機構(64,64a)と、
 前記撮像部により撮像された前記計測部分の画像に基づいて、前記センサにより計測する計測位置を決定する位置決定手段(14,44,144,146)と、
 前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記複数の計測部分の各々を前記撮像部の撮像視野を通過させるとともに、前記複数の計測部分の各々について前記位置決定手段により決定された前記計測位置が前記センサの計測範囲を通過するように、前記変化機構および前記調整機構を制御する制御手段(174)とを備える、計測システム。
<Configuration 1>
A measurement system (1, 1a, 1b) for measuring each of a plurality of measurement portions,
Imaging units (66, 66a, 66b);
Sensors (68, 68a, 68b);
A base unit (64, 64a) on which the imaging unit and the sensor are arranged;
A change mechanism (8, 8a) for changing a relative position between the base portion and the measurement target;
An adjustment mechanism (64, 64a) for adjusting a positional relationship between the imaging unit and the sensor with respect to a traveling direction of the base unit;
Position determination means (14, 44, 144, 146) for determining a measurement position to be measured by the sensor based on an image of the measurement portion captured by the imaging unit;
While allowing each of the plurality of measurement portions to pass through the imaging field of view of the imaging portion while the position of the imaging portion with respect to the traveling direction of the base portion is in front of the sensor, the A measurement system comprising: control means (174) for controlling the change mechanism and the adjustment mechanism such that the measurement position determined by the position determination means passes through the measurement range of the sensor.
 <構成2>
 前記調整機構は、前記ベース部を回転させる回転機構(64)である、構成1に記載の計測システム。
<Configuration 2>
The measurement system according to configuration 1, wherein the adjustment mechanism is a rotation mechanism (64) that rotates the base unit.
 <構成3>
 前記複数の計測部分のうちの少なくとも一の計測部分について、前記計測部分を撮像して得られる画像特徴の位置に対して、複数の前記計測位置が予め定められており、
 前記位置決定手段は、前記計測部分の画像に基づいて前記画像特徴の位置を特定することで、前記画像特徴の位置に対する複数の前記計測位置の各々を決定する、構成1または構成2に記載の計測システム。
<Configuration 3>
For at least one measurement portion of the plurality of measurement portions, a plurality of measurement positions are predetermined with respect to a position of an image feature obtained by imaging the measurement portion,
The configuration according to configuration 1 or 2, wherein the position determining unit determines each of the plurality of measurement positions with respect to the position of the image feature by specifying a position of the image feature based on an image of the measurement portion. Measurement system.
 <構成4>
 前記センサは、変位センサ(68)である、構成1~構成3のうちいずれか1項に記載の計測システム。
<Configuration 4>
The measurement system according to any one of Configurations 1 to 3, wherein the sensor is a displacement sensor (68).
 <構成5>
 前記変化機構の変位、および当該変化機構の変位に対応付けられた前記調整機構の変位からなる基準経路が予め定められており、
 前記制御手段は、前記基準経路に沿って前記変化機構および前記調整機構を制御することで前記複数の計測部分の各々が前記撮像部の撮像視野を通過させるようにするとともに、前記複数の計測部分の各々については、前記位置決定手段により決定された前記計測位置が前記センサの計測範囲を通過するように前記基準経路を修正する(168)、構成1~構成4のうちいずれか1項に記載の計測システム。
<Configuration 5>
A reference path including the displacement of the change mechanism and the displacement of the adjustment mechanism associated with the displacement of the change mechanism is predetermined,
The control unit controls the change mechanism and the adjustment mechanism along the reference path so that each of the plurality of measurement portions passes through the imaging field of view of the imaging unit, and the plurality of measurement portions In each of (1) and (2), the reference path is corrected so that the measurement position determined by the position determination unit passes through the measurement range of the sensor (168). Measurement system.
 <構成6>
 前記制御手段は、前記複数の計測部分の各々については、前記基準経路のうちの前記変化機構の変位を修正することなく前記調整機構の変位を修正する、構成5に記載の計測システム。
<Configuration 6>
The measurement system according to configuration 5, wherein the control unit corrects a displacement of the adjustment mechanism without correcting a displacement of the change mechanism in the reference path for each of the plurality of measurement portions.
 <構成7>
 前記位置決定手段は、前記計測部分の画像に基づいて、前記基準経路に応じて定められる基準位置に対する前記計測部分の位置ずれ値を取得する取得手段(144)をさらに含み、
 前記取得手段により取得された前記位置ずれ値が、予め定められた許容値を超えているか否かを判定する判定手段(176)と、
 前記判定手段の判定結果をユーザに通知する通知手段(178)とをさらに備える、構成5または構成6に記載の計測システム。
<Configuration 7>
The position determination unit further includes an acquisition unit (144) that acquires a displacement value of the measurement portion with respect to a reference position determined according to the reference route, based on an image of the measurement portion,
Determining means (176) for determining whether or not the displacement value obtained by the obtaining means exceeds a predetermined allowable value;
7. The measurement system according to configuration 5 or 6, further comprising a notification unit (178) for notifying a user of a determination result of the determination unit.
 <構成8>
 複数の計測部分の各々を計測するための計測方法であって、
 撮像部(66,66a,66b)とセンサ(68,68a,68b)とがベース部(64,64a)に配置されているとともに、前記ベース部と計測対象との相対位置を変化可能であり、前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整可能に構成されており、
 前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記計測部分が前記撮像部の撮像視野を通過する第1のステップ(S2)と、
 前記第1のステップにおいて前記計測部分が前記撮像視野を通過するときに得られる前記計測部分の画像に基づいて、前記センサにより計測する計測位置を決定する第2のステップ(S4)と、
 前記第2のステップにおいて決定された前記計測位置が前記センサの計測範囲を通過する第3のステップ(S6)とを備え、
 前記複数の計測部分の各々に対して前記第1のステップから前記第3のステップまでのステップを行う、計測方法。
<Configuration 8>
A measurement method for measuring each of a plurality of measurement portions,
The imaging section (66, 66a, 66b) and the sensor (68, 68a, 68b) are arranged on the base section (64, 64a), and the relative position between the base section and the measurement target can be changed. It is configured to be able to adjust the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit,
A first step (S2) in which the measurement section passes through the imaging field of view of the imaging section while the position of the imaging section with respect to the traveling direction of the base section is in front of the sensor;
A second step (S4) of determining a measurement position to be measured by the sensor based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view in the first step;
A third step (S6) in which the measurement position determined in the second step passes through a measurement range of the sensor.
A measurement method, comprising: performing the steps from the first step to the third step on each of the plurality of measurement portions.
 <構成9>
 複数の計測部分の各々を計測するための計測プログラム(140)であって、
 撮像部(66,66a,66b)とセンサ(68,68a,68b)とがベース部(64,64a)に配置されているとともに、前記ベース部と計測対象との相対位置を変化機構(8,8a)により変化可能であり、前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整機構(64,64a)により調整可能に構成されており、
 前記計測プログラムは、コンピュータに、
 前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記計測部分が前記撮像部の撮像視野を通過するように前記変化機構および前記調整機構を制御する第1のステップ(S1~S3)と、
 前記第1のステップにおいて前記撮像視野を前記計測部分が通過するときに得られる前記計測部分の画像に基づいて決定される前記センサにより計測する計測位置が前記センサの計測範囲を通過するように前記変化機構および前記調整機構を制御する第2ステップ(S1,S4~S6)とを、前記複数の計測部分の各々に対して実行させる、計測プログラム。
<Configuration 9>
A measurement program (140) for measuring each of the plurality of measurement portions,
An imaging section (66, 66a, 66b) and a sensor (68, 68a, 68b) are arranged on a base section (64, 64a), and a relative position between the base section and a measurement target is changed by a mechanism (8, 8a), and the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit can be adjusted by an adjustment mechanism (64, 64a).
The measurement program is a computer,
A first control unit that controls the change mechanism and the adjustment mechanism such that the measurement unit passes through the imaging field of view of the imaging unit while the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor. Steps (S1 to S3),
In the first step, the measurement position measured by the sensor determined based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view passes through a measurement range of the sensor. A measurement program for causing a second step (S1, S4 to S6) of controlling a change mechanism and the adjustment mechanism to be executed for each of the plurality of measurement portions.
 今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。 実 施 The embodiments disclosed this time are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
 1,1a,1b 計測システム、6 計測装置、8 移動機構、8a 変化機構、12 撮像条件判定部、14 位置決定手段、17 制御手段、42 撮像制御部、44 位置・姿勢計測部、46 モデル画像データ、50 ロボットコントローラ、52 ロボット、52a 直交ロボット、61 投光部、62,62b 回転体、62a ベース部、63 受光部、64 回転機構、64a 調整機構、66,66b カメラ、66a 撮像部、68,68b 変位センサ、68a センサ、70 設定装置、71,232,432 表示部、72 記憶部、73 計測位置決定部、74 モデル画像生成部、75 経路生成部、76 移動量決定部、77 撮像条件決定部、78 位置・姿勢情報生成部、79 計測条件決定部、82X Xステージ、82Y Yステージ、84X,84Y サーボモータ、91 回転テーブル、100 PLC、112 チップセット、114,202,402 プロセッサ、116 不揮発性メモリ、118 主メモリ、120 システムクロック、122,222,422 メモリカードインターフェイス、124,236,436 メモリカード、126 内部バス、128,220,420 通信インターフェイス、130 内部バスコントローラ、132 制御回路、134 内部バス制御回路、136 バッファメモリ、138 フィールドバスコントローラ、140 ユーザプログラム、142 位置・姿勢取得部、144 位置ずれ量算出部、146 計測位置算出部、162 計測ポイント算出部、164 回転角度算出部、166 移動量算出部、168 軌道修正部、170 計測条件修正部、172 計測条件判定部、174 目標移動量指定部、176 判定部、178 通知部、182 撮像条件データ、184 位置・姿勢データ、186 計測位置データ、190 経路データ、192 並進移動データ、194 回転移動データ、196 計測条件データ、200 コントローラ、210,410 I/Oコントローラ、204,404 RAM、206,406 表示コントローラ、208,408 システムコントローラ、212,412 ハードディスク、214 センサインターフェイス、216,416 入力インターフェイス、218,418 コントローラインターフェイス、234,434 キーボード、240 計測プログラム、300,500X,500Y サーボドライバ、400 画像処理装置、414 カメラインターフェイス、440 画像処理プログラム、442 プロジェクトファイル、500 ドライバユニット、W ワーク。 1, 1a, 1b measuring system, 6 measuring device, 8 moving mechanism, 8a changing mechanism, 12 imaging condition determining section, 14 position determining means, 17 controlling means, 42 imaging control section, 44 position / posture measuring section, 46 model image Data, 50 robot controller, 52 robot, 52a orthogonal robot, 61 projection unit, 62, 62b rotating body, 62 、 base unit, 63 部 light receiving unit, 64 rotation mechanism, 64a adjustment mechanism, 66, 66b camera, 66a imaging unit, 68 , 68b displacement sensor, 68a sensor, 70 setting device, 71, 232, 432 display unit, 72 storage unit, 73 measurement position determination unit, 74 model image generation unit, 75 path generation unit, 76 movement amount determination unit, 77 imaging condition Determining unit, 78 ° position / posture information generating unit, 79 ° measuring condition determining unit, 8 X X stage, 82Y Y stage, 84X, 84Y servo motor, 91 rotary table, 100 PLC, 112 chipset, 114,202,402 processor, 116 nonvolatile memory, 118 main memory, 120 system clock, 122,222,422 Memory card interface, 124, 236, 436 memory card, 126 internal bus, 128, 220, 420 communication interface, 130 internal bus controller, 132 control circuit, 134 internal bus control circuit, 136 buffer memory, 138 field bus controller, 140 user Program, 142 ° position / posture acquisition section, 144 ° position shift amount calculation section, 146 ° measurement position calculation section, 162 ° measurement point calculation section, 164 ° rotation angle Output unit, 166 movement amount calculation unit, 168 trajectory correction unit, 170 measurement condition correction unit, 172 measurement condition determination unit, 174 target movement amount designation unit, 176 determination unit, 178 notification unit, 182 imaging condition data, 184 position / posture Data, 186 measurement position data, 190 path data, 192 translation data, 194 rotation data, 196 measurement condition data, 200 controller, 210, 410 I / O controller, 204, 404 RAM, 206, 406 display controller, 208, 408 system controller, 212,412 hard disk, 214 sensor interface, 216,416 input interface, 218,418 controller interface, 234,434 keyboard, 240 measurement system Gram, 300, 500X, 500Y servo driver, 400 image processing device, 414 camera interface, 440 image processing program, 442 project file, 500 driver unit, W work.

Claims (9)

  1.  複数の計測部分の各々を計測するための計測システムであって、
     撮像部と、
     センサと、
     前記撮像部および前記センサが配置されるベース部と、
     前記ベース部と計測対象との間の相対位置を変化させる変化機構と、
     前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整する調整機構と、
     前記撮像部により撮像された前記計測部分の画像に基づいて、前記センサにより計測する計測位置を決定する位置決定手段と、
     前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記複数の計測部分の各々を前記撮像部の撮像視野を通過させるとともに、前記複数の計測部分の各々について前記位置決定手段により決定された前記計測位置が前記センサの計測範囲を通過するように、前記変化機構および前記調整機構を制御する制御手段とを備える、計測システム。
    A measurement system for measuring each of the plurality of measurement parts,
    An imaging unit;
    Sensors and
    A base unit on which the imaging unit and the sensor are arranged;
    A change mechanism that changes a relative position between the base unit and the measurement target,
    An adjustment mechanism that adjusts a positional relationship between the imaging unit and the sensor with respect to a traveling direction of the base unit;
    Position determining means for determining a measurement position to be measured by the sensor, based on an image of the measurement portion captured by the imaging unit,
    While allowing each of the plurality of measurement portions to pass through the imaging field of view of the imaging portion while the position of the imaging portion with respect to the traveling direction of the base portion is in front of the sensor, the A measurement system comprising: control means for controlling the change mechanism and the adjustment mechanism such that the measurement position determined by the position determination means passes through the measurement range of the sensor.
  2.  前記調整機構は、前記ベース部を回転させる回転機構である、請求項1に記載の計測システム。 The measurement system according to claim 1, wherein the adjustment mechanism is a rotation mechanism that rotates the base.
  3.  前記複数の計測部分のうちの少なくとも一の計測部分について、前記計測部分を撮像して得られる画像特徴の位置に対して、複数の前記計測位置が予め定められており、
     前記位置決定手段は、前記計測部分の画像に基づいて前記画像特徴の位置を特定することで、前記画像特徴の位置に対する複数の前記計測位置の各々を決定する、請求項1または請求項2に記載の計測システム。
    For at least one measurement portion of the plurality of measurement portions, a plurality of measurement positions are predetermined with respect to a position of an image feature obtained by imaging the measurement portion,
    3. The method according to claim 1, wherein the position determining unit determines each of the plurality of measurement positions with respect to the position of the image feature by specifying a position of the image feature based on an image of the measurement portion. 4. The described measurement system.
  4.  前記センサは、変位センサである、請求項1~請求項3のうちいずれか1項に記載の計測システム。 (4) The measurement system according to any one of (1) to (3), wherein the sensor is a displacement sensor.
  5.  前記変化機構の変位、および当該変化機構の変位に対応付けられた前記調整機構の変位からなる基準経路が予め定められており、
     前記制御手段は、前記基準経路に沿って前記変化機構および前記調整機構を制御することで前記複数の計測部分の各々が前記撮像部の撮像視野を通過させるようにするとともに、前記複数の計測部分の各々については、前記位置決定手段により決定された前記計測位置が前記センサの計測範囲を通過するように前記基準経路を修正する、請求項1~請求項4のうちいずれか1項に記載の計測システム。
    A reference path including the displacement of the change mechanism and the displacement of the adjustment mechanism associated with the displacement of the change mechanism is predetermined,
    The control unit controls the change mechanism and the adjustment mechanism along the reference path so that each of the plurality of measurement portions passes through the imaging field of view of the imaging unit, and the plurality of measurement portions The method according to any one of claims 1 to 4, wherein the reference path is corrected such that the measurement position determined by the position determination unit passes through a measurement range of the sensor. Measurement system.
  6.  前記制御手段は、前記複数の計測部分の各々については、前記基準経路のうちの前記変化機構の変位を修正することなく前記調整機構の変位を修正する、請求項5に記載の計測システム。 6. The measurement system according to claim 5, wherein, for each of the plurality of measurement portions, the control unit corrects a displacement of the adjustment mechanism without correcting a displacement of the change mechanism in the reference path. 7.
  7.  前記位置決定手段は、前記計測部分の画像に基づいて、前記基準経路に応じて定められる基準位置に対する前記計測部分の位置ずれ値を取得する取得手段をさらに含み、
     前記取得手段により取得された前記位置ずれ値が、予め定められた許容値を超えているか否かを判定する判定手段と、
     前記判定手段の判定結果をユーザに通知する通知手段とをさらに備える、請求項5または請求項6に記載の計測システム。
    The position determination unit further includes an acquisition unit configured to acquire a displacement value of the measurement portion with respect to a reference position determined according to the reference route, based on the image of the measurement portion,
    Determining means for determining whether the displacement value acquired by the acquiring means is greater than a predetermined allowable value,
    The measurement system according to claim 5, further comprising: a notification unit configured to notify a user of a determination result of the determination unit.
  8.  複数の計測部分の各々を計測するための計測方法であって、
     撮像部とセンサとがベース部に配置されているとともに、前記ベース部と計測対象との相対位置を変化可能であり、前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整可能に構成されており、
     前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記計測部分が前記撮像部の撮像視野を通過する第1のステップと、
     前記第1のステップにおいて前記計測部分が前記撮像視野を通過するときに得られる前記計測部分の画像に基づいて、前記センサにより計測する計測位置を決定する第2のステップと、
     前記第2のステップにおいて決定された前記計測位置が前記センサの計測範囲を通過する第3のステップとを備え、
     前記複数の計測部分の各々に対して前記第1のステップから前記第3のステップまでのステップを行う、計測方法。
    A measurement method for measuring each of a plurality of measurement portions,
    The imaging unit and the sensor are arranged on the base unit, and the relative position between the base unit and the measurement target can be changed, and the positional relationship between the imaging unit and the sensor with respect to the traveling direction of the base unit can be adjusted. It is composed of
    A first step in which the measurement section passes through the imaging field of view of the imaging section while the position of the imaging section with respect to the traveling direction of the base section is in front of the sensor;
    A second step of determining a measurement position to be measured by the sensor based on an image of the measurement part obtained when the measurement part passes through the imaging field of view in the first step;
    A third step in which the measurement position determined in the second step passes through a measurement range of the sensor,
    A measurement method, wherein the steps from the first step to the third step are performed on each of the plurality of measurement portions.
  9.  複数の計測部分の各々を計測するための計測プログラムであって、
     撮像部とセンサとがベース部に配置されているとともに、前記ベース部と計測対象との相対位置を変化機構により変化可能であり、前記ベース部の進行方向に対する前記撮像部および前記センサの位置関係を調整機構により調整可能に構成されており、
     前記計測プログラムは、コンピュータに、
     前記ベース部の進行方向に対する前記撮像部の位置が前記センサの前方となるようにしつつ前記計測部分が前記撮像部の撮像視野を通過するように前記変化機構および前記調整機構を制御する第1のステップと、
     前記第1のステップにおいて前記撮像視野を前記計測部分が通過するときに得られる前記計測部分の画像に基づいて決定される前記センサにより計測する計測位置が前記センサの計測範囲を通過するように前記変化機構および前記調整機構を制御する第2ステップとを、前記複数の計測部分の各々に対して実行させる、計測プログラム。
    A measurement program for measuring each of the plurality of measurement portions,
    The imaging unit and the sensor are arranged on the base unit, and a relative position between the base unit and the measurement target can be changed by a change mechanism, and a positional relationship between the imaging unit and the sensor with respect to a traveling direction of the base unit. Is configured to be adjustable by an adjustment mechanism,
    The measurement program is a computer,
    A first control unit that controls the change mechanism and the adjustment mechanism such that the measurement unit passes through an imaging field of view of the imaging unit while the position of the imaging unit with respect to the traveling direction of the base unit is in front of the sensor. Steps and
    In the first step, the measurement position measured by the sensor determined based on an image of the measurement portion obtained when the measurement portion passes through the imaging field of view passes through a measurement range of the sensor. And a second step of controlling the changing mechanism and the adjusting mechanism for each of the plurality of measurement portions.
PCT/JP2019/030740 2018-08-10 2019-08-05 Measurement system, measurement method, and measurement program WO2020031964A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018151978A JP7035902B2 (en) 2018-08-10 2018-08-10 Measurement system, measurement method, and measurement program
JP2018-151978 2018-08-10

Publications (1)

Publication Number Publication Date
WO2020031964A1 true WO2020031964A1 (en) 2020-02-13

Family

ID=69413741

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/030740 WO2020031964A1 (en) 2018-08-10 2019-08-05 Measurement system, measurement method, and measurement program

Country Status (2)

Country Link
JP (1) JP7035902B2 (en)
WO (1) WO2020031964A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03257354A (en) * 1990-03-08 1991-11-15 Mitsubishi Electric Corp Apparatus for inspecting solder printing
JPH04237310A (en) * 1991-01-21 1992-08-25 Nippon Telegr & Teleph Corp <Ntt> Three-dimensional positioning method
JP2016031368A (en) * 2014-07-25 2016-03-07 株式会社ミツトヨ Method for measuring high accuracy height map of test surface
JP2016514037A (en) * 2013-02-18 2016-05-19 ノードソン コーポレーションNordson Corporation Automatic position locator for height sensor in dispensing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03257354A (en) * 1990-03-08 1991-11-15 Mitsubishi Electric Corp Apparatus for inspecting solder printing
JPH04237310A (en) * 1991-01-21 1992-08-25 Nippon Telegr & Teleph Corp <Ntt> Three-dimensional positioning method
JP2016514037A (en) * 2013-02-18 2016-05-19 ノードソン コーポレーションNordson Corporation Automatic position locator for height sensor in dispensing system
JP2016031368A (en) * 2014-07-25 2016-03-07 株式会社ミツトヨ Method for measuring high accuracy height map of test surface

Also Published As

Publication number Publication date
JP2020027029A (en) 2020-02-20
JP7035902B2 (en) 2022-03-15

Similar Documents

Publication Publication Date Title
JP5911934B2 (en) Contour measurement device and robot system
JP5670416B2 (en) Robot system display device
JP6504274B2 (en) Three-dimensional shape data and texture information generation system, imaging control program, three-dimensional shape data and texture information generation method, and information recording medium
US20060025890A1 (en) Processing program generating device
JP2017528727A (en) Augmented reality camera used in combination with a 3D meter to generate a 3D image from a 2D camera image
KR20140008262A (en) Robot system, robot, robot control device, robot control method, and robot control program
JP2005201824A (en) Measuring device
JP2017118396A (en) Program, device and method for calculating internal parameter of depth camera
JP2005300230A (en) Measuring instrument
JP5388921B2 (en) Three-dimensional distance measuring apparatus and method
US20120224033A1 (en) Three-dimensional measurement method
JP2004257927A (en) Three-dimensional profile measuring system and method for measuring the same
JP2017033429A (en) Three-dimensional object inspection device
JP2019119027A (en) Method of controlling robot system, and robot system
JP2018001393A (en) Robot device, robot control method, program and recording medium
JP6973233B2 (en) Image processing system, image processing device and image processing program
CN109773589B (en) Method, device and equipment for online measurement and machining guidance of workpiece surface
JP2010207990A (en) Measuring system
JP2007033277A (en) Method of incorporating reference coordinate for three dimensional geometry measuring device
JP2010151697A (en) Apparatus and method for three-dimensional shape measurement
KR20130075712A (en) A laser-vision sensor and calibration method thereof
JP3081035B2 (en) 3D coordinate measuring device
JP5740649B2 (en) Image measuring apparatus, autofocus control method, and autofocus control program
JP7035902B2 (en) Measurement system, measurement method, and measurement program
JP2009264898A (en) Workpiece position/attitude measurement method and measuring device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19847683

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19847683

Country of ref document: EP

Kind code of ref document: A1