Skip to content

Detection of Adhesive Strip Inflection Point Height and Flatness

Project Overview

Project Background

With automotive manufacturers imposing increasingly strict requirements on tire quality, tire manufacturers are in urgent need of a fast, easy-to-operate, and high-precision measurement device. It can be used online to reduce downtime and minimize the occurrence of defective products.

Local Image

Camera Selection

LMI Laser Line Scan Camera Gocator2350

Detection Requirements

Measurement Accuracy ≤ 0.03mm
Measurement Repeatability ≤ 0.02mm
Measurement Cycle ≤ 3s

Solution

AI-Vision can process both contours and point clouds simultaneously. It locates inflection points through point cloud images to calculate volume and measure height, and extracts cross-sectional contours for cross-sectional area measurement.

Design Concept

Local Image

Implementation Effect Display

  • Project Result Display:

    Local Image

    Local Image

  • HMI Result Display:

    Local Image

Project Process

1. Initialization

  1. Add height and volume variables directly in global variables.

Local Image

  1. Select the Load Point Cloud tool to acquire point clouds.

2. Preprocessing

Local Image

Position Adjustment

Select the 3D Square Probe tool and 3D Position Adjustment tool. Adjust the position in the x and y directions by selecting the coordinates of the upper edge of the bottom surface.

Plane Fitting

  1. Select the Create ROI Array tool and select 19 different areas on the bottom surface for plane fitting.

Local Image

  1. Select the 3D Plane tool, bind the operator output variable from the previous step as the reference area for plane fitting, and set the fitted plane as the zero plane.

Local Image

Image Preprocessing

Select the 3D Cropping tool to copy the IM1 image to IM2 for flatness measurement.

Note

When calling subroutines in parallel, each subroutine needs to be executed in a different IM.

3. Flatness and Height Measurement

Local Image

Height Measurement

  1. Select the Create ROI tool and import the box recipe into the operator.

  2. Select the 3D Height tool, bind the box output by the Create ROI tool in the previous step as the input area to measure height.

Local Image

  1. Select the Lua Script tool to save the measurement data.
  • Bind the current loop count, the height measurement value of the 3D Height tool, the string used to splice and save height values, and the float array used to save height values.

  • Splice the height values into a string and save the string to a global variable (for saving to CSV).

  • Insert the current measured height into the float array for saving height values and save the array to a global variable.

Experience

string.format is used to format strings. %.nf means formatting a floating-point number to retain n decimal places.

pi = 3.14159 str = string.format("Pi is approximately %.3f", pi) print(str) -- Output: Pi is approximately 3.141

lua
-- Generate a string for splicing
write = ""

-- Generate the file if it does not exist
if FileExists("./Height.csv") == false then  
   -- Generate table header
   write = write .. "Time,"  
   for i = 1,30,1 do    
       write = write .. "h" .. i
       write = write .. ","
   end
   write = write .. "OK/NG" .. "\n"   
end

-- Splice the time into the table header
write = write .. os.date("%Y_%m_%d %H:%M;%S") .. ","  
-- Write the table header to the file
WriteToFile("./Height.csv",write)

-- Splice the currently measured heights into the write string
for i=1, #height do
   write = write ..  string.format("%.3f", height[i]) .. ","
end
print(write)

-- Save the currently measured heights to a global variable
SetStringVariable("HeightSave" , write)
  1. Select the Lua Script tool to write the height measurement results into a CSV file.
  • Bind the global variable of the array storing heights and the global variable of the string splicing height values.

  • Cycle through the height array for judgment and splice the judgment result to the bound string.

  • Save the spliced string to the CSV file.

lua
-- Height judgment
Judge = true
for i = 1, 30, 1 do
    -- Get the recipe value of the specified sequence number
    currentPin = GetRecipeSet(i)
    -- Judge the measurement result
    if currentPin.PinHight - 0.3 > Height[i] or Height[i] > currentPin.PinHight + 0.1 then
       Judge = false
       break
    end
end

-- Judge the result and splice data into the string according to the judgment result
if Judge == true then
    write = write .. "OK\n"
    DrawText3D(1,"green",30,-13,35,20,"Detection Result: OK")
elseif Judge == false then
    write = write .. "NG\n"
    DrawText3D(1,"red",30,-13,35,20,"Detection Result: NG")
end

-- Save the CSV file
WriteToFile("./Height.csv",write)

Flatness Measurement

  1. Select the Create ROI tool and import the recipe into the operator.

  2. Select the 3D Flatness tool, bind the box output from the previous step as the input area to measure flatness.

  3. Use the Data Check operator to judge the measured flatness, and use the Conditional Branch operator and 3D Data Display operator to display the data results.

Local Image

  1. Use the Write to CSV operator to save data.

Local Image

Experience Summary

Core Steps:

  1. Obtain the position to be measured according to the recipe and push the box.
  2. Measure dimensions.

AI-Vision, Making 3D Measurement Easier