Code generation assistance device and code generation assistance program
The code generation assistance system addresses the challenge of processing shape data from multiple sensors by determining and correcting feature positions, ensuring accurate and efficient data integration and visualization.
Patent Information
- Application Number
- CN202510586447.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-02-28
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-15
AI Technical Summary
When measuring the measured object using multiple shape sensors, how to process each shape data to accurately reflect the shape of the object, especially when the measured object vibration is measured, it is difficult for the prior art to achieve effective data processing and appropriate execution of the measurement item.
Through code generation auxiliary devices and programs, the correction values corresponding to the position and posture of multiple shape sensors are determined, the characteristic positions of shape data are corrected, and text codes are generated to perform inspections of measurement items, support two-dimensional and three-dimensional displays, and display measurement elements and inspection results on the display screen.
The simplified measurement and setting operation of the shape data acquired by multiple shape sensors is realized, the vibration components can be removed, and accurate shape data display and inspection results can be provided, reducing the need for users to write independent programs.
Smart Images

Figure CN120315697A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a code generation assistance device and a code generation assistance program for assisting in the generation of codes for performing measurement processing on shape data obtained from a shape sensor that measures the shape of a measurement object. Background Art
[0002] For example, Patent Document 1 discloses a shape inspection device that irradiates a measurement object with slit light having an extension in the X-axis direction and generates contour data of the measurement object based on a light reception signal generated by receiving reflected light from the measurement object.
[0003] In the shape inspection device of Patent Document 1, contour data of a measurement object that moves relatively in the Y-axis direction is sequentially acquired, feature points are extracted for each contour data, and each contour data is corrected based on the positions of the extracted feature points to generate a height image.
[0004] By using a shape inspection device such as that of Patent Document 1, it is possible to perform an appearance inspection of a measurement object. When measuring and inspecting a measurement object using a shape inspection device, it is necessary to appropriately process the shape data. In order to appropriately process the shape data, it is considered to use a dedicated application software corresponding to the shape inspection device.
[0005] However, for example, in the case of combining multiple devices, etc., it is sometimes difficult to use dedicated application software. Therefore, for example, the user needs to create independent programs for each device involved in the combination, but it is not easy to create appropriate processing programs for each measurement content for shape data representing a three-dimensional shape.
[0006] In addition, in a shape inspection device such as that of Patent Document 1, vibration components of the measurement object are removed by correcting each contour data.
[0007] Here, since many measurement objects have a three-dimensional shape, it is easy to grasp the shape of the measurement object by measuring the measurement object from multiple directions not only with one shape sensor but with multiple shape sensors.
[0008] However, in the case where the measurement object is measured from multiple directions with multiple shape sensors, multiple shape data corresponding to the multiple shape sensors are obtained. Therefore, in the case where the measurement object vibrates, how to process each shape data becomes a problem, and depending on the situation, it may not be possible to obtain shape data that accurately reflects the shape of the measurement object.
[0009] Patent Document 1: Japanese Unexamined Patent Application Publication No. 2023-15886 Summary of the Invention
[0010] The present disclosure has been made in view of this, and an object thereof is to provide a code generation assistance device and a code generation assistance program that can easily and appropriately perform a measurement setting operation on shape data obtained from a plurality of shape sensors.
[0011] In order to achieve the above object, in one aspect of the present disclosure, a code generation assistance device for an inspection device is assumed. The code generation assistance device for the inspection device includes: a reception unit that receives shape data; a feature position determination unit that determines a feature position in a cross section of a plurality of shape data corresponding to each of a plurality of shape sensors corrected by a correction value corresponding to the position and orientation of each shape sensor based on the plurality of shape sensors; a feature position correction unit that performs a correction process of correcting each shape data of each cross section in a manner of correcting the feature position based on a series of feature positions along the cross section arrangement direction in the plurality of cross sections; a setting unit that sets one or more measurement elements and a measurement item using the one or more measurement elements; an execution unit that determines the one or more measurement elements set by the setting unit for each shape data corrected by the feature position correction unit, and executes an inspection of the measurement item using the one or more measurement elements set by the setting unit; a code generation unit that determines the one or more measurement elements for the shape data and generates a text code for executing an inspection of the measurement item using the one or more measurement elements; and a screen generation unit that generates a display screen, the display screen having a first display area that displays the shape data received by the reception unit in two dimensions and / or three dimensions and displays the one or more measurement elements on the shape data, and including a result display element indicating a result of the inspection executed by the execution unit.
[0012] According to this configuration, when each of the plurality of shape sensors acquires shape data, the feature position determination unit determines the feature position in the cross section of the plurality of shape data. Each shape data is corrected based on the determined feature position. Therefore, for example, when vibration or the like occurs in the measurement object, shape data from which the vibration component has been removed is obtained. The measurement elements are determined for the shape data and the inspection of the measurement item is executed. Since the code generation unit generates a text code for executing the inspection of the measurement item, the user does not need to create an independent program, and the measurement setting operation becomes easy.
[0013] In addition, the shape data can be displayed two-dimensionally and / or three-dimensionally, the measurement elements can be displayed on the shape data, and the result display element indicating the inspection result can also be displayed.
[0014] In addition, in other aspects of the present disclosure, it is also possible to assume a code generation assistance program. The code generation assistance program causes a computer to perform the following processes: a process of receiving shape data; a process of determining a feature position in a cross-section of a plurality of shape data corresponding to each shape sensor after correcting the position and orientation of each shape sensor based on a plurality of shape sensors with a corresponding correction value; a correction process of performing, based on a series of feature positions along the cross-section arrangement direction in a plurality of cross-sections, a correction of each shape data of each cross-section in a manner of correcting the feature position; a process of setting one or more measurement elements and measurement items using the one or more measurement elements; a process of determining the set one or more measurement elements for the corrected shape data and performing an inspection of the set measurement items using the one or more measurement elements; a process of determining the one or more measurement elements for the shape data and generating a text code for performing an inspection of the measurement items using the one or more measurement elements; and a process of generating a display screen having a first display area for displaying the received shape data in two-dimensional and / or three-dimensional and displaying the one or more measurement elements on the shape data, and including a result display element indicating the result of the performed inspection.
[0015] According to the technology of the present disclosure, it is possible to easily and appropriately perform a measurement setting operation for shape data obtained from a plurality of shape sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram for explaining the structures of the main measurement system and the sub-measurement system of the present embodiment.
[0017] Figure 2 is a diagram for explaining the relationship between a text code and a library.
[0018] Figure 3 is a block diagram showing the structure of the main measurement device.
[0019] Figure 4 is a flowchart showing the process from the input of shape data to the code generation process.
[0020] Figure 5 is a flowchart showing the operation process required for the user.
[0021] Figure 6 is a diagram showing an example of a screen displayed on the display unit in the first stage.
[0022] Figure 7 is a diagram showing an example of the installation state of a plurality of measurement heads.
[0023] Figure 8It is a diagram showing an example of an image composition screen.
[0024] Figure 9 It is a diagram showing an example of a connection setting screen.
[0025] Figure 10 It is a diagram showing an example of a calibration screen displayed during calibration.
[0026] Figure 11 It is a diagram showing an example of an image acquisition screen.
[0027] Figure 12 It is a diagram showing an example of an image composition setting screen.
[0028] Figure 13 It is a diagram showing an example of a main screen.
[0029] Figure 14 It is a diagram showing an example of a main screen with measurement elements and measurement items set.
[0030] Figure 15 It is a diagram showing an example of a vibration correction screen.
[0031] Figure 16 It is a diagram showing an example of a situation where a three-dimensional image is displayed.
[0032] Figure 17 It is a diagram explaining the calculation method of correction values.
[0033] Figure 18 It is a chart showing the relationship between shape data and vibration components.
[0034] Figure 19 It is a diagram showing an example of a display screen of correction parameters applied to vibration correction processing.
[0035] Figure 20 It is a diagram showing an example of a text code generation window.
[0036] Figure 21 It is a diagram showing an example of an information output window.
[0037] Figure 22 It is a diagram showing an example of a text code display window.
[0038] Figure 23 It is a flowchart showing the process of text code generation processing.
[0039] Figure 24 It is a block diagram showing the structure of the sub-measurement device. Detailed implementation
[0040] Hereinafter, embodiments of the present invention will be described in detail based on the drawings. In addition, the following description of the preferred embodiments is essentially only an example and is not intended to limit the present invention, its applications, or its uses. For example, the relative sizes and positional relationships of the components shown in the drawings are for illustrating one embodiment and do not limit the present invention.
[0041] The code generation assistance device according to an embodiment of the present invention is, for example, assembled in a measurement system that measures the shape of a measurement object W. In addition, the code generation assistance device is used to assist the setting operation of a measurement device included in another measurement system so that the shape of the measurement object W is measured in the other measurement system. In the description of the present embodiment, the measurement system including the structure of the code generation assistance device is referred to as the main measurement system, and the other measurement system including the assisted object (measurement device) of the setting operation is referred to as the sub-measurement system.
[0042] As Figure 1 shown, the main measurement system 1 according to the present embodiment can measure the shapes of, for example, a plurality of measurement objects W sequentially conveyed by a conveying device such as a belt conveyor, and can inspect the measurement objects W. The main measurement system 1 includes a measurement head 11 as an example of a shape sensor, a display unit 13, an operation unit 14, and a main measurement device 20. The shape sensor is not limited to the measurement head 11, and may be, for example, a three-dimensional profiler or a three-dimensional image sensor.
[0043] The measurement head 11 is arranged to face the measured surface of the measurement object W. The measurement head 11 has a light projecting unit and a light receiving unit (not shown). The light projecting unit of the measurement head 11 irradiates the measurement object W conveyed by the conveying device with a strip-shaped measurement light extending in one direction. The light receiving unit of the measurement head 11 receives the measurement light reflected by the measurement object W and outputs a light reception amount distribution. The light receiving unit of the measurement head 11 is connected to the main measurement device 20. In the main measurement device 20, shape data representing the three-dimensional shape of the measurement object W is generated based on the light reception amount distribution output from the measurement head 11.
[0044] The shape data representing the three-dimensional shape of the object W to be measured includes the planar position information according to a planar coordinate system predetermined for the measurement head 11 and the height information corresponding to each planar position in the planar coordinate system. The shape data representing the three-dimensional shape of the object W can also be composed of the XY coordinates of each point in a lattice-like point sequence arranged according to the planar position information in the planar coordinate system and the Z coordinate corresponding to each point sequence. Since the point sequences in the shape data representing the three-dimensional shape of the object W are arranged in a lattice pattern, they are arranged at equal intervals in the X direction and also at equal intervals in the Y direction. At this time, the interval in the X direction and the interval in the Y direction can be the same or different. In addition to the planar position information and the height information, the shape data representing the three-dimensional shape of the object W can also include brightness information corresponding to each planar position, etc.
[0045] The main measurement device 20 is an example of the code generation auxiliary device according to an embodiment of the present invention. The main measurement device 20 is constituted by, for example, a personal computer, and includes a receiving unit 21, a storage unit 22, and a control unit 23. The receiving unit 21 has, for example, various communication interfaces and memories, etc., and is a part that receives the shape data of the object W to be measured output from the measurement head 11. Specifically, the receiving unit 21 receives the light reception amount distribution output from the measurement head 11, and generates contour data based on the received light reception amount distribution, and temporarily stores the generated contour data.
[0046] The storage unit 22 is constituted by a recording medium such as a non-volatile memory, a hard disk, etc. The code generation auxiliary program according to the embodiment of the present invention is stored in the storage unit 22. The code generation auxiliary program is a program that generates and outputs setting auxiliary information for assisting various setting operations of the sub-measurement devices 20A, 20B,... described later.
[0047] Inspection data, etc. are also stored in the storage unit 22, for example. The inspection data includes, for example, text codes, libraries, reference images, calibration data, etc. The storage unit storing the inspection data and the storage unit storing the code generation auxiliary program may be different.
[0048] The control unit 23 includes, for example, a CPU (Central Processing Unit) 23a, a ROM (Read Only Memory) 23b, and a RAM (Random Access Memory) 23c, etc. The RAM 23c is used as a work area when the CPU 23a of the control unit 23 operates. For example, system programs are stored in the ROM 23b. The CPU 23a executes a code generation auxiliary program stored in the storage unit 22, and the personal computer performs multiple processes. That is, the code generation auxiliary program is a program for causing a computer to perform multiple processes. When the CPU 23a executes the code generation auxiliary program, various functional units for generating setting auxiliary information are implemented. In addition, the code generation auxiliary program may not be stored in the storage unit 22, but may be stored in the ROM 23b of the control unit 23. Additionally, the code generation auxiliary program may be provided, for example, in a state stored in a recording medium 29 such as a CD-ROM or a USB memory. In this case, the code generation auxiliary program stored in the recording medium 29 can be installed in the storage unit 22 or the ROM 23b for use. Moreover, the code generation auxiliary program may be installed in an external server. In this case, the external server can also be an element that forms part of the code generation auxiliary device.
[0049] The display unit 13 is constituted by, for example, an organic EL (Electro-Luminescence) panel, an LCD (Liquid Crystal Display) panel, etc. The display unit 13 is connected to the main measurement device 20. The display unit 13 may be included in the main measurement device 20 or may not be included in the main measurement device 20. Additionally, the operation unit 14 includes, for example, pointing devices such as a keyboard and a mouse. The operation unit 14 is constituted by devices operated by a user and is connected to the main measurement device 20. The main measurement device 20 detects the operation status of the operation unit 14 and reflects it in each process.
[0050] In Figure 1 multiple sub-measurement systems 1A, 1B,... are shown. Since the multiple sub-measurement systems 1A, 1B,... have the same structure, the structure of the sub-measurement system 1A will be described below.
[0051] The sub-measurement system 1A includes a measurement head 11 and a sub-measurement device 20A. The measurement head 11 of the sub-measurement system 1A has the same structure as the measurement head 11 of the main measurement system 1. The sub-measurement device 20A can be constituted by a personal computer similar to the main measurement device 20. In addition, the code generation auxiliary program is not stored in the storage unit of the sub-measurement device 20A.
[0052] The main measurement device 20 generates and outputs setting assistance information based on the user's operation by executing a code generation assistance program. In the sub-measurement device 20A, various settings related to the measurement of the measurement object W are made using the setting assistance information output from the main measurement device 20 of the main measurement system 1. In the sub-measurement device 20A after the settings using the setting assistance information, a predetermined measurement or inspection of the shape of the measurement object W is performed based on the shape data obtained from the measurement head 11.
[0053] The sub-measurement device 20A is connected to an external device 2A. The external device 2A is constituted by, for example, a PLC (Programmable Logic Controller) or the like. The measurement result or inspection result of the sub-measurement device 20A is sent to the external device 2A. Similarly to the sub-measurement device 20A, an external device 2B is also connected to the sub-measurement device 20B.
[0054] The setting assistance information generated by the main measurement device 20 includes a text code (source code), a library, reference shape data, and calibration data. The text code is data generated by the main measurement device 20 based on the user's operation. The library is, for example, data prepared in advance by the manufacturer of the main measurement device 20. The reference shape data is the shape data of the measurement object W mainly used when generating the text code in the main measurement device 20.
[0055] Here, based on Figure 2 A summary of the relationship between the text code and the library will be described. Figure 2 FIG. is a diagram for explaining the relationship between the text code and the library. The library includes a plurality of processing programs that can respectively appropriately perform a plurality of predetermined processes on the shape data of the measurement object W. The library can be provided, for example, in the form of a DLL (Dynamic Link Library) file. The plurality of processing programs of the library in this example include processing programs classified into three groups (the first group GR1, the second group GR2, and the third group GR3). In addition, since the text code can be easily changed by the user, for example, in order to perform an inspection, it is easy to combine and use a plurality of different types of measurement devices and image processing devices, etc.
[0056] The plurality of processing programs classified into the first group GR1 are used to respectively determine various parts of a plurality of geometric shapes according to the shape data of the measurement object W, and exist according to each type (geometric element) of the geometric shape. Geometric elements include, for example, points, lines, planes, and circles. In Figure 2 the example shown, there are listed "point determination processing programs", "line determination processing programs", and "plane determination processing programs", etc.
[0057] A plurality of handlers classified as the second group GR2 are used to perform various measurements on the shape of the measurement object W according to the shape data of the measurement object W, and exist according to the type (measurement item) of each measurement. Measurement items include, for example, height, flatness, area, distance, and angle, etc. In Figure 2 In the example shown, "height calculation handler", "flatness calculation handler", "area calculation handler", etc. are listed.
[0058] A plurality of handlers classified as the third group GR3 are used to perform position correction on the shape data of the measurement object W by various methods respectively, and exist according to each position correction method. The position correction method includes a correction method based on pattern matching. In Figure 2 In the example shown, "pattern matching handler" is listed. The position correction includes correction of the position in the plane coordinate system. In addition, the position correction may include correction of the rotational posture in the plane coordinate system in addition to the correction of the position in the plane coordinate system. In addition, the position correction may include correction of the position in the height coordinate system corresponding to the height information in addition to the correction of the position in the plane coordinate system. And the position correction may also include correction of the posture (three-dimensional posture) in the three-dimensional coordinate system including the plane coordinate system and the height coordinate system. In addition, the handler classified as the third group GR3 may be one.
[0059] The text code includes character information (handler information described later) indicating the handler that should be called from the library in order to determine one or more geometric elements or perform one or more measurements based on the shape data. This character information may also be information indicating a "function" required for the process of determining one or more geometric elements or performing one or more measurements.
[0060] In addition, the text code includes character information (designation information described later) indicating parameters, etc. required for determining one or more geometric elements or performing one or more measurements. This character information may also be information indicating an "argument" related to the above-mentioned "function" used for determining one or more geometric elements or performing one or more measurements. In Figure 2 In the example shown, as the character information i11, i12, i13, i14 included in the text code, "determination of plane", "information required for determination of plane", "calculation of height", and "information required for calculation of height" are shown.
[0061] According to the text code, by reading in character information i11 such as "Determination of Plane", the "Plane Determination Handler" can be selected and called from multiple handlers in the library. In addition, the desired plane portion of the measurement object W can be determined based on the called "Plane Determination Handler" and character information i12 including the content of "Information Required for Plane Determination".
[0062] Moreover, according to the text code, by reading in character information i13 such as "Calculation of Height", the "Height Calculation Handler" can be selected and called from multiple handlers in the library. In addition, based on the called "Height Calculation Handler" and character information i14 including the content of "Information Required for Height Calculation", the height of the desired portion of the measurement object W can be measured according to the shape data of the measurement object W.
[0063] Figure 3 is a block diagram of the main measurement device 20 of the main measurement system 1. The main measurement device 20 of the main measurement system 1 includes a screen generation unit 33, an execution unit 34, an output unit 35, a reception unit 36, a code generation unit 37, a measurement setting generation unit 38, a calibration data generation unit 39, a feature position determination unit 30A, and a feature position calibration unit 30. The screen generation unit 33, the execution unit 34, the output unit 35, the reception unit 36, the code generation unit 37, the measurement setting generation unit 38, the calibration data generation unit 39, the feature position determination unit 30A, and the feature position calibration unit 30B are implemented by the CPU 23a ( Figure 1 as shown) of the control unit 23 executing the code generation auxiliary program stored in the storage unit 22. When the code generation auxiliary program is composed of multiple program modules, the screen generation unit 33, the execution unit 34, the output unit 35, the reception unit 36, the code generation unit 37, the measurement setting generation unit 38, the calibration data generation unit 39, the feature position determination unit 30A, and the feature position calibration unit 30B can be respectively composed of a single program module or multiple program modules. Part or all of the screen generation unit 33, the execution unit 34, the output unit 35, the reception unit 36, the code generation unit 37, the measurement setting generation unit 38, the calibration data generation unit 39, the feature position determination unit 30A, and the feature position calibration unit 30B can be composed of hardware or a combination of hardware and software.
[0064] Figure 4It is a flowchart showing the process of the main measurement system 1 from the input of shape data to the execution of code generation processing. In step S1, the main measurement system 1 sequentially measures the shapes of a plurality of measurement objects W conveyed by a conveying device provided with an encoder, for example. That is, the receiving unit 21 of the main measurement system 1 can grasp the moving distance in the conveying direction of each measurement object W conveyed by the conveying device based on the output from the encoder of the conveying device. The receiving unit 21 receives the contour data (hereinafter, also referred to as shape data) output from the measurement head 11 of the shape sensor every time each measurement object W moves a predetermined distance (set pitch amount) based on the output from the encoder of the conveying device. This process of receiving shape data is executed by a computer through a code generation assistance program. The receiving unit 21 generates a height image based on the received plurality of contour data. Here, the height image is shape data in which each pixel two-dimensionally arranged on a reference plane has a height in the direction perpendicular to the reference plane as a pixel value. The height direction is preset with respect to the measurement head 11 of the shape sensor. Therefore, shape data such as contour data and height images are represented by the local coordinate system of each shape sensor. The height image generated by the receiving unit 21 is a composite object height image. This composite object height image is sent from the receiving unit 21 to the screen generation unit 33, the execution unit 34, and the output unit 35. In addition, the receiving unit 21 may generate point group data in which each point constituting the shape data has arbitrary three-dimensional space coordinates based on the received plurality of contour data.
[0065] In addition, the receiving unit 21 can receive, for example, contour data output from a three-dimensional profiler, contour data output from a three-dimensional image sensor, three-dimensional CAD data, etc. in addition to the contour data output from the measurement head 11 to generate a height image. The contour data output from the three-dimensional profiler, the contour data output from the three-dimensional image sensor, the three-dimensional CAD data, etc. are also included in the shape data.
[0066] Figure 5 It is a flowchart showing the operation process required of the user when the main measurement system 1 executes code generation processing from the input of shape data. In step S11, the user specifies the input source of the shape data and the input conditions of the shape data, etc. This is called the first stage.
[0067] In the first stage, the screen generation unit 33 generates Figure 6An input source specifying screen 500 as shown is displayed on the display unit 13. On the input source specifying screen 500, as buttons for specifying the input source of the shape data, a first button 501 for inputting the shape data output from the measuring head 11 and a second button 502 for inputting the shape data from a file stored in the storage unit 22 or the like are provided. When the user operates the first button 501, the receiving unit 21 inputs the shape data output from the measuring head 11. On the other hand, when the user operates the second button 502, the receiving unit 21 inputs the shape data from the file. This input process is the process executed in step S1 of the flowchart shown in Figure 4 shown.
[0068] In step S2, it is determined whether the main measurement system 1 performs position correction of the shape data. That is, for example, as shown in Figure 7 shown, when the columnar measurement object W is conveyed in the axial direction by the conveying device, the shape data of the measurement object W is sometimes measured by the first measurement head 11A of the shape sensor, the second measurement head 11B of the shape sensor, the third measurement head 11C of the shape sensor, and the fourth measurement head 11D of the shape sensor. The first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D are arranged at arbitrary intervals, for example, at equal intervals in the circumferential direction of the measurement object W so as to surround the periphery of the measurement object W. By setting it to such a state, the shape of the entire circumference of the measurement object W can be measured by the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D.
[0069] When measuring the measurement object W using a plurality of measurement heads 11A to 11D, it is necessary to correct the coordinate systems of the shape data corresponding to the respective measurement heads 11A to 11D. This process is a process of correcting the shape data corresponding to the respective measurement heads 11A to 11D according to the correction values corresponding to the position postures of the respective measurement heads 11A to 11D of the plurality of shape sensors so that the coordinate systems of the respective shape data are the same, and is executed by the computer through the code generation auxiliary program. The correction data generation unit 39 generates correction data corresponding to the postures in the height direction of each shape data, the orientation in the reference plane, and the common coordinates of each shape sensor corresponding to each shape data. In addition, the correction data generation unit 39 generates correction data in which the origin position of each shape data corresponds to the position in the common coordinates of each shape sensor corresponding to each shape data. The correction data generation unit 39 can generate not only the origin position and the orientation in the reference plane, but also correction data for processing shape data with different height directions in common coordinates. By synthesizing shape data with different height directions with each other, the entire circumference shape can be obtained from the contour data and the height image having only a single value in the height direction.
[0070] Specifically, inFigure 5 In step S12 of the flowchart shown, the user designates a correction method for the input shape data, etc. The operation stage of the user on the main measurement device 20 at this time is referred to as the second stage. When the first stage is completed, the second stage is entered.
[0071] In Figure 4 In step S2 of the flowchart shown, the main measurement system 1 determines whether a correction method for the shape data has been designated in the second stage. If no correction method for the shape data has been designated, step S3 is skipped and step S4 is entered. If a correction method for the shape data has been designated, step S3 is entered.
[0072] In step S3, the correction data generation unit 39 of the main measurement system 1 executes a correction setting process using a calibration tool. The correction data generation unit 39 corrects the shape data corresponding to each measurement head 11 based on correction values corresponding to the position and orientation of each measurement head 11 of the plurality of measurement heads 11, and uses the calibration tool during this correction.
[0073] Figure 8 An image synthesis screen 510 displayed on the display unit 13 is shown in the case of correcting the shape data corresponding to each of the measurement heads 11A to 11D using a calibration tool. The image synthesis screen 510 is generated by the screen generation unit 33 and displayed on the display unit 13.
[0074] On the image synthesis screen 510, there are provided a step display area 511 for displaying processing steps, a calibration file selection area 512, an image display area 513 for displaying measurement images, a contour display area 514, and a head number designation area 515 for designating the number of measurement heads 11 used for image synthesis.
[0075] In Figure 8 In the example shown, the process of selecting a calibration file is shown, so "File Selection" is emphasized and displayed in the step display area 511. In the calibration file selection area 512, the user can, by operating the operation unit 14, accept the operation of selecting a desired calibration file and opening the selected calibration file. The correction data generation unit 39 executes the process of opening the calibration file selected in the calibration file selection area 512.
[0076] The calibration file can be generated by executing a calibration tool. When executing the calibration tool, a calibration workpiece W1 in the shape of a regular hexagonal prism is prepared in such a way as to be displayed in the image display area 513, and a first measurement head 11A, a second measurement head 11B, a third measurement head 11C, and a fourth measurement head 11D of a plurality of shape sensors are arranged so as to surround the calibration workpiece W1. The arrangement positions of the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D are the arrangement positions during operation.
[0077] An image obtained by synthesizing the shape data measured by the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D is displayed in the contour display area 514. This image is generated by the correction data generation unit 39.
[0078] In the head number specification area 515, the user can operate the operation unit 14 to input the number of measurement heads 11 to be used when synthesizing the shape data. In this example, the shape data measured by 4 measurement heads 11, namely the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D, are synthesized, so "4" is input. The input number is acquired by the correction data generation unit 39.
[0079] Figure 9 Indicates the state of "Connection Setting" after entering "File Selection". When the user operates Figure 8 the next button 510a, it advances from "File Selection" to "Connection Setting". In the step display area 511, "Connection Setting" is highlighted. In the connection setting, the screen generation unit 33 generates a connection setting screen 516 and displays it on the display unit 13. In the connection setting screen 516, the 4 measurement heads 11A, 11B, 11C, 11D are represented by "A", "B", "C", "D" respectively. In the connection setting screen 516, it is possible to set the IP address, set the port number, and input connection information for each of the 4 measurement heads 11A, 11B, 11C, 11D respectively. In addition, in the connection setting screen 516, the setting angle can be input for each of the 4 measurement heads 11A, 11B, 11C, 11D. The correction data generation unit 39 acquires the information set in the connection setting screen 516.
[0080] Here, the generation process of the calibration file will be described. The generation process of the calibration file is Figure 5 the process in the second stage of step S12 shown. Figure 10FIG. is an example of a calibration screen 600 displayed when performing calibration. The calibration screen 600 is generated by a screen generation unit 33 and displayed on a display unit 13. A calibration step display area 601, a contour display area 602, and a correction value display area 603 for displaying the steps of the calibration process are provided in the calibration screen 600.
[0081] In the contour display area 602, an image obtained by synthesizing shape data measured by a first measurement head 11A, a second measurement head 11B, a third measurement head 11C, and a fourth measurement head 11D used in synthesis is displayed. This image is generated by a correction data generation unit 39.
[0082] In the correction value display area 603, correction values corresponding to the position postures of the respective measurement heads 11A, 11B, 11C, 11D of the plurality of measurement heads 11A, 11B, 11C, 11D are displayed. The calibration screen 600 having the correction value display area 603 for displaying this correction value is an example of a correction value display screen.
[0083] The correction value is calculated by a correction data generation unit 39. For example, the length of each side of the calibration workpiece W1 is known, and in addition, since the calibration workpiece W1 is a regular hexagonal prism, the angle formed by two adjacent sides is also known. The correction data generation unit 39 acquires this geometric information of the calibration workpiece W1.
[0084] In addition, the correction data generation unit 39 acquires shape data measured by the respective measurement heads 11A, 11B, 11C, 11D. The correction data generation unit 39 calculates correction values for the positional relationships of the measurement heads 11A, 11B, 11C, 11D based on the geometric information of the calibration workpiece W1 so that the shape data measured by the respective measurement heads 11A, 11B, 11C, 11D is consistent with the shape of the calibration workpiece W1. Specifically, the correction data generation unit 39 calculates the offset value in the X direction, the offset value in the Z direction, and the θ angle of each of the measurement heads 11A, 11B, 11C, 11D. This calculation process is executed when an automatic calculation button 600a provided in the calibration screen 600 is operated by the user. After the correction data generation unit 39 calculates the correction values corresponding to the position postures of the respective measurement heads 11A, 11B, 11C, 11D through a calibration tool, the calculated correction values are displayed in the correction value display area 603. The correction data generation unit 39 automatically corrects the shape data corresponding to the respective measurement heads 11A, 11B, 11C, 11D based on the calculated correction values.
[0085] The calibration data generation unit 39 receives adjustment of the calibration value displayed in the calibration value display area 603. For example, when the alignment accuracy is low in the result of automatic calibration, if the user operates the operation unit 14 to perform an operation of adjusting the calibration value displayed in the calibration value display area 603, the calibration value reflecting this adjustment is displayed in the calibration value display area 603. Then, the calibration data generation unit 39 acquires the adjusted calibration value. Since the calibration data generation unit 39 uses the acquired adjusted calibration value in each process, it is possible to confirm whether the alignment accuracy has improved using the calibration value adjusted by the user.
[0086] The calibration data generation unit 39 is configured to be able to write the calculated calibration value as binary. The data including the calculated calibration value is used as calibration data. A save button 600b is provided on the calibration screen 600. When the save button 600b is operated, the calibration data generation unit 39 writes the calibration data as data to be used together with the output code. The output code written by the calibration data generation unit 39 can be saved in the storage unit 22, for example, or saved in an external device. This becomes a calibration file.
[0087] Figure 11 Indicates the state of "image acquisition" after entering "connection settings". When the user operates Figure 9 the next button 510b, it advances from "connection settings" to "image acquisition". "Image" corresponds to shape data. "Image acquisition" is highlighted in the step display area 511. In image acquisition, the screen generation unit 33 generates an image acquisition screen 517 and displays it on the display unit 13. An image acquisition start button 517a for starting to acquire shape data, an image acquisition stop button 517b for stopping to acquire shape data, and a shape data display area 517c are provided in the image acquisition screen 517.
[0088] When the image acquisition start button 517a is operated, the shape data obtained by the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D of the plurality of shape sensors is displayed in the shape data display area 517c. Here, the shape data such as the contour data and the height image obtained using the shape sensor has a single height data at each measurement point on the reference line and the reference plane, but only the measurement points with valid height data can also be displayed in the shape data display area 517c. The valid height data refers to, for example, the height data obtained by removing the background, etc. from the height data within the height range where the measurement object exists, the height data determined to be normal in comparison with the height data of surrounding measurement points, the height data when the shape sensor is an optical sensor and the measurement light amount is sufficient, etc. The shape data display area 517c is divided into four, and the shape data obtained by the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D can be respectively displayed. Thus, the shape data obtained by the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D can be confirmed.
[0089] Figure 12 Shows the state of "Image Composition Settings" after entering "Image Acquisition". When the user operates Figure 11 the next button 510c, it enters from "Image Acquisition" to "Image Composition Settings". In Figure 12 the step display area 511, "Image Composition Settings" is highlighted and displayed. In the image composition settings, the screen generation unit 33 generates an image composition setting screen 520 and displays it on the display unit 13.
[0090] In the image composition setting screen 520, a composite image display area 521 and a composition setting display area 522 are provided. In the composite image display area 521, a composite image obtained by synthesizing a plurality of shape data displayed in the Figure 11 shape data display area 517c is displayed. This composite image is an image based on the shape data corrected by the correction data generation unit 39 and is generated by the screen generation unit 33. In the composition setting display area 522, the X-direction offset value, Y-direction offset value, θ angle, and Z-direction offset value of the first measurement head 11A, the second measurement head 11B, the third measurement head 11C, and the fourth measurement head 11D are displayed as the setting values for image composition. If the reset button 520a provided on the image composition setting screen 520 is operated, the setting values for image composition are reset.
[0091] If the user operates the image composition button 520b provided on the image composition setting screen 520, the screen generation unit 33 generates Figure 13The main screen (display screen) 700 shown is displayed on the display unit 13. The main screen 700 has a first display area 710 and a second display area 720. The first display area 710 is an area for two-dimensional and / or three-dimensional display of the shape data corrected by the correction data generation unit 39. The first display area 710 and the second display area 720 may be arranged in the vertical direction as shown in Figure 13 or, although not shown, may be arranged in the horizontal direction.
[0092] The first display area 710 of the present embodiment includes a shape data display unit 710a that displays shape data and an individual image display unit 710b that displays the shape data measured by each measurement head 11. The shape data display unit 710a and the individual image display unit 710b may be arranged in the vertical direction as shown in Figure 13 or, although not shown, may be arranged in the horizontal direction.
[0093] In the shape data display unit 710a, the shape data corrected by the correction data generation unit 39 is displayed in two-dimensional and / or three-dimensional. An adjustment unit 710c for adjusting the viewing direction (view) of the displayed shape data is provided in the shape data display unit 710a. Since the viewing direction of the shape data is adjusted to the view adjusted by the adjustment unit 710c and is displayed on the shape data display unit 710a, the user can view the shape data of the measurement object W from the desired viewing direction.
[0094] Examples of the shape data displayed on the shape data display unit 710a include point group data composed of a large number of point groups. In this case, an image is provided in which the color of each point is changed according to the height. Thereby, the user can grasp the relative height of each part in the shape data.
[0095] A switching button 710e for switching between execution and non-execution of image synthesis is provided in the shape data display unit 710a. When the user operates the switching button 710e and image synthesis is executed, the synthesized shape data is displayed on the shape data display unit 710a. On the other hand, when the user operates the switching button 710e and image synthesis is not executed, only the shape data measured by the measurement head 11 selected from the four measurement heads 11A, 11B, 11C, and 11D is displayed in two-dimensional and / or three-dimensional on the shape data display unit 710a.
[0096] That is, a selection reception area 710d for selecting an arbitrary measurement head from the four measurement heads 11A, 11B, 11C, and 11D is provided in the individual image display unit 710b. Figure 14Shows the state where "B" is selected, that is, the state where the second measurement head 11B is selected by the user. In this case, the switching button 710e is black. When an operation is performed to not execute image synthesis, the screen generation unit 33 causes only the shape data measured by the second measurement head 11B to be displayed in two-dimensional and / or three-dimensional form on the shape data display unit 710a. Although not shown, similarly, when "A" is selected, only the shape data measured by the first measurement head 11A is displayed in two-dimensional and / or three-dimensional form on the shape data display unit 710a. When "C" is selected, only the shape data measured by the third measurement head 11C is displayed in two-dimensional and / or three-dimensional form on the shape data display unit 710a. When "D" is selected, only the shape data measured by the fourth measurement head 11D is displayed in two-dimensional and / or three-dimensional form on the shape data display unit 710a.
[0097] In this way, the screen generation unit 33 generates a display screen that can switch between a display mode in which a plurality of shape data corresponding to the plurality of measurement heads 11A, 11B, 11C, 11D are simultaneously displayed and a display mode in which individual shape data among the plurality of shape data are displayed for the display object in the first display area 710. This process is executed by a computer through a code generation assistance program.
[0098] On the other hand, in the individual image display unit 710b, only the shape data measured by the measurement head 11 selected in the selection reception area 710d is displayed. In Figure 13 shows the state where "A" is selected, that is, the state where the first measurement head 11A is selected by the user. In this case, only the shape data measured by the first measurement head 11A is displayed on the individual image display unit 710b. Similarly, when "B" is selected, only the shape data measured by the second measurement head 11B is displayed on the individual image display unit 710b. When "C" is selected, only the shape data measured by the third measurement head 11C is displayed on the individual image display unit 710b. When "D" is selected, only the shape data measured by the fourth measurement head 11D is displayed on the individual image display unit 710b.
[0099] In this way, the screen generation unit 33 displays a selection reception area 710d in the first display area 710 for receiving a selection of any one of the plurality of measurement heads 11A, 11B, 11C, 11D. And the screen generation unit 33 displays the shape data obtained by one measurement head 11 received in the selection reception area 710d as individual shape data on the individual image display unit 710b.
[0100] In addition, the screen generation unit 33 generates a screen that three-dimensionally displays, in a thumbnail form, the shape data corrected by the correction data generation unit 39 in a third display area 730 outside the first display area 710 and the second display area 720. The third display area 730 generated by the screen generation unit 33 can be set, for example, below the first display area 710, below the second display area 720, etc., and becomes a region smaller than the first display area 710 and the second display area 720. By displaying the shape data in a thumbnail form in the third display area 730, the user can easily grasp the approximate shape of the measurement object W.
[0101] As Figure 14 shown, the cross-sectional shape of the shape data corrected by the correction data generation unit 39 is displayed in the second display area 720. The setting of measurement elements and the setting of measurement items can be performed on the second display area 720. The setting of the measurement elements and the measurement items is Figure 5 the third stage shown. The third stage corresponds to Figure 4 the determination in step S4 in the flowchart shown. When the measurement conditions are set, the process proceeds to step S5, and the setting process of the measurement conditions is started. This setting process is a process of setting one or more measurement elements and measurement items using the one or more measurement elements, and is executed by a computer through a code generation assistance program.
[0102] On the other hand, when the measurement conditions are not set, the process proceeds to step S6 to determine whether to perform position correction of the shape data. When the position correction of the shape data is performed, the process proceeds to step S3.
[0103] Step S5 can be executed by the measurement setting generation unit (setting unit) 38. That is, it is set to Figure 14 the state where the cross-sectional shape is displayed in the second display area 720. The measurement setting generation unit 38 sets one or more measurement elements and measurement items using the one or more measurement elements for the cross-sectional shape of the shape data displayed in the second display area 720.
[0104] In Figure 14 the example shown, the measurement object W is a pipe having an arcuate wall portion. Therefore, as the measurement element, "circle" is set as shown by the dashed line L1. The measurement item is distance. Specifically, the diameter of the circle as the measurement element is set as the measurement item. In addition to Figure 14 the example shown, as the measurement element, for example, a plane can also be set. As the measurement item, height, flatness, area, angle, etc. can also be set.
[0105] In the individual image display section 710b of the first display area 710, one or more measurement elements set by the measurement setting generation section 38 are displayed on the shape data. In the individual image display section 710b, the measurement elements set by the measurement setting generation section 38 are shown by the solid line L2. Thus, the position and range of the measurement elements can be confirmed from a top view.
[0106] When the measurement element is a circle and the measurement item is distance, shape data measured by four measurement heads 11A, 11B, 11C, and 11D is required. Therefore, the screen generation section 33 causes the first display area 710 to display an image obtained by synthesizing the shape data measured by the four measurement heads 11A, 11B, 11C, and 11D. In addition, when the measurement element is a plane and the measurement item is height, when the plane is set at a position that can be measured only by the first measurement head 11A, the screen generation section 33 causes only the shape data measured by the first measurement head 11A to be displayed in the first display area 710. Similarly, when a measurement item is set at a position that can be measured only by the second measurement head 11B, the screen generation section 33 causes the first display area 710 to display only the shape data measured by the second measurement head 11B. In addition, when a measurement item is set at a position that can be measured only by the third measurement head 11C, the screen generation section 33 causes the first display area 710 to display only the shape data measured by the third measurement head 11C. And, when a measurement item is set at a position that can be measured only by the fourth measurement head 11D, the screen generation section 33 causes the first display area 710 to display only the shape data measured by the fourth measurement head 11D. In this way, the screen generation section 33 displays an image corresponding to the measurement item set by the measurement setting generation section 38 in the first display area 710.
[0107] (Vibration correction process)
[0108] In Figure 12 the image synthesis setting screen 520 shown, a vibration correction button 525 is provided. When the user operates the vibration correction button 525, the control section 23 executes the vibration correction process. That is, as Figure 7 shown, the measurement object W conveyed by the conveying device sometimes vibrates in the vertical direction as indicated by the arrow 100, or vibrates around the long axis as indicated by the arrow 101. When the measurement object W vibrates, the measurement head 11 measures the shape data of the vibrating measurement object W, so the shape data includes vibration components. If an inspection is performed based on the shape data including vibration components, the inspection result may become inaccurate. In contrast, in this embodiment, by executing a process for correcting the vibration of the measurement object W, the vibration components can be removed from the shape data.
[0109] The vibration correction process is performed by Figure 3The feature position determination unit 30A and the feature position correction unit 30B shown are executed. The feature position determination unit 30A is a part that determines the feature positions in the cross sections of the multiple shape data corresponding to the respective measurement heads 11 after being corrected by the correction values corresponding to the position postures of the respective measurement heads 11 based on the multiple measurement heads 11. The feature position correction unit 30B is a part that executes a correction process for correcting the respective shape data of each cross section in such a way as to correct the feature positions based on a series of feature positions along the cross section arrangement direction in the multiple cross sections.
[0110] Hereinafter, the processing of the feature position determination unit 30A and the processing of the feature position correction unit 30B will be specifically described. When Figure 12 the vibration correction button 525 on the image synthesis setting screen 520 shown is operated, the screen generation unit 33 generates Figure 15 the vibration correction screen 800 shown and displays it on the display unit 13. The vibration correction screen 800 includes a pre-correction image display area 810, a post-correction image display area 820, a correction process setting area 830, and a display switching area 840.
[0111] In the pre-correction image display area 810, the shape data before the correction process executed by the feature position correction unit 30B is displayed. The pre-correction image display area 810 includes: a pre-correction two-dimensional image display unit 810a that two-dimensionally displays the shape data received by the reception unit 21; and a pre-correction switching display unit 810b that three-dimensionally displays or displays in cross section the shape data received by the reception unit 21.
[0112] In the post-correction image display area 820, the shape data after the correction process executed by the feature position correction unit 30B is displayed. The post-correction image display area 820 includes: a post-correction two-dimensional image display unit 820a that two-dimensionally displays the shape data received by the reception unit 21; and a post-correction switching display unit 820b that three-dimensionally displays or displays in cross section the shape data received by the reception unit 21.
[0113] In the correction process setting area 830, settings for additional correction processes such as adding correction processes can be accepted. In addition, in the display switching area 840, the images displayed on the pre-correction switching display unit 810b and the images displayed on the post-correction switching display unit 820b can be switched from three-dimensional to cross section, or from cross section to three-dimensional. If the user performs an operation of selecting "Cross Section" in the display switching area 840, then as Figure 15 shown, the screen generation unit 33 causes the image of the pre-correction cross section to be displayed on the pre-correction switching display unit 810b, and causes the image of the post-correction cross section to be displayed on the post-correction switching display unit 820b. On the other hand, when the user performs an operation of selecting "3D" in the display switching area 840, as Figure 16As shown, the screen generation unit 33 causes the pre - correction switching display unit 810b to display the three - dimensional image before correction, and causes the post - correction switching display unit 820b to display the three - dimensional image after correction.
[0114] The feature position determination unit 30A receives the designation of the cross - section for determining the feature position. As Figure 15 shown, the position of the cross - section for correction can be designated by, for example, the line 801. Specifically, the user can operate the operation unit 14 to move the line 801 to an arbitrary position, and the cross - section of the part where the moved line 801 is located becomes the cross - section for determining the feature position.
[0115] The feature position determination unit 30A determines the center of the cross - section of the designated shape data, the maximum and minimum positions of the rectangle, etc. as the feature position. When the cross - section of the shape data is circular, the feature position determination unit 30A determines the center of the circle as the feature position. In addition, when the cross - section of the shape data is a polygon, the feature position determination unit 30A determines the center of the polygon as the feature position. In addition, in the case of a rotated rectangle, the feature position determination unit 30A can also determine the point with the maximum distance and the point with the minimum distance as the feature position. In this way, the feature position determination unit 30A determines the position that can be a feature as the feature position. This process is a process of determining the feature position in the cross - sections of multiple shape data, and is executed by a computer through a code generation auxiliary program.
[0116] The feature position correction unit 30B corrects each shape data of each cross - section in a manner that removes the vibration component of the measurement object W. This process is a correction process for correcting each shape data, and is executed by a computer through a code generation auxiliary program.
[0117] Figure 17 It is a diagram for explaining the calculation method of the correction parameter for the vibration component. Figure 17 The vertical axis in is the X - axis or the Z - axis, corresponding to the width direction of the conveying device. In addition, Figure 17 The horizontal axis in is the Y - axis, corresponding to the conveying direction of the conveying device. The arrangement of ΔX (cross - section coordinate system) is represented by “+”. This arrangement is transformed into (ΔX, ΔZ) in the head coordinate system of each measurement head 11. The feature position correction unit 30B calculates the correction parameter for removing the vibration component in this way. Then, the feature position correction unit 30B applies the correction parameter for removing the vibration component to the X and Z corrections of each shape data. Specifically, when the arrangement of the shape data is input to the feature position correction unit 30B, the feature position correction unit 30B applies the correction parameter to each shape data and outputs the arranged shape data after correction. The image based on the shape data input to the feature position correction unit 30B is the pre - correction image, and the image based on the shape data output from the feature position correction unit 30B is the post - correction image.
[0118] Here, for example, there is sometimes a undulating shape that repeats in the Y-axis direction provided on the object W to be measured. Such an undulating shape is a part of the shape of the object W to be measured, and thus is not defective. However, depending on the period of the undulating shape, it may be erroneously determined as a vibration component and the undulating shape may be removed by the vibration correction process of the present embodiment.
[0119] In response to this, the feature position correction unit 30B performs low-pass filtering processing on the shape data of each cross-section. Thereby, the undulating shape provided on the object W to be measured can be retained, and only the vibration component can be removed.
[0120] The feature position correction unit 30B can change the intensity of the low-pass filtering processing applied to the shape data of each cross-section. For example, by configuring the display screen so that the user can change the frequency threshold for applying the low-pass filtering processing, the frequency threshold can be increased or decreased via the display screen. Based on the changed frequency threshold, the feature position correction unit 30B applies low-pass filtering processing to the shape data of each cross-section.
[0121] In addition, for example, in Figure 18 the chart shown, the dashed line represents the shape data including the vibration component, and the solid line represents the curve obtained by curve fitting. The screen generation unit 33 can generate such a chart and display it on the display unit 13. By observing Figure 18 the chart shown, the user can confirm the degree of fitting, that is, the degree of vibration removal correction. By configuring the display screen in such a way that an adjustment unit 881 ([[]] Figure 19 shown) for adjusting the degree of vibration removal correction is displayed, the degree of vibration removal correction can be adjusted via the display screen. Based on the adjusted degree of vibration removal correction, the feature position correction unit 30B performs the vibration correction process.
[0122] Figure 19 A display screen 880 showing the correction parameters applied to the vibration correction process. In the display screen 880 of the correction parameters, a selection area 882 for the method of feature position detection, a display area 883 for the correction parameters calculated by the feature position correction unit 30B, etc. are provided. The user can change the correction parameters on the display screen 880. In the case of change, the vibration correction process is performed using the changed correction parameters.
[0123] Figure 3The execution unit 34 shown is a part that executes the inspection of the measurement items set by the measurement setting generation unit 38. Specifically, the execution unit 34 acquires each shape data corrected by the feature position correction unit 30B. The execution unit 34 determines one or more measurement elements set by the measurement setting generation unit 38 for each shape data corrected by the feature position correction unit 30B. The execution unit 34 executes the inspection of the measurement items using one or more measurement elements set by the measurement setting generation unit 38. This process is executed by a computer through a code generation assistance program.
[0124] For example, the execution unit 34 calculates the values of one or more measurement items of the measurement object W based on each shape data corrected by the feature position correction unit 30B, the text code, and the library stored in the storage unit 22. When the measurement item is an item for measuring a physical quantity, the execution unit 34 measures physical quantities such as height, flatness, distance, and roundness based on the measurement item.
[0125] As Figure 14 shown, the screen generation unit 33 displays the result display element (measurement result) 720a of the measurement element calculated by the execution unit 34 in the second display area 720. When the measurement item is distance, the result display element 720a is displayed in the second display area 720 in a manner combining a numerical value and a unit. The result display element 720a can be overlapped and displayed with the cross-sectional shape of the shape data displayed in the second display area 720, or can be displayed in a part other than the cross-sectional shape of the shape data.
[0126] When the cross-sections of multiple shape data are circular, the execution unit 34 executes the roundness inspection of the circle. When the execution unit 34 executes the roundness inspection, the screen generation unit 33 generates a result display element 720a for displaying the roundness inspection result. When executing the roundness inspection, the vibration of the measurement object W has a great influence on the inspection accuracy. By performing the vibration removal process at the stage before the roundness inspection as in this embodiment, the inspection accuracy of the roundness of the measurement object W with vibration can be improved.
[0127] In Figure 4 step S6, if the position correction of the shape data is not performed, the process proceeds to step S7. In step S7, it is determined whether to generate a text code. The determination in this step S7 is based on whether there is an instruction indicating the intention to generate a text code through the operation of the operation unit 14 by the user. Specifically, when the user operates the operation unit 14 to give a code generation instruction, it is determined in step S7 that a text code is to be generated and the process proceeds to step S8. On the other hand, if it is determined in step S7 that no text code is to be generated, the process proceeds to step S2.
[0128] In step S8, the code generation unit 37 generates text code. This step S8 is the fourth stage of step S14 in the flowchart shown in Figure 5 The code generation unit 37 determines one or more measurement elements for the shape data and generates text code for performing an inspection of a measurement item using the one or more measurement elements. The computer executes this text code generation process through a code generation assistance program.
[0129] The text code generation process is, for example, a process of generating text code for setting assistance information based on the correction information set in the correction setting process in step S3, the measurement conditions set in the measurement condition setting process in step S5, and the like. In this text code generation process, it also includes a process of outputting a library and reference shape data together with the text code, that is, a process of outputting setting assistance information. When the text code generation process ends, the code generation assistance process ends.
[0130] If the text code generation process starts, the screen generation unit 33 generates a text code generation window 750 as shown in Figure 20 and displays it on the display unit 13. In the text code generation window 750, there are a namespace input area 751, a folder input area 752, a file name input area 753, and a code generation button 754. The namespace input area 751 is an area for setting a namespace for the generated text code. The folder input area 752 is an input field for determining the address of a folder or the like that is the save destination (output destination) of the generated text code. The file name input area 753 is an area for inputting the file name of the file for identifying the generated text code.
[0131] The user can input information corresponding to the generated text code in the namespace input area 751, the folder input area 752, and the file name input area 753 of the text code generation window 750. The multiple pieces of information input to the namespace input area 751, the folder input area 752, and the file name input area 753 of the text code generation window 750 can be referred to as file generation information.
[0132] The code generation button 754 is a button for instructing the generation of a text code file. After the user inputs file generation information to the namespace input area 751, the folder input area 752, and the file name input area 753, the user operates the code generation button 754 via the operation unit 14. Then, the code generation unit 37 generates a text code file with a desired file name in a desired folder in the Figure 3 storage unit 22 shown.
[0133] If the code generation button 754 is operated, the screen generation unit 33 generates Figure 21The information output window 760 shown is displayed on the display unit 13. A string indicating the usage method of the file representing the text code, the library corresponding to the file, and the reference shape data corresponding thereto is displayed in the information output window 760.
[0134] In the information output window 760, in addition to the string indicating the usage method, a text code display button 761 and an output button 762 are also displayed. The user can operate the output button 762 on the basis of confirming the usage method displayed in the information output window 760. If the output button 762 is operated, the information output window 760 is closed, and the set auxiliary information is output to a predetermined output destination.
[0135] The text code display button 761 of the information output window 760 is a button for causing the display unit 13 to display the content of the generated text code. If the text code display button 761 is operated, the screen generation unit 33 generates Figure 22 The text code display window 770 shown is displayed on the display unit 13. The text code generated by the code generation unit 37 is displayed in the text code display window 770. Thus, the user can confirm the content of the text code generated by the code generation unit 37 on the screen of the display unit 13. A close button 771 for closing the text code display window 770 is displayed in the text code display window 770.
[0136] Figure 23 It is a flowchart showing the process flow of the text code generation process. When the text code generation process starts, in step S81, Figure 3 The reception unit 36 of receives the file generation information. The reception of the file generation information is based on Figure 20 The operation of the text code generation window 750 shown is performed.
[0137] In step S82, the reception unit 36 determines whether there is an instruction to generate a file for the text code. The determination in step S82 is performed, for example, based on Figure 20 Whether the code generation button 754 of the text code generation window 750 shown is operated. In the case where there is no instruction to generate a file, the reception unit 36 repeats the process of step S82. On the other hand, in the case where there is an instruction to generate a file, the process proceeds to step S83, and the code generation unit 37 generates a file of the text code based on the file generation information received in step S81.
[0138] That is, in step S83, the code generation unit 37 generates character information indicating a processing program to be called from the library as processing program information based on the information (type of measurement item) of a plurality of set measurement items. In addition, the code generation unit 37 generates character information indicating parameters and the like obtained by the user's designation in association with each piece of processing program information as designation information. Further, the code generation unit 37 combines the mutually related processing program information and designation information.
[0139] The library of this embodiment includes a processing program for setting the input source of the set shape data (input source setting) or setting the processing for generating the shape data (shape data generation processing setting). In the case of including such a processing program, the code generation unit 37 can include information indicating the input source of the shape data and the input pitch of the contour data as data input conditions in the text code. In addition, the library may not include a processing program for input source setting and shape data generation processing setting. When the library does not include a processing program for input source setting and shape data generation processing setting, the code generation unit 37 does not include information indicating the input source of the shape data set by the user and the input pitch of the contour data as data input conditions in the text code. Therefore, when setting the sub-measurement device 20A or the like, the user sets this information through an additional setting operation.
[0140] The library may also include a processing program related to the synthesis of shape data. In this case, when a plurality of synthesis conditions of shape data are set, the code generation unit 37 includes the synthesis conditions in the text code. In addition, the library may not include a processing program related to the synthesis of shape data. In this case, even if a plurality of synthesis conditions of shape data are set, the code generation unit 37 does not include the synthesis conditions in the text code.
[0141] The code generation unit 37 may also include information indicating the measurement result as measurement result information in the text code. Based on the text code including the measurement result information, it is possible to easily grasp the measurement result to be concerned about. When including the measurement result information in the text code, the code generation unit 37 processes the measurement result information as a structure in the text code.
[0142] Specifically, the information (value, unit, and item name) of each measurement item such as "peak height", "valley height", "average height", "maximum peak height", "minimum peak height", "maximum valley height", "minimum valley height", "maximum average height", and "minimum average height" can be included in the measurement result.
[0143] The value of each measurement item is a floating point type, and the unit and the project name are string types. In addition, the language of the project name can be selected in conjunction with the language used in the code generation auxiliary program, or a language different from the language used in the code generation auxiliary program can be selected. The code generation unit 37 can also determine the measurement results that should be paid attention to in the text code through a structure containing the measurement results of the values, units, and project names of each measurement item and an identifier for identifying the measurement items that should be paid attention to. For example, the measurement items that should be paid attention to can also be determined in the structure containing the measurement results of the values, units, and project names of each measurement item through an enumeration symbol (enum constant) of an enumeration type (enum type) as an identifier.
[0144] The library may include a processing program for executing a function, which takes an enumerator as an independent variable and returns a measurement result corresponding to the measurement item to be paid attention to from the structure of the enumeration type processing result. In addition, the function that returns the measurement result may also include a function that outputs the measurement result as a floating point value and a function that outputs the measurement result as a string representing a value with a unit such as "mm". Moreover, the function that returns the measurement result may also include a function that returns a string representing the project name with an enumerator as an independent variable. In this case, the code generation unit 37 can output an identifier such as an enumerator corresponding to the measurement item to be paid attention to, and generate a text code that uses the identifier to obtain the project name of the measurement item to be paid attention to and the value with a unit of the measurement result.
[0145] The library may also include a processing program for executing a process for displaying the measurement results. The processing program may also list the item names of the measurement items that should be paid attention to and the values of the measurement results with units. In addition, the library may also include a processing program for executing a function that takes the shape data, the area of the tool, and the measurement result of each area as arguments and returns image data that displays the measurement result of each area of the set tool on the two-dimensional shape data or the three-dimensional shape data.
[0146] In step S84, Figure 3 The screen generation unit 32 displays the method of using the setting auxiliary information ( Figure 21 In step S85, the receiving unit 36 determines whether there is an instruction to display the text code. The determination in step S85 is based on, for example, Figure 21 If there is no instruction to display the text code, the process proceeds to step S87. On the other hand, if there is an instruction to display the text code, in step S86, the screen generation unit 32 displays the text code as shown in FIG. Figure 22 As shown, the text code is displayed on the display unit 13. The display of the text code is ended by operating the close button 771.
[0147] In step S87, the reception unit 36 determines whether the output of the setting auxiliary information is instructed. The determination in step S87 is made based on, for example, Figure 21 whether the output button 762 shown in
[0148] (Details of the sub-measurement device)
[0149] Figure 24 is a block diagram showing the structure of the control systems of the sub-measurement devices 20A and 20B shown in Figure 1 . As shown in Figure 24 , the control unit 23 of the sub-measurement devices 20A and 20B in the present embodiment includes a screen generation unit 33, an execution unit 34, an input unit 41, and an analysis unit 42 as parts for measuring the shape of the measurement object W. The screen generation unit 33, the execution unit 34, the input unit 41, and the analysis unit 42 are realized, for example, by a CPU of the control unit 23 of the sub-measurement devices 20A and 20B executing a program for measuring the shape of the measurement object W stored in advance in the storage unit 22.
[0150] When setting the sub-measurement devices 20A and 20B for measuring the shape of the measurement object W, the setting auxiliary information read from the storage unit 22 of the main measurement device 20 is input to the sub-measurement devices 20A and 20B. The input unit 41 reads the setting auxiliary information stored in the storage unit 22 and holds the library of the setting auxiliary information.
[0151] The reception unit 21 of the sub-measurement devices 20A and 20B has the same structure and function as the reception unit 21 of the main measurement device 20. The execution unit 34 performs an inspection of the measurement items using one or more measurement elements in the measurement object W based on the shape data received by the reception unit 21 and the text code and library read by the input unit 41.
[0152] The analysis unit 42 performs various analyses based on the calculation results (measurement results) obtained by the execution unit 34. The screen generation unit 33 causes the display unit 13 to display an image of the measurement object W based on the shape data received by the reception unit 21. In addition, the screen generation unit 33 causes the calculation results calculated by the execution unit 34 and the analysis results analyzed by the analysis unit 42 to be displayed on the display unit 13.
[0153] The above-described embodiments are merely illustrative in all respects and should not be construed in a limiting sense. Also, all modifications and changes within the equivalent scope of the claimed patent protection are within the scope of the present invention.
[0154] Industrial applicability
[0155] As described above, the code generation assisting device and the code generation assisting program according to the present disclosure can be used to measure the shapes of various measurement objects.
[0156] Reference signs
[0157] 11 Measuring head (shape sensor),
[0158] 13 Display unit,
[0159] 20 Main measuring device (code generation assisting device),
[0160] 21 Receiving unit,
[0161] 22 Storage unit,
[0162] 30A Feature position determination unit,
[0163] 30B Feature position correction unit,
[0164] 33 Image generation unit,
[0165] 37 Code generation unit,
[0166] 38 Measurement setting generation unit (setting unit).
Claims
1. An auxiliary device for code generation of an inspection device, characterized in that the auxiliary device for code generation includes: a receiving unit that receives shape data; a feature position determination unit that determines a feature position in a cross section of a plurality of shape data corresponding to each shape sensor after correction by a correction value corresponding to the position and orientation of each shape sensor based on a plurality of shape sensors; a feature position correction unit that performs a correction process of respectively correcting the shape data of each cross section in a manner of correcting the feature position based on a series of feature positions along the cross section arrangement direction in a plurality of cross sections; a setting unit that sets one or more measurement elements and a measurement item using the one or more measurement elements; an execution unit that determines the one or more measurement elements set by the setting unit for the shape data corrected by the feature position correction unit, and executes an inspection of the measurement item using the one or more measurement elements set by the setting unit; a code generation unit that determines the one or more measurement elements for the shape data and generates a text code for executing an inspection of the measurement item using the one or more measurement elements; and a screen generation unit that generates a display screen, the display screen having a first display area for two-dimensionally and / or three-dimensionally displaying the shape data received by the receiving unit and displaying the one or more measurement elements on the shape data, and including a result display element indicating the result of the inspection executed by the execution unit.
2. The auxiliary device for code generation according to claim 1, characterized in that the feature position correction unit corrects the shape data of each cross section respectively to remove the vibration component of the measurement object.
3. The auxiliary device for code generation according to claim 2, characterized in that the feature position correction unit performs a low-pass filtering process on the shape data of each cross section.
4. The auxiliary device for code generation according to claim 3, characterized in that the feature position correction unit can change the intensity of the low-pass filtering process.
5. The auxiliary device for code generation according to claim 1, characterized in that the feature position determination unit determines the center of the cross section of the shape data as the feature position.
6. The auxiliary device for code generation according to claim 5, characterized in that when the cross section of the shape data is circular, the feature position determination unit determines the center of the circle as the feature position.
7. The auxiliary device for code generation according to claim 5, characterized in that when the cross section of the shape data is polygonal, the feature position determination unit determines the center of the polygon as the feature position.
8. The auxiliary device for code generation according to claim 1, characterized in that when the cross sections of a plurality of shape data are circular, the execution unit executes an inspection of the roundness of the circle.
9. The auxiliary device for code generation according to claim 1, characterized in that the screen generation unit generates a screen for displaying correction parameters of the correction process applied to the feature position correction unit.
10. The code generation assistance device according to claim 1, wherein the feature position determination unit receives a designation of a cross-section for determining a feature position.
11. The code generation assistance device according to claim 1, wherein the screen generation unit generates a screen that displays the shape data before the correction process is performed by the feature position correction unit and the shape data after the correction process is performed by the feature position correction unit.
12. A code generation assistance program, wherein causes a computer to perform the following processes: a process of receiving shape data; a process of determining a feature position in a cross-section of a plurality of shape data corresponding to each shape sensor, which is corrected by a correction value corresponding to the position and orientation of each shape sensor based on a plurality of shape sensors; a correction process of correcting each shape data of each cross-section in a manner of correcting the feature position, based on a series of feature positions along the cross-section arrangement direction in a plurality of cross-sections; a process of setting one or more measurement elements and a measurement item using the one or more measurement elements; a process of determining the set one or more measurement elements for the corrected shape data and performing an inspection of the set measurement item using the one or more measurement elements; a process of determining the one or more measurement elements for the shape data and generating a text code for performing an inspection of the measurement item using the one or more measurement elements; and a process of generating a display screen, the display screen having a first display area that displays the received shape data in two dimensions and / or three dimensions and displays the one or more measurement elements on the shape data, and including a result display element indicating the result of the performed inspection.
Citation Information
Patent Citations
Shape inspection device, processing device, height image processing method, and height image processing program
JP2023015886A