Mitsubishi Electric MELSENSOR VS70 Series Setting Manual / Spreadsheet

Fa sensor
Hide thumbs Also See for MELSENSOR VS70 Series:
Table of Contents

Advertisement

Vision Sensor Setting Guide (Spreadsheet)
-VS70M-600
-VS70M-600-R
-VS70M-800
-VS70M-800-R
-VS70M-802
-VS70M-802-R
-VS70C-600-R
-VS70C-800-R
-VS70C-802-R
-VS80M-100
-VS80M-200
-VS80M-200-R
-VS80M-400
-VS80M-400-R
-VS80M-202
-VS80M-202-R
-VS80M-402
-VS80M-402-R
-VS80C-100
-VS80C-200-R
-VS80C-400-R
-VS80C-202-R
-VS80C-402-R
This product is designed and manufactured by Cognex Corporation.
*Note that the warranty and general specifications of this product
differ from that of programmable controller products.

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSENSOR VS70 Series

  • Page 1 Vision Sensor Setting Guide (Spreadsheet) -VS70M-600 -VS70M-600-R -VS70M-800 -VS70M-800-R -VS70M-802 -VS70M-802-R -VS70C-600-R -VS70C-800-R -VS70C-802-R -VS80M-100 -VS80M-200 -VS80M-200-R -VS80M-400 -VS80M-400-R -VS80M-202 -VS80M-202-R -VS80M-402 -VS80M-402-R -VS80C-100 -VS80C-200-R -VS80C-400-R -VS80C-202-R -VS80C-402-R This product is designed and manufactured by Cognex Corporation. *Note that the warranty and general specifications of this product differ from that of programmable controller products.
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The precautions given in this manual are concerned with this product only. For the safety precautions for the entire programmable controller system, refer to the user's manuals of the respective modules.
  • Page 4 [Startup and Maintenance Precautions] CAUTION ● Do not clean the vision sensor with highly irritating or corrosive solvent such as caustic alkali solution, methyl ethyl ketone (MEK), and gasoline. Doing so may cause a fault.
  • Page 5: Precautions For Use

    PRECAUTIONS FOR USE For details on the precautions for use, refer to the following: Vision Sensor VS70 User's Manual Vision Sensor VS80 User's Manual...
  • Page 6: Conditions Of Use For The Product

    CONDITIONS OF USE FOR THE PRODUCT (1) This vision sensor shall be used in conditions; i) where any problem, fault or failure occurring in the vision sensor, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the vision sensor for the case of any problem, fault or failure occurring in the vision sensor.
  • Page 7: Introduction

    For details on how to register a profile, refer to the following manual. GX Works2 Version 1 Operating Manual (Common) GX Works3 Operating Manual For information on how to obtain a profile, please contact your local Mitsubishi Electric sales office or representative.
  • Page 8: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS ..............1 PRECAUTIONS FOR USE .
  • Page 9 Using Snippets ............... . . 99 APPENDIX Appendix 1 Sample Program .
  • Page 10: Relevant Manuals

    [SH-081891ENG] components, etc. of the vision sensor VS80 e-Manual e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated tool. e-Manual has the following features: • Required information can be cross-searched in multiple manuals.
  • Page 11: Chapter 1 Overview

    OVERVIEW This manual describes the method for basic operations and creating a job to guide a user unfamiliar with the operations of a spreadsheet. Spreadsheet is a programming interface of In-Sight Explorer that maximizes the functions of a vision sensor. A job can be created according to the application steps in EasyBuilder, whereas in a spreadsheet, a job can be created by placing functions.
  • Page 12: Screen Configuration

    Screen Configuration The following shows the screen configuration on a spreadsheet. (1) Menu bar (2) Toolbar (3) Spreadsheet (4) Palette window 1 OVERVIEW 1.1 Screen Configuration...
  • Page 13: Execution Order Of Functions

    Execution Order of Functions The execution order of functions on a spreadsheet is automatically optimized. When creating a job, the execution order is not needed to be considered. For the method for checking execution order, refer to the following section. Page 36 Checking an execution time of each function 1 OVERVIEW 1.2 Execution Order of Functions...
  • Page 14: Chapter 2 Basic Operations For Spreadsheet

    BASIC OPERATIONS FOR SPREADSHEET Spreadsheet Switching EasyBuilder to a spreadsheet The following shows the procedure for switching EasyBuilder to a spreadsheet. Operating procedure Select [View]  [Spreadsheet]. Precautions For a model which does not support the spreadsheet function, the menu will be grayed out. 2 BASIC OPERATIONS FOR SPREADSHEET 2.1 Spreadsheet...
  • Page 15 ● A job created in EasyBuilder A cell where a job created in EasyBuilder is placed is protected and therefore the "Property Sheet" screen is not displayed. The "Property Sheet" screen can be displayed by selecting [File]  [Unprotect Job]. ●...
  • Page 16: Displaying A Spreadsheet In Default

    Displaying a spreadsheet in default A spreadsheet can be displayed in default by setting an option. Operating procedure Select the checkbox of "Make Spreadsheet View the Default View" in [System]  [Options]  "Job View". 2 BASIC OPERATIONS FOR SPREADSHEET 2.1 Spreadsheet...
  • Page 17: Adjusting Transparency

    Adjusting transparency To make an image clear, increase the brightness of the spreadsheet. Conversely, by decreasing the brightness, the image will be blurry. (The default transparency of a spreadsheet is 25%.) It can be adjusted in the menu or icon on the toolbar. 2 BASIC OPERATIONS FOR SPREADSHEET 2.1 Spreadsheet...
  • Page 18 Adjusting transparency using the menu Operating procedure Select [Image]  [Overlay Transparency]. Adjust the transparency in the "Overlay Transparency" screen. The degree of the transparency can be checked by pressing the  key. Adjusting transparency using the icon on the toolbar Operating procedure Click on the toolbar.
  • Page 19: Hiding A Spreadsheet Temporarily

    Hiding a spreadsheet temporarily Bring an image to front by temporarily hiding a spreadsheet using the menu or icon on the toolbar. In the following screen, the spreadsheet is hidden. Operating procedure Select [View]  [Overlay] ( ). 2 BASIC OPERATIONS FOR SPREADSHEET 2.1 Spreadsheet...
  • Page 20: Placing A Function

    Placing a Function A function can be placed in a spreadsheet by either of the following methods. Page 18 Dragging and dropping a function from the Palette window Page 21 Entering a function directly in a cell Precautions Depending on a function, a vision data access function is automatically added to the cell next to the function. The cell will be overwritten with the vision data access function ;...
  • Page 21 When the Property Sheet screen is displayed Operating procedure Set the details of the items. Click the [OK] button. The function is placed to the spreadsheet. A vision data access function is automatically added. *1 Information such as status, measurement result value or its label, and parameters of a vision data access function (1) Placed function (2) A vision data access function that is automatically added 2 BASIC OPERATIONS FOR SPREADSHEET...
  • Page 22 When arguments can be entered Operating procedure Enter arguments. By placing the mouse cursor, the description of the function is displayed on the tooltip. 2 BASIC OPERATIONS FOR SPREADSHEET 2.2 Placing a Function...
  • Page 23: Entering A Function Directly In A Cell

    Entering a function directly in a cell Operating procedure Enter a function in the cell of a spreadsheet. When a correct function name is entered, the "Property Sheet" screen appears. Alternatively, arguments can be entered. If incorrect function name is entered, the incorrect letter and subsequent letters are displayed in red. By pressing the ...
  • Page 24: Referencing Cells

    Referencing Cells A cell can refer to another cell by specifying a row and a column. When data in the source cell changes, the data in the destination cell (the cell contains the reference) updates automatically. When the destination cell is moved, the column and row to be referenced changes as follows depending on the reference type.
  • Page 25: Inserting A Reference

    Inserting a reference The following shows the procedure for inserting a reference. Operating procedure Double-click a cell. Alternatively, select a cell and press the  key. Move the cursor to another cell. The appearance of the cursor is changed for a cell reference. To insert a relative reference, click a cell.
  • Page 26: Switching Cell Statuses (Enable/Disable)

    Switching Cell Statuses (Enable/Disable) A cell status (enable/disable) can be changed for each cell. It can be switched for a cell (function) that operates only on a specific condition. This section explains how to switch the cell status using an example of a cell where a TrainPatMaxPattern function is placed. In the following operation procedure, a model can be newly trained by using the Button function and making a cell of the TrainPatMaxPattern function enable without opening the "Property Sheet"...
  • Page 27 Select "Conditionally Enabled" in the "Cell State" screen. Click the [Select Cell] button, select the cell where the Button function is placed, and press the  key. Select another image than the one trained when the TrainPatMaxPattern function was placed, and click the cell of the Button function placed in the step 1.
  • Page 28: Using Functions

    Using Functions This section explains how to use functions with examples described in the following sections. Page 26 Using the PatMax pattern function Page 31 Synchronizing a region to feature position Using the PatMax pattern function The following shows the procedure for searching the shape of a work using the PatMax pattern function. Place the TrainPatMaxPattern function and train a model to be searched.
  • Page 29 In the screen to edit model regions, select a region on the work to detect a pattern by dragging the mouse, and press the  key. Alternatively, click the icon ( ) on the toolbar. A model is trained. Check that a green border appears around the trained region. After the completion of the training, '1.000' is displayed in a cell of the GetTrained (vision data access function), which was automatically added to the TrainPatMaxPattern function.
  • Page 30 Placing the FindPatMaxPatterns function Operating procedure Select [Functions] tab  "Vision Tools"  "Pattern Match"  "FindPatMaxPatterns" in the Palette window, and drag and drop it to a spreadsheet. Double-click "Pattern" in the "Property Sheet" screen. Alternatively, select "Pattern" and click the icon ( *1 By double-clicking "Pattern", a cell can be selected as an absolute reference.
  • Page 31 Select the cell where the TrainPatMaxPattern is placed, and press the  key. Double-click "Find Region" in the "Property Sheet" screen. Alternatively, select "Find Region" and click the icon ( ). Select an area where the pattern of a detection target will appear by dragging the mouse, and press the  key. Alternatively, click the icon ( ) on the toolbar.
  • Page 32 Set a tolerance rate for the detection target in the trained pattern. The screen below shows the default tolerance rate. In the default, ±15° of angle change is allowed, and a scale change is not allowed. The tolerance rate should be changed depending on the detection target or installation environment of a vision sensor. For details, refer to [Help] ( ) in the "Property Sheet"...
  • Page 33: Synchronizing A Region To Feature Position

    Synchronizing a region to feature position When the feature of an inspection target moves within the field of vision, creating a fixture is required. Specify a coordinate of the original feature in the "Fixture" parameter of a vision tool function. Operating procedure Double-click a function to be synchronized to display the "Property Sheet"...
  • Page 34: Debugging A Spreadsheet

    Debugging a Spreadsheet Checking cell dependency The recognition of cell dependency (precedent and dependent) can be difficult as a job becomes larger. The source cell (precedent cell) and the destination cell (dependent cell) are indicated by lines by using a job auditing function;...
  • Page 35 Increasing dependency levels The number of arrows increases one level by raising the cell dependency level. Operating procedure Select [View]  [Job Auditing]  [Increase Dependency Levels]. Decreasing dependency levels The number of arrows decreases one level at a time. Operating procedure Select [View] ...
  • Page 36 Reference lines A reference line indicates one dependency which is constituted by one precedent and one dependent. A small circle at the end of the arrow indicates the precedent cell, and the  part of the arrow indicates the destination cell. Blue: Normal precedents Red: Precedents in error Green: Normal dependents...
  • Page 37 When a reference line is displayed in a dashed line, a precedent cell (a small circle at the end of the arrow) is used for switching the cell status (enable/disable) of a dependent cell (the  part of the arrow). In the following example, A3 cell is set to enable/disable the cell status of B2 cell *1 The following shows the setting of cell status in B2 cell.
  • Page 38: Checking An Execution Time Of Each Function

    Checking an execution time of each function An execution time of each function can be checked by using the profile function of each job. A bottleneck function, which is included in a job, can be found to reduce its execution time. Operating procedure Select [Sensor] ...
  • Page 39 Sorting functions by execution time When sorting functions in the execution time order, the functions which take time to execute can be identified easily. Operating procedure Click "Time (ms)". Clicking the header of each column can sort items. Executing profile functions in a part of job Only the job of cells which have dependency can be executed without acquiring an image.
  • Page 40 Displaying cells including a structure The execution time of the main processing can be checked by displaying only cells containing a structure. Operating procedure Select the checkbox of "Structure Only". 2 BASIC OPERATIONS FOR SPREADSHEET 2.6 Debugging a Spreadsheet...
  • Page 41: Setting An Interface

    Setting an Interface By setting an interface, a vision sensor can be monitored in In-Sight Explorer and VisionView. Displaying a custom view The custom view displays the interface created in a spreadsheet using values and a control function. The screen which is suitable to monitor in In-Sight Explorer and VisionView can be configured and displayed. For details on the control function and the custom view, refer to the help of In-Sight Explorer.
  • Page 42: Establishing Communication

    Establishing Communication Communication can be established by the following methods. Page 40 In CC-Link IE Field Network Basic Page 50 In SLMP scanner Page 59 In I/Os In CC-Link IE Field Network Basic CC-Link IE Field Network Basic is a factory automation network using standard Ethernet. A programmable controller with a built-in Ethernet port will be the master station and communicates with slave stations.
  • Page 43 Connecting CC-Link IE Field Network Basic Operating procedure Select [Sensor]  [Network Settings] in In-Sight Explorer. In the "Network Settings" screen, select "CC-Link IE Field Basic" in "Industrial Ethernet Protocols". Click the [OK] button. When the following message appears, click the [Yes] button to restart the vision system. 2 BASIC OPERATIONS FOR SPREADSHEET 2.8 Establishing Communication...
  • Page 44 Set the following items in GX Works3. ● Set a module parameter. Select [Parameter]  "(module name)"  [Module Parameter] in the "Navigation" window, and set the following items in [Basic Settings]  [CC-Link IEF Basic Settings]. • IP address •...
  • Page 45 ● Configure refresh settings. Select [Parameter]  "(module name)"  [Module Parameter] in the "Navigation" window, and set the following items in [Basic Settings]  [CC-Link IEF Basic Settings] "Refresh Settings"  "<Detailed Setting>". Link side CPU side Device name Target Device name Points...
  • Page 46 Double-click the A0 cell (AcquireImage function) in In-Sight Explorer. Set "Industrial Ethernet" for "Trigger" in the "Property Sheet" screen. The setting above enables the programmable controller to control the triggers of a vision sensor. Make a vision sensor online. Select [Online]  [Monitor]  [Device/Buffer Memory Batch Monitor] in GX Works3. Perform the following operations.
  • Page 47 Outputting data Output data from a vision sensor to a programmable controller. Operating procedure Select [Functions] tab  "Input/Output"  "FormatOutputBuffer" in the Palette window of In-Sight Explorer, and drag and drop it to a spreadsheet. Click the [Add] button in the "FormatOutputBuffer" screen, and double-click a cell where a value to be output is entered. Select one cell for each value.
  • Page 48 Make a vision sensor online. Select [Online]  [Monitor]  [Device/Buffer Memory Batch Monitor] in GX Works3. Perform the following operations to check the output operations.  Turn ON 'Trigger Enable' (M1104) of remote output (RY).  Turn ON 'Trigger' (M1105) of remote output (RY). The data from the vision sensor is displayed in 'Inspection Results' (D1005 to D1013) of a remote register (RWr).
  • Page 49 Inputting data Input data from a programmable controller to a vision sensor. Operating procedure Select [Functions] tab  "Input/Output"  "FormatInputBuffer" in the Palette window, and drag and drop it to a spreadsheet. Click the [Add] button in the "FormatInputBuffer" screen to add storage destination for the number of units of data. Select a data type in "Data Type"...
  • Page 50 Select [Functions] tab  "Input/Output"  "Network"  "ReadUserDataBuffer" in the Palette window, and drag and drop it to the spreadsheet. Set the items in the "Property Sheet" screen as follows. Buffer: The cell where the FormatInputBuffer function is placed in the step 1 Protocol: CC-Link IE Field Basic Word Area Select [Functions] tab ...
  • Page 51 Select [Online]  [Monitor]  [Device/Buffer Memory Batch Monitor] in GX Works3, and set the data to be input to a vision sensor as a remote register (RWw). Set data from 'User Data' (D1101) to 'User Data' (D1104) Perform the following operations in the "Device/Buffer Memory Batch Monitor" window. ...
  • Page 52: In Slmp Scanner

    In SLMP scanner SLMP protocol is used for SLMP scanner communication. Device values in a programmable controller can be read and written from a vision sensor. A vision sensor and programmable controller synchronize with a poll interval set in the SLMP scanner setting of In-Sight Explorer.
  • Page 53 Select [Sensor]  [Network Settings] in In-Sight Explorer. In the "Network Settings" screen, select "SLMP Scanner" in "Industrial Ethernet Protocols". Select the [Settings] button under "Industrial Ethernet Protocols". Set the following items in the [Settings] tab in the "SLMP Scanner Settings" screen. Controller Type: PLC series of the programmable controller IP Address: IP address of the programmable controller Host Port: Port number of the programmable controller...
  • Page 54 In the [Device Addressing] tab, set the devices, offsets , and number of devices for each data block as follows. *1 A start address of the device to be used. Name Selected device Offset Number of devices  Control D - Data Register ...
  • Page 55 Click the [Test Connection] button in the [Settings] tab in the "SLMP Scanner Settings" screen. Check if the vision sensor and programmable controller are successfully connected. The red frame shown below is displayed as "Connecting" and the whole screen is turned to gray. When connected, "Connected"...
  • Page 56 Outputting data Output data from a vision sensor to a programmable controller. Operating procedure Select [Functions] tab  "Input/Output"  "FormatOutputBuffer" in the Palette window of In-Sight Explorer, and drag and drop it to a spreadsheet. Click the [Add] button in the "FormatOutputBuffer" screen, and double-click a cell where a value to be output is entered. Select one cell for each value.
  • Page 57 Select [Functions] tab  "Input/Output"  "Network"  "WriteResultsBuffer" in the Palette window, and drag and drop it to the spreadsheet. Set the items in the "Property Sheet" screen as follows. Buffer: The cell where the FormatOutputBuffer function is placed in the step 1 Protocol: SLMP protocol scanner Make a vision sensor online.
  • Page 58 Inputting data Input data from a programmable controller to a vision sensor. Operating procedure Select [Functions] tab  "Input/Output"  "FormatInputBuffer" in the Palette window, and drag and drop it to a spreadsheet. Click the [Add] button in the "FormatInputBuffer" screen to add storage destination for the number of units of data. Select a data type in "Data Type"...
  • Page 59 Select [Functions] tab  "Input/Output"  "Network"  "ReadUserDataBuffer" in the Palette window, and drag and drop it to the spreadsheet. Set the items in the "Property Sheet" screen as follows. Buffer: The cell where the FormatInputBuffer function is placed in the step 1 Protocol: SLMP protocol scanner Select [Functions] tab ...
  • Page 60 Set the data to be input to a vision sensor in a Watch window of GX Works3.  Select [Online]  [Watch]  [Register to Watch Window]  [Watch 1] to [Watch 4].  Enter 'D102' to 'D105' ('User Data' of input word blocks) in the "Name" column in the Watch window, press the  key. ...
  • Page 61: In I/Os

    In I/Os A vision sensor can be controlled and can control other devices by using the inputs and outputs of a built-in I/O and an I/O module. Controlling a vision sensor by the I/Os are shown below. Control Input to a vision sensor Event driven in a spreadsheet Job switching by a job ID number Online or offline control...
  • Page 62 Connecting a vision sensor Operating procedure Select [Sensor]  [Discrete I/O Settings] in In-Sight Explorer. Set the items according to the actual wiring in the "Discrete I/O Settings" screen. ● A built-in I/O line in a vision sensor VS70 contains some common lines used for inputs and outputs. •...
  • Page 63 Select "User Data" for "Signal Type" in the row of "1" in "Input". Cell statuses (Enable/Disable) can be controlled by inputting a built-in I/O. Select "Programmed" for "Signal Type" in the row of "1" in "Output". Data can be output depending on the execution result of a function in the spreadsheet. The details of an output signal can be set in the screen displayed after clicking the [Details] button.
  • Page 64 Switching a cell status (enable/disable) The following shows the procedure for switching the status of a cell (enable/disable) for each input of a built-in I/O. A cell where the DetectBlobs function is placed is used as an example. Operating procedure Select [Functions] tab ...
  • Page 65 To use the input 1, set the items in the "Property Sheet" screen as follows. Start Bit: 1 Number of Bits: 1 When the ReadDiscrete function is placed, the MultiStatus function for visualizing input statuses is placed as well. Right-click the A8 cell and select [Cell State] in the shortcut menu. Select "Conditionally Enabled"...
  • Page 66 Select [Sensor]  [Online] to make the vision sensor online. Input a signal to the input 1. Input a trigger. The value of the ReadDiscrete function is changed from '0.000' to '1.000' in the spreadsheet, and at the same time the color of the lamp for the MultiStatus function is changed from yellow to red *1 In the default, the color of a lamp is displayed as follows.
  • Page 67 Controlling outputs of a built-in I/O The following shows the procedure for controlling output 0 and output 1 depending on the blob dimension (Page 62 Switching a cell status (enable/disable)) calculated by the DetectBlobs function. Blob dimension Output 0 Output 1 Less than 30000 pixels Output Do not output...
  • Page 68 If a blob is not detected, '#ERR' will be displayed as a dimension value (in the H8 cell). In that case, when the H8 cell is directly specified, the error affects the WriteDiscrete function (the A14 cell and A15 cell) By using the ErrFree function, the error propagation can be prevented.
  • Page 69 Select [Functions] tab  "Input/Output"  "Discrete"  "WriteDiscrete" in the Palette window, and drag and drop it to the B14 cell in the spreadsheet. Set the items in the "Property Sheet" screen as follows. Start Bit: 0 Number of Bits: 1 Value: $A$14 2 BASIC OPERATIONS FOR SPREADSHEET 2.8 Establishing Communication...
  • Page 70 Select [Functions] tab  "Input/Output"  "Discrete"  "WriteDiscrete" in the Palette window, and drag and drop it to the B15 cell in the spreadsheet. Set the items in the "Property Sheet" screen as follows. Start Bit: 1 Number of Bits: 1 Value: $A$15 When the WriteDiscrete function is placed, the MultiStatus function for visualizing output statuses is placed as well.
  • Page 71 ■Appearance in a spreadsheet When making the vision sensor online the items are displayed in the spreadsheet as follows. When inputting a trigger, the WriteDiscrete function and MultiStatus function are changed. When the blob dimension is 30000 pixels or larger, the inspection result is as follows. When the blob dimension is less than 30000 pixels, the inspection result is as follows.
  • Page 72: Chapter 3 Creating Jobs

    CREATING JOBS This chapter explains the settings required for creating a job as necessary. Page 70 Acquiring Images Page 71 Setting Regions Page 79 Performing Calibration Page 90 Procedure for Setting Commonly Used Functions Acquiring Images This section explains about image acquisition. A function to acquire an image (AcquireImage function) is predefined in the A0 cell of a spreadsheet.
  • Page 73: Setting Regions

    Setting Regions This section explains a region that is required to be set for a vision tool function. *1 A region for training the model of a pattern, searching for a feature, and inspecting a feature. Page 71 Selecting a rectangular region Page 73 Setting a complex region Selecting a rectangular region The following shows the procedure for selecting a rectangular region.
  • Page 74 To resize the region: drag a size handle on the four corners. ( To bend the region: drag the curve handle ( To rotate the region: drag the rotation handle ( 3 CREATING JOBS 3.2 Setting Regions...
  • Page 75: Setting A Complex Region

    Setting a complex region The EditCompositeRegion function is suitable for detecting the work of an inspection target which compose a complex figure using a vision tool function. In this section, the procedure for selecting regions on the complex figure as shown below is described. Operating procedure Select [Functions] tab ...
  • Page 76 Check the items in the "Property Sheet" screen, and click the [OK] button. Click the button in the cell where the EditCompositeRegion function is placed to make the region selectable. In the default, a region is selected in rectangular shape. 3 CREATING JOBS 3.2 Setting Regions...
  • Page 77 Right-click any space in the screen, and select [Add Subregion]  [Circle] in the shortcut menu. A region that will be 'subtracted' is added. *1 A region which is not used for the function. Drag and drop the region to the position in the following figure. Right-click the region, and select [Subregion Operation] ...
  • Page 78 Right-click any space in the screen, and select [Add Subregion]  [Circle] in the shortcut menu. To exclude the hole included in the region, add a sub-region to the circle. Move the sub-region, and adjust its size to match the hole. Right-click any space in the screen, and select [Add Subregion] ...
  • Page 79 Drag the region to move to an appropriate position. Right-click the region, and select [Subregion Operation]  [Add] in the shortcut menu. The region for 'subtract' is changed to 'add'. Right-click any space in the screen, and select [Add Subregion]  [Circle] in the shortcut menu. To exclude the hole included in the region, add a sub-region to the circle.
  • Page 80 Select and right-click the region to be deleted, and select [Remove Subregion] in the shortcut menu. Unnecessary region is deleted. Press the  key to complete the setting. When using the region using the EditCompositeRegion function for a vision tool function, specify the cell where the EditCompositeRegion function is placed for "External Region"...
  • Page 81: Performing Calibration

    Performing Calibration This section shows how to perform a calibration and how to use its result. *1 Lens radial distortion and inclination of a vision sensor can be adjusted. Place the CalibrateGrid function, and perform calibration. (Page 79 Performing a calibration) Place the TransformImage function, and generate a calibrated image.
  • Page 82 Set the items in the "Property Sheet" screen. When using a calibration plate of 5 mm-square checkerboard with fiducial marks, set the items as follows. Grid Type : Checkerboard, with fiducial Grid Spacing: 5.0000 Grid Unit: Millimeters Lens Model: Radial *1 For details on the grid types, refer to the following section.
  • Page 83 Select "Pose" in the tree on the left side of the "Property Sheet" screen. 3 CREATING JOBS 3.3 Performing Calibration...
  • Page 84 Click the [Live Video] button or [Trigger] button to acquire an image to be calibrated. Adjust the position of the calibration plate while checking the captured image. The calibration pattern is applied, and feature points are detected. 3 CREATING JOBS 3.3 Performing Calibration...
  • Page 85 Click the [Calibrate] button. The result is displayed. 3 CREATING JOBS 3.3 Performing Calibration...
  • Page 86 The 'error' value indicates that how far the position of the predicted feature point from the actual feature point. It varies depending on the lens performance and accuracy of calibration grid. After the completion of a calibration, a calibration structure is created and "Calib" appear in the cell where the CalibrateGrid function is placed.
  • Page 87: Generating A Calibrated Image

    Generating a calibrated image The following show the procedure for generating a calibrated image using calibration result (Page 79 Performing a calibration). Operating procedure Select [Functions] tab  "Coordinate Transforms"  "Calibrate"  "TransformImage" in the Palette window, and drag and drop it to a spreadsheet.
  • Page 88 An image structure and a calibration structure is generated in the spreadsheet. For the image structure, an image which is calibrated by the CaribrateGrid function will be stored. (1) Image taken by a camera (2) Image with no distortion by calibration 3 CREATING JOBS 3.3 Performing Calibration...
  • Page 89: Converting A Unit

    Converting a unit The following shows the procedure for converting a unit. Operating procedure Select [Functions] tab  "Vision Tools"  "Pattern Match"  "TrainPatMaxPattern" in the Palette window, and drag and drop it to a spreadsheet. Set the items in the "Property Sheet" screen as follows. Image: Specify the cell where an image structure of the TransformImage function is placed (Page 85 Generating a calibrated image).
  • Page 90 Select [Functions] tab  "Vision Tools"  "Pattern Match"  "FindPatMaxPatterns" in the Palette window, and drag and drop it to a spreadsheet. Set the items in the "Property Sheet" screen as follows. Image: Specify the cell where an image structure of the TransformImage function is placed (Page 85 Generating a calibrated image).
  • Page 91 Set the items in the "Property Sheet" screen as follows. Calib: Specify a cell on the right side of the TransformImage function (a cell where "Calib" is displayed) (Page 85 Generating a calibrated image). Pattern: Select the cell where the FindPatMaxPatterns function is placed in the step 3. A pattern structure after the conversion and a vision data access function are placed in the spreadsheet.
  • Page 92: Procedure For Setting Commonly Used Functions

    Procedure for Setting Commonly Used Functions This section shows the procedure for setting the following functions. Page 90 Blob detection (ExtractBlobs function) Page 92 Edge inspection (BeadFind function, BeadInspect function) Page 96 OCV/OCR (OCRMax function) Blob detection (ExtractBlobs function) This function detects a work which has an irregular form and measures the dimension of a feature by detecting a blob. Operating procedure Select [Functions] tab ...
  • Page 93 Select "Region" in the "Property Sheet" screen, and click the icon ( The entire image is targeted as a blob detection area. Set "black" for "Color: Blob". Change the values in "Area Limit: Min" and "Area Limit: Max" according to the size of the feature. A blob is detected.
  • Page 94: Edge Inspection (Beadfind Function, Beadinspect Function)

    Edge inspection (BeadFind function, BeadInspect function) These functions detect edge width, chipping, and position gap by inspecting edge feature. The following shows the procedure for training a bead feature using the BeadFind function and inspecting it using the BeadInspect function. *1 A line of glue connecting parts.
  • Page 95 Click the [Find Bead Paths] button to detect a bead feature. When a bead path is detected, a blue line appears on the path. Check that the bead path is recognized as intended, and click the [Train Bead Path] button. After the training, the path is displayed in green.
  • Page 96 Select [Functions] tab  "Vision Tools"  "InspectEdge"  "BeadInspect" in the Palette window, and drag and drop it to the spreadsheet. Double-click "BeadFind" in the "Property Sheet" screen. Select a cell where a bead structure of the BeadFind function is placed, and press the  key. A vision data access function is placed in the spreadsheet.
  • Page 97 To check if a defective part can be detected, load the image of a defective work or acquire an image. When a defective is detected, the defective part is enclosed with a line and a number appear in the image. The information regarding the detective part is displayed in the spreadsheet.
  • Page 98: Ocv/Ocr (Ocrmax Function)

    OCV/OCR (OCRMax function) This function reads characters in an inspection region. Characters which are illegible (corrupted or inclined by a print) can also be read using the OCRMax function. Operating procedure Select [Functions] tab  "Vision Tools"  "OCV/OCR"  "OCRMax" in the Palette window, and drag and drop it to a spreadsheet.
  • Page 99 Click the [Auto-Tune] button in the "Property Sheet" screen. In the "Auto-Tune" screen, enter the characters to be read in "Text", and click the [Fix Segmentation (Automatic)] button. 3 CREATING JOBS 3.4 Procedure for Setting Commonly Used Functions...
  • Page 100 After the process is completed, the "Auto-Segment Results" screen appears. Depending on the characters to be read, two or more results will be displayed. Select an appropriate result and click the [OK] button. The characters read by the OCRMax function are displayed as follows. A vision data access function is placed in the spreadsheet.
  • Page 101: Using Snippets

    Using Snippets Snippet is a term for a re-usable function which includes a predefined cell range. Some snippets are prepared for a vision sensor. A part of a created job can be exported as a snippet. In the [Snipptes] tab in the Pallet window, the list of snippets is displayed. The following shows the procedure for using the prepared snippet, "FindPatMaxFeatures.cxd".
  • Page 102 Using the control function in the snippet, train a model, search a region, and set parameters. (1) EditRegion function for defining model region (2) EditRegion function for defining search region (3) Button for training models (4) Parameters Set a model region and search region, and click the [Train] button. The model is trained and the coordinate can be acquired.
  • Page 103: Appendix

    APPENDIX Appendix 1 Sample Program This section introduces sample programs of a spreadsheet. Features, utilization and sample programs of each function are explained. PatMax Spreadsheet-specific PatMax parameters  PatMax in a spreadsheet consists of two dedicated functions: model training and searching. Additionally, more parameters can be set in the spreadsheet than EasyBuilder.
  • Page 104 ● Elasticity The degree to which PatMax tolerates deformation can be set. Figure 1 shows the difference in execution results when the elasticity value is changed. With high elasticity, high execution result score is maintained even with some parts of the character missing. This parameter does not affect the execution speed of PatMax.
  • Page 105 ● Coarse and fine granularity PatMax performs two-step searching processing. Firstly, PatMax extracts search candidates by searching coarsely, and then detects shapes that match with a trained model by searching across the candidates finely. 'Coarse granularity' can be used for a coarse search, and 'fine granularity' can be used for a fine search (Figure 2).
  • Page 106 Detecting all overlapping works ■Expected scene Figure 3 PatMax pattern search target (1) Detection target (2) Captured image ■Sample program • Display content of spreadsheet • Program contents (1) A2: TrainPatMaxPattern (...) (2) A5: FindPatMaxPatterns (...) APPX Appendix 1 Sample Program...
  • Page 107 ■Program description (1) Use the TrainPatMaxPattern function to train a pattern model. Surround a pattern to be trained in "Pattern Region" (Figure 4). Pattern origin is positioned at the center of the pattern region when the origin is not specified. Set "Pattern Origin" as necessary. Figure 4 Trained model (2) Use the FindPatMaxPatterns function to search the shape of a model trained.
  • Page 108 ■Execution result example Figure 6 Search result of overlapping works according to PatMax pattern APPX Appendix 1 Sample Program...
  • Page 109 Detecting the pattern of a specific color within a color image The PatMaxRedLineColor function can detect a pattern, including not only a shape but also a color of a work. ■Expected scene (1) Detection target (2) Captured image ■Sample program •...
  • Page 110 ■Program description (1) Use the TrainPatMaxRedLineColor function to train a pattern model. Surround a pattern to be trained in "Pattern Region" to register the shape. Set "Selected Colors" for "Match Colors" and specify a color for detecting in "Select Colors" (Figure 8). By selecting a color of a detection target, the function scores based on the color;...
  • Page 111 (2) Use the FindPatMaxRedLineColor function to search the shape of a model trained. Specify a cell of the TrainPatMaxRedLineColor function for "Pattern." Specify the number of works to be detected simultaneously in "Number to Find." In this example, set 4 for "Number to Find" (Figure 9). Additionally, set a value in "Accept Threshold, Color"...
  • Page 112: Findblobs

    FindBlobs Classifying blobs according to geometric properties FindBlobs function is used for sorting blobs which satisfy specified requirements from blobs detected in advance. The function has parameters of angle, area, elongation, holes, perimeter, and spread, and defines requirements according to the parameters.
  • Page 113 Figure 11 Elongation parameter settings in the FindBlobs function property sheet Figure 12 Extracting only specified blobs by using FindBlobs function parameters APPX Appendix 1 Sample Program...
  • Page 114 Detecting a long screw among screws with different length ■Expected scene Find a long screw among screws with different length. A short screw A long screw (detection target) Figure 13 Expected scene image diagram ■Sample program • Display content of spreadsheet •...
  • Page 115 ■Program description (1) Use the ExtractBlobs function to detect screws. Specify "Region" and set 3 for "Number to Sort." Set parameters such as "Area Limit: Min" and "Area Limit: Max" as necessary. When the settings are confirmed, blobs (screws in this example) are detected within the specified region (Figure 14). Figure 14 Detecting the screw part (2) Use the FindBlobs function to detect only the long screw.
  • Page 116 ■Execution result example Figure 16 Detecting only the long screw APPX Appendix 1 Sample Program...
  • Page 117: Surfacefx

    SurfaceFX Specific image tool SurfaceFX is one of the image filter tools. The function processes the four images captured with different lighting directions, and outputs an image with enhanced surface scratches and recessed or raised surfaces. By doing so, emboss-like markings and scratches on a metal surface can be detected easily.
  • Page 118 Images captured with lightening from four different directions are processed by SurfaceFX function Figure 19 Procedure for generating an image using SurfaceFX function APPX Appendix 1 Sample Program...
  • Page 119 Inspecting characters embossed on a plastic ■Expected scene Inspect the accuracy of characters embossed on a plastic by using VS70 with integrated lights. Character recognition of the image captured normally is difficult. Figure 20 Captured image of characters scribed on a plastic APPX Appendix 1 Sample Program...
  • Page 120 ■Sample program • Display content of spreadsheet (10) (11) (12) (13) (14) • Program contents (1) A4: Count ($A$0, 3, 0, 0) (2) A5: If (A4=0, 0, 1) (3) A6: SetEvent (32) (4) A10: EditRegion (...) (5) A14: If ($A$4=1, 1, 0) (6) A15: If ($A$4=2, 1, 0) (7) A16: If ($A$4=3, 1, 0) (8) A17: If ($A$4=0, 1, 0)
  • Page 121 ■Program description (1) Use the Count function to count the number of triggers (Figure 21). Set 3 for "Max Value" to capture an image four times. By doing so, the count value is incremented as 1 → 2 → 3 → 0 (4), so it is reset to zero on the fourth image capture. Figure 21 Count function property sheet (2) The control code to judge whether or not an image is captured four times.
  • Page 122 Figure 22 IntegratedLightControl function property sheet Figure 23 "Cell State" of LatchImage function in D14 cell (14) Use the SurfaceFX function to execute SurfaceFX processing based on the four captured images. Refer to images which are latched using (10) to (13) on the property sheet. Set other parameters as necessary. Additionally, refer to (8) in the "Cell State"...
  • Page 123 Figure 24 SurfaceFX function property sheet ■Execution result example Figure 25 Images before and after applying SurfaceFX APPX Appendix 1 Sample Program...
  • Page 124: Region Structure Function

    Region structure function Dynamic region setting Region structure function is prepared in a spreadsheet. By using this function, a region setting based on the other tool results can be set dynamically. Therefore, an appropriate region can be specified for works with different shapes and sizes (Figure 26).
  • Page 125 Specifying an appropriate region according to the shape and size ■Expected scene Detect an unstructured work piece using a blob tool and inspect it by generating a region based on the information. ■Sample program • Display content of spreadsheet • Program contents (1) A3: ExtractBlobs (...) (2) B6: GetMinRow ($A$3, ...) C6: GetMinCol ($A$3, ...)
  • Page 126 GetMinRow (Blobs structure, Index): MinRow of Blobs → Region function X GetMinCol (Blobs structure, Index): MinCol of Blobs → Region function Y GetHigh (Blobs structure, Index): High of Blobs → Region function High GetWide (Blobs structure, Index): Wide of Blobs → Region function Wide (3) Use the Region function to specify a region.
  • Page 127 Figure 30 Execution result 2 Figure 31 Execution result 3 APPX Appendix 1 Sample Program...
  • Page 128: Master And Slave Communication

    Master and slave communication Data aggregation using master and slave communication Master and slave communication synchronizes triggers, and allows for the slave vision sensors to be triggered in tandem when the master vision sensor is triggered. In a spreadsheet, a master can acquire information obtained in a slave. Therefore, information can be aggregated into the master, when performing inspection using multiple vision sensors for capturing a large work and verifying data acquired from multiple works.
  • Page 129 ■Sample program (master side) • Display content of spreadsheet • Program contents (1) A0: AcquireImage (...) (2) A4: OCRMax (...) (3) B4: GetString ($A$4) (4) A8: ReadResult ($A$0, "Slave," 1000) (5) B8: GetResult ($A$8, 0) (6) A12: Exact (B4, B8) ■Program description (master side) (1) The sensor is set as the master in the AcquireImage function property sheet.
  • Page 130 Set the following parameters. • "Host Name": A host name of a vision sensor which is set as a slave. * In this example, "Slave" is set. (5) Use the GetResult function to acquire read information on a slave side. (6) Use the Exact function to compare the recognized characters between a master and slave, and judges whether the characters are matched completely or are mismatched.
  • Page 131 ■Program description (slave side) (1) The sensor is set as the slave in the AcquireImage function property sheet. Set the following parameters. • "Trigger": Network • "Master": OFF (unselect the checkbox) • "Master Name": A network trigger to be synchronized * In this example, "master"...
  • Page 132: Appendix 2 Commonly Used Functions

    Appendix 2 Commonly Used Functions Blobs Function Description ExtractBlobs To categorize pixels into white and black based on a threshold value to be set, and detect blobs by grouping pixels that touch each other. FindBlobs To score blobs according to the parameters of angle, area, elongation, holes, perimeter, and spread among the blobs detected by using ExtractBlobs, and select blobs that have greater scores than the score set in the AcceptThresh value.
  • Page 133: Identification

    Identification Function Description ReadIDMax To detect and decode 1D or 2D symbols within a region of interest. Character recognition Function Description OCRMax To perform Optical Character Recognition (OCR). Firstly, this function identifies the regions which contain lines of text, and then classifying and train characters by corresponding them to fonts one by one. Characters are identified by comparing the images of characters and trained fonts.
  • Page 134: Calibration

    Calibration Function Description CalibrateGrid To calculate a transformation between pixel and real-world coordinate systems by using calibration grid pattern and plate. Additionally, this function automatically accounts for any optical or perspective distortion present in the lens being used to acquire the image. TransformImage To create an image whose image distortion is corrected, based on the CalibrateGrid function result.
  • Page 135: Revisions

    Japanese manual number: BCN-P5999-1071-C This manual confers no industrial property rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 136: Trademarks

    TRADEMARKS Cognex, EasyBuilder, IDMax, In-Sight, InspectEdge, OCRMax, PatMax, PatMax RedLine, and VisionView are either registered trademarks or trademarks of Cognex Corporation. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies. ...
  • Page 138 Cognex Corporation www.cognex.com BCN-P5999-1072-C(2001) HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice.

Table of Contents