Академический Документы
Профессиональный Документы
Культура Документы
LL
The hardware and portions of the software described in this document may be covered by one
or more of the following U.S. patents. Other U.S. and foreign patents are pending.
Other product and company names mentioned herein are the trademarks, or registered
trademarks, of their respective owners.
LLL
CE Compliance Statement
CE Declaration of Conformity
Manufacturer Cognex Corporation
One Vision Drive
Natick, MA 01760 USA
EN 50082-1
EMC Immunity Standard
LY
Table of Contents
Introduction................................................................................................................... xi
Who Should Read This Book? ................................................................................xi
How to Use This Book .............................................................................................xi
For More Information .............................................................................................. xii
Part 1: Using the Interface ............................................................................................ 1
Chapter 1: Acquiring a Working Image ....................................................................... 2
Acquiring a Working Image ..................................................................................... 2
Step 1 Start In-Sight ................................................................................... 2
Step 2 Adjust the Camera .......................................................................... 3
Chapter 2: Moving Around the Interface..................................................................... 6
What is the Spreadsheet? ....................................................................................... 6
Navigating the In-Sight Interface ............................................................................. 6
Main Menus..................................................................................................... 8
Using the Control Pad ................................................................................... 10
Using the Keyboard....................................................................................... 12
Using the Mouse ........................................................................................... 13
Using Interactive Graphics ............................................................................ 13
Chapter 3: Saving & Loading Jobs............................................................................ 15
What is a Job?....................................................................................................... 15
Lesson: Saving a Job.................................................................................... 15
Lesson: Loading a Job .................................................................................. 16
Chapter 4: Entering Formulas .................................................................................... 17
What is a Formula? ............................................................................................... 17
Cell References............................................................................................. 17
The Formula Editor................................................................................................ 18
Cell Section Mode ......................................................................................... 20
Lesson: Entering Simple Formulas ............................................................... 21
Lesson: Entering Formulas with Cell References ......................................... 21
Lesson: Entering Simple Functions .............................................................. 23
Lesson: Editing Formulas.............................................................................. 24
Chapter 5: Working With Blocks................................................................................ 25
What is a Block?.................................................................................................... 25
Lesson: Marking a Block ............................................................................... 25
Lesson: Editing Blocks .................................................................................. 26
Y
Chapter 6: Using Property Sheets ............................................................................. 30
What is a Property Sheet? .................................................................................... 30
What is a Structure?.............................................................................................. 31
Lesson: Opening A Property Sheet .............................................................. 31
Lesson: Changing Parameter Values ........................................................... 31
Lesson: Using Interactive Graphics .............................................................. 32
Lesson: Inserting Cell References in Values ................................................ 34
Lesson: Inserting Formulas in Values........................................................... 34
Part 2: Vision Processing ........................................................................................... 37
Chapter 7: Acquiring Images ..................................................................................... 38
How Does the Spreadsheet Update?.................................................................... 38
Lesson: Acquiring From Manual Triggers ..................................................... 38
Lesson: Acquiring from External Triggers..................................................... 39
Chapter 8: Finding Features....................................................................................... 41
Why Do I Need to Find Features?......................................................................... 41
Finding Connected Regions .................................................................................. 42
Lesson: Finding Connected Regions Using ExtractBlobs ............................ 42
Lesson: Finding Connected Regions Using FindBlobs................................. 45
Lesson: Finding Connected Regions Using SortBlobs ................................. 47
Finding Edges........................................................................................................ 49
Lesson: Finding Edges Using FindLine ........................................................ 50
Lesson: Finding Edges Using FindSegment................................................. 53
Lesson: Finding Edges Using FindMultiLine................................................. 54
Lesson: Finding Edges Using FindCurve ..................................................... 56
Lesson: Finding Edges Using FindCircle ...................................................... 59
Finding Patterns .................................................................................................... 62
Lesson: Finding Patterns Using FindPatterns .............................................. 62
Chapter 9: Using Features to Find Objects .............................................................. 66
Why Combine Features?....................................................................................... 66
Lesson: Using PointToLine ........................................................................... 67
Lesson: Using LineToLine ............................................................................ 70
Lesson: Using PointToPointAngle ................................................................ 73
Lesson: Creating a Fixture............................................................................ 75
Chapter 10: Making Measurements ........................................................................... 79
What is a Measurement? ...................................................................................... 79
Lesson: Counting Pixels ............................................................................... 79
Lesson: Counting Features........................................................................... 84
Lesson: Measuring Distances....................................................................... 84
YL
Chapter 11: Creating Decision Points ....................................................................... 88
What is a Decision Point? ..................................................................................... 88
Converting Measurements into Decision Points ................................................... 88
Comparison................................................................................................... 89
Logical ........................................................................................................... 89
Conditionals .................................................................................................. 89
Decision Point Formula Examples ........................................................................ 89
Chapter 12: Communicating Results ........................................................................ 91
Using Discrete Output ........................................................................................... 91
Lesson: Configuring Discrete Output Options............................................... 92
Lesson: Writing Discrete Outputs ................................................................. 93
Using Serial Output ............................................................................................... 95
Lesson: Configuring Serial Output Options................................................... 95
Lesson: Writing Serial Outputs ..................................................................... 96
Chapter 13: Making a Run-time Interface.................................................................. 98
What is a Custom View? ....................................................................................... 98
Lesson: Understanding Graphics Functions ................................................. 99
Lesson: Defining a Custom View ................................................................ 102
Chapter 14: Configuring for Startup........................................................................ 105
Lesson: Selecting the Startup Job....................................................................... 105
Appendix A: The Profiler .......................................................................................... 106
Appendix B: Remote Job Selection......................................................................... 107
Lesson: Initiating a Job Load............................................................................... 107
Lesson: Responding to a Job Load..................................................................... 108
Appendix C: Sample Images .................................................................................... 110
YLL
List of Figures
YLLL
Figure 8-11. FindLine Function Inserted in Spreadsheet........................................... 52
Figure 8-12. FindSegment Property Sheet ................................................................ 53
Figure 8-13. FindSegment Function Inserted in Spreadsheet ................................... 54
Figure 8-14. FindMultiLine Property Sheet ................................................................ 55
Figure 8-15. FindMultiLine Function Inserted in Spreadsheet ................................... 56
Figure 8-16. Defining a FindCurve Region ................................................................ 57
Figure 8-17. FindCurve Function Inserted in Spreadsheet........................................ 58
Figure 8-18. FindCircle Property Sheet ..................................................................... 59
Figure 8-19. Defining a FindCircle Region................................................................. 60
Figure 8-20. FindCurve Function Inserted in Spreadsheet........................................ 61
Figure 8-21. FindPatterns Property Sheet ................................................................. 62
Figure 8-22. Defining a Model Region ....................................................................... 63
Figure 8-23. Defining a Find Region .......................................................................... 64
Figure 8-24. FindPatterns Function Inserted in Spreadsheet .................................... 65
Figure 9-1. PointToLine Function............................................................................... 67
Figure 9-2. PointToLine Property Sheet .................................................................... 68
Figure 9-3. PointToLine Function Inserted in Spreadsheet ....................................... 69
Figure 9-4. LineToLine Function ................................................................................ 70
Figure 9-5. LineToLine Property Sheet...................................................................... 71
Figure 9-6. LineToLine Function Inserted in Spreadsheet......................................... 72
Figure 9-7. PointToPointAngle Function .................................................................... 73
Figure 9-8. PointToPointAngle Property Sheet.......................................................... 74
Figure 9-9. PointToPointAngle Function Inserted in Spreadsheet............................. 75
Figure 9-10. Fixture in the Spreadsheet .................................................................... 76
Figure 9-11. PlotCross Property Sheet ...................................................................... 77
Figure 9-12. PlotCross Function Inserted in Spreadsheet......................................... 78
Figure 10-1. ExtractHistogram Property Sheet .......................................................... 80
Figure 10-2. Defining an ExtractHistogram Region ................................................... 81
Figure 10-3. ExtractHistogram Function Inserted in Spreadsheet............................. 82
Figure 10-4. FindMultiLine Function .......................................................................... 85
Figure 10-5. PairEdges Property Sheet ..................................................................... 86
Figure 10-6. PairEdges Function Inserted in Spreadsheet........................................ 87
L[
Figure 12-1. Discrete Output Dialog .......................................................................... 92
Figure 12-2. Output Details Dialog............................................................................. 93
Figure 12-3. WriteDiscrete Property Sheet ................................................................ 94
Figure 12-4. Serial Port 1 Dialog................................................................................ 95
Figure 12-5. WriteSerial Property Sheet .................................................................... 97
Figure 13-1. Custom View.......................................................................................... 98
Figure 13-2. Graphics Control Functions ................................................................. 100
Figure 13-3. Graphics Display Functions................................................................. 101
Figure 13-4. Configuring a Custom View in the Spreadsheet.................................. 102
Figure 13-5. Custom View Dialog ............................................................................ 103
Figure 13-6. Custom View of the Spreadsheet........................................................ 104
Figure 14-1. Startup Dialog...................................................................................... 105
Figure A-1. In-Sight Profiler ..................................................................................... 106
Figure B-1. Discrete Input Dialog............................................................................. 107
Figure C-2. Discrete Output Dialog.......................................................................... 108
Figure C-3. Discrete Output Details Dialog.............................................................. 109
Figure C-1. Image1A.bmp........................................................................................ 110
Figure C-2. Image1B.bmp........................................................................................ 111
Figure C-3. Image1C.bmp ....................................................................................... 111
Figure C-4. Image2A.bmp........................................................................................ 112
Figure C-5. Image2B.bmp........................................................................................ 112
List of Tables
[
Introduction
Welcome to In-Sight, a compact, stand-alone machine vision sensor for automated
inspection and process control. In-Sights innovative, built-in spreadsheet interface greatly
simplifies the task of developing, operating, and maintaining vision applications.
NOTE: The screen captures shown and the features described in this book are current
as of version 2.00 of the In-Sight firmware. Visit the In-Sight Online Support
Center at www.cognex.com/inSight to download updated documentation, if
available.
[L
For More Information
Other resources available to help you learn about the In-Sight vision sensor and its
spreadsheet interface include:
The following documents describe how to connect the vision processor, digital camera,
control pad, and other components. They also contain specifications, mechanical
drawings, and other hardware details:
Installing the In-Sight 1000
Cognex P/N 590-6346 (English)
Cognex 590-6346F (French)
Cognex 590-6346J (Japanese)
Installing the In-Sight 3000
Cognex P/N 590-6348 (English)
Cognex 590-6348F (French)
Cognex 590-6348J (Japanese)).
In-Sight Guide and Reference, an HTML Help file provided on the In-Sight CD-ROM.
In-Sight computer-based tutorials, which are included on CD-ROM with In-Sight Starter
Accessories Kits.
The In-Sight Online Support Center at
http://www.cognex.com/insight/support/support.asp.
[LL
Part 1: Using the Interface
The chapters in this part of the book introduce the basic components of the spreadsheet
interface. You will learn how to acquire an image from the In-Sight camera and how to navigate
the interface.
1
Chapter 1: Acquiring a Working Image
In this chapter, you will see how to start In-Sight and capture a working image to use in learning
the In-Sight graphic user interface.
2
Chapter 1: Acquiring a Working Image
NOTE: For specific information on navigating within the In-Sight interface, refer to
Navigating the Interface in the In-Sight Guide & Reference contained on your
In-Sight CD-ROM.
To adjust the camera:
1. Open the System menu (see Figure 1-1).
3
Getting Started with In-Sight
2. Select Live from the System menu to put the system into live video mode. This will
temporarily remove the semitransparent spreadsheet overlay (see Figure 1-2).
4
Chapter 1: Acquiring a Working Image
4. Press any key or button to return to the spreadsheet (see Figure 1-3).
You now have a working image to use as you learn about the In-Sight spreadsheet interface in
the following chapters.
5
Chapter 2: Moving Around the Interface
In this chapter, youll learn the basics of navigating in the In-Sight interface using the control
pad, a keyboard, or a mouse.
6
Chapter 2: Moving Around the Interface
Table 2-1 lists the methods by which each type of In-Sight Interface can be navigated:
7
Getting Started with In-Sight
Main Menus
The In-Sight interface has three main menus, as shown in Figure 2-1: System, Enter, and Edit.
8
Chapter 2: Moving Around the Interface
9
Getting Started with In-Sight
NOTE: For a comprehensive list of control pad actions by context within the interface,
refer to Navigating the Interface in the In-Sight Guide & Reference contained on
your In-Sight CD-ROM.
Direction Action
Buttons Buttons
Shortcut Buttons
Direction Buttons
The four Direction Buttons are used in many common operations, including interface
navigation, manipulating graphic regions of interest, incrementing/decrementing numeric
values, and selecting ranges of cells. The exact behavior of the direction buttons is context-
sensitive.
The up direction button moves the on-screen highlight up, decreases the size of a
graphic region, and increments numeric values. In the spreadsheet, pressing ZKLOH
holding the button selects an entire column of cells.
The down direction button moves the highlight down, increases the size of a graphic
region, and decrements numeric values.
The left direction button moves the highlight left, decreases the width of a graphic
region, rotates a graphic region counter-clockwise, curves a graphic region up, and
selects a digit to increment in a numeric value.
The right direction button moves the highlight right, increases the width of a graphic
region, rotates a graphic region clockwise, curves a graphic region down, and selects a
digit to increment in a numeric value. In the spreadsheet, pressing ZKLOHKROGLQJWKH
button selects an entire row of cells.
10
Chapter 2: Moving Around the Interface
Action Buttons
The four Action Buttons are used to open menus, enter formula and values, and manipulate
interactive graphics.
In the spreadsheet, the up action button opens the System menu. In all other contexts
throughout the interface, the button cancels changes and escapes to the previous
menu or dialog. It works much like pressing the ESC key on a computer keyboard.
The down action button selects the highlighted item and performs an action. The
button also opens the Enter menu, but only if it is pressed and held. Otherwise, if
pressed and immediately released the button automatically selects the highlighted
item, or accepts any changes you have just made. Its function is similar to pressing
ENTER on a computer keyboard.
The left action button accesses various editing shortcuts, including backspace in the
formula editor, and zeroing numbers when in numeric edit mode. However, the most
common use of the left action button is to access Interactive Graphics mode.
The right action button opens the Edit menu in the spreadsheet and in property sheets,
and maximizes numbers when in numeric edit mode.
Shortcut Buttons
The two buttons in the center of the control pad perform two shortcuts:
A The left-center button labeled "A" manually triggers an image acquisition and updates
the spreadsheet.
B The right-center button labeled "B" switches between the default view and the Custom
View of the current spreadsheet job.
11
Getting Started with In-Sight
NOTE: For a comprehensive list of keyboard actions by context within the interface,
refer to Navigating the Interface in the In-Sight Guide & Reference contained on
your In-Sight CD-ROM.
| and Selects spreadsheet rows, columns, and cell ranges for block editing
operations.
vcxz
Opens the Enter menu, selects highlighted items, and accepts changes.
@
^ Switches between the default and the Custom View of the spreadsheet.
Any alphanumeric
Inputs values, strings, and formulas.
character or symbol.
12
Chapter 2: Moving Around the Interface
NOTE: For a comprehensive list of mouse actions by context within the interface, refer
to Navigating the Interface in the In-Sight Guide & Reference contained on your
In-Sight CD-ROM
Selects/opens items throughout the entire interface. Also accepts changes made
Left-click
to values.
Opens the Enter menu in the spreadsheet and in property sheets, and adjusts
Left-click and hold
interactive graphics.
In the spreadsheet, opens the Edit menu and the System menu, depending on
whether the right-click action occurs on a selected cell, or outside the selection.
Right-click
Opens the Edit menu in property sheets. Cycles between interactive graphics
modes.
Right-click and drag Selects spreadsheet rows, columns, and cell ranges for block editing operations.
Press . Or, press and hold Left-click and hold to open the
to open the Enter menu, then
choose Graphics.
" Enter menu, then choose
Graphics.
When you access an interactive graphic, the semitransparent spreadsheet or property sheet
overlay will disappear, and the graphic will be displayed on top of the image. If the highlighted
cell or value has an associated graphic, the graphic will appear in red on the image beneath the
semitransparent spreadsheet or property sheet overlay (If a cell or value does not have an
associated graphic, then the default interactive graphics mode will be Zoom).
13
Getting Started with In-Sight
There are 5 types of interactive graphics: regions, circles, crosses, points, and lines. The type
of graphic displayed depends on the type of input required by the cell or value.
NOTE: For a comprehensive list of interactive graphic actions for each input device,
refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM.
14
Chapter 3: Saving & Loading Jobs
In this chapter, you will learn how to save and load In-Sight Jobs.
What is a Job?
A Job file (*.JOB) is an In-Sight spreadsheet containing formulas and text which performs a
specific set of machine vision tasks. Job file storage is limited to the amount of available flash
memory on the In-Sight 1000 and In-Sight 3000 sensor. File storage is virtually unlimited on an
In-Sight PC Host. The name of the job currently loaded is displayed in the lower-left corner of
the Save & Load dialog. If the current job has not been saved, it will be "Unnamed."
NOTE: All work entered in the spreadsheet remains in memory as long as the processor
has power or the In-Sight PC Host is open. However, if the processor loses
power or you close the In-Sight PC Host, you will lose all unsaved data.
Therefore, make sure you save your jobs.
15
Getting Started with In-Sight
3. Highlight < New >, then select Save to open a Text Entry dialog (see Figure 3-2).
16
Chapter 4: Entering Formulas
In this chapter, you will learn how to enter formulas into In-Sight spreadsheet cells.
What is a Formula?
A formula is a mathematical expression consisting of values and references to values,
connected by mathematical operators, and resulting in a new value or set of values. In-Sight
considers everything you enter into a cellwhether a single constant or a complex vision-
processing functionto be a formula. All formulas contained in an In-Sight job spreadsheet are
constructed using the formula editor (see below).
Formulas can return three types of results:
Values Numbers, such as 1.00 or 1.00.
Strings Alphanumeric characters, such as PASS or FAIL.
Structures A vision-processing function (structures are discussed Chapter 6: Using
Property Sheets).
Cell References
Formulas can refer to other cells in the spreadsheet by using absolute and relative cell
references.
Relative cell references point to cells relative to the position of the formula. When copied or
moved to a new location in the spreadsheet, these references automatically adjust to maintain
the same position relative to the formula, as in the following examples:
A5=A3+A4 If this formula is copied to cell B5, it becomes B5=B3+B4.
A5=A3+A4 If this formula is copied to cell A6, it becomes A6=A4+A5.
Absolute cell references point to fixed locations in the spreadsheet, regardless of the formulas
location. They do not change when the formula is copied or moved. Absolute cell references
are designated by a dollar sign ($) preceding the cells row or column label. By placing the
dollar sign appropriately, you can refer to a fixed row, column, or cell, as in the following
examples:
A5=$A$3+$A$4 If this formula is copied to cell B5, it becomes B5=$A$3+$A$4.
A5=A$3+A$4 If this formula is copied to cell B5, it becomes B5=B$3+B$4.
17
Getting Started with In-Sight
Formula Bar
Onscreen Keypad
Function Categories
Context-Sensitive Help
18
Chapter 4: Entering Formulas
Onscreen Keypad: The onscreen keypad occupies the left side of the formula editor
dialog. In addition to the keys for inserting numeric characters and mathematical operators
into formulas, the onscreen keypad provides keys for inserting cell references and text into
a formula, as follows:
Inserts an Absolute cell reference symbol into the formula. Complete the cell
reference by manually inserting an alpha character for the Column, and a numeric
character for the Row, after the $ character (for example, $A1).
Activates Cell Selection mode, for choosing an Absolute cell reference to insert into
the formula.
Activates Cell Selection mode, for choosing a Relative cell reference to insert into
the formula.
Opens the Text Entry dialog for inserting strings of alphanumeric characters and
Symbols into the formula.
Function List: A list of tool categories and subcategories occupies the center and right
sections of the formula editor. As a tool category is highlighted in the center, a list of that
categorys functions appears in the right section, organized within subcategories. The
current category and function selections are indicated by a V\PERO
Context Sensitive Help: The bottom part of the formula editor dialog contains context-
sensitive help text for quick reference.
19
Getting Started with In-Sight
When cells have been highlighted and selected, the display switches back to the property sheet
or dialog from which cell selection mode was initiated, and the references for those cells are
inserted.
In Figure 4-2, references for cells C7 and D7 will be inserted into the formula contained in cell
A11. If more cells were selected than can be used as references at the insertion point of the
formula, then only the first cell of the selection, cell C7, will be inserted and the reference to cell
D7 will be discarded.
20
Chapter 4: Entering Formulas
21
Getting Started with In-Sight
6. Repeat step 3, but select a different cell reference to insert in the formula.
22
Chapter 4: Entering Formulas
23
Getting Started with In-Sight
24
Chapter 5: Working With Blocks
In this chapter, you will learn how to manipulate blocks of cells in a spreadsheet.
What is a Block?
A Block is a contiguous, rectangular group of cells in a spreadsheet. You can cut, copy, paste,
clear, hide, insert, and remove blocks using functions in the Edit menu.
25
Getting Started with In-Sight
Copy
Copies a block of cells and stores its formulas in the systems internal clipboard, leaving the
original formulas in place in the spreadsheet.
To copy a block of cells:
1. Mark the block you want to copy, as described in the previous lesson.
2. Select Copy from the Edit menu.
Cut
Cuts a block of cells and stores its formulas in the systems internal clipboard, removing the
formulas from the spreadsheet.
To cut a block of cells:
1. Mark the block you want to cut, as described in the previous lesson.
2. Select Cut from the Edit menu.
26
Chapter 5: Working with Blocks
Paste
Pastes previously copied formulas contained in the systems internal clipboard back to the
spreadsheet.
To paste a block of cells:
1. Highlight the upper-left cell of the blocks new location.
2. Select Paste from the Edit menu.
Clear
Clearing cells permanently deletes their contents. Cleared cells cannot be pasted back into the
spreadsheet.
To clear a block of cells:
1. Mark the block of cells you want to clear.
2. Select Clear from the Edit menu.
NOTE: You cannot select rows and columns at the same time.
To select columns of cells:
Control Pad Keyboard Mouse
Press and hold button.
Press |+c to mark Left-click on a column label
Press up ( GLUHFWLRQ at the top of the
button to mark current current column.
spreadsheet.
column.
Right-click and hold while
Press right ( GLUHFWLRQ Press x to mark adjacent dragging right or left to
button to mark additional columns to the right. mark additional columns.
columns.
27
Getting Started with In-Sight
28
Chapter 5: Working with Blocks
29
Chapter 6: Using Property Sheets
In this chapter, you will learn how to use functions by configuring arguments in property sheets.
30
Chapter 6: Using Property Sheets
What is a Structure?
In-Sight functions that return structures differ from conventional spreadsheet functions. Instead
of returning a single value or text string to a cell, most functions that return structures
automatically insert an array of additional functions and values into adjacent cells. Figure 6-2
shows an example of a typical structure.
Function
Array of
Functions/Values
Structure Name
31
Getting Started with In-Sight
3. Open the Enter menu (see Figure 6-3), which includes the following items:
Number: Inserts a constant value into an edit box, check box, list box, or Interactive
Graphic.
Relative: Switches to Cell Selection mode for selecting a cell from the spreadsheet
to use as a relative reference.
Absolute: Switches to Cell Selection mode for selecting a cell from the spreadsheet
to use as an absolute reference.
Formula: Activates the formula editor.
Graphics: Switches to Interactive Graphics mode for changing the size and position
of the interactive graphic, if available.
32
Chapter 6: Using Property Sheets
sheets allow you to adjust most image-related parameter groups as a single Interactive
Graphic.
NOTE: For a comprehensive list of interactive graphic actions for each input device,
refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM.
To use an Interactive Graphic:
1. Highlight the cell in the spreadsheet containing the Hist structure, which was created
earlier.
2. Open the ExtractHistogram property sheet.
3. Expand the Region group. Highlight the X parameter value and switch to Interactive
Graphics mode (see Figure 6-4).
4. Accept or cancel changes that were made to the interactive graphic. This will return you
to the ExtractHistogram property sheet.
5. Select OK to accept your changes, or select Cancel to leave the property sheet
unchanged.
33
Getting Started with In-Sight
34
Chapter 6: Using Property Sheets
3. Use the formula editor to insert your formula directly into the parameter value, as shown
in Figure 6-5.
35
Part 2: Vision Processing
In the previous chapters you learned how to navigate the In-Sight interface. In the following
chapters, you will learn the basic techniques for configuring a vision application in the
spreadsheet.
37
Chapter 7: Acquiring Images
In this chapter, youll learn how to acquire images, set image acquisition parameters, and
trigger processing.
Live Mode
Live video mode acquires and displays images in rapid succession while the spreadsheet
overlay is temporarily disabled. This is useful when making camera adjustments.
To initiate Live video mode:
1. Open the System menu.
2. Select Live to enter Live mode.
3. Press any button to exit live mode and return to the spreadsheet.
NOTE: Any spreadsheet function that depends on the acquired image updates
automatically when Live mode terminates.
NOTE: Disabling the Manual trigger checkbox in the AcquireImage Property sheet also
disables the single acquisition trigger from the control pad.
38
Chapter 7: Acquiring Images
NOTE: All external trigger sources are disabled when the system is Offline. To go
Online, return to the spreadsheet, open the System menu, and check the Online
option.
39
Getting Started with In-Sight
Acquisition Parameters
Other parameter values in the AcquireImage function also control important image acquisition
parameters. These parameters include:
Exposure Image exposure time can be set in milliseconds. A smaller number reduces
the blurring of an object in motion. A larger numbers allows more light on the
imaging sensor.
Light Power Light power parameters can be set to control the current on up to four
independent LED light sources (In-Sight 3000 only).
Gain/Offset Analog gain and offset parameters can be set to adjust the voltage of the
analog video signal before it is converted a digital signal.
To adjust any of these parameters go to cell A0 and open the AcquireImage property sheet.
Changes will take effect when you accept your changes.
40
Chapter 8: Finding Features
In this chapter, you will learn several techniques for locating individual object features in the
field of view.
Curved Edge
Hole
Straight Edge
Irregular Shape
While In-Sight can find and report the position of an object in its entirety, you will generally want
to identify and find the objects most important features first; finding individual features is
sometimes easier than finding the object itself.
This approach not only allows you to extract data about individual features, but also enables
you to efficiently combine those features to locate the object or to evaluate its quality relative to
a known specification.
41
Getting Started with In-Sight
This chapter discusses In-Sights primary tools for finding these types of features:
Connected regions (Blobs)
Edges
Patterns
Subsequent chapters describe basic techniques for combining features to find objects, make
measurements, and create decision points based on those measurements.
42
Chapter 8: Finding Features
3. Under Vision Processing, select ExtractBlobs from the Blob subcategory to open the
ExtractBlobs property sheet (see Figure 8-2).
43
Getting Started with In-Sight
4. Expand the Region group. Highlight the X parameter value and switch to Interactive
Graphics mode (see Figure 8-3).
44
Chapter 8: Finding Features
The ExtractBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-4), along
with the Vision Data Access function GetNFound:
GetNFound Returns the number of Blobs found.
NOTE: You can configure ExtractBlobs to return more detailed data about each of the
Blobs it extracts by entering a value for Number to Sort in the property sheet.
45
Getting Started with In-Sight
5. Highlight the Blobs parameter value, and switch to Cell Selection mode. Select the cell
containing the Blobs structure (see Figure 8-5).
NOTE: The cell you select in the spreadsheet will provide the source Blob data for the
FindBlobs function.
6. Complete the property sheet by specifying the number of Blobs to find.
7. Select OK to accept your changes.
46
Chapter 8: Finding Features
The FindBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-6), plus
several Vision Data Access functions that return data describing each Blob found. The most
significant of these functions are these:
GetRow Returns the row centroid (Row).
GetCol Returns the column centroid (Col).
GetAngle Returns the Blob angle (Angle).
GetScore Returns the magnitude of the match (Score).
NOTE: Our objective in this lesson is simply to find Blob objects. We are not concerned
about Blob Color, Area, Elongation, Perimeter, or Spread at this point.
47
Getting Started with In-Sight
5. Select the Blobs structure cell containing the ExtractBlobs function (see Figure 8-7).
48
Chapter 8: Finding Features
8. The SortBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-8), plus
several Vision Data Access functions that return data describing the sorted Blobs:
GetRow Returns the row centroid (Row).
GetCol Returns the column centroid (Col).
GetAngle Returns the Blob angle (Angle).
GetScore Returns the magnitude of the match (Score).
Finding Edges
Edges are places in the image where the brightness changes abruptly from dark-to-light or
light-to-dark. Edges found by In-Sight are referred to as line segments, and can be straight or
curved, or can form a complete circle.
The In-Sight interface provides a variety of functions for locating straight and curved edges:
FindLine Finds a single straight line segment.
FindSegment Finds a pair of straight line segments.
FindMultiLine Finds multiple straight line segments.
FindCurve Finds an arc segment.
FindCircle Finds a complete circular edge.
49
Getting Started with In-Sight
50
Chapter 8: Finding Features
5. Position the region so that the Y axis is perpendicular to the edge to be located, then
accept your changes. An example is shown in Figure 8-10.
NOTE: The FindLine region box has two direction arrows, one initially pointing down
and the other pointing right. The arrow pointing down is on the X axis, and the
arrow pointing right is on the Y axis. Scanning for straight edges occurs in the
direction indicated by the arrow on the regions Y axis.
6. Adjust the remaining parameters as necessary.
NOTE: When parameters in the FindLine property sheet refer to black-to-white or white-
to-black polarity, they are referring to brightness transitions occurring in the
scan direction.
7. Select OK to accept your changes.
51
Getting Started with In-Sight
The FindLine function inserts an Edges structure in the spreadsheet (see Figure 8-11), along
with several Vision Data Access functions that return data about the edge segment found:
GetRow Returns the starting and ending row coordinates (Row0 and Row1).
GetCol Returns the starting and ending column coordinates (Col0 and Col1).
GetScore Returns the magnitude of the edge peak (Score).
NOTE: The reported score is positive when the FindLine region is oriented to scan from
dark to bright features, and negative when scanning from bright to dark features.
52
Chapter 8: Finding Features
53
Getting Started with In-Sight
The FindSegment function inserts an Edges structure in the spreadsheet (see Figure 8-13),
along with two additional Vision Data Access functions:
PairDistance Returns the distance between the two edge segments (Distance).
GetScore Returns the average magnitude of the two edge peaks (Score).
54
Chapter 8: Finding Features
You configure the FindMultiLine function in the same way as the FindLine function. Figure 8-14
gives an example of the FindMultiLine property sheet.
55
Getting Started with In-Sight
The FindMultiLine function inserts an Edges structure in the spreadsheet (see Figure 8-15),
along with the Vision Data Access function GetNFound:
GetNFound Returns the number of edges found.
NOTE: Unlike FindLine, FindMultiLine does not automatically place row and column
coordinate access functions into the Edges structure for all straight edges found.
If you need to access the coordinates of a specific edge or pair of edges, you can
manually insert the GetRow and GetCol functions into the spreadsheet.
56
Chapter 8: Finding Features
6. Adjust the region so that its Y axis is concentric with the curved edge to be located (see
Figure 8-16), and accept your changes.
NOTE: The FindCurve region box has two direction arrows, one initially pointing down
and the other pointing right. The arrow pointing down is on the X axis, and the
arrow pointing right is on the Y axis. Scanning for curved edges occurs in the
direction indicated by the arrow on the regions X axis.
7. Adjust the remaining parameter values as needed.
NOTE: When parameters in the FindCurve property sheet refer to black-to-white or
white-to-black polarity, they are referring to brightness transitions occurring in
the scan direction.
8. Select OK to accept your changes.
57
Getting Started with In-Sight
The FindCurve function inserts an Edges structure in the spreadsheet (see Figure 8-17), along
with several Vision Data Access functions that return data about the curved edge that was
found:
GetRow Returns the center, starting, and ending row coordinates (CentRow,
StartRow, and EndRow).
GetCol Returns the center, starting, and ending column coordinates (CentCol,
StartCol, and EndCol).
GetRadius Returns the Radius.
GetScore Returns the magnitude of the edge peak (Score).
NOTE: The reported score is positive when the FindCurve region is oriented to scan
from dark to bright features, and negative when scanning from bright to dark
features.
58
Chapter 8: Finding Features
59
Getting Started with In-Sight
You configure a FindCircle function in the same way as other edge finding functions, except
that instead of defining a region with Curve and Angle, you define a Torus with an Inner Radius
and Outer Radius (see Figure 8-19).
60
Chapter 8: Finding Features
The FindCircle function inserts an Edges structure in the spreadsheet (see Figure 8-20), along
with several Vision Data Access functions that return data about the circular edge that was
found:
GetRow Returns the center row coordinate (CentRow).
GetCol Returns the center column coordinate (CentCol).
GetRadius Returns the radius (Radius).
GetScore Returns the magnitude of the edge peak (Score).
NOTE: Scanning for circular edges occurs from the center of the circle outward. When
parameters in the FindCircle property sheet refer to black-to-white or white-to-
black polarity, they are referring to brightness transitions occurring in the scan
direction.
61
Getting Started with In-Sight
Finding Patterns
In-Sight can locate objects and other image features in the field of view by training a model of
a pattern, then searching subsequent images for matching patterns. The In-Sight FindPatterns
function combines model training and pattern matching into a single function.
62
Chapter 8: Finding Features
5. Position the region so that it completely encloses the model you intend to train, then
accept your changes. An example is shown in Figure 8-22.
63
Getting Started with In-Sight
7. Position the region so that it completely encloses the section of the image containing the
pattern to be located, then accept your changes. An example is shown in Figure 8-23.
64
Chapter 8: Finding Features
The FindPatterns function inserts a Patterns structure in the spreadsheet (see Figure 8-24),
along with several Vision Data Access functions that return data about the pattern that was
found:
GetRow Returns the row coordinate (Row).
GetCol Returns the column coordinate (Col).
GetScale Returns the pattern scale offset (Scale).
GetAngle Returns the pattern angle offset (Angle).
GetScore Returns the magnitude of the match (Score).
65
Chapter 9: Using Features to Find Objects
In this chapter, youll learn how to use the results of the features found in Chapter 8 to reliably
find objects.
66
Chapter 9: Using Features to Find Objects
Input Point
67
Getting Started with In-Sight
3. Under Geometry, select PointToLine from the Measure subcategory to open the
PointToLine property sheet (see Figure 9-2).
68
Chapter 9: Using Features to Find Objects
The PointToLine function automatically inserts a Dist structure in the spreadsheet (see Figure
9-3), along with several Vision Data Access functions that return data about the newly created
line segment between the input point and the input line segment:
GetRow Returns the starting and ending row coordinates (Row0 and Row1).
GetCol Returns the starting and ending column coordinates (Column0 and
Column1).
GetAngle Returns the Angle between the input point and line segment.
GetDistance Returns the Distance between the input point and the line segment.
69
Getting Started with In-Sight
Input Line
Segment 0
Input Line
Segment 1
70
Chapter 9: Using Features to Find Objects
3. Under Geometry, select LineToLine from the Measurements subcategory to open the
LineToLine property sheet (see Figure 9-5).
71
Getting Started with In-Sight
The LineToLine function inserts a Dist structure in the spreadsheet (see Figure 9-6), along with
several Vision Data Access functions that return data about newly created line segment:
GetRow Returns the starting and ending row coordinates (Row0 and Row1).
GetCol Returns the starting and ending column coordinates (Column0 and
Column1).
GetAngle Returns the Angle between the two input lines.
GetDistance Returns the Distance between the two lines.
NOTE: The GetDistance function returns a 0 if the two input lines intersect. If the lines
are parallel, GetDistance returns a positive value and GetAngle returns a 0.
72
Chapter 9: Using Features to Find Objects
73
Getting Started with In-Sight
74
Chapter 9: Using Features to Find Objects
The PointToPointAngle function inserts a single function into the spreadsheet (see Figure 9-9).
PointToPointAngle Returns the angle between the two input points.
NOTE: The GetAngle function simply returns the angle value to the spreadsheet. You
may want to add a label for this value in an adjacent cell, as shown in Figure 9-9.
Creating a Fixture
The most common type of fixture uses the average row and column coordinates from two
features, and the angle of rotation between them.
To create a fixture:
1. Identify the coordinates in the spreadsheet for the two points you will use for the fixture,
and (if necessary) determine the angle of rotation between those points using the
GetAngle function.
2. Highlight an empty cell and open the formula editor. Enter a formula that calculates the
average (mean) row value between the two points.
3. Select OK in the formula editor to accept your changes and return to the spreadsheet.
75
Getting Started with In-Sight
4. Highlight the empty cell adjacent to the row formula. Repeat step 2 to enter an average
column value formula between the two points.
5. Select OK in the formula editor to accept your changes and return to the spreadsheet.
6. Highlight the cell adjacent to the column value formula and select Relative from the
Enter menu to enter Cell Selection mode.
7. Select the cell that contains the PointToPointAngle formula between the two points.
NOTE: It is generally a good idea to identify fixture coordinates in the spreadsheet by
adding a text label to an adjacent empty cell. This makes the fixture coordinates
easier to identify when referencing them from within other functions (see Figure
9-10).
76
Chapter 9: Using Features to Find Objects
77
Getting Started with In-Sight
A cross then appears on top of the image at the fixture coordinate location (see Figure 9-12).
Any function that refers to the fixture will position itself in the image relative to this location.
The following chapter includes an example of how to use a fixture by referencing it from within
another function.
78
Chapter 10: Making Measurements
This chapter will show you how to use In-Sights image measurement techniques.
What is a Measurement?
Machine vision inspections rely on measurements to yield decisions, where a measurement
can be any useful data derived from the features located on an object.
In the previous lesson, we laid the groundwork for making measurements by describing various
techniques for locating objects in the field of view. Once you register an object in the image by
its coordinates (row, column, and theta), then measurements can be made in specific regions
that are fixtured relative to the native coordinate system of the object.
NOTE: Grayscale images contain up to 256 gray levels, where each pixel has a
grayscale value between 0 and 255. The Histogram counts the number of pixels
in a region for each gray level. To count the pixels in a region below a specified
threshold level, simply sum the Histogram array from zero up to the threshold
level.
79
Getting Started with In-Sight
The In-Sight interface supplies a number of functions that allow you to count pixels and make
other useful grayscale measurements. The most important of these functions are:
ExtractHistogram Extract a histogram array from an image region.
HistThresh Compute an adaptive threshold level.
HistCount Sum a specified section of the histogram array.
Using ExtractHistogram
To insert the ExtractHistogram function into the spreadsheet:
1. Highlight an empty cell in column A.
NOTE: The row you select plus one row above should be empty.
2. Open the formula editor.
3. Under Vision Processing, select ExtractHistogram from the Histogram subcategory to
open the ExtractHistogram property sheet.
4. If you have a fixture that you want to use to position this histogram measurement,
highlight the fixture parameter group and expand it. Highlight the row parameter value
switch to Cell Selection mode. Select the cells containing the coordinates (row, column,
and theta) that define the fixture. Accept your selection and return to the
ExtractHistogram property sheet (see Figure 10-1).
80
Chapter 10: Making Measurements
5. Expand the Region group. Highlight the X parameter value and switch to Interactive
Graphics mode. Position the region over the section of the image from which to extract
the histogram (see Figure 10-2). Accept your changes to return to the ExtractHistogram
property sheet.
81
Getting Started with In-Sight
The ExtractHistogram function is now positioned relative to the fixture point. As the objects
location and orientation vary, the fixture tracks the object, and the ExtractHistogram function
operates within the intended region, as shown in Figure 10-3.
The ExtractHistogram function inserts a Hist structure in the spreadsheet. It also inserts several
related functions that return data from the histogram. These include:
HistThresh The binary threshold (Thresh). Bright values are above the grayscale
threshold; dark values are below the grayscale threshold.
HistContrast The average grayscale of the bright pixels minus the average grayscale of
the dark pixels (Contrast).
HistCount The count of pixels above and below the threshold (BrightCount and
DarkCount, respectively).
HistMean The Average grayscale value of all pixels in the histogram.
NOTE: It is useful to examine the functions created by ExtractHist to help you better
understand the use of histogram related functions.
82
Chapter 10: Making Measurements
Using HistThresh
As previously described, the ExtractHistogram function automatically inserts the HistThresh
function into the spreadsheet. HistThresh sets a reference to the cell containing the Hist
structure and the range to compute the threshold. The maximum range is 0 to 255.
To change the threshold range:
1. Highlight an empty cell and open the formula editor.
2. Under Vision Processing, select HistThresh from the Histogram subcategory to open
the HistThresh property sheet.
3. Use the formula editor to insert a cell reference to an existing Hist structure and set the
last two arguments to 0 and 255, respectively.
4. Select OK.
The spreadsheet will now contain a HistThresh function that returns a threshold level.
NOTE: The threshold level returned by HistThresh is computed by finding the threshold
level that produces the best match between the original grayscale image and a
hypothetical binary image. This technique works quite well over a range of image
conditions but is not suited for every application.
Using HistCount
This function takes as its input a reference to a cell containing an ExtractHistogram function
and a range over which to count.
To insert HistCount into the spreadsheet:
1. Highlight an empty cell and open the formula editor.
2. Under Vision Processing, select HistCount from the Histogram subcategory to open
the HistThresh property sheet.
3. Use the formula editor to insert a cell reference to an existing histogram structure and set
the last two arguments to specify the range.
NOTE: The range to count is commonly set from zero to the threshold level or from the
threshold level to 255.
4. Select OK.
The spreadsheet will now contain a HistCount function returning a count of the number of pixels
in the histogram array whose grayscale values fall between the specified level.
83
Getting Started with In-Sight
NOTE: For counting purposes, these functions are typically registered to the object
being inspected using a fixture. This decreases the processing time necessary to
find the features, and prevents potential confusion with unwanted features.
TIP: When counting Edges and Patterns, be aware that the N2Find parameter in the
property sheets of the FindMultiLine and FindPatterns functions determines the
maximum number of features that can be reported.
To count Blob, Edge, or Pattern features:
1. Highlight an empty cell and open the formula editor.
2. Highlight and expand the Edges, Blobs, or Patterns function subcategory under Vision
Data Access.
3. Select the GetNFound function in the selected function subcategory. The formula editor
will open again. Highlight the Absolute Cell Reference button and Cell Selection mode.
4. Select the cell that refers to the source Edges, Blobs, or Patterns structure.
5. Select OK to return to the spreadsheet.
The GetNFound function will insert itself into the spreadsheet and return the number found for
the selected feature.
84
Chapter 10: Making Measurements
Using PairEdges
Edge pairs consist of two parallel edges that typically define the boundaries of an object
feature. In an array of multiple edges, it is also possible to have multiple edge pairs. For
example, an Edges structure containing six edges can have up to three edge pairs: (0,1), (2,3),
and (4,5).
The PairEdges function inputs an array of edges and sorts them into pairs according to
distance, polarity, and other characteristics.
To identify edge pairs:
1. Highlight an empty cell and open the formula editor.
2. Under Vision Processing, select FindMultiLine from the Edges subcategory. Verify that
at least two edge features are found. The example in Figure 10-4 shows four edges being
located.
NOTE: For this lesson, configure FindMultiLine so its region intersects some repeating
pattern of edges. Make sure you set the N2Find parameter large enough to cover
the maximum number of edges expected.
85
Getting Started with In-Sight
4. Under Vision Processing, select PairEdges from the Edges subcategory and open the
PairEdges property sheet (see Figure 10-5).
86
Chapter 10: Making Measurements
The spreadsheet will now contain the PairEdges function (see Figure 10-6), plus several
functions that report statistics about the edge pairs found:
NumPairs The number of edge pairs found (GetNFound).
MinDist The shortest distance between the two edges in a pair (PairMinDistance).
MaxDist The farthest distance between the two edges in a pair (PairMaxDistance).
MeanDist The average distance between the two edges in a pair (PairMeanDist).
SDevDist The standard deviation of the distance between two edges in a pair
(PairSDevDistance).
87
Chapter 11: Creating Decision Points
In this chapter, you will learn several basic techniques for converting measurements into
decisions.
88
Chapter 11: Creating Decision Points
Comparison
Under the Mathematics heading, the Operators category contains a complete selection of
comparison operators, including:
> Greater than
< Less than
= Equal to
>= Greater than or equal to
<= Less than or equal to
Logical
Under the Mathematics heading, the Logic category contains a selection of logical operators,
including:
And Logically ANDs multiple input arguments
Or Logically ORs multiple input arguments
Not Logical inverse of the input argument
Conditionals
Under the Mathematics heading, the Lookup category contains a selection of logic and error
handling functions that include:
If Returns one of two input arguments
Choose Returns one on N input arguments
CountErr Counts #ERRs over a range of cells
In this example, the text strings PASS and FAIL are substituted for the values 0 and 1 of the
previous example. If the value of A1 is greater than the value of B1 and less than the value of
C1, the function returns the string PASS; otherwise, the function returns FAIL.
D1 = If(A1<B1,FAIL,If(A1<C1,WARNING,PASS))
This example demonstrates how to nest the If function to determine more than two categories.
If A1 is less than B1, it returns FAIL; however, if A1 is less than C1, it returns WARNING, and if
A1 is greater than or equal to C1 it returns PASS.
D1 = Choose((A1>=B1)+(A1>=C1),FAIL,WARNING,PASS))
This example uses the Choose function to achieve the same result as in the previous example.
If A1 is less than both B1 and C1, the first argument evaluates to 0 and FAIL is the output. If
A1 is greater than B1 but less than C1, the first argument evaluates to 1 and WARNING is the
output. If A1 is greater than or equal to both B1 and C1, the first argument evaluates to 2, and
PASS is the output.
D1 = IF(CountErr(A1),0,A1>B1)
This example compares the contents of the cell A1 to the contents of cell B1. If the value of A1
is greater than the value of B1, and A1 is not #ERR, then the function returns 1; otherwise it
returns 0.
NOTE: This is an important example because it shows how to filter errors from the
output. Normally, a function that inputs #ERR also outputs #ERR. The CountErr
function blocks the propagation of #ERR throughout the spreadsheet by
returning a count of all #ERRs within its input range.
90
Chapter 12: Communicating Results
This chapter shows you how to configure In-Sights discrete and serial outputs to communicate
inspection results to external devices.
NOTE: The number of accessible outputs varies between the In-Sight 1000 and In-Sight
3000:
System Output Channels
In-Sight 1000 2 built-in on the camera
2 built-in on the processor
In-Sight 3000
8 additional using optional I/O Expansion Module
91
Getting Started with In-Sight
92
Chapter 12: Communicating Results
4. Select Details to open the Output Details dialog. This dialog contains three controls (see
Figure 12-2):
Pulse Enable for pulsed output (Delay Count must be 0); disable for steady
state.
Length (ms) Duration of pulse.
Delay Count The number of acquisition or tracking pulses to delay the output.
Discrete Output port settings are system-wide and are automatically saved when you press OK.
93
Getting Started with In-Sight
2. Under Input/Output, select WriteDiscrete from the Discrete subcategory to open the
WriteDiscrete property sheet (see Figure 12-3).
94
Chapter 12: Communicating Results
95
Getting Started with In-Sight
Text Standard ASCII protocol for sending/receiving text strings. To define the input
and output terminator characters, press the Details button to open the Text
Mode Details dialog.
Native Custom ASCII protocol for controlling In-Sight from any remote serial device.
To define the input and output terminator characters, press the Details button
to open the Native Mode Details dialog.
DeviceNet Protocol for communicating with Allen-Bradley PLC (requires an optional,
DeviceNet Interface Module from Cognex). To define the input and output data
packets sizes, press the Details button to open the DeviceNet Details dialog.
Motoman Protocol for communicating with Motoman MRC, MRC-II, and XRC robot
controllers operating in DCI mode.
Unused Closes the serial port so that no commands or data can be received/sent.
Note Refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM for
more detailed information on the commands and functions available for serial
mode.
96
Chapter 12: Communicating Results
97
Chapter 13: Making a Run-time Interface
This chapter will show you how to construct a run-time user interface.
98
Chapter 13: Making a Run-time Interface
Graphical Controls
Graphical controls allow operators to adjust application parameters without entering
spreadsheet View. Control functions include:
Button A labeled push button control.
CheckBox A labeled check box control.
Dialog A labeled dialog box control.
EditFloat An edit box control for entering floating-point values.
EditInt An edit box control for entering integer values.
EditRegion An interactive region control button.
EditString An edit box control for entering text strings.
Link A labeled link control.
ListBox A drop-down list control.
MessageBox A "pop-up" message box containing a user-defined text string.
Select Executes the Graphics Controls function contained in a spreadsheet cell,
chosen from a variable list of indexed cell references.
Wizard A Wizard control.
99
Getting Started with In-Sight
NOTE: In spreadsheet mode, you can link controls to generate events or to change the
behavior or properties of other functions. For example, you can create a button
that will reset the values accumulated in other cells by having those cells
reference the button. When the button is pressed it returns a 1; any cells with
formulas that depend on the state of the button will be affected.
For a comprehensive review of controls, refer to the In-Sight Guide and Reference located on
the CD-ROM.
Graphical Displays
You will want to show only the most useful information in Custom View. For instance, if your
application finds a blob and you would like the custom view to display one of the blobs row and
column coordinates, simply include the cells containing the GetRow and GetCol function in the
cells of the Custom View region.
In addition to the standard formulas, you can use special display functions to format data for
visual verification. These Graphics functions are contained in the Displays subcategory and
include the following functions (see Figure 13-3):
100
Chapter 13: Making a Run-time Interface
Chart A strip chart that can be inserted into the spreadsheet to graphically display the
value of a cell over multiple events.
ColorLabel A text cell with programmable foreground and background colors.
MultiStatus Displays up to 16 status lights within a single cell, indicating bit values.
Status A status light that displays in red, yellow, or green depending on the current
value.
101
Getting Started with In-Sight
102
Chapter 13: Making a Run-time Interface
3. Select Custom View to open the Custom View dialog (see Figure 13-5).
103
Getting Started with In-Sight
Graphics, and Custom View Overlay in the display will not be refreshed,
even if their respective checkboxes are turned ON.
Absolute Creates the cell reference that controls the conditional screen refresh
enabled by if. The cell reference specified by Absolute is enabled only
when if is checked.
5. Select OK to accept your changes.
To test your Custom View configuration, check Custom View mode in the Custom View dialog
and select OK. An example of Custom View is shown in Figure 13-6.
104
Chapter 14: Configuring for Startup
This chapter shows you how to configure your system to start a job automatically on power-up.
105
Appendix A: The Profiler
The Profiler dialog displays execution times and dependencies for all of the cells in the current
job spreadsheet that contain formulas and data (and excluding cells containing only text). This
information is most useful while trying to improve spreadsheet performance, because the
functions that take the most time to execute can be easily identified for possible optimization.
The Profiler dialog is also helpful when trying to identify the formulas and functions that are
causing errors in a spreadsheet.
NOTE: Execution times for identical jobs on an In-Sight 1000, In-Sight 3000, and In-Sight
PC Host will vary according to the processing capabilities of the respective
systems.
NOTE: The Profiler dialog is not accessible in Online mode, or when the current user is
logged in with a Protected or Locked level of Access.
To open the Profiler:
1. Open the System menu.
2. Select Profiler to open the Profiler dialog (see Figure A-1).
Note Refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM for
more detailed information on the In-Sight Profiler.
106
Appendix B: Remote Job Selection
In some applications, it is necessary to select a new job by remote control. In-Sight makes this
possible by allowing you to configure discrete input and output lines for the purpose of job
selection (In-Sight 3000 sensors only).
Note You must have physical I/O connections to the In-Sight 3000 processor as
described in Installing the In-Sight 3000 before following the procedures
described below.
107
Getting Started with In-Sight
Note In order to use the Job ID Number feature, the job to be loaded must be saved
with a numerical prefix (0-511). The Job ID Number is constructed by combining
the job ID number bits in order from least significant to most significant. For
example: two job ID number bits will allow you to select a job with a numeric
prefix of 0 to 3; three job ID number bits allow job selection with a numeric prefix
of 0 to 7; and four job ID number bits allow job selection with a numeric prefix of
0 to 15.
7. Select OK to accept your selection.
The system is now configured to load the job given by the job ID number bits whenever the bit
associated with the job load switch is pulsed.
108
Appendix B: Remote Job Selection
6. Select Details for the selected output line and open the Discrete Output Details dialog to
change the length of the pulse, if needed (see Figure C-3).
109
Appendix C: Sample Images
The images printed below are included to assist you in following along with the lessons in this
book.
To use these images, setup the camera as described in Chapter 1: Acquiring a Working Image.
If you are using a 16-mm lens, the lens should be positioned approximately 10- to 11-inches
(250- to 275-millimeters) above the page.
Note These images are included on the CD-ROM that ships with each In-Sight system
(Image1A.bmp, Image1B.bmp, Image1C.bmp, Image2A.bmp, and Image2B.bmp).
110
Appendix C: Sample Images
111
Getting Started with In-Sight
112
Index
Index
A
Absolute Cell Reference............................................................................................................. 17
Acquiring an Image....................................................................................................................... 2
Acquiring Images ........................................................................................................................ 38
Acquisition Parameters............................................................................................................... 40
B
Blocks ......................................................................................................................................... 25
C
CE Compliance Statement ...........................................................................................................iv
Cell References .......................................................................................................................... 17
Absolute .................................................................................................................................. 17
Relative ................................................................................................................................... 17
Cell Section Mode....................................................................................................................... 20
Clear ........................................................................................................................................... 27
Combining Features ................................................................................................................... 66
Communicating Results.............................................................................................................. 91
Connected Regions .................................................................................................................... 42
Context Sensitive Help ............................................................................................................... 19
Control Pad................................................................................................................................. 10
Action Buttons ......................................................................................................................... 11
Direction Buttons..................................................................................................................... 10
Shortcut Buttons...................................................................................................................... 11
Converting Measurements into Decision Points......................................................................... 88
Copy ........................................................................................................................................... 26
Creating Decision Points ............................................................................................................ 88
Custom View............................................................................................................................... 98
Cut .............................................................................................................................................. 26
D
Decision Point Formula Examples.............................................................................................. 89
Decision Points ........................................................................................................................... 88
Dialogs
Save & Load............................................................................................................................ 15
Save Job ................................................................................................................................. 16
Discrete Output........................................................................................................................... 91
113
Getting Started with In-Sight
E
Edges.......................................................................................................................................... 49
Editing Blocks ............................................................................................................................. 26
Clear........................................................................................................................................ 27
Copy........................................................................................................................................ 26
Cut........................................................................................................................................... 26
Paste ....................................................................................................................................... 27
Editing Formulas......................................................................................................................... 24
Entering Formulas ...................................................................................................................... 17
F
Features...................................................................................................................................... 41
Finding Edges............................................................................................................................. 49
Finding Features......................................................................................................................... 41
Finding Patterns ......................................................................................................................... 62
Formula....................................................................................................................................... 17
Formula Bar ................................................................................................................................ 18
Formula Editor ............................................................................................................................ 18
Function List ............................................................................................................................... 19
G
Graphical Controls...................................................................................................................... 99
Graphical Displays.................................................................................................................... 100
H
Hide/Unhide Rows & Columns ................................................................................................... 27
I
Inserting and Removing Rows ................................................................................................... 29
Interactive Graphics.................................................................................................................... 13
J
Job .............................................................................................................................................. 15
Job Load ................................................................................................................................... 107
Initiating................................................................................................................................. 107
Responding........................................................................................................................... 108
K
Keyboard .................................................................................................................................... 12
L
Live Mode ................................................................................................................................... 38
Loading a Job ............................................................................................................................. 16
114
Index
M
Marking a Block .......................................................................................................................... 25
Measurements ............................................................................................................................ 79
Mouse ......................................................................................................................................... 13
Moving Around the Interface ........................................................................................................ 6
N
Navigating..................................................................................................................................... 6
Navigating Menus ......................................................................................................................... 8
Navigation
Control Pad ............................................................................................................................. 10
Keyboard................................................................................................................................. 12
Mouse ..................................................................................................................................... 13
O
Onscreen Keypad ....................................................................................................................... 19
P
Paste........................................................................................................................................... 27
Patterns ...................................................................................................................................... 62
Property Sheets .......................................................................................................................... 30
R
Relative Cell Reference.............................................................................................................. 17
Remote Job Selection .............................................................................................................. 107
Run-time Interface ...................................................................................................................... 98
S
Sample Images......................................................................................................................... 110
Saving & Loading Jobs............................................................................................................... 15
Saving a Job ............................................................................................................................... 15
Serial Output............................................................................................................................... 95
Single Acquire Mode .................................................................................................................. 38
Spreadsheet ................................................................................................................................. 6
Spreadsheet Update................................................................................................................... 38
Starting In-Sight ............................................................................................................................ 2
Startup Configuration................................................................................................................ 105
Startup Job ............................................................................................................................... 105
Structure ..................................................................................................................................... 31
T
The Profiler ............................................................................................................................... 106
U
Using Features to Find Objects .................................................................................................. 66
115
www.cognex.com/insight/
P/N 590-6368
March 2001